OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 class VideoEncoder { | 76 class VideoEncoder { |
77 public: | 77 public: |
78 enum EncoderType { | 78 enum EncoderType { |
79 kH264, | 79 kH264, |
80 kVp8, | 80 kVp8, |
81 kVp9, | 81 kVp9, |
82 kUnsupportedCodec, | 82 kUnsupportedCodec, |
83 }; | 83 }; |
84 | 84 |
85 static VideoEncoder* Create(EncoderType codec_type); | 85 static VideoEncoder* Create(EncoderType codec_type); |
| 86 // Returns true if this type of encoder can be created using |
| 87 // VideoEncoder::Create. |
| 88 static bool IsSupportedSoftware(EncoderType codec_type); |
| 89 static EncoderType CodecToEncoderType(VideoCodecType codec_type); |
86 | 90 |
87 static VideoCodecVP8 GetDefaultVp8Settings(); | 91 static VideoCodecVP8 GetDefaultVp8Settings(); |
88 static VideoCodecVP9 GetDefaultVp9Settings(); | 92 static VideoCodecVP9 GetDefaultVp9Settings(); |
89 static VideoCodecH264 GetDefaultH264Settings(); | 93 static VideoCodecH264 GetDefaultH264Settings(); |
90 | 94 |
91 virtual ~VideoEncoder() {} | 95 virtual ~VideoEncoder() {} |
92 | 96 |
93 // Initialize the encoder with the information from the codecSettings | 97 // Initialize the encoder with the information from the codecSettings |
94 // | 98 // |
95 // Input: | 99 // Input: |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 | 215 |
212 const EncoderType encoder_type_; | 216 const EncoderType encoder_type_; |
213 webrtc::VideoEncoder* const encoder_; | 217 webrtc::VideoEncoder* const encoder_; |
214 | 218 |
215 std::unique_ptr<webrtc::VideoEncoder> fallback_encoder_; | 219 std::unique_ptr<webrtc::VideoEncoder> fallback_encoder_; |
216 std::string fallback_implementation_name_; | 220 std::string fallback_implementation_name_; |
217 EncodedImageCallback* callback_; | 221 EncodedImageCallback* callback_; |
218 }; | 222 }; |
219 } // namespace webrtc | 223 } // namespace webrtc |
220 #endif // WEBRTC_VIDEO_ENCODER_H_ | 224 #endif // WEBRTC_VIDEO_ENCODER_H_ |
OLD | NEW |