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