chrome.bluetoothSocket: clean-up Listen functions
[chromium-blink-merge.git] / content / renderer / media / rtc_video_encoder_factory.h
blobb9971bfeb0aa1d4e37f4e92dd30d5ff75e2c5462
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_
8 #include <vector>
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"
15 namespace media {
17 class GpuVideoAcceleratorFactories;
19 } // namespace media
21 namespace content {
23 // This class creates RTCVideoEncoder instances (each wrapping a
24 // media::VideoEncodeAccelerator) on behalf of the WebRTC stack.
25 class CONTENT_EXPORT RTCVideoEncoderFactory
26 : NON_EXPORTED_BASE(public cricket::WebRtcVideoEncoderFactory) {
27 public:
28 explicit RTCVideoEncoderFactory(
29 const scoped_refptr<media::GpuVideoAcceleratorFactories>& gpu_factories);
30 virtual ~RTCVideoEncoderFactory();
32 // cricket::WebRtcVideoEncoderFactory implementation.
33 virtual webrtc::VideoEncoder* CreateVideoEncoder(
34 webrtc::VideoCodecType type) OVERRIDE;
35 virtual void AddObserver(Observer* observer) OVERRIDE;
36 virtual void RemoveObserver(Observer* observer) OVERRIDE;
37 virtual const std::vector<VideoCodec>& codecs() const OVERRIDE;
38 virtual void DestroyVideoEncoder(webrtc::VideoEncoder* encoder) OVERRIDE;
40 private:
41 const scoped_refptr<media::GpuVideoAcceleratorFactories> gpu_factories_;
43 // Codec support list of cricket::WebRtcVideoEncoderFactory::VideoCodec
44 // instances.
45 std::vector<VideoCodec> codecs_;
47 DISALLOW_COPY_AND_ASSIGN(RTCVideoEncoderFactory);
50 } // namespace content
52 #endif // CONTENT_RENDERER_MEDIA_RTC_VIDEO_ENCODER_FACTORY_H_