From 7cf66dbc618027b515bc891bf59922c7723fea23 Mon Sep 17 00:00:00 2001 From: Bilal Elmoussaoui Date: Thu, 6 Jul 2023 15:07:35 +0200 Subject: [PATCH] Adapt to bitflags update Part-of: --- gstreamer/src/element_factory_type.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gstreamer/src/element_factory_type.rs b/gstreamer/src/element_factory_type.rs index cb0c9cc47..5f45d104a 100644 --- a/gstreamer/src/element_factory_type.rs +++ b/gstreamer/src/element_factory_type.rs @@ -1,10 +1,10 @@ // Take a look at the license at the top of the repository in the LICENSE file. -use bitflags::bitflags; -use glib::translate::*; +use glib::{bitflags::bitflags, translate::*}; bitflags! { #[doc(alias = "GstElementFactoryListType")] + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] pub struct ElementFactoryType: u64 { #[doc(alias = "GST_ELEMENT_FACTORY_TYPE_DECODER")] const DECODER = ffi::GST_ELEMENT_FACTORY_TYPE_DECODER; @@ -51,10 +51,10 @@ bitflags! { #[doc(alias = "GST_ELEMENT_FACTORY_TYPE_MEDIA_ANY")] const MEDIA_ANY = ffi::GST_ELEMENT_FACTORY_TYPE_MEDIA_ANY; - const VIDEO_ENCODER = Self::ENCODER.bits | Self::MEDIA_VIDEO.bits | Self::MEDIA_IMAGE.bits; - const AUDIO_ENCODER = Self::ENCODER.bits | Self::MEDIA_AUDIO.bits; - const AUDIOVIDEO_SINKS = Self::SINK.bits | Self::MEDIA_AUDIO.bits | Self::MEDIA_VIDEO.bits | Self::MEDIA_IMAGE.bits; - const DECODABLE = Self::DECODER.bits | Self::DEMUXER.bits | Self::DEPAYLOADER.bits | Self::PARSER.bits | Self::DECRYPTOR.bits; + const VIDEO_ENCODER = Self::ENCODER.bits() | Self::MEDIA_VIDEO.bits() | Self::MEDIA_IMAGE.bits(); + const AUDIO_ENCODER = Self::ENCODER.bits() | Self::MEDIA_AUDIO.bits(); + const AUDIOVIDEO_SINKS = Self::SINK.bits() | Self::MEDIA_AUDIO.bits() | Self::MEDIA_VIDEO.bits() | Self::MEDIA_IMAGE.bits(); + const DECODABLE = Self::DECODER.bits() | Self::DEMUXER.bits() | Self::DEPAYLOADER.bits() | Self::PARSER.bits() | Self::DECRYPTOR.bits(); } }