gstreamer_player/auto/
player_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
6use crate::ffi;
7use glib::{prelude::*, translate::*};
8
9glib::wrapper! {
10    #[doc(alias = "GstPlayerStreamInfo")]
11    pub struct PlayerStreamInfo(Object<ffi::GstPlayerStreamInfo, ffi::GstPlayerStreamInfoClass>);
12
13    match fn {
14        type_ => || ffi::gst_player_stream_info_get_type(),
15    }
16}
17
18impl PlayerStreamInfo {
19    pub const NONE: Option<&'static PlayerStreamInfo> = None;
20}
21
22unsafe impl Send for PlayerStreamInfo {}
23unsafe impl Sync for PlayerStreamInfo {}
24
25pub trait PlayerStreamInfoExt: IsA<PlayerStreamInfo> + 'static {
26    #[doc(alias = "gst_player_stream_info_get_caps")]
27    #[doc(alias = "get_caps")]
28    fn caps(&self) -> Option<gst::Caps> {
29        unsafe {
30            from_glib_none(ffi::gst_player_stream_info_get_caps(const_override(
31                self.as_ref().to_glib_none().0,
32            )))
33        }
34    }
35
36    #[doc(alias = "gst_player_stream_info_get_codec")]
37    #[doc(alias = "get_codec")]
38    fn codec(&self) -> Option<glib::GString> {
39        unsafe {
40            from_glib_none(ffi::gst_player_stream_info_get_codec(const_override(
41                self.as_ref().to_glib_none().0,
42            )))
43        }
44    }
45
46    #[doc(alias = "gst_player_stream_info_get_index")]
47    #[doc(alias = "get_index")]
48    fn index(&self) -> i32 {
49        unsafe {
50            ffi::gst_player_stream_info_get_index(const_override(self.as_ref().to_glib_none().0))
51        }
52    }
53
54    #[doc(alias = "gst_player_stream_info_get_stream_type")]
55    #[doc(alias = "get_stream_type")]
56    fn stream_type(&self) -> glib::GString {
57        unsafe {
58            from_glib_none(ffi::gst_player_stream_info_get_stream_type(const_override(
59                self.as_ref().to_glib_none().0,
60            )))
61        }
62    }
63
64    #[doc(alias = "gst_player_stream_info_get_tags")]
65    #[doc(alias = "get_tags")]
66    fn tags(&self) -> Option<gst::TagList> {
67        unsafe {
68            from_glib_none(ffi::gst_player_stream_info_get_tags(const_override(
69                self.as_ref().to_glib_none().0,
70            )))
71        }
72    }
73}
74
75impl<O: IsA<PlayerStreamInfo>> PlayerStreamInfoExt for O {}