video_file_writer.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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. #include <string>
  13. #include "api/scoped_refptr.h"
  14. #include "rtc_tools/video_file_reader.h"
  15. namespace webrtc {
  16. namespace test {
  17. // Writes video to file, determining YUV or Y4M format from the file extension.
  18. void WriteVideoToFile(const rtc::scoped_refptr<Video>& video,
  19. const std::string& file_name,
  20. int fps);
  21. // Writes Y4M video to file.
  22. void WriteY4mVideoToFile(const rtc::scoped_refptr<Video>& video,
  23. const std::string& file_name,
  24. int fps);
  25. // Writes YUV video to file.
  26. void WriteYuvVideoToFile(const rtc::scoped_refptr<Video>& video,
  27. const std::string& file_name,
  28. int fps);
  29. } // namespace test
  30. } // namespace webrtc
  31. #endif // RTC_TOOLS_VIDEO_FILE_WRITER_H_