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" | |
12 #include "third_party/libjingle/source/talk/media/webrtc/webrtcvideodecoderfacto
ry.h" | 11 #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" | 12 #include "third_party/webrtc/modules/video_coding/codecs/interface/video_codec_i
nterface.h" |
14 | 13 |
| 14 namespace media { |
| 15 class GpuVideoDecoderFactories; |
| 16 } |
| 17 |
15 namespace webrtc { | 18 namespace webrtc { |
16 class VideoDecoder; | 19 class VideoDecoder; |
17 } | 20 } |
18 | 21 |
19 namespace content { | 22 namespace content { |
20 | 23 |
21 class CONTENT_EXPORT RTCVideoDecoderFactory | 24 class CONTENT_EXPORT RTCVideoDecoderFactory |
22 : NON_EXPORTED_BASE(public cricket::WebRtcVideoDecoderFactory) { | 25 : NON_EXPORTED_BASE(public cricket::WebRtcVideoDecoderFactory) { |
23 public: | 26 public: |
24 RTCVideoDecoderFactory( | 27 RTCVideoDecoderFactory( |
25 const scoped_refptr<media::GpuVideoDecoder::Factories>& gpu_factories); | 28 const scoped_refptr<media::GpuVideoDecoderFactories>& gpu_factories); |
26 virtual ~RTCVideoDecoderFactory(); | 29 virtual ~RTCVideoDecoderFactory(); |
27 | 30 |
28 // Runs on Chrome_libJingle_WorkerThread. The child thread is blocked while | 31 // Runs on Chrome_libJingle_WorkerThread. The child thread is blocked while |
29 // this runs. | 32 // this runs. |
30 virtual webrtc::VideoDecoder* CreateVideoDecoder(webrtc::VideoCodecType type) | 33 virtual webrtc::VideoDecoder* CreateVideoDecoder(webrtc::VideoCodecType type) |
31 OVERRIDE; | 34 OVERRIDE; |
32 | 35 |
33 // Runs on Chrome_libJingle_WorkerThread. The child thread is blocked while | 36 // Runs on Chrome_libJingle_WorkerThread. The child thread is blocked while |
34 // this runs. | 37 // this runs. |
35 virtual void DestroyVideoDecoder(webrtc::VideoDecoder* decoder) OVERRIDE; | 38 virtual void DestroyVideoDecoder(webrtc::VideoDecoder* decoder) OVERRIDE; |
36 | 39 |
37 private: | 40 private: |
38 scoped_refptr<base::MessageLoopProxy> vda_loop_proxy_; | 41 scoped_refptr<base::MessageLoopProxy> vda_loop_proxy_; |
39 scoped_ptr<webrtc::VideoDecoder> decoder_; | 42 scoped_ptr<webrtc::VideoDecoder> decoder_; |
40 | 43 |
41 DISALLOW_COPY_AND_ASSIGN(RTCVideoDecoderFactory); | 44 DISALLOW_COPY_AND_ASSIGN(RTCVideoDecoderFactory); |
42 }; | 45 }; |
43 | 46 |
44 } // namespace content | 47 } // namespace content |
45 | 48 |
46 #endif // CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_FACTORY_H_ | 49 #endif // CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_FACTORY_H_ |
OLD | NEW |