Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1219)

Unified Diff: webrtc/modules/video_coding/codecs/test/videoprocessor.h

Issue 2956243002: Add SetCodecSettings method for configuring VideoCodec settings. (Closed)
Patch Set: address comment Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/video_coding/codecs/test/videoprocessor.h
diff --git a/webrtc/modules/video_coding/codecs/test/videoprocessor.h b/webrtc/modules/video_coding/codecs/test/videoprocessor.h
index 1177772dd3bfcd41cc7c319d457ccdc9ab6fdccd..cb15912de8a61228a69ae8380bdd3e5a10cddedc 100644
--- a/webrtc/modules/video_coding/codecs/test/videoprocessor.h
+++ b/webrtc/modules/video_coding/codecs/test/videoprocessor.h
@@ -49,22 +49,18 @@ const char* ExcludeFrameTypesToStr(ExcludeFrameTypes e);
// Test configuration for a test run.
struct TestConfig {
- TestConfig();
- ~TestConfig();
-
- // Name of the test. This is purely metadata and does not affect
- // the test in any way.
+ // Name of the test. This is purely metadata and does not affect the test.
std::string name;
// More detailed description of the test. This is purely metadata and does
- // not affect the test in any way.
+ // not affect the test.
std::string description;
// Number of this test. Useful if multiple runs of the same test with
// different configurations shall be managed.
- int test_number;
+ int test_number = 0;
- // File to process for the test. This must be a video file in the YUV format.
+ // File to process. This must be a video file in the YUV format.
std::string input_filename;
// File to write to during processing for the test. Will be a video file
@@ -72,20 +68,20 @@ struct TestConfig {
std::string output_filename;
// Path to the directory where encoded files will be put
- // (absolute or relative to the executable). Default: "out".
- std::string output_dir;
+ // (absolute or relative to the executable).
+ std::string output_dir = "out";
// Configurations related to networking.
NetworkingConfig networking_config;
// Decides how the packet loss simulations shall exclude certain frames
- // from packet loss. Default: kExcludeOnlyFirstKeyFrame.
- ExcludeFrameTypes exclude_frame_types;
+ // from packet loss.
+ ExcludeFrameTypes exclude_frame_types = kExcludeOnlyFirstKeyFrame;
// The length of a single frame of the input video file. This value is
// calculated out of the width and height according to the video format
// specification. Must be set before processing.
- size_t frame_length_in_bytes;
+ size_t frame_length_in_bytes = 0;
// Force the encoder and decoder to use a single core for processing.
// Using a single core is necessary to get a deterministic behavior for the
@@ -93,8 +89,7 @@ struct TestConfig {
// since multiple cores are competing to consume the byte budget for each
// frame in parallel.
// If set to false, the maximum number of available cores will be used.
- // Default: false.
- bool use_single_core;
+ bool use_single_core = false;
// If set to a value >0 this setting forces the encoder to create a keyframe
// every Nth frame. Note that the encoder may create a keyframe in other
@@ -102,16 +97,15 @@ struct TestConfig {
// Forcing key frames may also affect encoder planning optimizations in
// a negative way, since it will suddenly be forced to produce an expensive
// key frame.
- // Default: 0.
- int keyframe_interval;
+ int keyframe_interval = 0;
// The codec settings to use for the test (target bitrate, video size,
// framerate and so on). This struct must be created and filled in using
// the VideoCodingModule::Codec() method.
- webrtc::VideoCodec* codec_settings;
+ webrtc::VideoCodec* codec_settings = nullptr;
// If printing of information to stdout shall be performed during processing.
- bool verbose;
+ bool verbose = true;
};
// Handles encoding/decoding of video using the VideoEncoder/VideoDecoder
@@ -141,10 +135,10 @@ class VideoProcessor {
// Processes a single frame. Returns true as long as there's more frames
// available in the source clip.
- // Frame number must be an integer >= 0.
+ // |frame_number| must be an integer >= 0.
virtual bool ProcessFrame(int frame_number) = 0;
- // Updates the encoder with the target bit rate and the frame rate.
+ // Updates the encoder with the target |bit_rate| and the |frame_rate|.
virtual void SetRates(int bit_rate, int frame_rate) = 0;
// Return the size of the encoded frame in bytes. Dropped frames by the

Powered by Google App Engine
This is Rietveld 408576698