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::{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 | pub fn upstream_id(&self) -> Option<glib::GString> { |
39 | unsafe { |
40 | from_glib_none(ffi::gst_stream_collection_get_upstream_id( |
41 | self.to_glib_none().0, |
42 | )) |
43 | } |
44 | } |
45 | |
46 | //#[doc(alias = "stream-notify")] |
47 | //pub fn connect_stream_notify<Unsupported or ignored types>(&self, detail: Option<&str>, f: F) -> SignalHandlerId { |
48 | // Ignored prop: GObject.ParamSpec |
49 | //} |
50 | } |
51 | |
52 | unsafe impl Send for StreamCollection {} |
53 | unsafe impl Sync for StreamCollection {} |
54 | |