Make USB permissions work in the new permission message system
[chromium-blink-merge.git] / content / renderer / media / rtc_video_decoder_factory.h
blobd3951a31593e40fc6bea1e5a96552406f46ad2d5
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
3 // found in the LICENSE file.
5 #ifndef CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_FACTORY_H_
6 #define CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_FACTORY_H_
8 #include "base/threading/thread.h"
9 #include "content/common/content_export.h"
10 #include "third_party/libjingle/source/talk/media/webrtc/webrtcvideodecoderfactory.h"
11 #include "third_party/webrtc/modules/video_coding/codecs/interface/video_codec_interface.h"
13 namespace webrtc {
14 class VideoDecoder;
15 } // namespace webrtc
17 namespace media {
18 class GpuVideoAcceleratorFactories;
19 } // namespace media
21 namespace content {
23 // TODO(wuchengli): add unittest.
24 class CONTENT_EXPORT RTCVideoDecoderFactory
25 : NON_EXPORTED_BASE(public cricket::WebRtcVideoDecoderFactory) {
26 public:
27 explicit RTCVideoDecoderFactory(
28 const scoped_refptr<media::GpuVideoAcceleratorFactories>& gpu_factories);
29 ~RTCVideoDecoderFactory() override;
31 // Runs on Chrome_libJingle_WorkerThread. The child thread is blocked while
32 // this runs.
33 webrtc::VideoDecoder* CreateVideoDecoder(
34 webrtc::VideoCodecType type) override;
36 // Runs on Chrome_libJingle_WorkerThread. The child thread is blocked while
37 // this runs.
38 void DestroyVideoDecoder(webrtc::VideoDecoder* decoder) override;
40 private:
41 const scoped_refptr<media::GpuVideoAcceleratorFactories> gpu_factories_;
43 DISALLOW_COPY_AND_ASSIGN(RTCVideoDecoderFactory);
46 } // namespace content
48 #endif // CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_FACTORY_H_