summaryrefslogtreecommitdiff
path: root/chromium/third_party/webrtc/modules/video_coding/codecs/test/videoprocessor.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/webrtc/modules/video_coding/codecs/test/videoprocessor.cc')
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/codecs/test/videoprocessor.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/chromium/third_party/webrtc/modules/video_coding/codecs/test/videoprocessor.cc b/chromium/third_party/webrtc/modules/video_coding/codecs/test/videoprocessor.cc
index e788f23b9de..888adb8939e 100644
--- a/chromium/third_party/webrtc/modules/video_coding/codecs/test/videoprocessor.cc
+++ b/chromium/third_party/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];