2022-10-18 18:16:49 +00:00
|
|
|
// SPDX-License-Identifier: MPL-2.0
|
2022-10-19 19:22:31 +00:00
|
|
|
#![allow(clippy::non_send_fields_in_send_ty, unused_doc_comments)]
|
2022-10-18 18:16:49 +00:00
|
|
|
|
2022-08-16 14:44:41 +00:00
|
|
|
/**
|
|
|
|
* plugin-rswebrtc:
|
2023-06-08 23:06:36 +00:00
|
|
|
* @title: Rust WebRTC elements
|
|
|
|
* @short_description: A collection of high level WebRTC elements wrapping webrtcbin
|
2022-08-16 14:44:41 +00:00
|
|
|
*
|
2023-06-08 23:06:36 +00:00
|
|
|
* {{ net/webrtc/README.md[2:233] }}
|
2023-03-07 13:17:03 +00:00
|
|
|
*
|
2022-08-16 14:44:41 +00:00
|
|
|
* Since: plugins-rs-0.9
|
|
|
|
*/
|
2021-10-05 21:28:05 +00:00
|
|
|
use gst::glib;
|
2024-01-31 15:07:56 +00:00
|
|
|
use once_cell::sync::Lazy;
|
2022-07-12 21:13:38 +00:00
|
|
|
use tokio::runtime;
|
2021-10-05 21:28:05 +00:00
|
|
|
|
2023-03-01 23:01:43 +00:00
|
|
|
mod aws_kvs_signaller;
|
2023-10-16 16:16:52 +00:00
|
|
|
mod janusvr_signaller;
|
2023-06-21 19:54:00 +00:00
|
|
|
mod livekit_signaller;
|
2022-11-19 00:43:03 +00:00
|
|
|
pub mod signaller;
|
2022-07-12 21:13:38 +00:00
|
|
|
pub mod utils;
|
2021-10-05 21:28:05 +00:00
|
|
|
pub mod webrtcsink;
|
2022-07-12 21:13:38 +00:00
|
|
|
pub mod webrtcsrc;
|
2023-04-06 22:41:16 +00:00
|
|
|
mod whip_signaller;
|
2021-10-05 21:28:05 +00:00
|
|
|
|
|
|
|
fn plugin_init(plugin: &gst::Plugin) -> Result<(), glib::BoolError> {
|
|
|
|
webrtcsink::register(plugin)?;
|
2022-07-12 21:13:38 +00:00
|
|
|
webrtcsrc::register(Some(plugin))?;
|
2021-10-05 21:28:05 +00:00
|
|
|
|
|
|
|
Ok(())
|
|
|
|
}
|
|
|
|
|
|
|
|
gst::plugin_define!(
|
2022-08-16 14:44:41 +00:00
|
|
|
rswebrtc,
|
2021-10-05 21:28:05 +00:00
|
|
|
env!("CARGO_PKG_DESCRIPTION"),
|
|
|
|
plugin_init,
|
|
|
|
concat!(env!("CARGO_PKG_VERSION"), "-", env!("COMMIT_ID")),
|
2022-10-11 05:55:11 +00:00
|
|
|
"MPL-2.0",
|
2021-10-05 21:28:05 +00:00
|
|
|
env!("CARGO_PKG_NAME"),
|
|
|
|
env!("CARGO_PKG_NAME"),
|
|
|
|
env!("CARGO_PKG_REPOSITORY"),
|
|
|
|
env!("BUILD_REL_DATE")
|
|
|
|
);
|
2023-02-28 20:42:58 +00:00
|
|
|
|
|
|
|
pub static RUNTIME: Lazy<runtime::Runtime> = Lazy::new(|| {
|
|
|
|
runtime::Builder::new_multi_thread()
|
|
|
|
.enable_all()
|
|
|
|
.worker_threads(1)
|
|
|
|
.build()
|
|
|
|
.unwrap()
|
|
|
|
});
|