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

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

Issue 2999613002: Minor improvements to VideoProcessorIntegrationTest. (Closed)
Patch Set: Fix iOS more. Created 3 years, 4 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.cc
diff --git a/webrtc/modules/video_coding/codecs/test/videoprocessor.cc b/webrtc/modules/video_coding/codecs/test/videoprocessor.cc
index ba7a3403ab8bc623e9ac5d26066f029afa3ac48b..81e0488407b43ed678161feadbf3c4bbfe65b15b 100644
--- a/webrtc/modules/video_coding/codecs/test/videoprocessor.cc
+++ b/webrtc/modules/video_coding/codecs/test/videoprocessor.cc
@@ -138,10 +138,7 @@ VideoProcessor::VideoProcessor(webrtc::VideoEncoder* encoder,
frame_infos_.reserve(analysis_frame_reader->NumberOfFrames());
}
-VideoProcessor::~VideoProcessor() {
- encoder_->RegisterEncodeCompleteCallback(nullptr);
- decoder_->RegisterDecodeCompleteCallback(nullptr);
-}
+VideoProcessor::~VideoProcessor() = default;
void VideoProcessor::Init() {
RTC_DCHECK(!initialized_) << "VideoProcessor already initialized.";
@@ -189,6 +186,16 @@ void VideoProcessor::Init() {
}
}
+void VideoProcessor::Release() {
+ encoder_->RegisterEncodeCompleteCallback(nullptr);
+ decoder_->RegisterDecodeCompleteCallback(nullptr);
+
+ RTC_CHECK_EQ(encoder_->Release(), WEBRTC_VIDEO_CODEC_OK);
+ RTC_CHECK_EQ(decoder_->Release(), WEBRTC_VIDEO_CODEC_OK);
+
+ initialized_ = false;
+}
+
bool VideoProcessor::ProcessFrame(int frame_number) {
RTC_DCHECK_GE(frame_number, 0);
RTC_DCHECK_LE(frame_number, frame_infos_.size())

Powered by Google App Engine
This is Rietveld 408576698