// This file was generated by gir (cf27827) from gir-files (???) // DO NOT EDIT #[cfg(feature = "v1_10")] use Caps; use Object; #[cfg(feature = "v1_10")] use StreamFlags; #[cfg(feature = "v1_10")] use StreamType; #[cfg(feature = "v1_10")] use TagList; use ffi; use glib::object::IsA; use glib::translate::*; use glib_ffi; use gobject_ffi; use std::mem; use std::ptr; glib_wrapper! { pub struct Stream(Object): Object; match fn { get_type => || ffi::gst_stream_get_type(), } } impl Stream { #[cfg(feature = "v1_10")] pub fn new<'a, 'b, P: Into>, Q: Into>>(stream_id: P, caps: Q, type_: StreamType, flags: StreamFlags) -> Stream { assert_initialized_main_thread!(); let stream_id = stream_id.into(); let stream_id = stream_id.to_glib_none(); let caps = caps.into(); let caps = caps.to_glib_none(); unsafe { from_glib_full(ffi::gst_stream_new(stream_id.0, caps.0, type_.to_glib(), flags.to_glib())) } } } unsafe impl Send for Stream {} unsafe impl Sync for Stream {} pub trait StreamExt { #[cfg(feature = "v1_10")] fn get_caps(&self) -> Option; #[cfg(feature = "v1_10")] fn get_stream_flags(&self) -> StreamFlags; #[cfg(feature = "v1_10")] fn get_stream_id(&self) -> Option; #[cfg(feature = "v1_10")] fn get_stream_type(&self) -> StreamType; #[cfg(feature = "v1_10")] fn get_tags(&self) -> Option; #[cfg(feature = "v1_10")] fn set_caps<'a, P: Into>>(&self, caps: P); #[cfg(feature = "v1_10")] fn set_stream_flags(&self, flags: StreamFlags); #[cfg(feature = "v1_10")] fn set_stream_type(&self, stream_type: StreamType); #[cfg(feature = "v1_10")] fn set_tags<'a, P: Into>>(&self, tags: P); } impl> StreamExt for O { #[cfg(feature = "v1_10")] fn get_caps(&self) -> Option { unsafe { from_glib_full(ffi::gst_stream_get_caps(self.to_glib_none().0)) } } #[cfg(feature = "v1_10")] fn get_stream_flags(&self) -> StreamFlags { unsafe { from_glib(ffi::gst_stream_get_stream_flags(self.to_glib_none().0)) } } #[cfg(feature = "v1_10")] fn get_stream_id(&self) -> Option { unsafe { from_glib_none(ffi::gst_stream_get_stream_id(self.to_glib_none().0)) } } #[cfg(feature = "v1_10")] fn get_stream_type(&self) -> StreamType { unsafe { from_glib(ffi::gst_stream_get_stream_type(self.to_glib_none().0)) } } #[cfg(feature = "v1_10")] fn get_tags(&self) -> Option { unsafe { from_glib_full(ffi::gst_stream_get_tags(self.to_glib_none().0)) } } #[cfg(feature = "v1_10")] fn set_caps<'a, P: Into>>(&self, caps: P) { let caps = caps.into(); let caps = caps.to_glib_none(); unsafe { ffi::gst_stream_set_caps(self.to_glib_none().0, caps.0); } } #[cfg(feature = "v1_10")] fn set_stream_flags(&self, flags: StreamFlags) { unsafe { ffi::gst_stream_set_stream_flags(self.to_glib_none().0, flags.to_glib()); } } #[cfg(feature = "v1_10")] fn set_stream_type(&self, stream_type: StreamType) { unsafe { ffi::gst_stream_set_stream_type(self.to_glib_none().0, stream_type.to_glib()); } } #[cfg(feature = "v1_10")] fn set_tags<'a, P: Into>>(&self, tags: P) { let tags = tags.into(); let tags = tags.to_glib_none(); unsafe { ffi::gst_stream_set_tags(self.to_glib_none().0, tags.0); } } }