gstreamer_pbutils/auto/discoverer_container_info.rs
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
6use crate::{DiscovererStreamInfo, ffi};
7use glib::translate::*;
8
9glib::wrapper! {
10 /// [`DiscovererStreamInfo`][crate::DiscovererStreamInfo] specific to container streams.
11 ///
12 /// # Implements
13 ///
14 /// [`DiscovererStreamInfoExt`][trait@crate::prelude::DiscovererStreamInfoExt], [`trait@glib::ObjectExt`], [`DiscovererStreamInfoExtManual`][trait@crate::prelude::DiscovererStreamInfoExtManual]
15 #[doc(alias = "GstDiscovererContainerInfo")]
16 pub struct DiscovererContainerInfo(Object<ffi::GstDiscovererContainerInfo>) @extends DiscovererStreamInfo;
17
18 match fn {
19 type_ => || ffi::gst_discoverer_container_info_get_type(),
20 }
21}
22
23impl DiscovererContainerInfo {
24 ///
25 /// # Returns
26 ///
27 /// the list of
28 /// [`DiscovererStreamInfo`][crate::DiscovererStreamInfo] this container stream offers.
29 /// Free with `gst_discoverer_stream_info_list_free()` after usage.
30 #[doc(alias = "gst_discoverer_container_info_get_streams")]
31 #[doc(alias = "get_streams")]
32 pub fn streams(&self) -> Vec<DiscovererStreamInfo> {
33 unsafe {
34 FromGlibPtrContainer::from_glib_full(ffi::gst_discoverer_container_info_get_streams(
35 self.to_glib_none().0,
36 ))
37 }
38 }
39
40 ///
41 /// # Returns
42 ///
43 /// tags specific to the given container. If you wish to use
44 /// the tags after the life-time of `self`, you will need to copy them.
45 #[cfg(feature = "v1_20")]
46 #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
47 #[doc(alias = "gst_discoverer_container_info_get_tags")]
48 #[doc(alias = "get_tags")]
49 pub fn tags(&self) -> Option<gst::TagList> {
50 unsafe {
51 from_glib_none(ffi::gst_discoverer_container_info_get_tags(
52 self.to_glib_none().0,
53 ))
54 }
55 }
56}
57
58unsafe impl Send for DiscovererContainerInfo {}
59unsafe impl Sync for DiscovererContainerInfo {}