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

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

Issue 2707023008: Step #2: Add batch mode to VideoProcessor integration tests. (Closed)
Patch Set: asapersson comments 2. Created 3 years, 9 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 de373dd8c4898e2f9e3e4fd8b2edca97c091850c..129f962ba489965919d3f1d81e59370c565d6dfe 100644
--- a/webrtc/modules/video_coding/codecs/test/videoprocessor.cc
+++ b/webrtc/modules/video_coding/codecs/test/videoprocessor.cc
@@ -218,16 +218,14 @@ void VideoProcessorImpl::SetRates(int bit_rate, int frame_rate) {
num_spatial_resizes_ = 0;
}
-// TODO(brandtr): Update implementation of EncodedFrameSize and EncodedFrameType
-// to support batch processing in the caller.
-size_t VideoProcessorImpl::EncodedFrameSize() {
- RTC_DCHECK(!frame_infos_.empty());
- return frame_infos_.back().encoded_frame_size;
+size_t VideoProcessorImpl::EncodedFrameSize(int frame_number) {
+ RTC_DCHECK_LT(frame_number, frame_infos_.size());
+ return frame_infos_[frame_number].encoded_frame_size;
}
-FrameType VideoProcessorImpl::EncodedFrameType() {
- RTC_DCHECK(!frame_infos_.empty());
- return frame_infos_.back().encoded_frame_type;
+FrameType VideoProcessorImpl::EncodedFrameType(int frame_number) {
+ RTC_DCHECK_LT(frame_number, frame_infos_.size());
+ return frame_infos_[frame_number].encoded_frame_type;
}
int VideoProcessorImpl::NumberDroppedFrames() {

Powered by Google App Engine
This is Rietveld 408576698