2022-10-24 06:48:31 +00:00
|
|
|
// Copyright (C) 2022, Asymptotic Inc.
|
2022-07-19 06:02:47 +00:00
|
|
|
// Author: Taruntej Kanakamalla <taruntej@asymptotic.io>
|
2022-10-24 06:48:31 +00:00
|
|
|
// Author: Sanchayan Maity <sanchayan@asymptotic.io>
|
2022-07-19 06:02:47 +00:00
|
|
|
//
|
|
|
|
// This Source Code Form is subject to the terms of the Mozilla Public License, v2.0.
|
|
|
|
// If a copy of the MPL was not distributed with this file, You can obtain one at
|
|
|
|
// <https://mozilla.org/MPL/2.0/>.
|
|
|
|
//
|
|
|
|
// SPDX-License-Identifier: MPL-2.0
|
2022-09-15 06:40:53 +00:00
|
|
|
#![allow(clippy::non_send_fields_in_send_ty, unused_doc_comments)]
|
2022-07-19 06:02:47 +00:00
|
|
|
|
2022-09-15 06:40:53 +00:00
|
|
|
/**
|
|
|
|
* plugin-webrtchttp:
|
|
|
|
*
|
|
|
|
* Since: plugins-rs-0.9.0
|
|
|
|
*/
|
2022-07-19 06:02:47 +00:00
|
|
|
use gst::glib;
|
2022-10-27 12:21:09 +00:00
|
|
|
mod utils;
|
2022-10-24 06:48:31 +00:00
|
|
|
mod whepsrc;
|
2022-07-19 06:02:47 +00:00
|
|
|
mod whipsink;
|
|
|
|
|
2022-10-24 06:48:31 +00:00
|
|
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy, glib::Enum)]
|
|
|
|
#[repr(u32)]
|
|
|
|
#[enum_type(name = "GstRsWebRTCICETransportPolicy")]
|
|
|
|
#[non_exhaustive]
|
2022-11-29 05:21:30 +00:00
|
|
|
pub enum IceTransportPolicy {
|
2022-10-24 06:48:31 +00:00
|
|
|
#[enum_value(name = "All: get both STUN and TURN candidate pairs", nick = "all")]
|
|
|
|
All = 0,
|
|
|
|
#[enum_value(name = "Relay: get only TURN candidate pairs", nick = "relay")]
|
|
|
|
Relay = 1,
|
|
|
|
}
|
|
|
|
|
2022-07-19 06:02:47 +00:00
|
|
|
fn plugin_init(plugin: &gst::Plugin) -> Result<(), glib::BoolError> {
|
2022-10-24 06:48:31 +00:00
|
|
|
#[cfg(feature = "doc")]
|
|
|
|
{
|
2022-12-05 10:10:53 +00:00
|
|
|
use gst::prelude::*;
|
|
|
|
|
2022-12-05 10:07:09 +00:00
|
|
|
IceTransportPolicy::static_type().mark_as_plugin_api(gst::PluginAPIFlags::empty());
|
2022-10-24 06:48:31 +00:00
|
|
|
}
|
|
|
|
whipsink::register(plugin)?;
|
|
|
|
whepsrc::register(plugin)?;
|
|
|
|
|
|
|
|
Ok(())
|
2022-07-19 06:02:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
gst::plugin_define!(
|
|
|
|
webrtchttp,
|
|
|
|
env!("CARGO_PKG_DESCRIPTION"),
|
|
|
|
plugin_init,
|
|
|
|
concat!(env!("CARGO_PKG_VERSION"), "-", env!("COMMIT_ID")),
|
|
|
|
"MPL",
|
|
|
|
env!("CARGO_PKG_NAME"),
|
|
|
|
env!("CARGO_PKG_NAME"),
|
|
|
|
env!("CARGO_PKG_REPOSITORY"),
|
|
|
|
env!("BUILD_REL_DATE")
|
|
|
|
);
|