gstreamer_play/auto/
play_stream_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#![allow(deprecated)]
6
7use crate::ffi;
8use glib::{prelude::*, translate::*};
9
10glib::wrapper! {
11    #[doc(alias = "GstPlayStreamInfo")]
12    pub struct PlayStreamInfo(Object<ffi::GstPlayStreamInfo, ffi::GstPlayStreamInfoClass>);
13
14    match fn {
15        type_ => || ffi::gst_play_stream_info_get_type(),
16    }
17}
18
19impl PlayStreamInfo {
20    pub const NONE: Option<&'static PlayStreamInfo> = None;
21}
22
23unsafe impl Send for PlayStreamInfo {}
24unsafe impl Sync for PlayStreamInfo {}
25
26mod sealed {
27    pub trait Sealed {}
28    impl<T: super::IsA<super::PlayStreamInfo>> Sealed for T {}
29}
30
31pub trait PlayStreamInfoExt: IsA<PlayStreamInfo> + sealed::Sealed + 'static {
32    #[doc(alias = "gst_play_stream_info_get_caps")]
33    #[doc(alias = "get_caps")]
34    fn caps(&self) -> Option<gst::Caps> {
35        unsafe {
36            from_glib_none(ffi::gst_play_stream_info_get_caps(const_override(
37                self.as_ref().to_glib_none().0,
38            )))
39        }
40    }
41
42    #[doc(alias = "gst_play_stream_info_get_codec")]
43    #[doc(alias = "get_codec")]
44    fn codec(&self) -> Option<glib::GString> {
45        unsafe {
46            from_glib_none(ffi::gst_play_stream_info_get_codec(const_override(
47                self.as_ref().to_glib_none().0,
48            )))
49        }
50    }
51
52    #[cfg_attr(feature = "v1_26", deprecated = "Since 1.26")]
53    #[allow(deprecated)]
54    #[doc(alias = "gst_play_stream_info_get_index")]
55    #[doc(alias = "get_index")]
56    fn index(&self) -> i32 {
57        unsafe {
58            ffi::gst_play_stream_info_get_index(const_override(self.as_ref().to_glib_none().0))
59        }
60    }
61
62    #[cfg(feature = "v1_26")]
63    #[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
64    #[doc(alias = "gst_play_stream_info_get_stream_id")]
65    #[doc(alias = "get_stream_id")]
66    fn stream_id(&self) -> glib::GString {
67        unsafe {
68            from_glib_none(ffi::gst_play_stream_info_get_stream_id(const_override(
69                self.as_ref().to_glib_none().0,
70            )))
71        }
72    }
73
74    #[doc(alias = "gst_play_stream_info_get_stream_type")]
75    #[doc(alias = "get_stream_type")]
76    fn stream_type(&self) -> glib::GString {
77        unsafe {
78            from_glib_none(ffi::gst_play_stream_info_get_stream_type(const_override(
79                self.as_ref().to_glib_none().0,
80            )))
81        }
82    }
83
84    #[doc(alias = "gst_play_stream_info_get_tags")]
85    #[doc(alias = "get_tags")]
86    fn tags(&self) -> Option<gst::TagList> {
87        unsafe {
88            from_glib_none(ffi::gst_play_stream_info_get_tags(const_override(
89                self.as_ref().to_glib_none().0,
90            )))
91        }
92    }
93}
94
95impl<O: IsA<PlayStreamInfo>> PlayStreamInfoExt for O {}