Paulina Hensman | b671d46 | 2018-09-14 09:32:00 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license |
| 5 | * that can be found in the LICENSE file in the root of the source |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | #ifndef RTC_TOOLS_VIDEO_FILE_WRITER_H_ |
| 11 | #define RTC_TOOLS_VIDEO_FILE_WRITER_H_ |
| 12 | |
Paulina Hensman | b671d46 | 2018-09-14 09:32:00 | [diff] [blame] | 13 | #include <string> |
| 14 | |
Mirko Bonadei | d970807 | 2019-01-25 19:26:48 | [diff] [blame] | 15 | #include "api/scoped_refptr.h" |
Paulina Hensman | b671d46 | 2018-09-14 09:32:00 | [diff] [blame] | 16 | #include "rtc_tools/video_file_reader.h" |
| 17 | |
| 18 | namespace webrtc { |
| 19 | namespace test { |
| 20 | |
| 21 | // Writes video to file, determining YUV or Y4M format from the file extension. |
| 22 | void WriteVideoToFile(const rtc::scoped_refptr<Video>& video, |
| 23 | const std::string& file_name, |
| 24 | int fps); |
| 25 | |
Yves Gerey | 3cb5e5b | 2019-03-21 10:22:42 | [diff] [blame] | 26 | // Writes Y4M video to file. |
| 27 | void WriteY4mVideoToFile(const rtc::scoped_refptr<Video>& video, |
| 28 | const std::string& file_name, |
| 29 | int fps); |
| 30 | |
| 31 | // Writes YUV video to file. |
| 32 | void WriteYuvVideoToFile(const rtc::scoped_refptr<Video>& video, |
| 33 | const std::string& file_name, |
| 34 | int fps); |
| 35 | |
Paulina Hensman | b671d46 | 2018-09-14 09:32:00 | [diff] [blame] | 36 | } // namespace test |
| 37 | } // namespace webrtc |
| 38 | |
| 39 | #endif // RTC_TOOLS_VIDEO_FILE_WRITER_H_ |