2020-12-15 10:53:31 +00:00
|
|
|
// Take a look at the license at the top of the repository in the LICENSE file.
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2020-11-27 13:37:49 +00:00
|
|
|
#![cfg_attr(feature = "dox", feature(doc_cfg))]
|
2020-11-18 12:48:41 +00:00
|
|
|
|
2020-11-22 10:45:51 +00:00
|
|
|
pub use ffi;
|
2020-12-20 17:39:15 +00:00
|
|
|
pub use gio;
|
|
|
|
pub use glib;
|
|
|
|
pub use gst;
|
|
|
|
pub use gst_net;
|
|
|
|
pub use gst_rtsp;
|
|
|
|
pub use gst_sdp;
|
2018-02-09 02:30:08 +00:00
|
|
|
|
|
|
|
macro_rules! assert_initialized_main_thread {
|
2018-04-01 08:30:03 +00:00
|
|
|
() => {
|
2020-11-22 10:45:51 +00:00
|
|
|
if unsafe { gst::ffi::gst_is_initialized() } != glib::ffi::GTRUE {
|
2018-02-09 02:30:08 +00:00
|
|
|
panic!("GStreamer has not been initialized. Call `gst::init` first.");
|
|
|
|
}
|
2018-04-01 08:30:03 +00:00
|
|
|
};
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
macro_rules! skip_assert_initialized {
|
2018-04-01 08:30:03 +00:00
|
|
|
() => {};
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
|
2019-02-28 08:32:13 +00:00
|
|
|
#[allow(clippy::unreadable_literal)]
|
|
|
|
#[allow(clippy::too_many_arguments)]
|
|
|
|
#[allow(clippy::match_same_arms)]
|
|
|
|
#[allow(clippy::type_complexity)]
|
2019-09-07 10:08:09 +00:00
|
|
|
#[allow(clippy::let_and_return)]
|
2018-02-09 02:30:08 +00:00
|
|
|
mod auto;
|
2020-11-22 10:45:51 +00:00
|
|
|
pub use crate::auto::*;
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2018-04-23 17:37:08 +00:00
|
|
|
mod rtsp_address_pool;
|
|
|
|
mod rtsp_auth;
|
|
|
|
mod rtsp_client;
|
|
|
|
mod rtsp_context;
|
2020-02-23 08:00:05 +00:00
|
|
|
mod rtsp_media;
|
2018-04-23 17:37:08 +00:00
|
|
|
mod rtsp_media_factory;
|
|
|
|
mod rtsp_server;
|
|
|
|
mod rtsp_session_pool;
|
2019-01-08 16:13:37 +00:00
|
|
|
mod rtsp_stream;
|
|
|
|
mod rtsp_stream_transport;
|
2020-02-23 07:58:54 +00:00
|
|
|
mod rtsp_thread;
|
2018-04-23 17:37:08 +00:00
|
|
|
mod rtsp_token;
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2020-02-23 08:00:05 +00:00
|
|
|
pub mod subclass;
|
|
|
|
|
2020-11-22 10:45:51 +00:00
|
|
|
pub use crate::rtsp_context::*;
|
2021-04-24 20:41:35 +00:00
|
|
|
pub use crate::rtsp_thread::*;
|
2020-11-22 10:45:51 +00:00
|
|
|
pub use crate::rtsp_token::*;
|
2018-02-23 02:33:37 +00:00
|
|
|
|
2020-01-22 17:38:13 +00:00
|
|
|
use once_cell::sync::Lazy;
|
|
|
|
|
2020-11-22 10:45:51 +00:00
|
|
|
use std::ffi::CStr;
|
|
|
|
|
2020-01-22 17:38:13 +00:00
|
|
|
pub static RTSP_ADDRESS_POOL_ANY_IPV4: Lazy<&'static str> = Lazy::new(|| unsafe {
|
2020-11-22 10:45:51 +00:00
|
|
|
CStr::from_ptr(ffi::GST_RTSP_ADDRESS_POOL_ANY_IPV4)
|
2020-01-22 17:38:13 +00:00
|
|
|
.to_str()
|
|
|
|
.unwrap()
|
|
|
|
});
|
|
|
|
pub static RTSP_ADDRESS_POOL_ANY_IPV6: Lazy<&'static str> = Lazy::new(|| unsafe {
|
2020-11-22 10:45:51 +00:00
|
|
|
CStr::from_ptr(ffi::GST_RTSP_ADDRESS_POOL_ANY_IPV6)
|
2020-01-22 17:38:13 +00:00
|
|
|
.to_str()
|
|
|
|
.unwrap()
|
|
|
|
});
|
|
|
|
pub static RTSP_AUTH_CHECK_CONNECT: Lazy<&'static str> = Lazy::new(|| unsafe {
|
2020-11-22 10:45:51 +00:00
|
|
|
CStr::from_ptr(ffi::GST_RTSP_AUTH_CHECK_CONNECT)
|
2020-01-22 17:38:13 +00:00
|
|
|
.to_str()
|
|
|
|
.unwrap()
|
|
|
|
});
|
|
|
|
pub static RTSP_AUTH_CHECK_MEDIA_FACTORY_ACCESS: Lazy<&'static str> = Lazy::new(|| unsafe {
|
2020-11-22 10:45:51 +00:00
|
|
|
CStr::from_ptr(ffi::GST_RTSP_AUTH_CHECK_MEDIA_FACTORY_ACCESS)
|
2020-01-22 17:38:13 +00:00
|
|
|
.to_str()
|
|
|
|
.unwrap()
|
|
|
|
});
|
|
|
|
pub static RTSP_AUTH_CHECK_MEDIA_FACTORY_CONSTRUCT: Lazy<&'static str> = Lazy::new(|| unsafe {
|
2020-11-22 10:45:51 +00:00
|
|
|
CStr::from_ptr(ffi::GST_RTSP_AUTH_CHECK_MEDIA_FACTORY_CONSTRUCT)
|
2020-01-22 17:38:13 +00:00
|
|
|
.to_str()
|
|
|
|
.unwrap()
|
|
|
|
});
|
|
|
|
pub static RTSP_AUTH_CHECK_TRANSPORT_CLIENT_SETTINGS: Lazy<&'static str> = Lazy::new(|| unsafe {
|
2020-11-22 10:45:51 +00:00
|
|
|
CStr::from_ptr(ffi::GST_RTSP_AUTH_CHECK_TRANSPORT_CLIENT_SETTINGS)
|
2020-01-22 17:38:13 +00:00
|
|
|
.to_str()
|
|
|
|
.unwrap()
|
|
|
|
});
|
|
|
|
pub static RTSP_AUTH_CHECK_URL: Lazy<&'static str> = Lazy::new(|| unsafe {
|
2020-11-22 10:45:51 +00:00
|
|
|
CStr::from_ptr(ffi::GST_RTSP_AUTH_CHECK_URL)
|
2020-01-22 17:38:13 +00:00
|
|
|
.to_str()
|
|
|
|
.unwrap()
|
|
|
|
});
|
|
|
|
pub static RTSP_PERM_MEDIA_FACTORY_ACCESS: Lazy<&'static str> = Lazy::new(|| unsafe {
|
2020-11-22 10:45:51 +00:00
|
|
|
CStr::from_ptr(ffi::GST_RTSP_PERM_MEDIA_FACTORY_ACCESS)
|
2020-01-22 17:38:13 +00:00
|
|
|
.to_str()
|
|
|
|
.unwrap()
|
|
|
|
});
|
|
|
|
pub static RTSP_PERM_MEDIA_FACTORY_CONSTRUCT: Lazy<&'static str> = Lazy::new(|| unsafe {
|
2020-11-22 10:45:51 +00:00
|
|
|
CStr::from_ptr(ffi::GST_RTSP_PERM_MEDIA_FACTORY_CONSTRUCT)
|
2020-01-22 17:38:13 +00:00
|
|
|
.to_str()
|
|
|
|
.unwrap()
|
|
|
|
});
|
|
|
|
pub static RTSP_TOKEN_MEDIA_FACTORY_ROLE: Lazy<&'static str> = Lazy::new(|| unsafe {
|
2020-11-22 10:45:51 +00:00
|
|
|
CStr::from_ptr(ffi::GST_RTSP_TOKEN_MEDIA_FACTORY_ROLE)
|
2020-01-22 17:38:13 +00:00
|
|
|
.to_str()
|
|
|
|
.unwrap()
|
|
|
|
});
|
|
|
|
pub static RTSP_TOKEN_TRANSPORT_CLIENT_SETTINGS: Lazy<&'static str> = Lazy::new(|| unsafe {
|
2020-11-22 10:45:51 +00:00
|
|
|
CStr::from_ptr(ffi::GST_RTSP_TOKEN_TRANSPORT_CLIENT_SETTINGS)
|
2020-01-22 17:38:13 +00:00
|
|
|
.to_str()
|
|
|
|
.unwrap()
|
|
|
|
});
|
2018-02-15 15:03:31 +00:00
|
|
|
|
2018-02-09 02:30:08 +00:00
|
|
|
// Re-export all the traits in a prelude module, so that applications
|
|
|
|
// can always "use gst::prelude::*" without getting conflicts
|
|
|
|
pub mod prelude {
|
2020-12-20 17:39:15 +00:00
|
|
|
#[doc(hidden)]
|
|
|
|
pub use gio::prelude::*;
|
|
|
|
#[doc(hidden)]
|
2018-02-09 02:30:08 +00:00
|
|
|
pub use glib::prelude::*;
|
2020-12-20 17:39:15 +00:00
|
|
|
#[doc(hidden)]
|
2018-02-09 02:30:08 +00:00
|
|
|
pub use gst::prelude::*;
|
2020-12-20 17:39:15 +00:00
|
|
|
#[doc(hidden)]
|
|
|
|
pub use gst_net::prelude::*;
|
|
|
|
#[doc(hidden)]
|
|
|
|
pub use gst_rtsp::prelude::*;
|
|
|
|
#[doc(hidden)]
|
|
|
|
pub use gst_sdp::prelude::*;
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2020-11-22 10:45:51 +00:00
|
|
|
pub use crate::auto::traits::*;
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2020-11-22 10:45:51 +00:00
|
|
|
pub use crate::rtsp_address_pool::RTSPAddressPoolExtManual;
|
|
|
|
pub use crate::rtsp_auth::RTSPAuthExtManual;
|
|
|
|
pub use crate::rtsp_client::RTSPClientExtManual;
|
|
|
|
pub use crate::rtsp_media::RTSPMediaExtManual;
|
|
|
|
pub use crate::rtsp_media_factory::RTSPMediaFactoryExtManual;
|
|
|
|
pub use crate::rtsp_server::RTSPServerExtManual;
|
|
|
|
pub use crate::rtsp_session_pool::RTSPSessionPoolExtManual;
|
|
|
|
pub use crate::rtsp_stream::RTSPStreamExtManual;
|
|
|
|
pub use crate::rtsp_stream_transport::RTSPStreamTransportExtManual;
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|