| Index: webrtc/video_encoder.h
|
| diff --git a/webrtc/video_encoder.h b/webrtc/video_encoder.h
|
| index d8b7921bc07fad057cfc438021c41c6219b134a6..0a36251ed2cf8c508219c24b60895d06580127c7 100644
|
| --- a/webrtc/video_encoder.h
|
| +++ b/webrtc/video_encoder.h
|
| @@ -16,6 +16,7 @@
|
| #include <vector>
|
|
|
| #include "webrtc/common_types.h"
|
| +#include "webrtc/media/base/codec.h"
|
| #include "webrtc/typedefs.h"
|
| #include "webrtc/video_frame.h"
|
|
|
| @@ -75,18 +76,10 @@ class EncodedImageCallback {
|
|
|
| class VideoEncoder {
|
| public:
|
| - enum EncoderType {
|
| - kH264,
|
| - kVp8,
|
| - kVp9,
|
| - kUnsupportedCodec,
|
| - };
|
| -
|
| - static VideoEncoder* Create(EncoderType codec_type);
|
| + static VideoEncoder* Create(const cricket::VideoCodec& codec);
|
| // Returns true if this type of encoder can be created using
|
| // VideoEncoder::Create.
|
| - static bool IsSupportedSoftware(EncoderType codec_type);
|
| - static EncoderType CodecToEncoderType(VideoCodecType codec_type);
|
| + static bool IsSupportedSoftware(const cricket::VideoCodec& codec);
|
|
|
| static VideoCodecVP8 GetDefaultVp8Settings();
|
| static VideoCodecVP9 GetDefaultVp9Settings();
|
| @@ -174,7 +167,7 @@ class VideoEncoder {
|
| // hardware restrictions, such as max resolution.
|
| class VideoEncoderSoftwareFallbackWrapper : public VideoEncoder {
|
| public:
|
| - VideoEncoderSoftwareFallbackWrapper(VideoCodecType codec_type,
|
| + VideoEncoderSoftwareFallbackWrapper(const cricket::VideoCodec& codec,
|
| webrtc::VideoEncoder* encoder);
|
|
|
| int32_t InitEncode(const VideoCodec* codec_settings,
|
| @@ -213,7 +206,7 @@ class VideoEncoderSoftwareFallbackWrapper : public VideoEncoder {
|
| uint32_t packet_loss_;
|
| int64_t rtt_;
|
|
|
| - const EncoderType encoder_type_;
|
| + const cricket::VideoCodec codec_;
|
| webrtc::VideoEncoder* const encoder_;
|
|
|
| std::unique_ptr<webrtc::VideoEncoder> fallback_encoder_;
|
|
|