blob: c68f80acebaa1a60ab258547aab7da73efab8b81 [file] [log] [blame]
/*
* Copyright (c) 2018 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef API_VIDEO_VIDEO_CODEC_TYPE_H_
#define API_VIDEO_VIDEO_CODEC_TYPE_H_
namespace webrtc {
enum VideoCodecType {
// There are various memset(..., 0, ...) calls in the code that rely on
// kVideoCodecGeneric being zero.
kVideoCodecGeneric = 0,
kVideoCodecVP8,
kVideoCodecVP9,
kVideoCodecAV1,
kVideoCodecH264,
kVideoCodecH265,
};
template <typename Sink>
void AbslStringify(Sink& sink, VideoCodecType codec_type) {
switch (codec_type) {
case kVideoCodecGeneric:
sink.Append("Generic");
return;
case kVideoCodecVP8:
sink.Append("VP8");
return;
case kVideoCodecVP9:
sink.Append("VP9");
return;
case kVideoCodecAV1:
sink.Append("AV1");
return;
case kVideoCodecH264:
sink.Append("H264");
return;
case kVideoCodecH265:
sink.Append("H265");
return;
}
sink.Append("Unknown");
}
} // namespace webrtc
#endif // API_VIDEO_VIDEO_CODEC_TYPE_H_