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
26pub trait PlayStreamInfoExt: IsA<PlayStreamInfo> + 'static {
27    #[doc(alias = "gst_play_stream_info_get_caps")]
28    #[doc(alias = "get_caps")]
29    fn caps(&self) -> Option<gst::Caps> {
30        unsafe {
31            from_glib_none(ffi::gst_play_stream_info_get_caps(const_override(
32                self.as_ref().to_glib_none().0,
33            )))
34        }
35    }
36
37    #[doc(alias = "gst_play_stream_info_get_codec")]
38    #[doc(alias = "get_codec")]
39    fn codec(&self) -> Option<glib::GString> {
40        unsafe {
41            from_glib_none(ffi::gst_play_stream_info_get_codec(const_override(
42                self.as_ref().to_glib_none().0,
43            )))
44        }
45    }
46
47    #[cfg_attr(feature = "v1_26", deprecated = "Since 1.26")]
48    #[allow(deprecated)]
49    #[doc(alias = "gst_play_stream_info_get_index")]
50    #[doc(alias = "get_index")]
51    fn index(&self) -> i32 {
52        unsafe {
53            ffi::gst_play_stream_info_get_index(const_override(self.as_ref().to_glib_none().0))
54        }
55    }
56
57    #[cfg(feature = "v1_26")]
58    #[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
59    #[doc(alias = "gst_play_stream_info_get_stream_id")]
60    #[doc(alias = "get_stream_id")]
61    fn stream_id(&self) -> glib::GString {
62        unsafe {
63            from_glib_none(ffi::gst_play_stream_info_get_stream_id(const_override(
64                self.as_ref().to_glib_none().0,
65            )))
66        }
67    }
68
69    #[doc(alias = "gst_play_stream_info_get_stream_type")]
70    #[doc(alias = "get_stream_type")]
71    fn stream_type(&self) -> glib::GString {
72        unsafe {
73            from_glib_none(ffi::gst_play_stream_info_get_stream_type(const_override(
74                self.as_ref().to_glib_none().0,
75            )))
76        }
77    }
78
79    #[doc(alias = "gst_play_stream_info_get_tags")]
80    #[doc(alias = "get_tags")]
81    fn tags(&self) -> Option<gst::TagList> {
82        unsafe {
83            from_glib_none(ffi::gst_play_stream_info_get_tags(const_override(
84                self.as_ref().to_glib_none().0,
85            )))
86        }
87    }
88}
89
90impl<O: IsA<PlayStreamInfo>> PlayStreamInfoExt for O {}