gstreamer_player/auto/
player_video_info.rs1use crate::{ffi, PlayerStreamInfo};
7use glib::translate::*;
8
9glib::wrapper! {
10    #[doc(alias = "GstPlayerVideoInfo")]
16    pub struct PlayerVideoInfo(Object<ffi::GstPlayerVideoInfo, ffi::GstPlayerVideoInfoClass>) @extends PlayerStreamInfo;
17
18    match fn {
19        type_ => || ffi::gst_player_video_info_get_type(),
20    }
21}
22
23impl PlayerVideoInfo {
24    #[doc(alias = "gst_player_video_info_get_bitrate")]
30    #[doc(alias = "get_bitrate")]
31    pub fn bitrate(&self) -> i32 {
32        unsafe { ffi::gst_player_video_info_get_bitrate(self.to_glib_none().0) }
33    }
34
35    #[doc(alias = "gst_player_video_info_get_height")]
40    #[doc(alias = "get_height")]
41    pub fn height(&self) -> i32 {
42        unsafe { ffi::gst_player_video_info_get_height(self.to_glib_none().0) }
43    }
44
45    #[doc(alias = "gst_player_video_info_get_max_bitrate")]
51    #[doc(alias = "get_max_bitrate")]
52    pub fn max_bitrate(&self) -> i32 {
53        unsafe { ffi::gst_player_video_info_get_max_bitrate(self.to_glib_none().0) }
54    }
55
56    #[doc(alias = "gst_player_video_info_get_width")]
61    #[doc(alias = "get_width")]
62    pub fn width(&self) -> i32 {
63        unsafe { ffi::gst_player_video_info_get_width(self.to_glib_none().0) }
64    }
65}
66
67unsafe impl Send for PlayerVideoInfo {}
68unsafe impl Sync for PlayerVideoInfo {}