Chromium Code Reviews| Index: content/renderer/media/rtc_video_decoder_bridge_tv.cc |
| diff --git a/content/renderer/media/rtc_video_decoder_bridge_tv.cc b/content/renderer/media/rtc_video_decoder_bridge_tv.cc |
| index c59496c2e730137b5ff157cb348bcba7e95de8e2..76f22856ead1b38b45a301f74874ab5cb11cecbe 100644 |
| --- a/content/renderer/media/rtc_video_decoder_bridge_tv.cc |
| +++ b/content/renderer/media/rtc_video_decoder_bridge_tv.cc |
| @@ -91,13 +91,12 @@ int32_t RTCVideoDecoderBridgeTv::Decode( |
| render_time_ms - timestamp_offset_millis_)); |
| } |
| - factory_->QueueBuffer( |
| - buffer, |
| - base::Bind(&RTCVideoDecoderBridgeTv::RunDecodeCompleteCallback, |
| - decode_complete_callback_, |
| - input_image._timeStamp, |
| - size_), |
| - new_size); |
| + factory_->QueueBuffer(buffer, new_size); |
| + |
| + // WebRTC measures the decoding time and control the timing of the Decode() |
| + // calls. In GoogleTV's implementation, we let WebRTC think decoding is done |
| + // here so that we can get frames constantly. |
| + RunDecodeCompleteCallback(input_image._timeStamp); |
| return WEBRTC_VIDEO_CODEC_OK; |
| } |
| @@ -118,21 +117,17 @@ int32_t RTCVideoDecoderBridgeTv::Reset() { |
| return WEBRTC_VIDEO_CODEC_OK; |
| } |
| -// static |
| -void RTCVideoDecoderBridgeTv::RunDecodeCompleteCallback( |
| - webrtc::DecodedImageCallback* callback, |
| - int64_t timestamp, |
| - gfx::Size size) { |
| +void RTCVideoDecoderBridgeTv::RunDecodeCompleteCallback(int64_t timestamp) { |
|
wonsik
2013/07/29 02:33:28
Since this is used only in RTCVideoDecoderBridgeTv
dwkang1
2013/07/29 02:55:35
Done.
|
| // We call the decode complete callback function to notify libjingle that |
| // decoding is finished. In addition, this also reports back to libjingle that |
| // the particular video frame with |timestamp| is correctly rendered to |
| // libjingle, so that it can generate proper stats. |
| webrtc::I420VideoFrame dummy_video_frame; |
| - int half_width = (size.width() + 1) / 2; |
| + int half_width = (size_.width() + 1) / 2; |
| dummy_video_frame.CreateEmptyFrame( |
| - size.width(), size.height(), size.width(), half_width, half_width); |
| + size_.width(), size_.height(), size_.width(), half_width, half_width); |
| dummy_video_frame.set_timestamp(timestamp); |
| - callback->Decoded(dummy_video_frame); |
| + decode_complete_callback_->Decoded(dummy_video_frame); |
| } |
| } // namespace content |