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