OLD | NEW |
| (Empty) |
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. | |
4 | |
5 #ifndef CONTENT_RENDERER_MEDIA_RTC_VIDEO_ENCODER_FACTORY_H_ | |
6 #define CONTENT_RENDERER_MEDIA_RTC_VIDEO_ENCODER_FACTORY_H_ | |
7 | |
8 #include <vector> | |
9 | |
10 #include "base/compiler_specific.h" | |
11 #include "base/macros.h" | |
12 #include "base/memory/ref_counted.h" | |
13 #include "content/common/content_export.h" | |
14 #include "third_party/webrtc/media/engine/webrtcvideoencoderfactory.h" | |
15 | |
16 namespace media { | |
17 class GpuVideoAcceleratorFactories; | |
18 } // namespace media | |
19 | |
20 namespace content { | |
21 | |
22 // This class creates RTCVideoEncoder instances (each wrapping a | |
23 // media::VideoEncodeAccelerator) on behalf of the WebRTC stack. | |
24 class CONTENT_EXPORT RTCVideoEncoderFactory | |
25 : NON_EXPORTED_BASE(public cricket::WebRtcVideoEncoderFactory) { | |
26 public: | |
27 explicit RTCVideoEncoderFactory( | |
28 media::GpuVideoAcceleratorFactories* gpu_factories); | |
29 ~RTCVideoEncoderFactory() override; | |
30 | |
31 // cricket::WebRtcVideoEncoderFactory implementation. | |
32 webrtc::VideoEncoder* CreateVideoEncoder( | |
33 webrtc::VideoCodecType type) override; | |
34 const std::vector<VideoCodec>& codecs() const override; | |
35 void DestroyVideoEncoder(webrtc::VideoEncoder* encoder) override; | |
36 | |
37 private: | |
38 media::GpuVideoAcceleratorFactories* gpu_factories_; | |
39 | |
40 // List of supported cricket::WebRtcVideoEncoderFactory::VideoCodec. | |
41 std::vector<VideoCodec> codecs_; | |
42 | |
43 DISALLOW_COPY_AND_ASSIGN(RTCVideoEncoderFactory); | |
44 }; | |
45 | |
46 } // namespace content | |
47 | |
48 #endif // CONTENT_RENDERER_MEDIA_RTC_VIDEO_ENCODER_FACTORY_H_ | |
OLD | NEW |