| 1 | // This file was generated by gir (https://github.com/gtk-rs/gir) |
| 2 | // from gir-files (https://github.com/gtk-rs/gir-files) |
| 3 | // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) |
| 4 | // DO NOT EDIT |
| 5 | |
| 6 | use crate::{ffi, Object, Stream}; |
| 7 | use glib::translate::*; |
| 8 | |
| 9 | glib::wrapper! { |
| 10 | #[doc (alias = "GstStreamCollection" )] |
| 11 | pub struct StreamCollection(Object<ffi::GstStreamCollection, ffi::GstStreamCollectionClass>) @extends Object; |
| 12 | |
| 13 | match fn { |
| 14 | type_ => || ffi::gst_stream_collection_get_type(), |
| 15 | } |
| 16 | } |
| 17 | |
| 18 | impl StreamCollection { |
| 19 | #[doc (alias = "gst_stream_collection_get_size" )] |
| 20 | #[doc (alias = "get_size" )] |
| 21 | pub fn size(&self) -> u32 { |
| 22 | unsafe { ffi::gst_stream_collection_get_size(self.to_glib_none().0) } |
| 23 | } |
| 24 | |
| 25 | #[doc (alias = "gst_stream_collection_get_stream" )] |
| 26 | #[doc (alias = "get_stream" )] |
| 27 | pub fn stream(&self, index: u32) -> Option<Stream> { |
| 28 | unsafe { |
| 29 | from_glib_none(ffi::gst_stream_collection_get_stream( |
| 30 | self.to_glib_none().0, |
| 31 | index, |
| 32 | )) |
| 33 | } |
| 34 | } |
| 35 | |
| 36 | #[doc (alias = "gst_stream_collection_get_upstream_id" )] |
| 37 | #[doc (alias = "get_upstream_id" )] |
| 38 | #[doc (alias = "upstream-id" )] |
| 39 | pub fn upstream_id(&self) -> Option<glib::GString> { |
| 40 | unsafe { |
| 41 | from_glib_none(ffi::gst_stream_collection_get_upstream_id( |
| 42 | self.to_glib_none().0, |
| 43 | )) |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | //#[doc(alias = "stream-notify")] |
| 48 | //pub fn connect_stream_notify<Unsupported or ignored types>(&self, detail: Option<&str>, f: F) -> SignalHandlerId { |
| 49 | // Ignored prop: GObject.ParamSpec |
| 50 | //} |
| 51 | } |
| 52 | |
| 53 | unsafe impl Send for StreamCollection {} |
| 54 | unsafe impl Sync for StreamCollection {} |
| 55 | |