Add optional visualization file writers to VideoProcessor tests.

The purpose of this visualization CL is to add the ability to record
video at the source, after encode, and after decode, in the VideoProcessor
tests. These output files can then be replayed and used as a subjective
complement to the objective metric plots given by the existing Python
plotting script.

BUG=webrtc:6634

Review-Url: https://codereview.webrtc.org/2700493006
Cr-Commit-Position: refs/heads/master@{#16738}
This commit is contained in:
brandtr
2017-02-21 03:59:15 -08:00
committed by Commit bot
parent 7d59f6b1c4
commit 872104ac41
20 changed files with 669 additions and 349 deletions

View File

@ -490,11 +490,12 @@ int main(int argc, char* argv[]) {
webrtc::VP8Encoder* encoder = webrtc::VP8Encoder::Create();
webrtc::VP8Decoder* decoder = webrtc::VP8Decoder::Create();
webrtc::test::Stats stats;
webrtc::test::FrameReaderImpl frame_reader(config.input_filename,
config.codec_settings->width,
config.codec_settings->height);
webrtc::test::FrameWriterImpl frame_writer(config.output_filename,
config.frame_length_in_bytes);
webrtc::test::YuvFrameReaderImpl frame_reader(config.input_filename,
config.codec_settings->width,
config.codec_settings->height);
webrtc::test::YuvFrameWriterImpl frame_writer(config.output_filename,
config.codec_settings->width,
config.codec_settings->height);
frame_reader.Init();
frame_writer.Init();
webrtc::test::PacketReader packet_reader;
@ -507,9 +508,11 @@ int main(int argc, char* argv[]) {
packet_manipulator.InitializeRandomSeed(time(NULL));
}
webrtc::test::VideoProcessor* processor =
new webrtc::test::VideoProcessorImpl(encoder, decoder, &frame_reader,
&frame_writer, &packet_manipulator,
config, &stats);
new webrtc::test::VideoProcessorImpl(
encoder, decoder, &frame_reader, &frame_writer, &packet_manipulator,
config, &stats, nullptr /* source_frame_writer */,
nullptr /* encoded_frame_writer */,
nullptr /* decoded_frame_writer */);
processor->Init();
int frame_number = 0;