OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_FACTORY_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_FACTORY_H_ |
6 #define CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_FACTORY_H_ | 6 #define CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_FACTORY_H_ |
7 | 7 |
8 #include "base/message_loop/message_loop_proxy.h" | 8 #include "base/message_loop/message_loop_proxy.h" |
9 #include "base/threading/thread.h" | 9 #include "base/threading/thread.h" |
10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
11 #include "media/filters/gpu_video_decoder.h" | 11 #include "content/renderer/media/renderer_gpu_video_decoder_factories.h" |
12 #include "third_party/libjingle/source/talk/media/webrtc/webrtcvideodecoderfacto ry.h" | 12 #include "third_party/libjingle/source/talk/media/webrtc/webrtcvideodecoderfacto ry.h" |
13 #include "third_party/webrtc/modules/video_coding/codecs/interface/video_codec_i nterface.h" | 13 #include "third_party/webrtc/modules/video_coding/codecs/interface/video_codec_i nterface.h" |
14 | 14 |
15 namespace webrtc { | 15 namespace webrtc { |
16 class VideoDecoder; | 16 class VideoDecoder; |
17 } | 17 } |
18 | 18 |
19 namespace content { | 19 namespace content { |
20 | 20 |
21 class CONTENT_EXPORT RTCVideoDecoderFactory | 21 class CONTENT_EXPORT RTCVideoDecoderFactory |
22 : NON_EXPORTED_BASE(public cricket::WebRtcVideoDecoderFactory) { | 22 : NON_EXPORTED_BASE(public cricket::WebRtcVideoDecoderFactory) { |
23 public: | 23 public: |
24 RTCVideoDecoderFactory( | 24 RTCVideoDecoderFactory( |
25 const scoped_refptr<media::GpuVideoDecoder::Factories>& gpu_factories); | 25 const scoped_refptr<base::MessageLoopProxy>& vda_loop_proxy, |
26 const scoped_refptr<content::RendererGpuVideoDecoderFactories>& | |
scherkus (not reviewing)
2013/07/19 18:13:58
don't need content namespace
wuchengli
2013/07/20 06:04:14
Changed back to media::GpuVideoDecoder::Factories.
| |
27 gpu_factories); | |
26 virtual ~RTCVideoDecoderFactory(); | 28 virtual ~RTCVideoDecoderFactory(); |
27 | 29 |
28 // Runs on Chrome_libJingle_WorkerThread. The child thread is blocked while | 30 // Runs on Chrome_libJingle_WorkerThread. The child thread is blocked while |
29 // this runs. | 31 // this runs. |
30 virtual webrtc::VideoDecoder* CreateVideoDecoder(webrtc::VideoCodecType type) | 32 virtual webrtc::VideoDecoder* CreateVideoDecoder(webrtc::VideoCodecType type) |
31 OVERRIDE; | 33 OVERRIDE; |
32 | 34 |
33 // Runs on Chrome_libJingle_WorkerThread. The child thread is blocked while | 35 // Runs on Chrome_libJingle_WorkerThread. The child thread is blocked while |
34 // this runs. | 36 // this runs. |
35 virtual void DestroyVideoDecoder(webrtc::VideoDecoder* decoder) OVERRIDE; | 37 virtual void DestroyVideoDecoder(webrtc::VideoDecoder* decoder) OVERRIDE; |
36 | 38 |
37 private: | 39 private: |
38 scoped_refptr<base::MessageLoopProxy> vda_loop_proxy_; | 40 scoped_refptr<base::MessageLoopProxy> vda_loop_proxy_; |
39 scoped_ptr<webrtc::VideoDecoder> decoder_; | 41 scoped_refptr<content::RendererGpuVideoDecoderFactories> gpu_factories_; |
scherkus (not reviewing)
2013/07/19 18:13:58
don't need content namespace
wuchengli
2013/07/20 06:04:14
Changed back to media::GpuVideoDecoder::Factories.
| |
40 | 42 |
41 DISALLOW_COPY_AND_ASSIGN(RTCVideoDecoderFactory); | 43 DISALLOW_COPY_AND_ASSIGN(RTCVideoDecoderFactory); |
42 }; | 44 }; |
43 | 45 |
44 } // namespace content | 46 } // namespace content |
45 | 47 |
46 #endif // CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_FACTORY_H_ | 48 #endif // CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_FACTORY_H_ |
OLD | NEW |