mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-02-22 07:36:20 +00:00
When swapping between several development branches, compilation times can be frustrating. This commit proposes adding features to control which signaller to include when building the webrtc plugin. By default, all signallers are included, just like before. Compiling the `webrtc-precise-sync` examples with `--no-default-features` reduces compilation to 267 crates instead of 429 when all signallers are compiled in. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1539>
55 lines
1.3 KiB
Rust
55 lines
1.3 KiB
Rust
// SPDX-License-Identifier: MPL-2.0
|
|
#![allow(clippy::non_send_fields_in_send_ty, unused_doc_comments)]
|
|
|
|
/**
|
|
* plugin-rswebrtc:
|
|
* @title: Rust WebRTC elements
|
|
* @short_description: A collection of high level WebRTC elements wrapping webrtcbin
|
|
*
|
|
* {{ net/webrtc/README.md[2:233] }}
|
|
*
|
|
* Since: plugins-rs-0.9
|
|
*/
|
|
use gst::glib;
|
|
use once_cell::sync::Lazy;
|
|
use tokio::runtime;
|
|
|
|
#[cfg(feature = "aws")]
|
|
mod aws_kvs_signaller;
|
|
#[cfg(feature = "janus")]
|
|
mod janusvr_signaller;
|
|
#[cfg(feature = "livekit")]
|
|
mod livekit_signaller;
|
|
pub mod signaller;
|
|
pub mod utils;
|
|
pub mod webrtcsink;
|
|
pub mod webrtcsrc;
|
|
#[cfg(feature = "whip")]
|
|
mod whip_signaller;
|
|
|
|
fn plugin_init(plugin: &gst::Plugin) -> Result<(), glib::BoolError> {
|
|
webrtcsink::register(plugin)?;
|
|
webrtcsrc::register(Some(plugin))?;
|
|
|
|
Ok(())
|
|
}
|
|
|
|
gst::plugin_define!(
|
|
rswebrtc,
|
|
env!("CARGO_PKG_DESCRIPTION"),
|
|
plugin_init,
|
|
concat!(env!("CARGO_PKG_VERSION"), "-", env!("COMMIT_ID")),
|
|
"MPL-2.0",
|
|
env!("CARGO_PKG_NAME"),
|
|
env!("CARGO_PKG_NAME"),
|
|
env!("CARGO_PKG_REPOSITORY"),
|
|
env!("BUILD_REL_DATE")
|
|
);
|
|
|
|
pub static RUNTIME: Lazy<runtime::Runtime> = Lazy::new(|| {
|
|
runtime::Builder::new_multi_thread()
|
|
.enable_all()
|
|
.worker_threads(1)
|
|
.build()
|
|
.unwrap()
|
|
});
|