| * Copyright (c) 2019 The WebRTC project authors. All Rights Reserved. |
| * Use of this source code is governed by a BSD-style license |
| * that can be found in the LICENSE file in the root of the source |
| * tree. An additional intellectual property rights grant can be found |
| * in the file PATENTS. All contributing project authors may |
| * be found in the AUTHORS file in the root of the source tree. |
| #ifndef TEST_TESTSUPPORT_VIDEO_FRAME_WRITER_H_ |
| #define TEST_TESTSUPPORT_VIDEO_FRAME_WRITER_H_ |
| #include "api/video/video_frame.h" |
| #include "rtc_base/buffer.h" |
| #include "rtc_base/critical_section.h" |
| #include "test/testsupport/frame_writer.h" |
| // Writes webrtc::VideoFrame to specified file with y4m frame writer |
| VideoFrameWriter(std::string output_file_name, |
| virtual ~VideoFrameWriter(); |
| bool WriteFrame(const webrtc::VideoFrame& frame); |
| rtc::Buffer ExtractI420BufferWithSize(const VideoFrame& frame, |
| const std::string output_file_name_; |
| std::unique_ptr<FrameWriter> frame_writer_; |
| #endif // TEST_TESTSUPPORT_VIDEO_FRAME_WRITER_H_ |