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

50 lines
1.5 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)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
2017-07-04 22:47:33 +00:00
// DO NOT EDIT
2020-11-21 13:46:33 +00:00
use crate::Object;
use crate::Stream;
use glib::translate::*;
2017-07-04 22:47:33 +00:00
2020-12-17 22:34:53 +00:00
glib::wrapper! {
2020-11-21 13:46:33 +00:00
pub struct StreamCollection(Object<ffi::GstStreamCollection, ffi::GstStreamCollectionClass>) @extends Object;
2017-07-04 22:47:33 +00:00
match fn {
2020-11-21 13:46:33 +00:00
get_type => || ffi::gst_stream_collection_get_type(),
2017-07-04 22:47:33 +00:00
}
}
impl StreamCollection {
2020-12-08 13:00:17 +00:00
#[doc(alias = "gst_stream_collection_get_size")]
pub fn get_size(&self) -> u32 {
2020-11-21 13:46:33 +00:00
unsafe { ffi::gst_stream_collection_get_size(self.to_glib_none().0) }
2017-07-04 22:47:33 +00:00
}
2020-12-08 13:00:17 +00:00
#[doc(alias = "gst_stream_collection_get_stream")]
pub fn get_stream(&self, index: u32) -> Option<Stream> {
2017-07-04 22:47:33 +00:00
unsafe {
2020-11-21 13:46:33 +00:00
from_glib_none(ffi::gst_stream_collection_get_stream(
self.to_glib_none().0,
index,
))
2017-07-04 22:47:33 +00:00
}
}
2020-12-08 13:00:17 +00:00
#[doc(alias = "gst_stream_collection_get_upstream_id")]
2020-11-21 13:46:33 +00:00
pub fn get_upstream_id(&self) -> Option<glib::GString> {
2017-07-04 22:47:33 +00:00
unsafe {
2020-11-21 13:46:33 +00:00
from_glib_none(ffi::gst_stream_collection_get_upstream_id(
self.to_glib_none().0,
))
2017-07-04 22:47:33 +00:00
}
}
2021-02-28 16:30:54 +00:00
//pub fn connect_stream_notify<Unsupported or ignored types>(&self, detail: Option<&str>, 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 {}