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

54 lines
1.6 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
use crate::{Object, Stream};
2020-11-21 13:46:33 +00:00
use glib::translate::*;
2017-07-04 22:47:33 +00:00
2020-12-17 22:34:53 +00:00
glib::wrapper! {
#[doc(alias = "GstStreamCollection")]
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 {
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")]
#[doc(alias = "get_size")]
2021-04-11 19:38:18 +00:00
pub fn 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")]
#[doc(alias = "get_stream")]
2021-04-19 20:13:58 +00:00
pub fn 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")]
#[doc(alias = "get_upstream_id")]
2021-04-11 19:38:18 +00:00
pub fn 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
}
}
//#[doc(alias = "stream-notify")]
2021-02-28 16:30:54 +00:00
//pub fn connect_stream_notify<Unsupported or ignored types>(&self, detail: Option<&str>, f: F) -> SignalHandlerId {
// Ignored prop: GObject.ParamSpec
2017-07-04 22:47:33 +00:00
//}
}
unsafe impl Send for StreamCollection {}
unsafe impl Sync for StreamCollection {}