Add missing enum variants for FFmpeg 6.1 (#16)

This commit is contained in:
FreezyLemon
2024-04-03 18:27:13 +02:00
committed by GitHub
parent e294e14fe2
commit f269020af8
3 changed files with 41 additions and 1 deletions

View File

@ -658,6 +658,10 @@ pub enum Id {
VMIX,
#[cfg(feature = "ffmpeg_6_1")]
AC4,
#[cfg(feature = "ffmpeg_6_1")]
OSQ,
#[cfg(feature = "ffmpeg_6_1")]
SMPTE_2038,
}
impl Id {
@ -1310,6 +1314,21 @@ impl From<AVCodecID> for Id {
#[cfg(feature = "ffmpeg_6_0")]
AV_CODEC_ID_ANULL => Id::ANULL,
#[cfg(feature = "ffmpeg_6_1")]
AV_CODEC_ID_PDV => Id::PDV,
#[cfg(feature = "ffmpeg_6_1")]
AV_CODEC_ID_EVC => Id::EVC,
#[cfg(feature = "ffmpeg_6_1")]
AV_CODEC_ID_RTV1 => Id::RTV1,
#[cfg(feature = "ffmpeg_6_1")]
AV_CODEC_ID_VMIX => Id::VMIX,
#[cfg(feature = "ffmpeg_6_1")]
AV_CODEC_ID_AC4 => Id::AC4,
#[cfg(feature = "ffmpeg_6_1")]
AV_CODEC_ID_OSQ => Id::OSQ,
#[cfg(feature = "ffmpeg_6_1")]
AV_CODEC_ID_SMPTE_2038 => Id::SMPTE_2038,
#[cfg(feature = "non-exhaustive-enums")]
_ => unimplemented!(),
}
@ -1965,6 +1984,10 @@ impl From<Id> for AVCodecID {
Id::VMIX => AV_CODEC_ID_VMIX,
#[cfg(feature = "ffmpeg_6_1")]
Id::AC4 => AV_CODEC_ID_AC4,
#[cfg(feature = "ffmpeg_6_1")]
Id::OSQ => AV_CODEC_ID_OSQ,
#[cfg(feature = "ffmpeg_6_1")]
Id::SMPTE_2038 => AV_CODEC_ID_SMPTE_2038,
}
}
}