gstreamer_pbutils/auto/
discoverer_stream_info.rs1use crate::ffi;
7use glib::{prelude::*, translate::*};
8
9glib::wrapper! {
10 #[doc(alias = "GstDiscovererStreamInfo")]
11 pub struct DiscovererStreamInfo(Object<ffi::GstDiscovererStreamInfo>);
12
13 match fn {
14 type_ => || ffi::gst_discoverer_stream_info_get_type(),
15 }
16}
17
18impl DiscovererStreamInfo {
19 pub const NONE: Option<&'static DiscovererStreamInfo> = None;
20}
21
22unsafe impl Send for DiscovererStreamInfo {}
23unsafe impl Sync for DiscovererStreamInfo {}
24
25pub trait DiscovererStreamInfoExt: IsA<DiscovererStreamInfo> + 'static {
26 #[doc(alias = "gst_discoverer_stream_info_get_caps")]
27 #[doc(alias = "get_caps")]
28 fn caps(&self) -> Option<gst::Caps> {
29 unsafe {
30 from_glib_full(ffi::gst_discoverer_stream_info_get_caps(
31 self.as_ref().to_glib_none().0,
32 ))
33 }
34 }
35
36 #[doc(alias = "gst_discoverer_stream_info_get_misc")]
37 #[doc(alias = "get_misc")]
38 fn misc(&self) -> Option<gst::Structure> {
39 unsafe {
40 from_glib_none(ffi::gst_discoverer_stream_info_get_misc(
41 self.as_ref().to_glib_none().0,
42 ))
43 }
44 }
45
46 #[doc(alias = "gst_discoverer_stream_info_get_next")]
47 #[doc(alias = "get_next")]
48 #[must_use]
49 fn next(&self) -> Option<DiscovererStreamInfo> {
50 unsafe {
51 from_glib_full(ffi::gst_discoverer_stream_info_get_next(
52 self.as_ref().to_glib_none().0,
53 ))
54 }
55 }
56
57 #[doc(alias = "gst_discoverer_stream_info_get_previous")]
58 #[doc(alias = "get_previous")]
59 #[must_use]
60 fn previous(&self) -> Option<DiscovererStreamInfo> {
61 unsafe {
62 from_glib_full(ffi::gst_discoverer_stream_info_get_previous(
63 self.as_ref().to_glib_none().0,
64 ))
65 }
66 }
67
68 #[doc(alias = "gst_discoverer_stream_info_get_stream_id")]
69 #[doc(alias = "get_stream_id")]
70 fn stream_id(&self) -> Option<glib::GString> {
71 unsafe {
72 from_glib_none(ffi::gst_discoverer_stream_info_get_stream_id(
73 self.as_ref().to_glib_none().0,
74 ))
75 }
76 }
77
78 #[cfg(feature = "v1_20")]
79 #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
80 #[doc(alias = "gst_discoverer_stream_info_get_stream_number")]
81 #[doc(alias = "get_stream_number")]
82 fn stream_number(&self) -> i32 {
83 unsafe { ffi::gst_discoverer_stream_info_get_stream_number(self.as_ref().to_glib_none().0) }
84 }
85
86 #[doc(alias = "gst_discoverer_stream_info_get_stream_type_nick")]
87 #[doc(alias = "get_stream_type_nick")]
88 fn stream_type_nick(&self) -> glib::GString {
89 unsafe {
90 from_glib_none(ffi::gst_discoverer_stream_info_get_stream_type_nick(
91 self.as_ref().to_glib_none().0,
92 ))
93 }
94 }
95
96 #[doc(alias = "gst_discoverer_stream_info_get_tags")]
97 #[doc(alias = "get_tags")]
98 fn tags(&self) -> Option<gst::TagList> {
99 unsafe {
100 from_glib_none(ffi::gst_discoverer_stream_info_get_tags(
101 self.as_ref().to_glib_none().0,
102 ))
103 }
104 }
105
106 #[doc(alias = "gst_discoverer_stream_info_get_toc")]
107 #[doc(alias = "get_toc")]
108 fn toc(&self) -> Option<gst::Toc> {
109 unsafe {
110 from_glib_none(ffi::gst_discoverer_stream_info_get_toc(
111 self.as_ref().to_glib_none().0,
112 ))
113 }
114 }
115}
116
117impl<O: IsA<DiscovererStreamInfo>> DiscovererStreamInfoExt for O {}