OLD | NEW |
| (Empty) |
1 /* | |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | |
3 * | |
4 * Use of this source code is governed by a BSD-style license | |
5 * that can be found in the LICENSE file in the root of the source | |
6 * tree. An additional intellectual property rights grant can be found | |
7 * in the file PATENTS. All contributing project authors may | |
8 * be found in the AUTHORS file in the root of the source tree. | |
9 * | |
10 */ | |
11 #ifndef WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_VIDEOTOOLBOX_VIDEOCODECFACTORY_H_ | |
12 #define WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_VIDEOTOOLBOX_VIDEOCODECFACTORY_H_ | |
13 | |
14 #include "webrtc/media/engine/webrtcvideoencoderfactory.h" | |
15 #include "webrtc/media/engine/webrtcvideodecoderfactory.h" | |
16 | |
17 namespace webrtc { | |
18 | |
19 class VideoToolboxVideoEncoderFactory | |
20 : public cricket::WebRtcVideoEncoderFactory { | |
21 public: | |
22 VideoToolboxVideoEncoderFactory(); | |
23 ~VideoToolboxVideoEncoderFactory(); | |
24 | |
25 // WebRtcVideoEncoderFactory implementation. | |
26 VideoEncoder* CreateVideoEncoder(const cricket::VideoCodec& codec) override; | |
27 void DestroyVideoEncoder(VideoEncoder* encoder) override; | |
28 const std::vector<cricket::VideoCodec>& supported_codecs() const override; | |
29 | |
30 private: | |
31 // TODO(magjed): Mutable because it depends on a field trial and it is | |
32 // recalculated every call to supported_codecs(). | |
33 mutable std::vector<cricket::VideoCodec> supported_codecs_; | |
34 }; | |
35 | |
36 class VideoToolboxVideoDecoderFactory | |
37 : public cricket::WebRtcVideoDecoderFactory { | |
38 public: | |
39 VideoToolboxVideoDecoderFactory(); | |
40 ~VideoToolboxVideoDecoderFactory(); | |
41 | |
42 // WebRtcVideoDecoderFactory implementation. | |
43 VideoDecoder* CreateVideoDecoder(VideoCodecType type) override; | |
44 void DestroyVideoDecoder(VideoDecoder* decoder) override; | |
45 | |
46 private: | |
47 std::vector<cricket::VideoCodec> supported_codecs_; | |
48 }; | |
49 | |
50 } // namespace webrtc | |
51 | |
52 #endif // WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_VIDEOTOOLBOX_VIDEOCODECFACTORY_H_ | |
OLD | NEW |