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/message_loop/message_loop_proxy.h"
9 #include "base/threading/thread.h"
10 #include "content/common/content_export.h"
11 #include "third_party/libjingle/source/talk/media/webrtc/webrtcvideodecoderfactory.h"
12 #include "third_party/webrtc/modules/video_coding/codecs/interface/video_codec_interface.h"
19 class GpuVideoAcceleratorFactories
;
24 // TODO(wuchengli): add unittest.
25 class CONTENT_EXPORT RTCVideoDecoderFactory
26 : NON_EXPORTED_BASE(public cricket::WebRtcVideoDecoderFactory
) {
28 explicit RTCVideoDecoderFactory(
29 const scoped_refptr
<media::GpuVideoAcceleratorFactories
>& gpu_factories
);
30 ~RTCVideoDecoderFactory() override
;
32 // Runs on Chrome_libJingle_WorkerThread. The child thread is blocked while
34 webrtc::VideoDecoder
* CreateVideoDecoder(
35 webrtc::VideoCodecType type
) override
;
37 // Runs on Chrome_libJingle_WorkerThread. The child thread is blocked while
39 void DestroyVideoDecoder(webrtc::VideoDecoder
* decoder
) override
;
42 scoped_refptr
<media::GpuVideoAcceleratorFactories
> gpu_factories_
;
44 DISALLOW_COPY_AND_ASSIGN(RTCVideoDecoderFactory
);
47 } // namespace content
49 #endif // CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_FACTORY_H_