gstreamer-rs/gstreamer/src/auto/stream_collection.rs

58 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)
2017-07-04 22:47:33 +00:00
// DO NOT EDIT
use glib::translate::*;
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
use glib::GString;
2019-03-19 07:40:05 +00:00
use gst_sys;
use Object;
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
use Stream;
2017-07-04 22:47:33 +00:00
glib_wrapper! {
2020-11-07 10:17:25 +00:00
pub struct StreamCollection(Object<gst_sys::GstStreamCollection, gst_sys::GstStreamCollectionClass>) @extends Object;
2017-07-04 22:47:33 +00:00
match fn {
2019-03-19 07:40:05 +00:00
get_type => || gst_sys::gst_stream_collection_get_type(),
2017-07-04 22:47:33 +00:00
}
}
impl StreamCollection {
2017-10-01 13:52:15 +00:00
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn get_size(&self) -> u32 {
unsafe { gst_sys::gst_stream_collection_get_size(self.to_glib_none().0) }
2017-07-04 22:47:33 +00:00
}
2017-10-01 13:52:15 +00:00
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn get_stream(&self, index: u32) -> Option<Stream> {
2017-07-04 22:47:33 +00:00
unsafe {
from_glib_none(gst_sys::gst_stream_collection_get_stream(
self.to_glib_none().0,
index,
))
2017-07-04 22:47:33 +00:00
}
}
2017-10-01 13:52:15 +00:00
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn get_upstream_id(&self) -> Option<GString> {
2017-07-04 22:47:33 +00:00
unsafe {
from_glib_none(gst_sys::gst_stream_collection_get_upstream_id(
self.to_glib_none().0,
))
2017-07-04 22:47:33 +00:00
}
}
2017-09-09 13:01:32 +00:00
//pub fn connect_stream_notify<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId {
2017-07-04 22:47:33 +00:00
// Ignored p0: GObject.ParamSpec
//}
}
unsafe impl Send for StreamCollection {}
unsafe impl Sync for StreamCollection {}