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

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

Issue 2684223002: Use std::unique_ptr in VideoProcessor. (Closed)
Patch Set: address comments 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 a217b1132ea378dc6053867a82a39c26366c5ce4..5a2a68f5bac37edca2f609ae474c7af7d7c41df2 100644
--- a/webrtc/modules/video_coding/codecs/test/videoprocessor.h
+++ b/webrtc/modules/video_coding/codecs/test/videoprocessor.h
@@ -190,20 +190,20 @@ class VideoProcessorImpl : public VideoProcessor {
// Return the number of spatial resizes.
int NumberSpatialResizes() override;
- webrtc::VideoEncoder* encoder_;
- webrtc::VideoDecoder* decoder_;
+ webrtc::VideoEncoder* const encoder_;
+ webrtc::VideoDecoder* const decoder_;
std::unique_ptr<VideoBitrateAllocator> bitrate_allocator_;
- FrameReader* frame_reader_;
- FrameWriter* frame_writer_;
- PacketManipulator* packet_manipulator_;
+ FrameReader* const frame_reader_;
+ FrameWriter* const frame_writer_;
+ PacketManipulator* const packet_manipulator_;
const TestConfig& config_;
Stats* stats_;
- EncodedImageCallback* encode_callback_;
- DecodedImageCallback* decode_callback_;
+ 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:
- uint8_t* last_successful_frame_buffer_;
+ std::unique_ptr<uint8_t[]> last_successful_frame_buffer_;
sprang_webrtc 2017/02/09 15:21:19 ..or maybe even an rtc::Buffer? Then we won't have
åsapersson 2017/02/10 08:13:33 Ok will look at it in a separate cl.
// To keep track of if we have excluded the first key frame from packet loss:
bool first_key_frame_has_been_excluded_;
// To tell the decoder previous frame have been dropped due to packet loss:
@@ -235,7 +235,7 @@ class VideoProcessorImpl : public VideoProcessor {
const webrtc::RTPFragmentationHeader* fragmentation) override;
private:
- VideoProcessorImpl* video_processor_;
+ VideoProcessorImpl* const video_processor_;
};
// Callback class required to implement according to the VideoDecoder API.
@@ -252,7 +252,7 @@ class VideoProcessorImpl : public VideoProcessor {
}
private:
- VideoProcessorImpl* video_processor_;
+ VideoProcessorImpl* const video_processor_;
};
};
« 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