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"
18 class GpuVideoAcceleratorFactories
;
23 // TODO(wuchengli): add unittest.
24 class CONTENT_EXPORT RTCVideoDecoderFactory
25 : NON_EXPORTED_BASE(public cricket::WebRtcVideoDecoderFactory
) {
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
33 webrtc::VideoDecoder
* CreateVideoDecoder(
34 webrtc::VideoCodecType type
) override
;
36 // Runs on Chrome_libJingle_WorkerThread. The child thread is blocked while
38 void DestroyVideoDecoder(webrtc::VideoDecoder
* decoder
) override
;
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_