Introduce factory method for IVF frame generator
Bug: webrtc:10138 Change-Id: I9039aa289c935b7fcc2f3ab4ddec6413eb1302c4 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161324 Reviewed-by: Patrik Höglund <phoglund@webrtc.org> Commit-Queue: Artem Titov <titovartem@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30011}
This commit is contained in:
parent
749f6604a1
commit
fd76b5fe86
@ -459,6 +459,7 @@ if (rtc_include_tests) {
|
||||
":frame_generator_api",
|
||||
"../system_wrappers",
|
||||
"../test:video_test_common",
|
||||
"../test:video_test_support",
|
||||
"//third_party/abseil-cpp/absl/types:optional",
|
||||
]
|
||||
}
|
||||
|
||||
@ -13,6 +13,7 @@
|
||||
#include <utility>
|
||||
|
||||
#include "test/frame_generator.h"
|
||||
#include "test/testsupport/ivf_video_frame_generator.h"
|
||||
|
||||
namespace webrtc {
|
||||
namespace test {
|
||||
@ -35,6 +36,12 @@ std::unique_ptr<FrameGeneratorInterface> CreateFromYuvFileFrameGenerator(
|
||||
frame_repeat_count);
|
||||
}
|
||||
|
||||
// Creates a frame generator that repeatedly plays an ivf file.
|
||||
std::unique_ptr<FrameGeneratorInterface> CreateFromYuvFileFrameGenerator(
|
||||
std::string file) {
|
||||
return std::make_unique<IvfVideoFrameGenerator>(std::move(file));
|
||||
}
|
||||
|
||||
std::unique_ptr<FrameGeneratorInterface>
|
||||
CreateScrollingInputFromYuvFilesFrameGenerator(
|
||||
Clock* clock,
|
||||
|
||||
@ -41,6 +41,10 @@ std::unique_ptr<FrameGeneratorInterface> CreateFromYuvFileFrameGenerator(
|
||||
size_t height,
|
||||
int frame_repeat_count);
|
||||
|
||||
// Creates a frame generator that repeatedly plays an ivf file.
|
||||
std::unique_ptr<FrameGeneratorInterface> CreateFromYuvFileFrameGenerator(
|
||||
std::string file);
|
||||
|
||||
// Creates a frame generator which takes a set of yuv files (wrapping a
|
||||
// frame generator created by CreateFromYuvFile() above), but outputs frames
|
||||
// that have been cropped to specified resolution: source_width/source_height
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user