OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_BRIDGE_TV_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_BRIDGE_TV_H_ |
| 7 |
| 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" |
| 10 #include "content/common/content_export.h" |
| 11 #include "third_party/webrtc/modules/video_coding/codecs/interface/video_codec_i
nterface.h" |
| 12 #include "ui/gfx/size.h" |
| 13 |
| 14 namespace content { |
| 15 |
| 16 class MediaStreamDependencyFactory; |
| 17 class RTCVideoDecoderFactoryTv; |
| 18 |
| 19 // An object shared between WebMediaPlayerAndroid and WebRTC Video Engine. |
| 20 // Note that this class provides the first remote stream. |
| 21 class CONTENT_EXPORT RTCVideoDecoderBridgeTv |
| 22 : NON_EXPORTED_BASE(public webrtc::VideoDecoder) { |
| 23 public: |
| 24 explicit RTCVideoDecoderBridgeTv(RTCVideoDecoderFactoryTv* factory); |
| 25 virtual ~RTCVideoDecoderBridgeTv(); |
| 26 |
| 27 // webrtc::VideoDecoder implementation. |
| 28 virtual int32_t InitDecode(const webrtc::VideoCodec* codec_settings, |
| 29 int32_t number_of_cores) OVERRIDE; |
| 30 virtual int32_t Decode( |
| 31 const webrtc::EncodedImage& input_image, |
| 32 bool missing_frames, |
| 33 const webrtc::RTPFragmentationHeader* fragmentation, |
| 34 const webrtc::CodecSpecificInfo* codec_specific_info, |
| 35 int64_t render_time_ms) OVERRIDE; |
| 36 virtual int32_t RegisterDecodeCompleteCallback( |
| 37 webrtc::DecodedImageCallback* callback) OVERRIDE; |
| 38 virtual int32_t Release() OVERRIDE; |
| 39 virtual int32_t Reset() OVERRIDE; |
| 40 |
| 41 private: |
| 42 static void RunDecodeCompleteCallback(webrtc::DecodedImageCallback* callback, |
| 43 int64_t timestamp, |
| 44 gfx::Size size); |
| 45 |
| 46 // The factory outlives this object, so weak pointer is fine. |
| 47 RTCVideoDecoderFactoryTv* factory_; |
| 48 |
| 49 gfx::Size size_; |
| 50 bool is_initialized_; |
| 51 bool first_frame_; |
| 52 webrtc::DecodedImageCallback* decode_complete_callback_; |
| 53 int64_t timestamp_offset_millis_; |
| 54 |
| 55 DISALLOW_COPY_AND_ASSIGN(RTCVideoDecoderBridgeTv); |
| 56 }; |
| 57 |
| 58 } // namespace content |
| 59 |
| 60 #endif // CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_BRIDGE_TV_H_ |
OLD | NEW |