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_FACTORY_TV_H_ | |
| 6 #define CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_FACTORY_TV_H_ | |
| 7 | |
| 8 #include "base/basictypes.h" | |
| 9 #include "base/compiler_specific.h" | |
| 10 #include "base/message_loop.h" | |
| 11 #include "content/common/content_export.h" | |
| 12 #include "media/base/demuxer.h" | |
| 13 #include "third_party/libjingle/source/talk/media/webrtc/webrtcvideodecoderfacto ry.h" | |
| 14 #include "ui/gfx/size.h" | |
| 15 | |
| 16 namespace webrtc { | |
| 17 class VideoDecoder; | |
| 18 } | |
| 19 | |
| 20 namespace content { | |
| 21 | |
| 22 class MediaStreamDependencyFactory; | |
| 23 class RTCDemuxerStream; | |
| 24 class RTCVideoDecoderBridgeTv; | |
| 25 | |
| 26 class CONTENT_EXPORT RTCVideoDecoderFactoryTv | |
|
dwkang1
2013/05/14 07:57:48
Documentation for this class?
wonsik
2013/05/14 12:53:57
Done.
| |
| 27 : NON_EXPORTED_BASE(public cricket::WebRtcVideoDecoderFactory), | |
| 28 public media::Demuxer { | |
| 29 public: | |
| 30 RTCVideoDecoderFactoryTv(); | |
| 31 | |
| 32 // cricket::WebRtcVideoDecoderFactory implementation. | |
| 33 virtual webrtc::VideoDecoder* CreateVideoDecoder( | |
| 34 webrtc::VideoCodecType type) OVERRIDE; | |
| 35 virtual void DestroyVideoDecoder(webrtc::VideoDecoder* decoder) OVERRIDE; | |
| 36 | |
| 37 bool AcquireDemuxer(); | |
| 38 void ReleaseDemuxer(); | |
| 39 | |
| 40 // media::Demuxer implementation. | |
| 41 virtual void Initialize(media::DemuxerHost* host, | |
| 42 const media::PipelineStatusCB& cb) OVERRIDE; | |
| 43 virtual media::DemuxerStream* GetStream( | |
| 44 media::DemuxerStream::Type type) OVERRIDE; | |
| 45 virtual base::TimeDelta GetStartTime() const OVERRIDE; | |
| 46 | |
| 47 // For RTCVideoDecoderBridgeTv to talk to RTCDemuxerStream. | |
| 48 void UpdateSize(const gfx::Size& size); | |
| 49 void QueueBuffer(scoped_refptr<media::DecoderBuffer> buffer, | |
| 50 const base::Closure& done_cb, | |
| 51 const gfx::Size& size); | |
| 52 | |
| 53 private: | |
| 54 base::Lock lock_; | |
| 55 scoped_ptr<RTCVideoDecoderBridgeTv> decoder_; | |
| 56 | |
| 57 media::PipelineStatusCB init_cb_; | |
| 58 scoped_ptr<RTCDemuxerStream> stream_; | |
| 59 | |
| 60 bool is_acquired_; | |
| 61 | |
| 62 DISALLOW_COPY_AND_ASSIGN(RTCVideoDecoderFactoryTv); | |
| 63 }; | |
| 64 | |
| 65 } // namespace content | |
| 66 | |
| 67 #endif // CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_FACTORY_TV_H_ | |
| OLD | NEW |