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