Add histogram for end-to-end delay:

"WebRTC.Video.EndToEndDelayInMs"

Make capture time in local timebase available for decoded VP9 video frames (propagate ntp_time_ms from EncodedImage to decoded VideoFrame).

BUG=webrtc:6409

Review-Url: https://codereview.webrtc.org/1905563002
Cr-Commit-Position: refs/heads/master@{#14367}
This commit is contained in:
asapersson
2016-09-23 02:09:46 -07:00
committed by Commit bot
parent 6d4c8c307e
commit 1490f7aa55
6 changed files with 27 additions and 7 deletions

View File

@ -931,14 +931,16 @@ int VP9DecoderImpl::Decode(const EncodedImage& input_image,
// It may be released by libvpx during future vpx_codec_decode or
// vpx_codec_destroy calls.
img = vpx_codec_get_frame(decoder_, &iter);
int ret = ReturnFrame(img, input_image._timeStamp);
int ret = ReturnFrame(img, input_image._timeStamp, input_image.ntp_time_ms_);
if (ret != 0) {
return ret;
}
return WEBRTC_VIDEO_CODEC_OK;
}
int VP9DecoderImpl::ReturnFrame(const vpx_image_t* img, uint32_t timestamp) {
int VP9DecoderImpl::ReturnFrame(const vpx_image_t* img,
uint32_t timestamp,
int64_t ntp_time_ms) {
if (img == NULL) {
// Decoder OK and NULL image => No show frame.
return WEBRTC_VIDEO_CODEC_NO_OUTPUT;
@ -964,6 +966,7 @@ int VP9DecoderImpl::ReturnFrame(const vpx_image_t* img, uint32_t timestamp) {
VideoFrame decoded_image(img_wrapped_buffer, timestamp,
0 /* render_time_ms */, webrtc::kVideoRotation_0);
decoded_image.set_ntp_time_ms(ntp_time_ms);
int ret = decode_complete_callback_->Decoded(decoded_image);
if (ret != 0)

View File

@ -153,7 +153,9 @@ class VP9DecoderImpl : public VP9Decoder {
const char* ImplementationName() const override;
private:
int ReturnFrame(const vpx_image_t* img, uint32_t timeStamp);
int ReturnFrame(const vpx_image_t* img,
uint32_t timestamp,
int64_t ntp_time_ms);
// Memory pool used to share buffers between libvpx and webrtc.
Vp9FrameBufferPool frame_buffer_pool_;