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

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

Issue 2709123004: Step #0: Minor cleanups in VideoProcessor. (Closed)
Patch Set: asapersson comments 1 Created 3 years, 10 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
« no previous file with comments | « no previous file | webrtc/modules/video_coding/codecs/test/videoprocessor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c2e26b3f097eae0b8a58da755557d6358b82b033..8623476de12e191c9be847581888708b605ff4df 100644
--- a/webrtc/modules/video_coding/codecs/test/videoprocessor.h
+++ b/webrtc/modules/video_coding/codecs/test/videoprocessor.h
@@ -251,14 +251,20 @@ class VideoProcessorImpl : public VideoProcessor {
webrtc::VideoEncoder* const encoder_;
webrtc::VideoDecoder* const decoder_;
- std::unique_ptr<VideoBitrateAllocator> bitrate_allocator_;
+ const std::unique_ptr<VideoBitrateAllocator> bitrate_allocator_;
+
+ // Adapters for the codec callbacks.
+ const std::unique_ptr<EncodedImageCallback> encode_callback_;
+ const std::unique_ptr<DecodedImageCallback> decode_callback_;
+
+ PacketManipulator* const packet_manipulator_;
+ const TestConfig& config_;
+
// These (mandatory) file manipulators are used for, e.g., objective PSNR and
// SSIM calculations at the end of a test run.
FrameReader* const analysis_frame_reader_;
FrameWriter* const analysis_frame_writer_;
- PacketManipulator* const packet_manipulator_;
- const TestConfig& config_;
- Stats* stats_;
+
// These (optional) file writers are used for persistently storing the output
// of the coding pipeline at different stages: pre encode (source), post
// encode (encoded), and post decode (decoded). The purpose is to give the
@@ -269,10 +275,6 @@ class VideoProcessorImpl : public VideoProcessor {
IvfFileWriter* const encoded_frame_writer_;
FrameWriter* const decoded_frame_writer_;
- // Adapters for the codec callbacks.
- std::unique_ptr<EncodedImageCallback> encode_callback_;
- std::unique_ptr<DecodedImageCallback> decode_callback_;
-
// Keep track of the last successful frame, since we need to write that
// when decoding fails.
std::unique_ptr<uint8_t[]> last_successful_frame_buffer_;
@@ -285,12 +287,13 @@ class VideoProcessorImpl : public VideoProcessor {
size_t encoded_frame_size_;
FrameType encoded_frame_type_;
int prev_time_stamp_;
- int num_dropped_frames_;
- int num_spatial_resizes_;
int last_encoder_frame_width_;
int last_encoder_frame_height_;
// Statistics.
+ Stats* stats_;
+ int num_dropped_frames_;
+ int num_spatial_resizes_;
double bit_rate_factor_; // Multiply frame length with this to get bit rate.
int64_t encode_start_ns_;
int64_t decode_start_ns_;
« no previous file with comments | « no previous file | webrtc/modules/video_coding/codecs/test/videoprocessor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698