Chromium Code Reviews| 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 RTCVideoDecoderBridgeTv(RTCVideoDecoderFactoryTv* factory); | |
| 25 virtual ~RTCVideoDecoderBridgeTv(); | |
| 26 | |
| 27 // webrtc::VideoDecoder implementation. | |
| 28 virtual int32_t InitDecode(const webrtc::VideoCodec* codecSettings, | |
|
acolwell GONE FROM CHROMIUM
2013/05/14 18:17:47
nit: change to unix_hacker_style here and below. s
wonsik
2013/05/20 14:02:24
Done.
| |
| 29 int32_t numberOfCores) OVERRIDE; | |
| 30 virtual int32_t Decode( | |
| 31 const webrtc::EncodedImage& inputImage, | |
| 32 bool missingFrames, | |
| 33 const webrtc::RTPFragmentationHeader* fragmentation, | |
| 34 const webrtc::CodecSpecificInfo* codecSpecificInfo = NULL, | |
| 35 int64_t renderTimeMs = -1) 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 | |
| 45 // The factory outlives this object, so weak pointer is fine. | |
| 46 RTCVideoDecoderFactoryTv* factory_; | |
| 47 | |
| 48 gfx::Size size_; | |
| 49 bool is_initialized_; | |
| 50 bool first_frame_; | |
| 51 webrtc::DecodedImageCallback* decode_complete_callback_; | |
| 52 int64_t timestamp_offset_millis_; | |
| 53 | |
| 54 DISALLOW_COPY_AND_ASSIGN(RTCVideoDecoderBridgeTv); | |
| 55 }; | |
| 56 | |
| 57 } // namespace content | |
| 58 | |
| 59 #endif // CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_BRIDGE_TV_H_ | |
| OLD | NEW |