From b26edd70b859331218e87a50bc046a271fae4ec9 Mon Sep 17 00:00:00 2001 From: Bitworks LLC Date: Mon, 12 Sep 2022 14:16:09 +0400 Subject: [PATCH 1/5] Update pixel.rs --- src/util/format/pixel.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/util/format/pixel.rs b/src/util/format/pixel.rs index e582f741..b1a5cf06 100644 --- a/src/util/format/pixel.rs +++ b/src/util/format/pixel.rs @@ -742,6 +742,7 @@ impl From for Pixel { AV_PIX_FMT_RPI4_8 => Pixel::RPI4_8, #[cfg(feature = "rpi")] AV_PIX_FMT_RPI4_10 => Pixel::RPI4_10, + _ => todo!() } } } @@ -1122,6 +1123,7 @@ impl From for AVPixelFormat { Pixel::RPI4_8 => AV_PIX_FMT_RPI4_8, #[cfg(feature = "rpi")] Pixel::RPI4_10 => AV_PIX_FMT_RPI4_10, + _ => todo!() } } } From de415fea8a488e1158682adf732c8ed463e622b4 Mon Sep 17 00:00:00 2001 From: Bitworks LLC Date: Tue, 13 Sep 2022 14:56:09 +0400 Subject: [PATCH 2/5] Update pixel.rs --- src/util/format/pixel.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/format/pixel.rs b/src/util/format/pixel.rs index b1a5cf06..2e5e4c4b 100644 --- a/src/util/format/pixel.rs +++ b/src/util/format/pixel.rs @@ -742,7 +742,7 @@ impl From for Pixel { AV_PIX_FMT_RPI4_8 => Pixel::RPI4_8, #[cfg(feature = "rpi")] AV_PIX_FMT_RPI4_10 => Pixel::RPI4_10, - _ => todo!() + _ => unimplemented!("Not all current or future pixel formats are supported yet") } } } @@ -1123,7 +1123,7 @@ impl From for AVPixelFormat { Pixel::RPI4_8 => AV_PIX_FMT_RPI4_8, #[cfg(feature = "rpi")] Pixel::RPI4_10 => AV_PIX_FMT_RPI4_10, - _ => todo!() + _ => unimplemented!("Not all current or future pixel formats are supported yet") } } } From 807014859d57fad6b65dea731ee24fcb3a0460b2 Mon Sep 17 00:00:00 2001 From: Bitworks LLC Date: Tue, 13 Sep 2022 15:03:39 +0400 Subject: [PATCH 3/5] Update pixel.rs --- src/util/format/pixel.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/format/pixel.rs b/src/util/format/pixel.rs index 2e5e4c4b..8f23f0b3 100644 --- a/src/util/format/pixel.rs +++ b/src/util/format/pixel.rs @@ -742,7 +742,7 @@ impl From for Pixel { AV_PIX_FMT_RPI4_8 => Pixel::RPI4_8, #[cfg(feature = "rpi")] AV_PIX_FMT_RPI4_10 => Pixel::RPI4_10, - _ => unimplemented!("Not all current or future pixel formats are supported yet") + _ => unimplemented!("Not all current or future pixel formats are supported yet"), } } } @@ -1123,7 +1123,7 @@ impl From for AVPixelFormat { Pixel::RPI4_8 => AV_PIX_FMT_RPI4_8, #[cfg(feature = "rpi")] Pixel::RPI4_10 => AV_PIX_FMT_RPI4_10, - _ => unimplemented!("Not all current or future pixel formats are supported yet") + _ => unimplemented!("Not all current or future pixel formats are supported yet"), } } } From c29a649abc2527c6644671b3aafc5591dac6787d Mon Sep 17 00:00:00 2001 From: FreezyLemon Date: Sat, 22 Oct 2022 16:25:24 +0200 Subject: [PATCH 4/5] add wildcard branches for matches on enums --- src/codec/audio_service.rs | 2 ++ src/codec/discard.rs | 2 ++ src/codec/field_order.rs | 2 ++ src/codec/id.rs | 2 ++ src/codec/packet/side_data.rs | 2 ++ src/codec/subtitle/mod.rs | 2 ++ src/software/resampling/dither.rs | 2 ++ src/software/resampling/engine.rs | 2 ++ src/software/resampling/filter.rs | 2 ++ src/util/chroma/location.rs | 2 ++ src/util/color/primaries.rs | 2 ++ src/util/color/range.rs | 2 ++ src/util/color/space.rs | 2 ++ src/util/color/transfer_characteristic.rs | 2 ++ src/util/format/pixel.rs | 2 ++ src/util/format/sample.rs | 2 ++ src/util/frame/side_data.rs | 2 ++ src/util/mathematics/rounding.rs | 2 ++ src/util/media.rs | 2 ++ src/util/option/mod.rs | 2 ++ src/util/picture.rs | 2 ++ 21 files changed, 42 insertions(+) diff --git a/src/codec/audio_service.rs b/src/codec/audio_service.rs index 37486ce4..008b8013 100644 --- a/src/codec/audio_service.rs +++ b/src/codec/audio_service.rs @@ -27,6 +27,8 @@ impl From for AudioService { AV_AUDIO_SERVICE_TYPE_VOICE_OVER => AudioService::VoiceOver, AV_AUDIO_SERVICE_TYPE_KARAOKE => AudioService::Karaoke, AV_AUDIO_SERVICE_TYPE_NB => AudioService::Main, + + _ => unimplemented!(), } } } diff --git a/src/codec/discard.rs b/src/codec/discard.rs index 156712cb..72e64d3f 100644 --- a/src/codec/discard.rs +++ b/src/codec/discard.rs @@ -22,6 +22,8 @@ impl From for Discard { AVDISCARD_NONINTRA => Discard::NonIntra, AVDISCARD_NONKEY => Discard::NonKey, AVDISCARD_ALL => Discard::All, + + _ => unimplemented!(), } } } diff --git a/src/codec/field_order.rs b/src/codec/field_order.rs index 67a5b7e2..abc2d574 100644 --- a/src/codec/field_order.rs +++ b/src/codec/field_order.rs @@ -20,6 +20,8 @@ impl From for FieldOrder { AV_FIELD_BB => FieldOrder::BB, AV_FIELD_TB => FieldOrder::TB, AV_FIELD_BT => FieldOrder::BT, + + _ => unimplemented!(), } } } diff --git a/src/codec/id.rs b/src/codec/id.rs index 8999353e..c5c787c1 100644 --- a/src/codec/id.rs +++ b/src/codec/id.rs @@ -1233,6 +1233,8 @@ impl From for Id { AV_CODEC_ID_PHM => Id::PHM, #[cfg(feature = "ffmpeg_5_1")] AV_CODEC_ID_DFPWM => Id::DFPWM, + + _ => unimplemented!(), } } } diff --git a/src/codec/packet/side_data.rs b/src/codec/packet/side_data.rs index 13234d38..78740c4f 100644 --- a/src/codec/packet/side_data.rs +++ b/src/codec/packet/side_data.rs @@ -106,6 +106,8 @@ impl From for Type { #[cfg(feature = "ffmpeg_5_0")] AV_PKT_DATA_DYNAMIC_HDR10_PLUS => Type::DYNAMIC_HDR10_PLUS, + + _ => unimplemented!(), } } } diff --git a/src/codec/subtitle/mod.rs b/src/codec/subtitle/mod.rs index f59da2d4..e3f694d0 100644 --- a/src/codec/subtitle/mod.rs +++ b/src/codec/subtitle/mod.rs @@ -29,6 +29,8 @@ impl From for Type { SUBTITLE_BITMAP => Type::Bitmap, SUBTITLE_TEXT => Type::Text, SUBTITLE_ASS => Type::Ass, + + _ => unimplemented!(), } } } diff --git a/src/software/resampling/dither.rs b/src/software/resampling/dither.rs index fc991059..c9c6ee47 100644 --- a/src/software/resampling/dither.rs +++ b/src/software/resampling/dither.rs @@ -34,6 +34,8 @@ impl From for Dither { SWR_DITHER_NS_LOW_SHIBATA => Dither::NoiseShapingLowShibata, SWR_DITHER_NS_HIGH_SHIBATA => Dither::NoiseShapingHighShibata, SWR_DITHER_NB => Dither::None, + + _ => unimplemented!(), } } } diff --git a/src/software/resampling/engine.rs b/src/software/resampling/engine.rs index cc2681a1..335eca4f 100644 --- a/src/software/resampling/engine.rs +++ b/src/software/resampling/engine.rs @@ -13,6 +13,8 @@ impl From for Engine { SWR_ENGINE_SWR => Engine::Software, SWR_ENGINE_SOXR => Engine::SoundExchange, SWR_ENGINE_NB => Engine::Software, + + _ => unimplemented!(), } } } diff --git a/src/software/resampling/filter.rs b/src/software/resampling/filter.rs index 3d5b9cc1..7bf2aa59 100644 --- a/src/software/resampling/filter.rs +++ b/src/software/resampling/filter.rs @@ -14,6 +14,8 @@ impl From for Filter { SWR_FILTER_TYPE_CUBIC => Filter::Cubic, SWR_FILTER_TYPE_BLACKMAN_NUTTALL => Filter::BlackmanNuttall, SWR_FILTER_TYPE_KAISER => Filter::Kaiser, + + _ => unimplemented!(), } } } diff --git a/src/util/chroma/location.rs b/src/util/chroma/location.rs index 28f15bb2..f4e56e32 100644 --- a/src/util/chroma/location.rs +++ b/src/util/chroma/location.rs @@ -23,6 +23,8 @@ impl From for Location { AVCHROMA_LOC_BOTTOMLEFT => Location::BottomLeft, AVCHROMA_LOC_BOTTOM => Location::Bottom, AVCHROMA_LOC_NB => Location::Unspecified, + + _ => unimplemented!(), } } } diff --git a/src/util/color/primaries.rs b/src/util/color/primaries.rs index 0ae557fc..91ccfe39 100644 --- a/src/util/color/primaries.rs +++ b/src/util/color/primaries.rs @@ -66,6 +66,8 @@ impl From for Primaries { AVCOL_PRI_JEDEC_P22 => Primaries::JEDEC_P22, #[cfg(feature = "ffmpeg_4_3")] AVCOL_PRI_EBU3213 => Primaries::EBU3213, + + _ => unimplemented!(), } } } diff --git a/src/util/color/range.rs b/src/util/color/range.rs index e1ad3958..e527d087 100644 --- a/src/util/color/range.rs +++ b/src/util/color/range.rs @@ -31,6 +31,8 @@ impl From for Range { AVCOL_RANGE_MPEG => Range::MPEG, AVCOL_RANGE_JPEG => Range::JPEG, AVCOL_RANGE_NB => Range::Unspecified, + + _ => unimplemented!(), } } } diff --git a/src/util/color/space.rs b/src/util/color/space.rs index 82dde415..247f7b3b 100644 --- a/src/util/color/space.rs +++ b/src/util/color/space.rs @@ -59,6 +59,8 @@ impl From for Space { AVCOL_SPC_CHROMA_DERIVED_NCL => Space::ChromaDerivedNCL, AVCOL_SPC_CHROMA_DERIVED_CL => Space::ChromaDerivedCL, AVCOL_SPC_ICTCP => Space::ICTCP, + + _ => unimplemented!(), } } } diff --git a/src/util/color/transfer_characteristic.rs b/src/util/color/transfer_characteristic.rs index e35aad0e..69925343 100644 --- a/src/util/color/transfer_characteristic.rs +++ b/src/util/color/transfer_characteristic.rs @@ -63,6 +63,8 @@ impl From for TransferCharacteristic { AVCOL_TRC_SMPTE2084 => TransferCharacteristic::SMPTE2084, AVCOL_TRC_SMPTE428 => TransferCharacteristic::SMPTE428, AVCOL_TRC_ARIB_STD_B67 => TransferCharacteristic::ARIB_STD_B67, + + _ => unimplemented!(), } } } diff --git a/src/util/format/pixel.rs b/src/util/format/pixel.rs index e582f741..33871722 100644 --- a/src/util/format/pixel.rs +++ b/src/util/format/pixel.rs @@ -742,6 +742,8 @@ impl From for Pixel { AV_PIX_FMT_RPI4_8 => Pixel::RPI4_8, #[cfg(feature = "rpi")] AV_PIX_FMT_RPI4_10 => Pixel::RPI4_10, + + _ => unimplemented!(), } } } diff --git a/src/util/format/sample.rs b/src/util/format/sample.rs index 7f1b14dd..724120d6 100644 --- a/src/util/format/sample.rs +++ b/src/util/format/sample.rs @@ -86,6 +86,8 @@ impl From for Sample { AV_SAMPLE_FMT_DBLP => Sample::F64(Type::Planar), AV_SAMPLE_FMT_NB => Sample::None, + + _ => unimplemented!(), } } } diff --git a/src/util/frame/side_data.rs b/src/util/frame/side_data.rs index ae375a0c..f88d9c1d 100644 --- a/src/util/frame/side_data.rs +++ b/src/util/frame/side_data.rs @@ -120,6 +120,8 @@ impl From for Type { #[cfg(feature = "ffmpeg_5_1")] AV_FRAME_DATA_DYNAMIC_HDR_VIVID => Type::DYNAMIC_HDR_VIVID, + + _ => unimplemented!(), } } } diff --git a/src/util/mathematics/rounding.rs b/src/util/mathematics/rounding.rs index b3d279d4..6ac81453 100644 --- a/src/util/mathematics/rounding.rs +++ b/src/util/mathematics/rounding.rs @@ -21,6 +21,8 @@ impl From for Rounding { AV_ROUND_UP => Rounding::Up, AV_ROUND_NEAR_INF => Rounding::NearInfinity, AV_ROUND_PASS_MINMAX => Rounding::PassMinMax, + + _ => unimplemented!(), } } } diff --git a/src/util/media.rs b/src/util/media.rs index 531f624f..6c6d243e 100644 --- a/src/util/media.rs +++ b/src/util/media.rs @@ -22,6 +22,8 @@ impl From for Type { AVMEDIA_TYPE_SUBTITLE => Type::Subtitle, AVMEDIA_TYPE_ATTACHMENT => Type::Attachment, AVMEDIA_TYPE_NB => Type::Unknown, + + _ => unimplemented!(), } } } diff --git a/src/util/option/mod.rs b/src/util/option/mod.rs index e340d980..406dfcd8 100644 --- a/src/util/option/mod.rs +++ b/src/util/option/mod.rs @@ -53,6 +53,8 @@ impl From for Type { AV_OPT_TYPE_CHANNEL_LAYOUT => Type::ChannelLayout, #[cfg(feature = "ffmpeg_5_1")] AV_OPT_TYPE_CHLAYOUT => Type::ChannelLayout, + + _ => unimplemented!(), } } } diff --git a/src/util/picture.rs b/src/util/picture.rs index c89a918b..916af04e 100644 --- a/src/util/picture.rs +++ b/src/util/picture.rs @@ -25,6 +25,8 @@ impl From for Type { AV_PICTURE_TYPE_SI => Type::SI, AV_PICTURE_TYPE_SP => Type::SP, AV_PICTURE_TYPE_BI => Type::BI, + + _ => unimplemented!(), } } } From d6aa5a328ee0d163bdd69d5af0dbf3fc0a9fdd1a Mon Sep 17 00:00:00 2001 From: FreezyLemon Date: Sat, 22 Oct 2022 17:28:37 +0200 Subject: [PATCH 5/5] add feature non-exhaustive-enums --- Cargo.toml | 5 ++++- src/codec/audio_service.rs | 1 + src/codec/discard.rs | 1 + src/codec/field_order.rs | 1 + src/codec/id.rs | 1 + src/codec/packet/side_data.rs | 1 + src/codec/subtitle/mod.rs | 1 + src/software/resampling/dither.rs | 1 + src/software/resampling/engine.rs | 1 + src/software/resampling/filter.rs | 1 + src/util/chroma/location.rs | 1 + src/util/color/primaries.rs | 1 + src/util/color/range.rs | 1 + src/util/color/space.rs | 1 + src/util/color/transfer_characteristic.rs | 1 + src/util/format/pixel.rs | 1 + src/util/format/sample.rs | 1 + src/util/frame/side_data.rs | 1 + src/util/mathematics/rounding.rs | 1 + src/util/media.rs | 1 + src/util/option/mod.rs | 1 + src/util/picture.rs | 1 + 22 files changed, 25 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 313ddf7d..a1c11577 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,7 @@ keywords = ["ffmpeg", "multimedia", "video", "audio"] categories = ["multimedia"] [features] -default = ["codec", "device", "filter", "format", "software-resampling", "software-scaling"] +default = ["codec", "device", "filter", "format", "software-resampling", "software-scaling", "non-exhaustive-enums"] # ffmpeg are obsolete features kept for backward compatibility purposes and # don't do anything anymore (equivalents are automatically specified through @@ -29,6 +29,9 @@ ffmpeg4 = [] static = ["ffmpeg-sys-next/static"] build = ["static", "ffmpeg-sys-next/build"] +# mark enums in generated bindings as #[non_exhaustive] +non-exhaustive-enums = ["ffmpeg-sys-next/non-exhaustive-enums"] + # licensing build-license-gpl = ["ffmpeg-sys-next/build-license-gpl"] build-license-nonfree = ["ffmpeg-sys-next/build-license-nonfree"] diff --git a/src/codec/audio_service.rs b/src/codec/audio_service.rs index 008b8013..91837a3a 100644 --- a/src/codec/audio_service.rs +++ b/src/codec/audio_service.rs @@ -28,6 +28,7 @@ impl From for AudioService { AV_AUDIO_SERVICE_TYPE_KARAOKE => AudioService::Karaoke, AV_AUDIO_SERVICE_TYPE_NB => AudioService::Main, + #[cfg(feature = "non-exhaustive-enums")] _ => unimplemented!(), } } diff --git a/src/codec/discard.rs b/src/codec/discard.rs index 72e64d3f..b540ef84 100644 --- a/src/codec/discard.rs +++ b/src/codec/discard.rs @@ -23,6 +23,7 @@ impl From for Discard { AVDISCARD_NONKEY => Discard::NonKey, AVDISCARD_ALL => Discard::All, + #[cfg(feature = "non-exhaustive-enums")] _ => unimplemented!(), } } diff --git a/src/codec/field_order.rs b/src/codec/field_order.rs index abc2d574..4fba0426 100644 --- a/src/codec/field_order.rs +++ b/src/codec/field_order.rs @@ -21,6 +21,7 @@ impl From for FieldOrder { AV_FIELD_TB => FieldOrder::TB, AV_FIELD_BT => FieldOrder::BT, + #[cfg(feature = "non-exhaustive-enums")] _ => unimplemented!(), } } diff --git a/src/codec/id.rs b/src/codec/id.rs index c5c787c1..8f7cd0a6 100644 --- a/src/codec/id.rs +++ b/src/codec/id.rs @@ -1234,6 +1234,7 @@ impl From for Id { #[cfg(feature = "ffmpeg_5_1")] AV_CODEC_ID_DFPWM => Id::DFPWM, + #[cfg(feature = "non-exhaustive-enums")] _ => unimplemented!(), } } diff --git a/src/codec/packet/side_data.rs b/src/codec/packet/side_data.rs index 78740c4f..1b4d8544 100644 --- a/src/codec/packet/side_data.rs +++ b/src/codec/packet/side_data.rs @@ -107,6 +107,7 @@ impl From for Type { #[cfg(feature = "ffmpeg_5_0")] AV_PKT_DATA_DYNAMIC_HDR10_PLUS => Type::DYNAMIC_HDR10_PLUS, + #[cfg(feature = "non-exhaustive-enums")] _ => unimplemented!(), } } diff --git a/src/codec/subtitle/mod.rs b/src/codec/subtitle/mod.rs index e3f694d0..c0c63b14 100644 --- a/src/codec/subtitle/mod.rs +++ b/src/codec/subtitle/mod.rs @@ -30,6 +30,7 @@ impl From for Type { SUBTITLE_TEXT => Type::Text, SUBTITLE_ASS => Type::Ass, + #[cfg(feature = "non-exhaustive-enums")] _ => unimplemented!(), } } diff --git a/src/software/resampling/dither.rs b/src/software/resampling/dither.rs index c9c6ee47..4dd9586b 100644 --- a/src/software/resampling/dither.rs +++ b/src/software/resampling/dither.rs @@ -35,6 +35,7 @@ impl From for Dither { SWR_DITHER_NS_HIGH_SHIBATA => Dither::NoiseShapingHighShibata, SWR_DITHER_NB => Dither::None, + #[cfg(feature = "non-exhaustive-enums")] _ => unimplemented!(), } } diff --git a/src/software/resampling/engine.rs b/src/software/resampling/engine.rs index 335eca4f..b14a8a9f 100644 --- a/src/software/resampling/engine.rs +++ b/src/software/resampling/engine.rs @@ -14,6 +14,7 @@ impl From for Engine { SWR_ENGINE_SOXR => Engine::SoundExchange, SWR_ENGINE_NB => Engine::Software, + #[cfg(feature = "non-exhaustive-enums")] _ => unimplemented!(), } } diff --git a/src/software/resampling/filter.rs b/src/software/resampling/filter.rs index 7bf2aa59..d85c4e2e 100644 --- a/src/software/resampling/filter.rs +++ b/src/software/resampling/filter.rs @@ -15,6 +15,7 @@ impl From for Filter { SWR_FILTER_TYPE_BLACKMAN_NUTTALL => Filter::BlackmanNuttall, SWR_FILTER_TYPE_KAISER => Filter::Kaiser, + #[cfg(feature = "non-exhaustive-enums")] _ => unimplemented!(), } } diff --git a/src/util/chroma/location.rs b/src/util/chroma/location.rs index f4e56e32..25147922 100644 --- a/src/util/chroma/location.rs +++ b/src/util/chroma/location.rs @@ -24,6 +24,7 @@ impl From for Location { AVCHROMA_LOC_BOTTOM => Location::Bottom, AVCHROMA_LOC_NB => Location::Unspecified, + #[cfg(feature = "non-exhaustive-enums")] _ => unimplemented!(), } } diff --git a/src/util/color/primaries.rs b/src/util/color/primaries.rs index 91ccfe39..323a0402 100644 --- a/src/util/color/primaries.rs +++ b/src/util/color/primaries.rs @@ -67,6 +67,7 @@ impl From for Primaries { #[cfg(feature = "ffmpeg_4_3")] AVCOL_PRI_EBU3213 => Primaries::EBU3213, + #[cfg(feature = "non-exhaustive-enums")] _ => unimplemented!(), } } diff --git a/src/util/color/range.rs b/src/util/color/range.rs index e527d087..476886ad 100644 --- a/src/util/color/range.rs +++ b/src/util/color/range.rs @@ -32,6 +32,7 @@ impl From for Range { AVCOL_RANGE_JPEG => Range::JPEG, AVCOL_RANGE_NB => Range::Unspecified, + #[cfg(feature = "non-exhaustive-enums")] _ => unimplemented!(), } } diff --git a/src/util/color/space.rs b/src/util/color/space.rs index 247f7b3b..c38e8e7f 100644 --- a/src/util/color/space.rs +++ b/src/util/color/space.rs @@ -60,6 +60,7 @@ impl From for Space { AVCOL_SPC_CHROMA_DERIVED_CL => Space::ChromaDerivedCL, AVCOL_SPC_ICTCP => Space::ICTCP, + #[cfg(feature = "non-exhaustive-enums")] _ => unimplemented!(), } } diff --git a/src/util/color/transfer_characteristic.rs b/src/util/color/transfer_characteristic.rs index 69925343..965e6285 100644 --- a/src/util/color/transfer_characteristic.rs +++ b/src/util/color/transfer_characteristic.rs @@ -64,6 +64,7 @@ impl From for TransferCharacteristic { AVCOL_TRC_SMPTE428 => TransferCharacteristic::SMPTE428, AVCOL_TRC_ARIB_STD_B67 => TransferCharacteristic::ARIB_STD_B67, + #[cfg(feature = "non-exhaustive-enums")] _ => unimplemented!(), } } diff --git a/src/util/format/pixel.rs b/src/util/format/pixel.rs index 33871722..68f5408f 100644 --- a/src/util/format/pixel.rs +++ b/src/util/format/pixel.rs @@ -743,6 +743,7 @@ impl From for Pixel { #[cfg(feature = "rpi")] AV_PIX_FMT_RPI4_10 => Pixel::RPI4_10, + #[cfg(feature = "non-exhaustive-enums")] _ => unimplemented!(), } } diff --git a/src/util/format/sample.rs b/src/util/format/sample.rs index 724120d6..5f8f4f56 100644 --- a/src/util/format/sample.rs +++ b/src/util/format/sample.rs @@ -87,6 +87,7 @@ impl From for Sample { AV_SAMPLE_FMT_NB => Sample::None, + #[cfg(feature = "non-exhaustive-enums")] _ => unimplemented!(), } } diff --git a/src/util/frame/side_data.rs b/src/util/frame/side_data.rs index f88d9c1d..a9ac82e6 100644 --- a/src/util/frame/side_data.rs +++ b/src/util/frame/side_data.rs @@ -121,6 +121,7 @@ impl From for Type { #[cfg(feature = "ffmpeg_5_1")] AV_FRAME_DATA_DYNAMIC_HDR_VIVID => Type::DYNAMIC_HDR_VIVID, + #[cfg(feature = "non-exhaustive-enums")] _ => unimplemented!(), } } diff --git a/src/util/mathematics/rounding.rs b/src/util/mathematics/rounding.rs index 6ac81453..abe2800f 100644 --- a/src/util/mathematics/rounding.rs +++ b/src/util/mathematics/rounding.rs @@ -22,6 +22,7 @@ impl From for Rounding { AV_ROUND_NEAR_INF => Rounding::NearInfinity, AV_ROUND_PASS_MINMAX => Rounding::PassMinMax, + #[cfg(feature = "non-exhaustive-enums")] _ => unimplemented!(), } } diff --git a/src/util/media.rs b/src/util/media.rs index 6c6d243e..ff9ca292 100644 --- a/src/util/media.rs +++ b/src/util/media.rs @@ -23,6 +23,7 @@ impl From for Type { AVMEDIA_TYPE_ATTACHMENT => Type::Attachment, AVMEDIA_TYPE_NB => Type::Unknown, + #[cfg(feature = "non-exhaustive-enums")] _ => unimplemented!(), } } diff --git a/src/util/option/mod.rs b/src/util/option/mod.rs index 406dfcd8..a858630a 100644 --- a/src/util/option/mod.rs +++ b/src/util/option/mod.rs @@ -54,6 +54,7 @@ impl From for Type { #[cfg(feature = "ffmpeg_5_1")] AV_OPT_TYPE_CHLAYOUT => Type::ChannelLayout, + #[cfg(feature = "non-exhaustive-enums")] _ => unimplemented!(), } } diff --git a/src/util/picture.rs b/src/util/picture.rs index 916af04e..de2e5335 100644 --- a/src/util/picture.rs +++ b/src/util/picture.rs @@ -26,6 +26,7 @@ impl From for Type { AV_PICTURE_TYPE_SP => Type::SP, AV_PICTURE_TYPE_BI => Type::BI, + #[cfg(feature = "non-exhaustive-enums")] _ => unimplemented!(), } }