mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-06-02 13:29:29 +00:00
57 lines
1.7 KiB
Rust
57 lines
1.7 KiB
Rust
// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4)
|
|
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
|
// DO NOT EDIT
|
|
|
|
use ffi;
|
|
use glib::translate::*;
|
|
use glib_ffi;
|
|
use gobject_ffi;
|
|
use gst;
|
|
use std::mem;
|
|
use std::ptr;
|
|
|
|
glib_wrapper! {
|
|
pub struct RTSPToken(Boxed<ffi::GstRTSPToken>);
|
|
|
|
match fn {
|
|
copy => |ptr| gobject_ffi::g_boxed_copy(ffi::gst_rtsp_token_get_type(), ptr as *mut _) as *mut ffi::GstRTSPToken,
|
|
free => |ptr| gobject_ffi::g_boxed_free(ffi::gst_rtsp_token_get_type(), ptr as *mut _),
|
|
get_type => || ffi::gst_rtsp_token_get_type(),
|
|
}
|
|
}
|
|
|
|
impl RTSPToken {
|
|
//pub fn new(firstfield: &str, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) -> RTSPToken {
|
|
// unsafe { TODO: call ffi::gst_rtsp_token_new() }
|
|
//}
|
|
|
|
pub fn new_empty() -> RTSPToken {
|
|
assert_initialized_main_thread!();
|
|
unsafe {
|
|
from_glib_full(ffi::gst_rtsp_token_new_empty())
|
|
}
|
|
}
|
|
|
|
//pub fn new_valist(firstfield: &str, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported) -> RTSPToken {
|
|
// unsafe { TODO: call ffi::gst_rtsp_token_new_valist() }
|
|
//}
|
|
|
|
pub fn get_string(&mut self, field: &str) -> Option<String> {
|
|
unsafe {
|
|
from_glib_none(ffi::gst_rtsp_token_get_string(self.to_glib_none_mut().0, field.to_glib_none().0))
|
|
}
|
|
}
|
|
|
|
pub fn get_structure(&mut self) -> Option<gst::Structure> {
|
|
unsafe {
|
|
from_glib_none(ffi::gst_rtsp_token_get_structure(self.to_glib_none_mut().0))
|
|
}
|
|
}
|
|
|
|
pub fn is_allowed(&mut self, field: &str) -> bool {
|
|
unsafe {
|
|
from_glib(ffi::gst_rtsp_token_is_allowed(self.to_glib_none_mut().0, field.to_glib_none().0))
|
|
}
|
|
}
|
|
}
|