forked from mirrors/gstreamer-rs
gstreamer-webrtc: Regenerate
This commit is contained in:
parent
1099955249
commit
4686b61d78
9 changed files with 390 additions and 464 deletions
File diff suppressed because it is too large
Load diff
|
@ -1,2 +1,2 @@
|
|||
Generated by gir (https://github.com/gtk-rs/gir @ 062b3d6)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ b84cead5)
|
||||
Generated by gir (https://github.com/gtk-rs/gir @ 694b4b8)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ 9f59d878)
|
||||
|
|
|
@ -2,29 +2,23 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use glib;
|
||||
use crate::WebRTCDataChannelState;
|
||||
use crate::WebRTCPriorityType;
|
||||
use glib::object::ObjectExt;
|
||||
use glib::object::ObjectType as ObjectType_;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::signal::SignalHandlerId;
|
||||
use glib::translate::*;
|
||||
use glib::GString;
|
||||
use glib::StaticType;
|
||||
use glib::Value;
|
||||
use glib_sys;
|
||||
use gobject_sys;
|
||||
use gst_web_rtc_sys;
|
||||
use libc;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
use WebRTCDataChannelState;
|
||||
use WebRTCPriorityType;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct WebRTCDataChannel(Object<gst_web_rtc_sys::GstWebRTCDataChannel, gst_web_rtc_sys::GstWebRTCDataChannelClass>);
|
||||
glib::glib_wrapper! {
|
||||
pub struct WebRTCDataChannel(Object<ffi::GstWebRTCDataChannel, ffi::GstWebRTCDataChannelClass>);
|
||||
|
||||
match fn {
|
||||
get_type => || gst_web_rtc_sys::gst_webrtc_data_channel_get_type(),
|
||||
get_type => || ffi::gst_webrtc_data_channel_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -33,7 +27,7 @@ impl WebRTCDataChannel {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
pub fn close(&self) {
|
||||
unsafe {
|
||||
gst_web_rtc_sys::gst_webrtc_data_channel_close(self.to_glib_none().0);
|
||||
ffi::gst_webrtc_data_channel_close(self.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -41,7 +35,7 @@ impl WebRTCDataChannel {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
pub fn on_buffered_amount_low(&self) {
|
||||
unsafe {
|
||||
gst_web_rtc_sys::gst_webrtc_data_channel_on_buffered_amount_low(self.to_glib_none().0);
|
||||
ffi::gst_webrtc_data_channel_on_buffered_amount_low(self.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -49,7 +43,7 @@ impl WebRTCDataChannel {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
pub fn on_close(&self) {
|
||||
unsafe {
|
||||
gst_web_rtc_sys::gst_webrtc_data_channel_on_close(self.to_glib_none().0);
|
||||
ffi::gst_webrtc_data_channel_on_close(self.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -57,7 +51,7 @@ impl WebRTCDataChannel {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
pub fn on_message_data(&self, data: Option<&glib::Bytes>) {
|
||||
unsafe {
|
||||
gst_web_rtc_sys::gst_webrtc_data_channel_on_message_data(
|
||||
ffi::gst_webrtc_data_channel_on_message_data(
|
||||
self.to_glib_none().0,
|
||||
data.to_glib_none().0,
|
||||
);
|
||||
|
@ -68,7 +62,7 @@ impl WebRTCDataChannel {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
pub fn on_message_string(&self, str: Option<&str>) {
|
||||
unsafe {
|
||||
gst_web_rtc_sys::gst_webrtc_data_channel_on_message_string(
|
||||
ffi::gst_webrtc_data_channel_on_message_string(
|
||||
self.to_glib_none().0,
|
||||
str.to_glib_none().0,
|
||||
);
|
||||
|
@ -79,7 +73,7 @@ impl WebRTCDataChannel {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
pub fn on_open(&self) {
|
||||
unsafe {
|
||||
gst_web_rtc_sys::gst_webrtc_data_channel_on_open(self.to_glib_none().0);
|
||||
ffi::gst_webrtc_data_channel_on_open(self.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -87,10 +81,7 @@ impl WebRTCDataChannel {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
pub fn send_data(&self, data: Option<&glib::Bytes>) {
|
||||
unsafe {
|
||||
gst_web_rtc_sys::gst_webrtc_data_channel_send_data(
|
||||
self.to_glib_none().0,
|
||||
data.to_glib_none().0,
|
||||
);
|
||||
ffi::gst_webrtc_data_channel_send_data(self.to_glib_none().0, data.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -98,18 +89,15 @@ impl WebRTCDataChannel {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
pub fn send_string(&self, str: Option<&str>) {
|
||||
unsafe {
|
||||
gst_web_rtc_sys::gst_webrtc_data_channel_send_string(
|
||||
self.to_glib_none().0,
|
||||
str.to_glib_none().0,
|
||||
);
|
||||
ffi::gst_webrtc_data_channel_send_string(self.to_glib_none().0, str.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_property_buffered_amount(&self) -> u64 {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.as_ptr() as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||
b"buffered-amount\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -123,8 +111,8 @@ impl WebRTCDataChannel {
|
|||
pub fn get_property_buffered_amount_low_threshold(&self) -> u64 {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.as_ptr() as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||
b"buffered-amount-low-threshold\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -137,8 +125,8 @@ impl WebRTCDataChannel {
|
|||
|
||||
pub fn set_property_buffered_amount_low_threshold(&self, buffered_amount_low_threshold: u64) {
|
||||
unsafe {
|
||||
gobject_sys::g_object_set_property(
|
||||
self.as_ptr() as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_set_property(
|
||||
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||
b"buffered-amount-low-threshold\0".as_ptr() as *const _,
|
||||
Value::from(&buffered_amount_low_threshold).to_glib_none().0,
|
||||
);
|
||||
|
@ -148,8 +136,8 @@ impl WebRTCDataChannel {
|
|||
pub fn get_property_id(&self) -> i32 {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<i32 as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.as_ptr() as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||
b"id\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -160,11 +148,11 @@ impl WebRTCDataChannel {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn get_property_label(&self) -> Option<GString> {
|
||||
pub fn get_property_label(&self) -> Option<glib::GString> {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<GString as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.as_ptr() as *mut gobject_sys::GObject,
|
||||
let mut value = Value::from_type(<glib::GString as StaticType>::static_type());
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||
b"label\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -177,8 +165,8 @@ impl WebRTCDataChannel {
|
|||
pub fn get_property_max_packet_lifetime(&self) -> i32 {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<i32 as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.as_ptr() as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||
b"max-packet-lifetime\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -192,8 +180,8 @@ impl WebRTCDataChannel {
|
|||
pub fn get_property_max_retransmits(&self) -> i32 {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<i32 as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.as_ptr() as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||
b"max-retransmits\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -207,8 +195,8 @@ impl WebRTCDataChannel {
|
|||
pub fn get_property_negotiated(&self) -> bool {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.as_ptr() as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||
b"negotiated\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -222,8 +210,8 @@ impl WebRTCDataChannel {
|
|||
pub fn get_property_ordered(&self) -> bool {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.as_ptr() as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||
b"ordered\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -237,8 +225,8 @@ impl WebRTCDataChannel {
|
|||
pub fn get_property_priority(&self) -> WebRTCPriorityType {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<WebRTCPriorityType as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.as_ptr() as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||
b"priority\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -249,11 +237,11 @@ impl WebRTCDataChannel {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn get_property_protocol(&self) -> Option<GString> {
|
||||
pub fn get_property_protocol(&self) -> Option<glib::GString> {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<GString as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.as_ptr() as *mut gobject_sys::GObject,
|
||||
let mut value = Value::from_type(<glib::GString as StaticType>::static_type());
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||
b"protocol\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -266,8 +254,8 @@ impl WebRTCDataChannel {
|
|||
pub fn get_property_ready_state(&self) -> WebRTCDataChannelState {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<WebRTCDataChannelState as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.as_ptr() as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||
b"ready-state\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -283,8 +271,8 @@ impl WebRTCDataChannel {
|
|||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn close_trampoline<F: Fn(&WebRTCDataChannel) + Send + Sync + 'static>(
|
||||
this: *mut gst_web_rtc_sys::GstWebRTCDataChannel,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstWebRTCDataChannel,
|
||||
f: glib::ffi::gpointer,
|
||||
) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
|
@ -304,7 +292,7 @@ impl WebRTCDataChannel {
|
|||
|
||||
pub fn emit_close(&self) {
|
||||
let _ = unsafe {
|
||||
glib::Object::from_glib_borrow(self.as_ptr() as *mut gobject_sys::GObject)
|
||||
glib::Object::from_glib_borrow(self.as_ptr() as *mut glib::gobject_ffi::GObject)
|
||||
.emit("close", &[])
|
||||
.unwrap()
|
||||
};
|
||||
|
@ -317,8 +305,8 @@ impl WebRTCDataChannel {
|
|||
unsafe extern "C" fn on_buffered_amount_low_trampoline<
|
||||
F: Fn(&WebRTCDataChannel) + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_web_rtc_sys::GstWebRTCDataChannel,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstWebRTCDataChannel,
|
||||
f: glib::ffi::gpointer,
|
||||
) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
|
@ -343,8 +331,8 @@ impl WebRTCDataChannel {
|
|||
unsafe extern "C" fn on_close_trampoline<
|
||||
F: Fn(&WebRTCDataChannel) + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_web_rtc_sys::GstWebRTCDataChannel,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstWebRTCDataChannel,
|
||||
f: glib::ffi::gpointer,
|
||||
) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
|
@ -369,9 +357,9 @@ impl WebRTCDataChannel {
|
|||
unsafe extern "C" fn on_error_trampoline<
|
||||
F: Fn(&WebRTCDataChannel, &glib::Error) + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_web_rtc_sys::GstWebRTCDataChannel,
|
||||
error: *mut glib_sys::GError,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstWebRTCDataChannel,
|
||||
error: *mut glib::ffi::GError,
|
||||
f: glib::ffi::gpointer,
|
||||
) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this), &from_glib_borrow(error))
|
||||
|
@ -398,9 +386,9 @@ impl WebRTCDataChannel {
|
|||
unsafe extern "C" fn on_message_data_trampoline<
|
||||
F: Fn(&WebRTCDataChannel, Option<&glib::Bytes>) + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_web_rtc_sys::GstWebRTCDataChannel,
|
||||
data: *mut glib_sys::GBytes,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstWebRTCDataChannel,
|
||||
data: *mut glib::ffi::GBytes,
|
||||
f: glib::ffi::gpointer,
|
||||
) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(
|
||||
|
@ -432,14 +420,14 @@ impl WebRTCDataChannel {
|
|||
unsafe extern "C" fn on_message_string_trampoline<
|
||||
F: Fn(&WebRTCDataChannel, Option<&str>) + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_web_rtc_sys::GstWebRTCDataChannel,
|
||||
this: *mut ffi::GstWebRTCDataChannel,
|
||||
data: *mut libc::c_char,
|
||||
f: glib_sys::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(
|
||||
&from_glib_borrow(this),
|
||||
Option::<GString>::from_glib_borrow(data)
|
||||
Option::<glib::GString>::from_glib_borrow(data)
|
||||
.as_ref()
|
||||
.as_deref(),
|
||||
)
|
||||
|
@ -464,8 +452,8 @@ impl WebRTCDataChannel {
|
|||
unsafe extern "C" fn on_open_trampoline<
|
||||
F: Fn(&WebRTCDataChannel) + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_web_rtc_sys::GstWebRTCDataChannel,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstWebRTCDataChannel,
|
||||
f: glib::ffi::gpointer,
|
||||
) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
|
@ -492,9 +480,9 @@ impl WebRTCDataChannel {
|
|||
unsafe extern "C" fn send_data_trampoline<
|
||||
F: Fn(&WebRTCDataChannel, Option<&glib::Bytes>) + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_web_rtc_sys::GstWebRTCDataChannel,
|
||||
data: *mut glib_sys::GBytes,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstWebRTCDataChannel,
|
||||
data: *mut glib::ffi::GBytes,
|
||||
f: glib::ffi::gpointer,
|
||||
) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(
|
||||
|
@ -519,7 +507,7 @@ impl WebRTCDataChannel {
|
|||
|
||||
pub fn emit_send_data(&self, data: Option<&glib::Bytes>) {
|
||||
let _ = unsafe {
|
||||
glib::Object::from_glib_borrow(self.as_ptr() as *mut gobject_sys::GObject)
|
||||
glib::Object::from_glib_borrow(self.as_ptr() as *mut glib::gobject_ffi::GObject)
|
||||
.emit("send-data", &[&data])
|
||||
.unwrap()
|
||||
};
|
||||
|
@ -532,14 +520,14 @@ impl WebRTCDataChannel {
|
|||
unsafe extern "C" fn send_string_trampoline<
|
||||
F: Fn(&WebRTCDataChannel, Option<&str>) + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_web_rtc_sys::GstWebRTCDataChannel,
|
||||
this: *mut ffi::GstWebRTCDataChannel,
|
||||
data: *mut libc::c_char,
|
||||
f: glib_sys::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(
|
||||
&from_glib_borrow(this),
|
||||
Option::<GString>::from_glib_borrow(data)
|
||||
Option::<glib::GString>::from_glib_borrow(data)
|
||||
.as_ref()
|
||||
.as_deref(),
|
||||
)
|
||||
|
@ -559,7 +547,7 @@ impl WebRTCDataChannel {
|
|||
|
||||
pub fn emit_send_string(&self, data: Option<&str>) {
|
||||
let _ = unsafe {
|
||||
glib::Object::from_glib_borrow(self.as_ptr() as *mut gobject_sys::GObject)
|
||||
glib::Object::from_glib_borrow(self.as_ptr() as *mut glib::gobject_ffi::GObject)
|
||||
.emit("send-string", &[&data])
|
||||
.unwrap()
|
||||
};
|
||||
|
@ -574,9 +562,9 @@ impl WebRTCDataChannel {
|
|||
unsafe extern "C" fn notify_buffered_amount_trampoline<
|
||||
F: Fn(&WebRTCDataChannel) + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_web_rtc_sys::GstWebRTCDataChannel,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstWebRTCDataChannel,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
|
@ -603,9 +591,9 @@ impl WebRTCDataChannel {
|
|||
unsafe extern "C" fn notify_buffered_amount_low_threshold_trampoline<
|
||||
F: Fn(&WebRTCDataChannel) + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_web_rtc_sys::GstWebRTCDataChannel,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstWebRTCDataChannel,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
|
@ -632,9 +620,9 @@ impl WebRTCDataChannel {
|
|||
unsafe extern "C" fn notify_ready_state_trampoline<
|
||||
F: Fn(&WebRTCDataChannel) + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_web_rtc_sys::GstWebRTCDataChannel,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstWebRTCDataChannel,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
|
|
|
@ -3,16 +3,15 @@
|
|||
// DO NOT EDIT
|
||||
|
||||
use glib::translate::*;
|
||||
use gst_web_rtc_sys;
|
||||
|
||||
glib_wrapper! {
|
||||
glib::glib_wrapper! {
|
||||
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||
pub struct WebRTCSessionDescription(Boxed<gst_web_rtc_sys::GstWebRTCSessionDescription>);
|
||||
pub struct WebRTCSessionDescription(Boxed<ffi::GstWebRTCSessionDescription>);
|
||||
|
||||
match fn {
|
||||
copy => |ptr| gst_web_rtc_sys::gst_webrtc_session_description_copy(mut_override(ptr)),
|
||||
free => |ptr| gst_web_rtc_sys::gst_webrtc_session_description_free(ptr),
|
||||
get_type => || gst_web_rtc_sys::gst_webrtc_session_description_get_type(),
|
||||
copy => |ptr| ffi::gst_webrtc_session_description_copy(mut_override(ptr)),
|
||||
free => |ptr| ffi::gst_webrtc_session_description_free(ptr),
|
||||
get_type => || ffi::gst_webrtc_session_description_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,26 +2,22 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use crate::WebRTCDTLSTransportState;
|
||||
use crate::WebRTCICETransport;
|
||||
use glib::object::ObjectType as ObjectType_;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::signal::SignalHandlerId;
|
||||
use glib::translate::*;
|
||||
use glib::GString;
|
||||
use glib::StaticType;
|
||||
use glib::Value;
|
||||
use glib_sys;
|
||||
use gobject_sys;
|
||||
use gst_web_rtc_sys;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
use WebRTCDTLSTransportState;
|
||||
use WebRTCICETransport;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct WebRTCDTLSTransport(Object<gst_web_rtc_sys::GstWebRTCDTLSTransport, gst_web_rtc_sys::GstWebRTCDTLSTransportClass>);
|
||||
glib::glib_wrapper! {
|
||||
pub struct WebRTCDTLSTransport(Object<ffi::GstWebRTCDTLSTransport, ffi::GstWebRTCDTLSTransportClass>);
|
||||
|
||||
match fn {
|
||||
get_type => || gst_web_rtc_sys::gst_webrtc_dtls_transport_get_type(),
|
||||
get_type => || ffi::gst_webrtc_dtls_transport_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -29,7 +25,7 @@ impl WebRTCDTLSTransport {
|
|||
pub fn new(session_id: u32, rtcp: bool) -> WebRTCDTLSTransport {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
from_glib_none(gst_web_rtc_sys::gst_webrtc_dtls_transport_new(
|
||||
from_glib_none(ffi::gst_webrtc_dtls_transport_new(
|
||||
session_id,
|
||||
rtcp.to_glib(),
|
||||
))
|
||||
|
@ -38,18 +34,18 @@ impl WebRTCDTLSTransport {
|
|||
|
||||
pub fn set_transport(&self, ice: &WebRTCICETransport) {
|
||||
unsafe {
|
||||
gst_web_rtc_sys::gst_webrtc_dtls_transport_set_transport(
|
||||
ffi::gst_webrtc_dtls_transport_set_transport(
|
||||
self.to_glib_none().0,
|
||||
ice.to_glib_none().0,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_property_certificate(&self) -> Option<GString> {
|
||||
pub fn get_property_certificate(&self) -> Option<glib::GString> {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<GString as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.as_ptr() as *mut gobject_sys::GObject,
|
||||
let mut value = Value::from_type(<glib::GString as StaticType>::static_type());
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||
b"certificate\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -61,8 +57,8 @@ impl WebRTCDTLSTransport {
|
|||
|
||||
pub fn set_property_certificate(&self, certificate: Option<&str>) {
|
||||
unsafe {
|
||||
gobject_sys::g_object_set_property(
|
||||
self.as_ptr() as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_set_property(
|
||||
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||
b"certificate\0".as_ptr() as *const _,
|
||||
Value::from(certificate).to_glib_none().0,
|
||||
);
|
||||
|
@ -72,8 +68,8 @@ impl WebRTCDTLSTransport {
|
|||
pub fn get_property_client(&self) -> bool {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.as_ptr() as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||
b"client\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -86,19 +82,19 @@ impl WebRTCDTLSTransport {
|
|||
|
||||
pub fn set_property_client(&self, client: bool) {
|
||||
unsafe {
|
||||
gobject_sys::g_object_set_property(
|
||||
self.as_ptr() as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_set_property(
|
||||
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||
b"client\0".as_ptr() as *const _,
|
||||
Value::from(&client).to_glib_none().0,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_property_remote_certificate(&self) -> Option<GString> {
|
||||
pub fn get_property_remote_certificate(&self) -> Option<glib::GString> {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<GString as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.as_ptr() as *mut gobject_sys::GObject,
|
||||
let mut value = Value::from_type(<glib::GString as StaticType>::static_type());
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||
b"remote-certificate\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -111,8 +107,8 @@ impl WebRTCDTLSTransport {
|
|||
pub fn get_property_rtcp(&self) -> bool {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.as_ptr() as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||
b"rtcp\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -126,8 +122,8 @@ impl WebRTCDTLSTransport {
|
|||
pub fn get_property_session_id(&self) -> u32 {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<u32 as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.as_ptr() as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||
b"session-id\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -142,8 +138,8 @@ impl WebRTCDTLSTransport {
|
|||
unsafe {
|
||||
let mut value =
|
||||
Value::from_type(<WebRTCDTLSTransportState as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.as_ptr() as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||
b"state\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -157,8 +153,8 @@ impl WebRTCDTLSTransport {
|
|||
pub fn get_property_transport(&self) -> Option<WebRTCICETransport> {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<WebRTCICETransport as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.as_ptr() as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||
b"transport\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -177,9 +173,9 @@ impl WebRTCDTLSTransport {
|
|||
unsafe extern "C" fn notify_certificate_trampoline<
|
||||
F: Fn(&WebRTCDTLSTransport) + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_web_rtc_sys::GstWebRTCDTLSTransport,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstWebRTCDTLSTransport,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
|
@ -204,9 +200,9 @@ impl WebRTCDTLSTransport {
|
|||
unsafe extern "C" fn notify_client_trampoline<
|
||||
F: Fn(&WebRTCDTLSTransport) + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_web_rtc_sys::GstWebRTCDTLSTransport,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstWebRTCDTLSTransport,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
|
@ -233,9 +229,9 @@ impl WebRTCDTLSTransport {
|
|||
unsafe extern "C" fn notify_remote_certificate_trampoline<
|
||||
F: Fn(&WebRTCDTLSTransport) + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_web_rtc_sys::GstWebRTCDTLSTransport,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstWebRTCDTLSTransport,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
|
@ -260,9 +256,9 @@ impl WebRTCDTLSTransport {
|
|||
unsafe extern "C" fn notify_state_trampoline<
|
||||
F: Fn(&WebRTCDTLSTransport) + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_web_rtc_sys::GstWebRTCDTLSTransport,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstWebRTCDTLSTransport,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
|
@ -289,9 +285,9 @@ impl WebRTCDTLSTransport {
|
|||
unsafe extern "C" fn notify_transport_trampoline<
|
||||
F: Fn(&WebRTCDTLSTransport) + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_web_rtc_sys::GstWebRTCDTLSTransport,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstWebRTCDTLSTransport,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
|
|
|
@ -2,35 +2,30 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use crate::WebRTCICEComponent;
|
||||
use crate::WebRTCICEConnectionState;
|
||||
use crate::WebRTCICEGatheringState;
|
||||
use glib::object::ObjectType as ObjectType_;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::signal::SignalHandlerId;
|
||||
use glib::translate::*;
|
||||
use glib::GString;
|
||||
use glib::StaticType;
|
||||
use glib::Value;
|
||||
use glib_sys;
|
||||
use gobject_sys;
|
||||
use gst_web_rtc_sys;
|
||||
use libc;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
use WebRTCICEComponent;
|
||||
use WebRTCICEConnectionState;
|
||||
use WebRTCICEGatheringState;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct WebRTCICETransport(Object<gst_web_rtc_sys::GstWebRTCICETransport, gst_web_rtc_sys::GstWebRTCICETransportClass>);
|
||||
glib::glib_wrapper! {
|
||||
pub struct WebRTCICETransport(Object<ffi::GstWebRTCICETransport, ffi::GstWebRTCICETransportClass>);
|
||||
|
||||
match fn {
|
||||
get_type => || gst_web_rtc_sys::gst_webrtc_ice_transport_get_type(),
|
||||
get_type => || ffi::gst_webrtc_ice_transport_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
impl WebRTCICETransport {
|
||||
pub fn connection_state_change(&self, new_state: WebRTCICEConnectionState) {
|
||||
unsafe {
|
||||
gst_web_rtc_sys::gst_webrtc_ice_transport_connection_state_change(
|
||||
ffi::gst_webrtc_ice_transport_connection_state_change(
|
||||
self.to_glib_none().0,
|
||||
new_state.to_glib(),
|
||||
);
|
||||
|
@ -39,7 +34,7 @@ impl WebRTCICETransport {
|
|||
|
||||
pub fn gathering_state_change(&self, new_state: WebRTCICEGatheringState) {
|
||||
unsafe {
|
||||
gst_web_rtc_sys::gst_webrtc_ice_transport_gathering_state_change(
|
||||
ffi::gst_webrtc_ice_transport_gathering_state_change(
|
||||
self.to_glib_none().0,
|
||||
new_state.to_glib(),
|
||||
);
|
||||
|
@ -48,7 +43,7 @@ impl WebRTCICETransport {
|
|||
|
||||
pub fn new_candidate(&self, stream_id: u32, component: WebRTCICEComponent, attr: &str) {
|
||||
unsafe {
|
||||
gst_web_rtc_sys::gst_webrtc_ice_transport_new_candidate(
|
||||
ffi::gst_webrtc_ice_transport_new_candidate(
|
||||
self.to_glib_none().0,
|
||||
stream_id,
|
||||
component.to_glib(),
|
||||
|
@ -59,15 +54,15 @@ impl WebRTCICETransport {
|
|||
|
||||
pub fn selected_pair_change(&self) {
|
||||
unsafe {
|
||||
gst_web_rtc_sys::gst_webrtc_ice_transport_selected_pair_change(self.to_glib_none().0);
|
||||
ffi::gst_webrtc_ice_transport_selected_pair_change(self.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_property_component(&self) -> WebRTCICEComponent {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<WebRTCICEComponent as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.as_ptr() as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||
b"component\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -82,8 +77,8 @@ impl WebRTCICETransport {
|
|||
unsafe {
|
||||
let mut value =
|
||||
Value::from_type(<WebRTCICEGatheringState as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.as_ptr() as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||
b"gathering-state\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -98,8 +93,8 @@ impl WebRTCICETransport {
|
|||
unsafe {
|
||||
let mut value =
|
||||
Value::from_type(<WebRTCICEConnectionState as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.as_ptr() as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||
b"state\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -117,12 +112,15 @@ impl WebRTCICETransport {
|
|||
unsafe extern "C" fn on_new_candidate_trampoline<
|
||||
F: Fn(&WebRTCICETransport, &str) + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_web_rtc_sys::GstWebRTCICETransport,
|
||||
this: *mut ffi::GstWebRTCICETransport,
|
||||
object: *mut libc::c_char,
|
||||
f: glib_sys::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this), &GString::from_glib_borrow(object))
|
||||
f(
|
||||
&from_glib_borrow(this),
|
||||
&glib::GString::from_glib_borrow(object),
|
||||
)
|
||||
}
|
||||
unsafe {
|
||||
let f: Box_<F> = Box_::new(f);
|
||||
|
@ -146,8 +144,8 @@ impl WebRTCICETransport {
|
|||
unsafe extern "C" fn on_selected_candidate_pair_change_trampoline<
|
||||
F: Fn(&WebRTCICETransport) + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_web_rtc_sys::GstWebRTCICETransport,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstWebRTCICETransport,
|
||||
f: glib::ffi::gpointer,
|
||||
) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
|
@ -174,9 +172,9 @@ impl WebRTCICETransport {
|
|||
unsafe extern "C" fn notify_gathering_state_trampoline<
|
||||
F: Fn(&WebRTCICETransport) + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_web_rtc_sys::GstWebRTCICETransport,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstWebRTCICETransport,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
|
@ -201,9 +199,9 @@ impl WebRTCICETransport {
|
|||
unsafe extern "C" fn notify_state_trampoline<
|
||||
F: Fn(&WebRTCICETransport) + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_web_rtc_sys::GstWebRTCICETransport,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstWebRTCICETransport,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
|
|
|
@ -2,27 +2,26 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use crate::WebRTCDTLSTransport;
|
||||
use glib::translate::*;
|
||||
use gst_web_rtc_sys;
|
||||
use WebRTCDTLSTransport;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct WebRTCRTPReceiver(Object<gst_web_rtc_sys::GstWebRTCRTPReceiver, gst_web_rtc_sys::GstWebRTCRTPReceiverClass>);
|
||||
glib::glib_wrapper! {
|
||||
pub struct WebRTCRTPReceiver(Object<ffi::GstWebRTCRTPReceiver, ffi::GstWebRTCRTPReceiverClass>);
|
||||
|
||||
match fn {
|
||||
get_type => || gst_web_rtc_sys::gst_webrtc_rtp_receiver_get_type(),
|
||||
get_type => || ffi::gst_webrtc_rtp_receiver_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
impl WebRTCRTPReceiver {
|
||||
pub fn new() -> WebRTCRTPReceiver {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe { from_glib_none(gst_web_rtc_sys::gst_webrtc_rtp_receiver_new()) }
|
||||
unsafe { from_glib_none(ffi::gst_webrtc_rtp_receiver_new()) }
|
||||
}
|
||||
|
||||
pub fn set_rtcp_transport(&self, transport: &WebRTCDTLSTransport) {
|
||||
unsafe {
|
||||
gst_web_rtc_sys::gst_webrtc_rtp_receiver_set_rtcp_transport(
|
||||
ffi::gst_webrtc_rtp_receiver_set_rtcp_transport(
|
||||
self.to_glib_none().0,
|
||||
transport.to_glib_none().0,
|
||||
);
|
||||
|
@ -31,7 +30,7 @@ impl WebRTCRTPReceiver {
|
|||
|
||||
pub fn set_transport(&self, transport: &WebRTCDTLSTransport) {
|
||||
unsafe {
|
||||
gst_web_rtc_sys::gst_webrtc_rtp_receiver_set_transport(
|
||||
ffi::gst_webrtc_rtp_receiver_set_transport(
|
||||
self.to_glib_none().0,
|
||||
transport.to_glib_none().0,
|
||||
);
|
||||
|
|
|
@ -2,27 +2,26 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use crate::WebRTCDTLSTransport;
|
||||
use glib::translate::*;
|
||||
use gst_web_rtc_sys;
|
||||
use WebRTCDTLSTransport;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct WebRTCRTPSender(Object<gst_web_rtc_sys::GstWebRTCRTPSender, gst_web_rtc_sys::GstWebRTCRTPSenderClass>);
|
||||
glib::glib_wrapper! {
|
||||
pub struct WebRTCRTPSender(Object<ffi::GstWebRTCRTPSender, ffi::GstWebRTCRTPSenderClass>);
|
||||
|
||||
match fn {
|
||||
get_type => || gst_web_rtc_sys::gst_webrtc_rtp_sender_get_type(),
|
||||
get_type => || ffi::gst_webrtc_rtp_sender_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
impl WebRTCRTPSender {
|
||||
pub fn new() -> WebRTCRTPSender {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe { from_glib_none(gst_web_rtc_sys::gst_webrtc_rtp_sender_new()) }
|
||||
unsafe { from_glib_none(ffi::gst_webrtc_rtp_sender_new()) }
|
||||
}
|
||||
|
||||
pub fn set_rtcp_transport(&self, transport: &WebRTCDTLSTransport) {
|
||||
unsafe {
|
||||
gst_web_rtc_sys::gst_webrtc_rtp_sender_set_rtcp_transport(
|
||||
ffi::gst_webrtc_rtp_sender_set_rtcp_transport(
|
||||
self.to_glib_none().0,
|
||||
transport.to_glib_none().0,
|
||||
);
|
||||
|
@ -31,7 +30,7 @@ impl WebRTCRTPSender {
|
|||
|
||||
pub fn set_transport(&self, transport: &WebRTCDTLSTransport) {
|
||||
unsafe {
|
||||
gst_web_rtc_sys::gst_webrtc_rtp_sender_set_transport(
|
||||
ffi::gst_webrtc_rtp_sender_set_transport(
|
||||
self.to_glib_none().0,
|
||||
transport.to_glib_none().0,
|
||||
);
|
||||
|
|
|
@ -2,6 +2,11 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use crate::WebRTCRTPReceiver;
|
||||
use crate::WebRTCRTPSender;
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
use crate::WebRTCRTPTransceiverDirection;
|
||||
use glib::object::ObjectType as ObjectType_;
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
|
@ -14,26 +19,16 @@ use glib::StaticType;
|
|||
use glib::Value;
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
use glib_sys;
|
||||
use gobject_sys;
|
||||
use gst_web_rtc_sys;
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
use std::boxed::Box as Box_;
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
use std::mem::transmute;
|
||||
use WebRTCRTPReceiver;
|
||||
use WebRTCRTPSender;
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
use WebRTCRTPTransceiverDirection;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct WebRTCRTPTransceiver(Object<gst_web_rtc_sys::GstWebRTCRTPTransceiver, gst_web_rtc_sys::GstWebRTCRTPTransceiverClass>);
|
||||
glib::glib_wrapper! {
|
||||
pub struct WebRTCRTPTransceiver(Object<ffi::GstWebRTCRTPTransceiver, ffi::GstWebRTCRTPTransceiverClass>);
|
||||
|
||||
match fn {
|
||||
get_type => || gst_web_rtc_sys::gst_webrtc_rtp_transceiver_get_type(),
|
||||
get_type => || ffi::gst_webrtc_rtp_transceiver_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -44,8 +39,8 @@ impl WebRTCRTPTransceiver {
|
|||
unsafe {
|
||||
let mut value =
|
||||
Value::from_type(<WebRTCRTPTransceiverDirection as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.as_ptr() as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||
b"direction\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -60,8 +55,8 @@ impl WebRTCRTPTransceiver {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
pub fn set_property_direction(&self, direction: WebRTCRTPTransceiverDirection) {
|
||||
unsafe {
|
||||
gobject_sys::g_object_set_property(
|
||||
self.as_ptr() as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_set_property(
|
||||
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||
b"direction\0".as_ptr() as *const _,
|
||||
Value::from(&direction).to_glib_none().0,
|
||||
);
|
||||
|
@ -71,8 +66,8 @@ impl WebRTCRTPTransceiver {
|
|||
pub fn get_property_mlineindex(&self) -> u32 {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<u32 as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.as_ptr() as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||
b"mlineindex\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -86,8 +81,8 @@ impl WebRTCRTPTransceiver {
|
|||
pub fn get_property_receiver(&self) -> Option<WebRTCRTPReceiver> {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<WebRTCRTPReceiver as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.as_ptr() as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||
b"receiver\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -100,8 +95,8 @@ impl WebRTCRTPTransceiver {
|
|||
pub fn get_property_sender(&self) -> Option<WebRTCRTPSender> {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<WebRTCRTPSender as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.as_ptr() as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||
b"sender\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -122,9 +117,9 @@ impl WebRTCRTPTransceiver {
|
|||
unsafe extern "C" fn notify_direction_trampoline<
|
||||
F: Fn(&WebRTCRTPTransceiver) + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_web_rtc_sys::GstWebRTCRTPTransceiver,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstWebRTCRTPTransceiver,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
|
|
Loading…
Reference in a new issue