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 6fb4491415df6c932f3ed6b5758a598500732e43..6b00e3c042bf2fee4832b24c3bd81b08612a365f 100644 |
--- a/webrtc/modules/video_coding/codecs/test/videoprocessor.cc |
+++ b/webrtc/modules/video_coding/codecs/test/videoprocessor.cc |
@@ -220,8 +220,6 @@ bool VideoProcessorImpl::ProcessFrame(int frame_number) { |
// Ensure we have a new statistics data object we can fill. |
FrameStatistic& stat = stats_->NewFrame(frame_number); |
- encode_start_ns_ = rtc::TimeNanos(); |
- |
// Decide if we are going to force a keyframe. |
std::vector<FrameType> frame_types(1, kVideoFrameDelta); |
if (config_.keyframe_interval > 0 && |
@@ -233,6 +231,7 @@ bool VideoProcessorImpl::ProcessFrame(int frame_number) { |
encoded_frame_size_ = 0; |
encoded_frame_type_ = kVideoFrameDelta; |
+ encode_start_ns_ = rtc::TimeNanos(); |
int32_t encode_result = |
encoder_->Encode(source_frame, nullptr, &frame_types); |
@@ -253,6 +252,8 @@ void VideoProcessorImpl::FrameEncoded( |
webrtc::VideoCodecType codec, |
const EncodedImage& encoded_image, |
const webrtc::RTPFragmentationHeader* fragmentation) { |
+ int64_t encode_stop_ns = rtc::TimeNanos(); |
sprang_webrtc
2017/02/15 10:50:59
Maybe add comments clarifying that timestamps shou
brandtr
2017/02/15 12:13:36
Good idea. Done.
|
+ |
// Timestamp is frame number, so this gives us #dropped frames. |
int num_dropped_from_prev_encode = |
encoded_image._timeStamp - prev_time_stamp_ - 1; |
@@ -269,8 +270,6 @@ void VideoProcessorImpl::FrameEncoded( |
// (encoder callback is only called for non-zero length frames). |
encoded_frame_size_ = encoded_image._length; |
encoded_frame_type_ = encoded_image._frameType; |
- |
- int64_t encode_stop_ns = rtc::TimeNanos(); |
int frame_number = encoded_image._timeStamp; |
FrameStatistic& stat = stats_->stats_[frame_number]; |