OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_FACTORY_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_FACTORY_H_ |
| 7 |
| 8 #include "base/message_loop/message_loop_proxy.h" |
| 9 #include "base/threading/thread.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" |
| 13 #include "third_party/webrtc/modules/video_coding/codecs/interface/video_codec_i
nterface.h" |
| 14 |
| 15 namespace webrtc { |
| 16 class VideoDecoder; |
| 17 } |
| 18 |
| 19 namespace content { |
| 20 |
| 21 class CONTENT_EXPORT RTCVideoDecoderFactory |
| 22 : NON_EXPORTED_BASE(public cricket::WebRtcVideoDecoderFactory) { |
| 23 public: |
| 24 RTCVideoDecoderFactory( |
| 25 const scoped_refptr<media::GpuVideoDecoder::Factories>& gpu_factories); |
| 26 virtual ~RTCVideoDecoderFactory(); |
| 27 |
| 28 // Runs on Chrome_libJingle_WorkerThread. The child thread is blocked while |
| 29 // this runs. |
| 30 virtual webrtc::VideoDecoder* CreateVideoDecoder(webrtc::VideoCodecType type) |
| 31 OVERRIDE; |
| 32 |
| 33 // Runs on Chrome_libJingle_WorkerThread. The child thread is blocked while |
| 34 // this runs. |
| 35 virtual void DestroyVideoDecoder(webrtc::VideoDecoder* decoder) OVERRIDE; |
| 36 |
| 37 private: |
| 38 scoped_refptr<base::MessageLoopProxy> vda_loop_proxy_; |
| 39 scoped_ptr<webrtc::VideoDecoder> decoder_; |
| 40 |
| 41 DISALLOW_COPY_AND_ASSIGN(RTCVideoDecoderFactory); |
| 42 }; |
| 43 |
| 44 } // namespace content |
| 45 |
| 46 #endif // CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_FACTORY_H_ |
OLD | NEW |