diff --git a/gstreamer/src/subclass/uri_handler.rs b/gstreamer/src/subclass/uri_handler.rs index 7f38b7440..f8bce2d47 100644 --- a/gstreamer/src/subclass/uri_handler.rs +++ b/gstreamer/src/subclass/uri_handler.rs @@ -9,10 +9,10 @@ use crate::URIHandler; use crate::URIType; pub trait URIHandlerImpl: super::element::ElementImpl { + const URI_TYPE: URIType; + fn get_protocols() -> &'static [&'static str]; fn get_uri(&self, element: &Self::Type) -> Option; fn set_uri(&self, element: &Self::Type, uri: &str) -> Result<(), glib::Error>; - fn get_uri_type() -> URIType; - fn get_protocols() -> Vec; } unsafe impl IsImplementable for URIHandler { @@ -43,7 +43,7 @@ unsafe impl IsImplementable for URIHandler { unsafe extern "C" fn uri_handler_get_type( _type_: glib::ffi::GType, ) -> ffi::GstURIType { - ::get_uri_type().to_glib() + ::URI_TYPE.to_glib() } unsafe extern "C" fn uri_handler_get_protocols(