gstreamer_play/auto/
play_stream_info.rs
1#![allow(deprecated)]
6
7use crate::ffi;
8use glib::{prelude::*, translate::*};
9
10glib::wrapper! {
11 #[doc(alias = "GstPlayStreamInfo")]
21 pub struct PlayStreamInfo(Object<ffi::GstPlayStreamInfo, ffi::GstPlayStreamInfoClass>);
22
23 match fn {
24 type_ => || ffi::gst_play_stream_info_get_type(),
25 }
26}
27
28impl PlayStreamInfo {
29 pub const NONE: Option<&'static PlayStreamInfo> = None;
30}
31
32unsafe impl Send for PlayStreamInfo {}
33unsafe impl Sync for PlayStreamInfo {}
34
35mod sealed {
36 pub trait Sealed {}
37 impl<T: super::IsA<super::PlayStreamInfo>> Sealed for T {}
38}
39
40pub trait PlayStreamInfoExt: IsA<PlayStreamInfo> + sealed::Sealed + 'static {
46 #[doc(alias = "gst_play_stream_info_get_caps")]
52 #[doc(alias = "get_caps")]
53 fn caps(&self) -> Option<gst::Caps> {
54 unsafe {
55 from_glib_none(ffi::gst_play_stream_info_get_caps(const_override(
56 self.as_ref().to_glib_none().0,
57 )))
58 }
59 }
60
61 #[doc(alias = "gst_play_stream_info_get_codec")]
67 #[doc(alias = "get_codec")]
68 fn codec(&self) -> Option<glib::GString> {
69 unsafe {
70 from_glib_none(ffi::gst_play_stream_info_get_codec(const_override(
71 self.as_ref().to_glib_none().0,
72 )))
73 }
74 }
75
76 #[cfg_attr(feature = "v1_26", deprecated = "Since 1.26")]
87 #[allow(deprecated)]
88 #[doc(alias = "gst_play_stream_info_get_index")]
89 #[doc(alias = "get_index")]
90 fn index(&self) -> i32 {
91 unsafe {
92 ffi::gst_play_stream_info_get_index(const_override(self.as_ref().to_glib_none().0))
93 }
94 }
95
96 #[cfg(feature = "v1_26")]
102 #[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
103 #[doc(alias = "gst_play_stream_info_get_stream_id")]
104 #[doc(alias = "get_stream_id")]
105 fn stream_id(&self) -> glib::GString {
106 unsafe {
107 from_glib_none(ffi::gst_play_stream_info_get_stream_id(const_override(
108 self.as_ref().to_glib_none().0,
109 )))
110 }
111 }
112
113 #[doc(alias = "gst_play_stream_info_get_stream_type")]
120 #[doc(alias = "get_stream_type")]
121 fn stream_type(&self) -> glib::GString {
122 unsafe {
123 from_glib_none(ffi::gst_play_stream_info_get_stream_type(const_override(
124 self.as_ref().to_glib_none().0,
125 )))
126 }
127 }
128
129 #[doc(alias = "gst_play_stream_info_get_tags")]
134 #[doc(alias = "get_tags")]
135 fn tags(&self) -> Option<gst::TagList> {
136 unsafe {
137 from_glib_none(ffi::gst_play_stream_info_get_tags(const_override(
138 self.as_ref().to_glib_none().0,
139 )))
140 }
141 }
142}
143
144impl<O: IsA<PlayStreamInfo>> PlayStreamInfoExt for O {}