mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-25 02:51:10 +00:00
Re-export all dependency crates and their preludes
This makes code in examples potentially simpler.
This commit is contained in:
parent
53aae7ddba
commit
68839c0e79
22 changed files with 142 additions and 4 deletions
|
@ -3,6 +3,9 @@
|
|||
#![cfg_attr(feature = "dox", feature(doc_cfg))]
|
||||
|
||||
pub use ffi;
|
||||
pub use glib;
|
||||
pub use gst;
|
||||
pub use gst_base;
|
||||
|
||||
macro_rules! skip_assert_initialized {
|
||||
() => {};
|
||||
|
@ -23,8 +26,12 @@ pub use crate::app_src::AppSrcCallbacks;
|
|||
// Re-export all the traits in a prelude module, so that applications
|
||||
// can always "use gst::prelude::*" without getting conflicts
|
||||
pub mod prelude {
|
||||
#[doc(hidden)]
|
||||
pub use glib::prelude::*;
|
||||
#[doc(hidden)]
|
||||
pub use gst::prelude::*;
|
||||
#[doc(hidden)]
|
||||
pub use gst_base::prelude::*;
|
||||
|
||||
pub use crate::auto::traits::*;
|
||||
}
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
#![cfg_attr(feature = "dox", feature(doc_cfg))]
|
||||
|
||||
pub use ffi;
|
||||
pub use glib;
|
||||
pub use gst;
|
||||
pub use gst_base;
|
||||
|
||||
macro_rules! assert_initialized_main_thread {
|
||||
() => {
|
||||
|
@ -55,8 +58,12 @@ pub use crate::audio_encoder::AudioEncoderExtManual;
|
|||
// Re-export all the traits in a prelude module, so that applications
|
||||
// can always "use gst::prelude::*" without getting conflicts
|
||||
pub mod prelude {
|
||||
#[doc(hidden)]
|
||||
pub use glib::prelude::*;
|
||||
#[doc(hidden)]
|
||||
pub use gst::prelude::*;
|
||||
#[doc(hidden)]
|
||||
pub use gst_base::prelude::*;
|
||||
|
||||
pub use super::audio_decoder::AudioDecoderExtManual;
|
||||
pub use super::audio_encoder::AudioEncoderExtManual;
|
||||
|
|
|
@ -8,6 +8,13 @@ mod audio_sink;
|
|||
mod audio_src;
|
||||
|
||||
pub mod prelude {
|
||||
#[doc(hidden)]
|
||||
pub use glib::subclass::prelude::*;
|
||||
#[doc(hidden)]
|
||||
pub use gst::subclass::prelude::*;
|
||||
#[doc(hidden)]
|
||||
pub use gst_base::subclass::prelude::*;
|
||||
|
||||
pub use super::audio_decoder::{AudioDecoderImpl, AudioDecoderImplExt};
|
||||
pub use super::audio_encoder::{AudioEncoderImpl, AudioEncoderImplExt};
|
||||
pub use super::audio_sink::{AudioSinkImpl, AudioSinkImplExt};
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#![cfg_attr(feature = "dox", feature(doc_cfg))]
|
||||
|
||||
pub use ffi;
|
||||
pub use glib;
|
||||
pub use gst;
|
||||
|
||||
macro_rules! assert_initialized_main_thread {
|
||||
() => {
|
||||
|
@ -63,7 +65,9 @@ pub const AGGREGATOR_FLOW_NEED_DATA: gst::FlowError = gst::FlowError::CustomErro
|
|||
// Re-export all the traits in a prelude module, so that applications
|
||||
// can always "use gst::prelude::*" without getting conflicts
|
||||
pub mod prelude {
|
||||
#[doc(hidden)]
|
||||
pub use glib::prelude::*;
|
||||
#[doc(hidden)]
|
||||
pub use gst::prelude::*;
|
||||
|
||||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
|
|
|
@ -20,6 +20,11 @@ mod aggregator;
|
|||
mod aggregator_pad;
|
||||
|
||||
pub mod prelude {
|
||||
#[doc(hidden)]
|
||||
pub use glib::subclass::prelude::*;
|
||||
#[doc(hidden)]
|
||||
pub use gst::subclass::prelude::*;
|
||||
|
||||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
|
||||
pub use super::aggregator::{AggregatorImpl, AggregatorImplExt};
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#![cfg_attr(feature = "dox", feature(doc_cfg))]
|
||||
|
||||
pub use ffi;
|
||||
pub use glib;
|
||||
pub use gst;
|
||||
|
||||
macro_rules! assert_initialized_main_thread {
|
||||
() => {
|
||||
|
@ -27,7 +29,9 @@ pub use crate::harness::Harness;
|
|||
// Re-export all the traits in a prelude module, so that applications
|
||||
// can always "use gst::prelude::*" without getting conflicts
|
||||
pub mod prelude {
|
||||
#[doc(hidden)]
|
||||
pub use glib::prelude::*;
|
||||
#[doc(hidden)]
|
||||
pub use gst::prelude::*;
|
||||
|
||||
pub use crate::auto::traits::*;
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#![cfg_attr(feature = "dox", feature(doc_cfg))]
|
||||
|
||||
pub use ffi;
|
||||
pub use glib;
|
||||
pub use gst;
|
||||
|
||||
macro_rules! assert_initialized_main_thread {
|
||||
() => {
|
||||
|
@ -25,5 +27,10 @@ pub use crate::auto::*;
|
|||
use crate::control_point::*;
|
||||
|
||||
pub mod prelude {
|
||||
#[doc(hidden)]
|
||||
pub use glib::prelude::*;
|
||||
#[doc(hidden)]
|
||||
pub use gst::prelude::*;
|
||||
|
||||
pub use crate::auto::traits::*;
|
||||
}
|
||||
|
|
|
@ -3,6 +3,11 @@
|
|||
#![cfg_attr(feature = "dox", feature(doc_cfg))]
|
||||
|
||||
pub use ffi;
|
||||
pub use gio;
|
||||
pub use glib;
|
||||
pub use gst;
|
||||
pub use gst_base;
|
||||
pub use gst_pbutils;
|
||||
|
||||
use std::sync::Once;
|
||||
|
||||
|
@ -56,9 +61,18 @@ pub use crate::timeline_element::TimelineElementExtManual;
|
|||
// Re-export all the traits in a prelude module, so that applications
|
||||
// can always "use gst::prelude::*" without getting conflicts
|
||||
pub mod prelude {
|
||||
pub use crate::timeline_element::TimelineElementExtManual;
|
||||
#[doc(hidden)]
|
||||
pub use gio::prelude::*;
|
||||
#[doc(hidden)]
|
||||
pub use glib::prelude::*;
|
||||
#[doc(hidden)]
|
||||
pub use gst::prelude::*;
|
||||
#[doc(hidden)]
|
||||
pub use gst_base::prelude::*;
|
||||
#[doc(hidden)]
|
||||
pub use gst_pbutils::prelude::*;
|
||||
|
||||
pub use crate::timeline_element::TimelineElementExtManual;
|
||||
|
||||
pub use crate::auto::traits::*;
|
||||
}
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
#![cfg_attr(feature = "dox", feature(doc_cfg))]
|
||||
|
||||
pub use ffi;
|
||||
pub use gst;
|
||||
pub use gst_base;
|
||||
pub use gst_video;
|
||||
|
||||
macro_rules! assert_initialized_main_thread {
|
||||
() => {
|
||||
|
@ -38,8 +41,14 @@ pub use crate::gl_sync_meta::*;
|
|||
// Re-export all the traits in a prelude module, so that applications
|
||||
// can always "use gst::prelude::*" without getting conflicts
|
||||
pub mod prelude {
|
||||
#[doc(hidden)]
|
||||
pub use glib::prelude::*;
|
||||
#[doc(hidden)]
|
||||
pub use gst::prelude::*;
|
||||
#[doc(hidden)]
|
||||
pub use gst_base::prelude::*;
|
||||
#[doc(hidden)]
|
||||
pub use gst_video::prelude::*;
|
||||
|
||||
pub use crate::auto::traits::*;
|
||||
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#![cfg_attr(feature = "dox", feature(doc_cfg))]
|
||||
|
||||
pub use ffi;
|
||||
pub use gio;
|
||||
pub use gst;
|
||||
|
||||
macro_rules! assert_initialized_main_thread {
|
||||
() => {
|
||||
|
@ -33,7 +35,11 @@ mod net_address_meta;
|
|||
// Re-export all the traits in a prelude module, so that applications
|
||||
// can always "use gst::prelude::*" without getting conflicts
|
||||
pub mod prelude {
|
||||
#[doc(hidden)]
|
||||
pub use gio::prelude::*;
|
||||
#[doc(hidden)]
|
||||
pub use glib::prelude::*;
|
||||
#[doc(hidden)]
|
||||
pub use gst::prelude::*;
|
||||
|
||||
pub use crate::auto::traits::*;
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#![cfg_attr(feature = "dox", feature(doc_cfg))]
|
||||
|
||||
pub use ffi;
|
||||
pub use glib;
|
||||
pub use gst;
|
||||
|
||||
use std::sync::Once;
|
||||
|
||||
|
@ -49,7 +51,9 @@ pub use crate::functions::*;
|
|||
// Re-export all the traits in a prelude module, so that applications
|
||||
// can always "use gst::prelude::*" without getting conflicts
|
||||
pub mod prelude {
|
||||
#[doc(hidden)]
|
||||
pub use glib::prelude::*;
|
||||
#[doc(hidden)]
|
||||
pub use gst::prelude::*;
|
||||
|
||||
pub use crate::auto::traits::*;
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#![cfg_attr(feature = "dox", feature(doc_cfg))]
|
||||
|
||||
pub use ffi;
|
||||
pub use gst;
|
||||
pub use gst_video;
|
||||
|
||||
macro_rules! skip_assert_initialized {
|
||||
() => {};
|
||||
|
@ -34,8 +36,12 @@ mod player_visualization;
|
|||
// Re-export all the traits in a prelude module, so that applications
|
||||
// can always "use gst::prelude::*" without getting conflicts
|
||||
pub mod prelude {
|
||||
#[doc(hidden)]
|
||||
pub use glib::prelude::*;
|
||||
#[doc(hidden)]
|
||||
pub use gst::prelude::*;
|
||||
#[doc(hidden)]
|
||||
pub use gst_video::prelude::*;
|
||||
|
||||
pub use crate::auto::traits::*;
|
||||
}
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#![cfg_attr(feature = "dox", feature(doc_cfg))]
|
||||
|
||||
pub use ffi;
|
||||
pub use glib;
|
||||
pub use gst;
|
||||
|
||||
macro_rules! assert_initialized_main_thread {
|
||||
() => {
|
||||
|
@ -29,7 +31,9 @@ pub use crate::rtp_buffer::{compare_seqnum, RTPBuffer, RTPBufferExt};
|
|||
// Re-export all the traits in a prelude module, so that applications
|
||||
// can always "use gst::prelude::*" without getting conflicts
|
||||
pub mod prelude {
|
||||
#[doc(hidden)]
|
||||
pub use glib::prelude::*;
|
||||
#[doc(hidden)]
|
||||
pub use gst::prelude::*;
|
||||
|
||||
pub use crate::auto::traits::*;
|
||||
|
|
|
@ -3,6 +3,12 @@
|
|||
#![cfg_attr(feature = "dox", feature(doc_cfg))]
|
||||
|
||||
pub use ffi;
|
||||
pub use gio;
|
||||
pub use glib;
|
||||
pub use gst;
|
||||
pub use gst_net;
|
||||
pub use gst_rtsp;
|
||||
pub use gst_sdp;
|
||||
|
||||
macro_rules! assert_initialized_main_thread {
|
||||
() => {
|
||||
|
@ -116,8 +122,18 @@ pub static RTSP_TOKEN_TRANSPORT_CLIENT_SETTINGS: Lazy<&'static str> = Lazy::new(
|
|||
// Re-export all the traits in a prelude module, so that applications
|
||||
// can always "use gst::prelude::*" without getting conflicts
|
||||
pub mod prelude {
|
||||
#[doc(hidden)]
|
||||
pub use gio::prelude::*;
|
||||
#[doc(hidden)]
|
||||
pub use glib::prelude::*;
|
||||
#[doc(hidden)]
|
||||
pub use gst::prelude::*;
|
||||
#[doc(hidden)]
|
||||
pub use gst_net::prelude::*;
|
||||
#[doc(hidden)]
|
||||
pub use gst_rtsp::prelude::*;
|
||||
#[doc(hidden)]
|
||||
pub use gst_sdp::prelude::*;
|
||||
|
||||
pub use crate::auto::traits::*;
|
||||
|
||||
|
|
|
@ -10,6 +10,11 @@ mod rtsp_server;
|
|||
pub use self::rtsp_media::SDPInfo;
|
||||
|
||||
pub mod prelude {
|
||||
#[doc(hidden)]
|
||||
pub use glib::subclass::prelude::*;
|
||||
#[doc(hidden)]
|
||||
pub use gst::subclass::prelude::*;
|
||||
|
||||
pub use super::rtsp_client::{RTSPClientImpl, RTSPClientImplExt};
|
||||
pub use super::rtsp_media::{RTSPMediaImpl, RTSPMediaImplExt};
|
||||
pub use super::rtsp_media_factory::{RTSPMediaFactoryImpl, RTSPMediaFactoryImplExt};
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
#![cfg_attr(feature = "dox", feature(doc_cfg))]
|
||||
|
||||
pub use ffi;
|
||||
pub use glib;
|
||||
pub use gst;
|
||||
pub use gst_sdp;
|
||||
|
||||
macro_rules! assert_initialized_main_thread {
|
||||
() => {
|
||||
|
@ -25,8 +28,12 @@ pub use crate::auto::*;
|
|||
// Re-export all the traits in a prelude module, so that applications
|
||||
// can always "use gst::prelude::*" without getting conflicts
|
||||
pub mod prelude {
|
||||
#[doc(hidden)]
|
||||
pub use glib::prelude::*;
|
||||
#[doc(hidden)]
|
||||
pub use gst::prelude::*;
|
||||
#[doc(hidden)]
|
||||
pub use gst_sdp::prelude::*;
|
||||
|
||||
pub use crate::auto::traits::*;
|
||||
}
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#![cfg_attr(feature = "dox", feature(doc_cfg))]
|
||||
|
||||
pub use ffi;
|
||||
pub use glib;
|
||||
pub use gst;
|
||||
|
||||
macro_rules! assert_initialized_main_thread {
|
||||
() => {
|
||||
|
@ -45,7 +47,9 @@ pub use crate::sdp_zone::*;
|
|||
// Re-export all the traits in a prelude module, so that applications
|
||||
// can always "use gst::prelude::*" without getting conflicts
|
||||
pub mod prelude {
|
||||
#[doc(hidden)]
|
||||
pub use glib::prelude::*;
|
||||
#[doc(hidden)]
|
||||
pub use gst::prelude::*;
|
||||
|
||||
pub use crate::auto::traits::*;
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
#![cfg_attr(feature = "dox", feature(doc_cfg))]
|
||||
|
||||
pub use ffi;
|
||||
pub use glib;
|
||||
pub use gst;
|
||||
pub use gst_base;
|
||||
|
||||
macro_rules! assert_initialized_main_thread {
|
||||
() => {
|
||||
|
@ -107,8 +110,12 @@ pub const VIDEO_DECODER_FLOW_NEED_DATA: gst::FlowSuccess = gst::FlowSuccess::Cus
|
|||
// Re-export all the traits in a prelude module, so that applications
|
||||
// can always "use gst::prelude::*" without getting conflicts
|
||||
pub mod prelude {
|
||||
#[doc(hidden)]
|
||||
pub use glib::prelude::*;
|
||||
#[doc(hidden)]
|
||||
pub use gst::prelude::*;
|
||||
#[doc(hidden)]
|
||||
pub use gst_base::prelude::*;
|
||||
|
||||
pub use crate::auto::traits::*;
|
||||
pub use crate::video_buffer_pool::VideoBufferPoolConfig;
|
||||
|
|
|
@ -7,6 +7,13 @@ mod video_encoder;
|
|||
mod video_sink;
|
||||
|
||||
pub mod prelude {
|
||||
#[doc(hidden)]
|
||||
pub use glib::subclass::prelude::*;
|
||||
#[doc(hidden)]
|
||||
pub use gst::subclass::prelude::*;
|
||||
#[doc(hidden)]
|
||||
pub use gst_base::subclass::prelude::*;
|
||||
|
||||
pub use super::video_decoder::{VideoDecoderImpl, VideoDecoderImplExt};
|
||||
pub use super::video_encoder::{VideoEncoderImpl, VideoEncoderImplExt};
|
||||
pub use super::video_sink::{VideoSinkImpl, VideoSinkImplExt};
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
#![cfg_attr(feature = "dox", feature(doc_cfg))]
|
||||
|
||||
pub use ffi;
|
||||
pub use glib;
|
||||
pub use gst;
|
||||
pub use gst_sdp;
|
||||
|
||||
macro_rules! assert_initialized_main_thread {
|
||||
() => {
|
||||
|
@ -30,8 +33,12 @@ mod web_rtc_session_description;
|
|||
// Re-export all the traits in a prelude module, so that applications
|
||||
// can always "use gst::prelude::*" without getting conflicts
|
||||
pub mod prelude {
|
||||
#[doc(hidden)]
|
||||
pub use glib::prelude::*;
|
||||
#[doc(hidden)]
|
||||
pub use gst::prelude::*;
|
||||
#[doc(hidden)]
|
||||
pub use gst_sdp::prelude::*;
|
||||
|
||||
pub use crate::auto::traits::*;
|
||||
}
|
||||
|
|
|
@ -5,9 +5,7 @@
|
|||
|
||||
// Re-exported for the subclass gst_plugin_define! macro
|
||||
pub use ffi;
|
||||
#[doc(hidden)]
|
||||
pub use glib;
|
||||
#[doc(hidden)]
|
||||
pub use paste;
|
||||
|
||||
use glib::translate::{from_glib, from_glib_full};
|
||||
|
@ -303,6 +301,7 @@ pub const FORMAT_PERCENT_SCALE: u32 = ffi::GST_FORMAT_PERCENT_SCALE as u32;
|
|||
// Re-export all the traits in a prelude module, so that applications
|
||||
// can always "use gst::prelude::*" without getting conflicts
|
||||
pub mod prelude {
|
||||
#[doc(hidden)]
|
||||
pub use glib::prelude::*;
|
||||
|
||||
pub use crate::auto::traits::*;
|
||||
|
|
|
@ -36,6 +36,9 @@ pub use self::error::FlowError;
|
|||
pub use self::plugin::{MAJOR_VERSION, MINOR_VERSION};
|
||||
|
||||
pub mod prelude {
|
||||
#[doc(hidden)]
|
||||
pub use glib::subclass::prelude::*;
|
||||
|
||||
pub use super::bin::{BinImpl, BinImplExt};
|
||||
pub use super::child_proxy::ChildProxyImpl;
|
||||
pub use super::clock::{ClockImpl, ClockImplExt};
|
||||
|
@ -52,7 +55,6 @@ pub mod prelude {
|
|||
pub use super::tag_setter::TagSetterImpl;
|
||||
pub use super::uri_handler::URIHandlerImpl;
|
||||
pub use super::PanicPoison;
|
||||
pub use glib::subclass::prelude::*;
|
||||
}
|
||||
|
||||
use self::prelude::*;
|
||||
|
|
Loading…
Reference in a new issue