gstreamer-rs/gstreamer-webrtc/src/auto/web_rtcrtp_transceiver.rs

50 lines
1.8 KiB
Rust
Raw Normal View History

2018-04-23 17:34:22 +00:00
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files (https://github.com/gtk-rs/gir-files)
2018-03-15 16:04:49 +00:00
// DO NOT EDIT
use WebRTCRTPReceiver;
use WebRTCRTPSender;
use glib::StaticType;
use glib::Value;
2019-01-16 11:32:39 +00:00
use glib::object::ObjectType;
2018-03-15 16:04:49 +00:00
use glib::translate::*;
2019-03-19 07:40:05 +00:00
use gobject_sys;
use gst_web_rtc_sys;
2018-03-15 16:04:49 +00:00
glib_wrapper! {
2019-03-19 07:40:05 +00:00
pub struct WebRTCRTPTransceiver(Object<gst_web_rtc_sys::GstWebRTCRTPTransceiver, gst_web_rtc_sys::GstWebRTCRTPTransceiverClass, WebRTCRTPTransceiverClass>);
2018-03-15 16:04:49 +00:00
match fn {
2019-03-19 07:40:05 +00:00
get_type => || gst_web_rtc_sys::gst_webrtc_rtp_transceiver_get_type(),
2018-03-15 16:04:49 +00:00
}
}
impl WebRTCRTPTransceiver {
pub fn get_property_mlineindex(&self) -> u32 {
unsafe {
let mut value = Value::from_type(<u32 as StaticType>::static_type());
2019-03-19 07:40:05 +00:00
gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"mlineindex\0".as_ptr() as *const _, value.to_glib_none_mut().0);
2018-03-15 16:04:49 +00:00
value.get().unwrap()
}
}
pub fn get_property_receiver(&self) -> Option<WebRTCRTPReceiver> {
unsafe {
let mut value = Value::from_type(<WebRTCRTPReceiver as StaticType>::static_type());
2019-03-19 07:40:05 +00:00
gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"receiver\0".as_ptr() as *const _, value.to_glib_none_mut().0);
2018-03-15 16:04:49 +00:00
value.get()
}
}
pub fn get_property_sender(&self) -> Option<WebRTCRTPSender> {
unsafe {
let mut value = Value::from_type(<WebRTCRTPSender as StaticType>::static_type());
2019-03-19 07:40:05 +00:00
gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"sender\0".as_ptr() as *const _, value.to_glib_none_mut().0);
2018-03-15 16:04:49 +00:00
value.get()
}
}
}
unsafe impl Send for WebRTCRTPTransceiver {}
unsafe impl Sync for WebRTCRTPTransceiver {}