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/message_loop_proxy.h" | |
| 10 #include "content/common/content_export.h" | |
| 11 #include "media/base/audio_decoder_config.h" | |
|
ycheo (away)
2013/05/14 13:28:09
Could you check if these headers are needed until
wonsik
2013/05/14 14:18:55
Removed unnecessary headers
| |
| 12 #include "media/base/decoder_buffer_queue.h" | |
| 13 #include "media/base/demuxer.h" | |
| 14 #include "media/base/demuxer_stream.h" | |
| 15 #include "media/base/pipeline_status.h" | |
| 16 #include "media/base/video_decoder_config.h" | |
| 17 #include "third_party/webrtc/modules/video_coding/codecs/interface/video_codec_i nterface.h" | |
| 18 | |
| 19 namespace content { | |
| 20 | |
| 21 class MediaStreamDependencyFactory; | |
| 22 class RTCVideoDecoderFactoryTv; | |
| 23 | |
| 24 // An object shared between WebMediaPlayerAndroid and WebRTC Video Engine. | |
| 25 // Note that this class provides the first remote stream. | |
| 26 class CONTENT_EXPORT RTCVideoDecoderBridgeTv | |
| 27 : NON_EXPORTED_BASE(public webrtc::VideoDecoder) { | |
| 28 public: | |
| 29 RTCVideoDecoderBridgeTv(RTCVideoDecoderFactoryTv* factory); | |
| 30 virtual ~RTCVideoDecoderBridgeTv(); | |
| 31 | |
| 32 // webrtc::VideoDecoder implementation. | |
| 33 virtual int32_t InitDecode(const webrtc::VideoCodec* codecSettings, | |
| 34 int32_t numberOfCores) OVERRIDE; | |
| 35 virtual int32_t Decode( | |
| 36 const webrtc::EncodedImage& inputImage, | |
| 37 bool missingFrames, | |
| 38 const webrtc::RTPFragmentationHeader* fragmentation, | |
| 39 const webrtc::CodecSpecificInfo* codecSpecificInfo = NULL, | |
| 40 int64_t renderTimeMs = -1) OVERRIDE; | |
| 41 virtual int32_t RegisterDecodeCompleteCallback( | |
| 42 webrtc::DecodedImageCallback* callback) OVERRIDE; | |
| 43 virtual int32_t Release() OVERRIDE; | |
| 44 virtual int32_t Reset() OVERRIDE; | |
| 45 | |
| 46 private: | |
| 47 static void RunDecodeCompleteCallback(webrtc::DecodedImageCallback* callback, | |
| 48 int64_t timestamp); | |
| 49 | |
| 50 // The factory outlives this object, so weak pointer is fine. | |
| 51 RTCVideoDecoderFactoryTv* factory_; | |
| 52 | |
| 53 gfx::Size size_; | |
| 54 bool is_initialized_; | |
| 55 bool first_frame_; | |
| 56 webrtc::DecodedImageCallback* decode_complete_callback_; | |
| 57 int64_t timestamp_offset_millis_; | |
| 58 | |
| 59 DISALLOW_COPY_AND_ASSIGN(RTCVideoDecoderBridgeTv); | |
| 60 }; | |
| 61 | |
| 62 } // namespace content | |
| 63 | |
| 64 #endif // CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_BRIDGE_TV_H_ | |
| OLD | NEW |