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_ENCODER_FACTORY_H_
6 #define CONTENT_RENDERER_MEDIA_RTC_VIDEO_ENCODER_FACTORY_H_
10 #include "base/compiler_specific.h"
11 #include "base/memory/ref_counted.h"
12 #include "content/common/content_export.h"
13 #include "third_party/libjingle/source/talk/media/webrtc/webrtcvideoencoderfactory.h"
16 class GpuVideoAcceleratorFactories
;
21 // This class creates RTCVideoEncoder instances (each wrapping a
22 // media::VideoEncodeAccelerator) on behalf of the WebRTC stack.
23 class CONTENT_EXPORT RTCVideoEncoderFactory
24 : NON_EXPORTED_BASE(public cricket::WebRtcVideoEncoderFactory
) {
26 explicit RTCVideoEncoderFactory(
27 const scoped_refptr
<media::GpuVideoAcceleratorFactories
>& gpu_factories
);
28 ~RTCVideoEncoderFactory() override
;
30 // cricket::WebRtcVideoEncoderFactory implementation.
31 webrtc::VideoEncoder
* CreateVideoEncoder(
32 webrtc::VideoCodecType type
) override
;
33 const std::vector
<VideoCodec
>& codecs() const override
;
34 void DestroyVideoEncoder(webrtc::VideoEncoder
* encoder
) override
;
37 const scoped_refptr
<media::GpuVideoAcceleratorFactories
> gpu_factories_
;
39 // List of supported cricket::WebRtcVideoEncoderFactory::VideoCodec.
40 std::vector
<VideoCodec
> codecs_
;
42 DISALLOW_COPY_AND_ASSIGN(RTCVideoEncoderFactory
);
45 } // namespace content
47 #endif // CONTENT_RENDERER_MEDIA_RTC_VIDEO_ENCODER_FACTORY_H_