| Index: content/renderer/media/rtc_video_decoder_bridge_tv.h
|
| diff --git a/content/renderer/media/rtc_video_decoder_bridge_tv.h b/content/renderer/media/rtc_video_decoder_bridge_tv.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..25900d9023f161795dc27acf5c7b8fab6f85fc7b
|
| --- /dev/null
|
| +++ b/content/renderer/media/rtc_video_decoder_bridge_tv.h
|
| @@ -0,0 +1,65 @@
|
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_BRIDGE_TV_H_
|
| +#define CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_BRIDGE_TV_H_
|
| +
|
| +#include "base/basictypes.h"
|
| +#include "base/message_loop_proxy.h"
|
| +#include "content/common/content_export.h"
|
| +#include "media/base/audio_decoder_config.h"
|
| +#include "media/base/decoder_buffer_queue.h"
|
| +#include "media/base/demuxer.h"
|
| +#include "media/base/demuxer_stream.h"
|
| +#include "media/base/pipeline_status.h"
|
| +#include "media/base/video_decoder_config.h"
|
| +#include "third_party/webrtc/modules/video_coding/codecs/interface/video_codec_interface.h"
|
| +
|
| +namespace content {
|
| +
|
| +class MediaStreamDependencyFactory;
|
| +class RTCVideoDecoderFactoryTv;
|
| +
|
| +// An object shared between WebMediaPlayerAndroid and WebRTC Video Engine.
|
| +// Note that this class provides the first remote stream.
|
| +class CONTENT_EXPORT RTCVideoDecoderBridgeTv
|
| + : NON_EXPORTED_BASE(public webrtc::VideoDecoder) {
|
| + public:
|
| + RTCVideoDecoderBridgeTv(RTCVideoDecoderFactoryTv* factory);
|
| + virtual ~RTCVideoDecoderBridgeTv();
|
| +
|
| + // webrtc::VideoDecoder implementation.
|
| + virtual WebRtc_Word32 InitDecode(
|
| + const webrtc::VideoCodec* codecSettings,
|
| + WebRtc_Word32 numberOfCores) OVERRIDE;
|
| + virtual WebRtc_Word32 Decode(
|
| + const webrtc::EncodedImage& inputImage,
|
| + bool missingFrames,
|
| + const webrtc::RTPFragmentationHeader* fragmentation,
|
| + const webrtc::CodecSpecificInfo* codecSpecificInfo = NULL,
|
| + WebRtc_Word64 renderTimeMs = -1) OVERRIDE;
|
| + virtual WebRtc_Word32 RegisterDecodeCompleteCallback(
|
| + webrtc::DecodedImageCallback* callback) OVERRIDE;
|
| + virtual WebRtc_Word32 Release() OVERRIDE;
|
| + virtual WebRtc_Word32 Reset() OVERRIDE;
|
| +
|
| + private:
|
| + static void RunDecodeCompleteCallback(webrtc::DecodedImageCallback* callback,
|
| + WebRtc_Word64 timestamp);
|
| +
|
| + // The factory outlives this object, so weak pointer is fine.
|
| + RTCVideoDecoderFactoryTv* factory_;
|
| +
|
| + gfx::Size size_;
|
| + bool is_initialized_;
|
| + bool first_frame_;
|
| + webrtc::DecodedImageCallback* decode_complete_callback_;
|
| + WebRtc_Word64 timestamp_offset_millis_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(RTCVideoDecoderBridgeTv);
|
| +};
|
| +
|
| +} // namespace content
|
| +
|
| +#endif // CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_BRIDGE_TV_H_
|
|
|