gst-plugins-rs/net/rtp/src/rtpbin2/mod.rs
Mathieu Duponchelle 74ec83a0ff rtpbin2: implement and use synchronization context
Co-authored-by: Sebastian Dröge <sebastian@centricular.com>
Co-Authored-By: Matthew Waters <matthew@centricular.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1426>
2024-05-28 19:58:09 +10:00

37 lines
857 B
Rust

// SPDX-License-Identifier: MPL-2.0
use gst::glib;
use gst::prelude::*;
use once_cell::sync::Lazy;
mod imp;
mod jitterbuffer;
mod session;
mod source;
mod sync;
mod time;
glib::wrapper! {
pub struct RtpBin2(ObjectSubclass<imp::RtpBin2>) @extends gst::Element, gst::Object;
}
pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> {
#[cfg(feature = "doc")]
{
crate::rtpbin2::sync::TimestampingMode::static_type()
.mark_as_plugin_api(gst::PluginAPIFlags::empty());
}
gst::Element::register(
Some(plugin),
"rtpbin2",
gst::Rank::NONE,
RtpBin2::static_type(),
)
}
pub static RUNTIME: Lazy<tokio::runtime::Runtime> = Lazy::new(|| {
tokio::runtime::Builder::new_multi_thread()
.enable_time()
.worker_threads(1)
.build()
.unwrap()
});