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

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

Issue 1323943007: VP9: Add automaticeResize to codec setting. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 3 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 e788f23b9dea1e3de62dcfb94c3caeb337600e51..888adb8939e52bf7993c1ae049b310a9a54f6708 100644
--- a/webrtc/modules/video_coding/codecs/test/videoprocessor.cc
+++ b/webrtc/modules/video_coding/codecs/test/videoprocessor.cc
@@ -59,6 +59,7 @@ VideoProcessorImpl::VideoProcessorImpl(webrtc::VideoEncoder* encoder,
last_frame_missing_(false),
initialized_(false),
encoded_frame_size_(0),
+ encoded_frame_type_(kKeyFrame),
prev_time_stamp_(0),
num_dropped_frames_(0),
num_spatial_resizes_(0),
@@ -161,6 +162,10 @@ size_t VideoProcessorImpl::EncodedFrameSize() {
return encoded_frame_size_;
}
+VideoFrameType VideoProcessorImpl::EncodedFrameType() {
+ return encoded_frame_type_;
+}
+
int VideoProcessorImpl::NumberDroppedFrames() {
return num_dropped_frames_;
}
@@ -202,6 +207,7 @@ bool VideoProcessorImpl::ProcessFrame(int frame_number) {
// For dropped frames, we regard them as zero size encoded frames.
encoded_frame_size_ = 0;
+ encoded_frame_type_ = kDeltaFrame;
int32_t encode_result = encoder_->Encode(source_frame_, NULL, &frame_types);
@@ -233,6 +239,8 @@ void VideoProcessorImpl::FrameEncoded(const EncodedImage& encoded_image) {
// (encoder callback is only called for non-zero length frames).
encoded_frame_size_ = encoded_image._length;
+ encoded_frame_type_ = encoded_image._frameType;
+
TickTime encode_stop = TickTime::Now();
int frame_number = encoded_image._timeStamp;
FrameStatistic& stat = stats_->stats_[frame_number];

Powered by Google App Engine
This is Rietveld 408576698