forked from mirrors/gstreamer-rs
subclass: clean up subclassing prelude/re-exports
Use re-export pattern from glib. Fix #255
This commit is contained in:
parent
1d886727d9
commit
6cd711cfdf
8 changed files with 47 additions and 40 deletions
|
@ -249,7 +249,7 @@ mod media {
|
|||
&self,
|
||||
media: &gst_rtsp_server::RTSPMedia,
|
||||
sdp: &mut gst_sdp::SDPMessageRef,
|
||||
info: &gst_rtsp_server::subclass::rtsp_media::SDPInfo,
|
||||
info: &gst_rtsp_server::subclass::SDPInfo,
|
||||
) -> Result<(), gst::LoggableError> {
|
||||
self.parent_setup_sdp(media, sdp, info)?;
|
||||
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
// except according to those terms.
|
||||
#![allow(clippy::cast_ptr_alignment)]
|
||||
|
||||
pub mod audio_decoder;
|
||||
pub mod audio_encoder;
|
||||
pub mod audio_sink;
|
||||
pub mod audio_src;
|
||||
mod audio_decoder;
|
||||
mod audio_encoder;
|
||||
mod audio_sink;
|
||||
mod audio_src;
|
||||
|
||||
pub mod prelude {
|
||||
pub use super::audio_decoder::{AudioDecoderImpl, AudioDecoderImplExt};
|
||||
|
|
|
@ -8,18 +8,20 @@
|
|||
// except according to those terms.
|
||||
#![allow(clippy::cast_ptr_alignment)]
|
||||
|
||||
pub mod base_parse;
|
||||
pub mod base_sink;
|
||||
mod base_parse;
|
||||
mod base_sink;
|
||||
// Public to namespace CreateSuccess
|
||||
pub mod base_src;
|
||||
// Public to namespace GenerateOutputSuccess and PrepareOutputBufferSuccess,
|
||||
pub mod base_transform;
|
||||
pub mod push_src;
|
||||
mod push_src;
|
||||
|
||||
pub use self::base_transform::BaseTransformMode;
|
||||
|
||||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
pub mod aggregator;
|
||||
mod aggregator;
|
||||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
pub mod aggregator_pad;
|
||||
mod aggregator_pad;
|
||||
|
||||
pub mod prelude {
|
||||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
|
|
|
@ -7,10 +7,12 @@
|
|||
// except according to those terms.
|
||||
#![allow(clippy::cast_ptr_alignment)]
|
||||
|
||||
pub mod rtsp_client;
|
||||
pub mod rtsp_media;
|
||||
pub mod rtsp_media_factory;
|
||||
pub mod rtsp_server;
|
||||
mod rtsp_client;
|
||||
mod rtsp_media;
|
||||
mod rtsp_media_factory;
|
||||
mod rtsp_server;
|
||||
|
||||
pub use self::rtsp_media::SDPInfo;
|
||||
|
||||
pub mod prelude {
|
||||
pub use super::rtsp_client::{RTSPClientImpl, RTSPClientImplExt};
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
// except according to those terms.
|
||||
#![allow(clippy::cast_ptr_alignment)]
|
||||
|
||||
pub mod video_decoder;
|
||||
pub mod video_encoder;
|
||||
mod video_decoder;
|
||||
mod video_encoder;
|
||||
|
||||
pub mod prelude {
|
||||
pub use super::video_decoder::{VideoDecoderImpl, VideoDecoderImplExt};
|
||||
|
|
|
@ -9,34 +9,37 @@
|
|||
#![allow(clippy::cast_ptr_alignment)]
|
||||
|
||||
#[macro_use]
|
||||
pub mod error;
|
||||
mod error;
|
||||
|
||||
#[cfg(any(feature = "v1_14"))]
|
||||
#[macro_use]
|
||||
#[path = "plugin_1_14.rs"]
|
||||
pub mod plugin;
|
||||
mod plugin;
|
||||
|
||||
#[cfg(not(any(feature = "v1_14")))]
|
||||
#[macro_use]
|
||||
#[path = "plugin_1_12.rs"]
|
||||
pub mod plugin;
|
||||
mod plugin;
|
||||
|
||||
pub mod bin;
|
||||
pub mod child_proxy;
|
||||
pub mod element;
|
||||
pub mod ghost_pad;
|
||||
pub mod pad;
|
||||
pub mod pipeline;
|
||||
mod bin;
|
||||
mod child_proxy;
|
||||
mod element;
|
||||
mod ghost_pad;
|
||||
mod pad;
|
||||
mod pipeline;
|
||||
|
||||
pub mod device;
|
||||
pub mod device_provider;
|
||||
mod device;
|
||||
mod device_provider;
|
||||
|
||||
pub mod clock;
|
||||
pub mod system_clock;
|
||||
mod clock;
|
||||
mod system_clock;
|
||||
|
||||
pub mod preset;
|
||||
pub mod tag_setter;
|
||||
pub mod uri_handler;
|
||||
mod preset;
|
||||
mod tag_setter;
|
||||
mod uri_handler;
|
||||
|
||||
pub use self::error::FlowError;
|
||||
pub use self::plugin::{MAJOR_VERSION, MINOR_VERSION};
|
||||
|
||||
pub mod prelude {
|
||||
pub use super::bin::{BinImpl, BinImplExt};
|
||||
|
|
|
@ -31,8 +31,8 @@ macro_rules! gst_plugin_define(
|
|||
#[no_mangle]
|
||||
#[allow(non_upper_case_globals)]
|
||||
pub static gst_plugin_desc: GstPluginDesc = GstPluginDesc($crate::gst_sys::GstPluginDesc {
|
||||
major_version: $crate::subclass::plugin::MAJOR_VERSION,
|
||||
minor_version: $crate::subclass::plugin::MINOR_VERSION,
|
||||
major_version: $crate::subclass::MAJOR_VERSION,
|
||||
minor_version: $crate::subclass::MINOR_VERSION,
|
||||
name: concat!(stringify!($name), "\0") as *const str as *const _,
|
||||
description: concat!($description, "\0") as *const str as *const _,
|
||||
plugin_init: Some(plugin_init_trampoline),
|
||||
|
@ -49,8 +49,8 @@ macro_rules! gst_plugin_define(
|
|||
unsafe {
|
||||
$crate::glib::glib_result_from_gboolean!(
|
||||
$crate::gst_sys::gst_plugin_register_static(
|
||||
$crate::subclass::plugin::MAJOR_VERSION,
|
||||
$crate::subclass::plugin::MINOR_VERSION,
|
||||
$crate::subclass::MAJOR_VERSION,
|
||||
$crate::subclass::MINOR_VERSION,
|
||||
concat!(stringify!($name), "\0") as *const str as *const _,
|
||||
concat!($description, "\0") as *const str as _,
|
||||
Some(plugin_init_trampoline),
|
||||
|
|
|
@ -29,8 +29,8 @@ macro_rules! gst_plugin_define(
|
|||
unsafe impl Sync for GstPluginDesc {}
|
||||
|
||||
static GST_PLUGIN_DESC: GstPluginDesc = GstPluginDesc($crate::gst_sys::GstPluginDesc {
|
||||
major_version: $crate::subclass::plugin::MAJOR_VERSION,
|
||||
minor_version: $crate::subclass::plugin::MINOR_VERSION,
|
||||
major_version: $crate::subclass::MAJOR_VERSION,
|
||||
minor_version: $crate::subclass::MINOR_VERSION,
|
||||
name: concat!(stringify!($name), "\0") as *const str as *const _,
|
||||
description: concat!($description, "\0") as *const str as *const _,
|
||||
plugin_init: Some(plugin_init_trampoline),
|
||||
|
@ -47,8 +47,8 @@ macro_rules! gst_plugin_define(
|
|||
unsafe {
|
||||
$crate::glib::glib_result_from_gboolean!(
|
||||
$crate::gst_sys::gst_plugin_register_static(
|
||||
$crate::subclass::plugin::MAJOR_VERSION,
|
||||
$crate::subclass::plugin::MINOR_VERSION,
|
||||
$crate::subclass::MAJOR_VERSION,
|
||||
$crate::subclass::MINOR_VERSION,
|
||||
concat!(stringify!($name), "\0") as *const str as *const _,
|
||||
concat!($description, "\0") as *const str as _,
|
||||
Some(plugin_init_trampoline),
|
||||
|
|
Loading…
Reference in a new issue