| 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..9b0007e9d4cfa42efe80ed93aab76e35acf7de46 100644
|
| --- a/content/renderer/media/rtc_video_decoder_bridge_tv.cc
|
| +++ b/content/renderer/media/rtc_video_decoder_bridge_tv.cc
|
| @@ -25,8 +25,7 @@ RTCVideoDecoderBridgeTv::RTCVideoDecoderBridgeTv(
|
| RTCVideoDecoderFactoryTv* factory)
|
| : factory_(factory),
|
| is_initialized_(false),
|
| - first_frame_(true),
|
| - decode_complete_callback_(NULL) {}
|
| + first_frame_(true) {}
|
|
|
| RTCVideoDecoderBridgeTv::~RTCVideoDecoderBridgeTv() {}
|
|
|
| @@ -57,7 +56,7 @@ int32_t RTCVideoDecoderBridgeTv::Decode(
|
| if (missing_frames || !input_image._completeFrame)
|
| return WEBRTC_VIDEO_CODEC_ERROR;
|
|
|
| - if (!is_initialized_ || decode_complete_callback_ == NULL)
|
| + if (!is_initialized_)
|
| return WEBRTC_VIDEO_CODEC_UNINITIALIZED;
|
|
|
| if (first_frame_) {
|
| @@ -91,20 +90,13 @@ 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);
|
|
|
| return WEBRTC_VIDEO_CODEC_OK;
|
| }
|
|
|
| int32_t RTCVideoDecoderBridgeTv::RegisterDecodeCompleteCallback(
|
| webrtc::DecodedImageCallback* callback) {
|
| - decode_complete_callback_ = callback;
|
| return WEBRTC_VIDEO_CODEC_OK;
|
| }
|
|
|
| @@ -118,21 +110,4 @@ int32_t RTCVideoDecoderBridgeTv::Reset() {
|
| return WEBRTC_VIDEO_CODEC_OK;
|
| }
|
|
|
| -// static
|
| -void RTCVideoDecoderBridgeTv::RunDecodeCompleteCallback(
|
| - webrtc::DecodedImageCallback* callback,
|
| - int64_t timestamp,
|
| - gfx::Size size) {
|
| - // 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;
|
| - dummy_video_frame.CreateEmptyFrame(
|
| - size.width(), size.height(), size.width(), half_width, half_width);
|
| - dummy_video_frame.set_timestamp(timestamp);
|
| - callback->Decoded(dummy_video_frame);
|
| -}
|
| -
|
| } // namespace content
|
|
|