[PCLF] Add ability to use fixed frame reate for video dump
Bug: b/237997865 Change-Id: I4e93db1f8a0ac84d8d1c014073cbcd0f58482203 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/268763 Commit-Queue: Artem Titov <titovartem@webrtc.org> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/main@{#37547}
This commit is contained in:
parent
bfe9f5c5b1
commit
208129fb53
@ -307,6 +307,9 @@ class PeerConnectionE2EQualityTestFixture {
|
||||
// video frames to be dumped. Modulo equals X means every Xth frame will be
|
||||
// written to the dump file. The value must be greater than 0.
|
||||
int output_dump_sampling_modulo = 1;
|
||||
// If set to true uses fixed frame rate while dumping output video to the
|
||||
// file. `fps` will be used as frame rate.
|
||||
bool output_dump_use_fixed_framerate = false;
|
||||
// If true will display input and output video on the user's screen.
|
||||
bool show_on_screen = false;
|
||||
// If specified, determines a sync group to which this video stream belongs.
|
||||
|
||||
@ -185,6 +185,7 @@ if (!build_with_chromium) {
|
||||
":quality_analyzing_video_decoder",
|
||||
":quality_analyzing_video_encoder",
|
||||
":simulcast_dummy_buffer_helper",
|
||||
"../..:fixed_fps_video_frame_writer_adapter",
|
||||
"../..:test_renderer",
|
||||
"../../../api:array_view",
|
||||
"../../../api:peer_connection_quality_test_fixture_api",
|
||||
|
||||
@ -21,6 +21,7 @@
|
||||
#include "test/pc/e2e/analyzer/video/quality_analyzing_video_decoder.h"
|
||||
#include "test/pc/e2e/analyzer/video/quality_analyzing_video_encoder.h"
|
||||
#include "test/pc/e2e/analyzer/video/simulcast_dummy_buffer_helper.h"
|
||||
#include "test/testsupport/fixed_fps_video_frame_writer_adapter.h"
|
||||
#include "test/video_renderer.h"
|
||||
|
||||
namespace webrtc {
|
||||
@ -203,8 +204,13 @@ VideoQualityAnalyzerInjectionHelper::MaybeCreateVideoWriter(
|
||||
// TODO(titovartem) create only one file writer for simulcast video track.
|
||||
// For now this code will be invoked for each simulcast stream separately, but
|
||||
// only one file will be used.
|
||||
auto video_writer = std::make_unique<test::Y4mVideoFrameWriterImpl>(
|
||||
file_name.value(), config.width, config.height, config.fps);
|
||||
std::unique_ptr<test::VideoFrameWriter> video_writer =
|
||||
std::make_unique<test::Y4mVideoFrameWriterImpl>(
|
||||
file_name.value(), config.width, config.height, config.fps);
|
||||
if (config.output_dump_use_fixed_framerate) {
|
||||
video_writer = std::make_unique<test::FixedFpsVideoFrameWriterAdapter>(
|
||||
config.fps, clock_, std::move(video_writer));
|
||||
}
|
||||
test::VideoFrameWriter* out = video_writer.get();
|
||||
video_writers_.push_back(std::move(video_writer));
|
||||
return out;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user