2018-04-23 17:34:22 +00:00
|
|
|
// This file was generated by gir (https://github.com/gtk-rs/gir)
|
|
|
|
// from gir-files (https://github.com/gtk-rs/gir-files)
|
2021-04-01 13:58:41 +00:00
|
|
|
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
2017-08-01 12:36:39 +00:00
|
|
|
// DO NOT EDIT
|
|
|
|
|
2024-06-01 13:14:58 +00:00
|
|
|
use crate::{ffi, PlayerStreamInfo};
|
2017-08-01 12:36:39 +00:00
|
|
|
use glib::translate::*;
|
|
|
|
|
2020-12-17 22:34:53 +00:00
|
|
|
glib::wrapper! {
|
2021-06-02 07:47:51 +00:00
|
|
|
#[doc(alias = "GstPlayerAudioInfo")]
|
2020-11-22 10:29:02 +00:00
|
|
|
pub struct PlayerAudioInfo(Object<ffi::GstPlayerAudioInfo, ffi::GstPlayerAudioInfoClass>) @extends PlayerStreamInfo;
|
2017-08-01 12:36:39 +00:00
|
|
|
|
|
|
|
match fn {
|
2021-04-19 19:55:01 +00:00
|
|
|
type_ => || ffi::gst_player_audio_info_get_type(),
|
2017-08-01 12:36:39 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-08-17 11:50:25 +00:00
|
|
|
impl PlayerAudioInfo {
|
2020-12-08 13:00:17 +00:00
|
|
|
#[doc(alias = "gst_player_audio_info_get_bitrate")]
|
2021-05-03 18:35:37 +00:00
|
|
|
#[doc(alias = "get_bitrate")]
|
2021-04-11 19:38:18 +00:00
|
|
|
pub fn bitrate(&self) -> i32 {
|
2020-11-22 10:29:02 +00:00
|
|
|
unsafe { ffi::gst_player_audio_info_get_bitrate(self.to_glib_none().0) }
|
2017-08-01 12:36:39 +00:00
|
|
|
}
|
|
|
|
|
2020-12-08 13:00:17 +00:00
|
|
|
#[doc(alias = "gst_player_audio_info_get_channels")]
|
2021-05-03 18:35:37 +00:00
|
|
|
#[doc(alias = "get_channels")]
|
2021-04-11 19:38:18 +00:00
|
|
|
pub fn channels(&self) -> i32 {
|
2020-11-22 10:29:02 +00:00
|
|
|
unsafe { ffi::gst_player_audio_info_get_channels(self.to_glib_none().0) }
|
2017-08-01 12:36:39 +00:00
|
|
|
}
|
|
|
|
|
2020-12-08 13:00:17 +00:00
|
|
|
#[doc(alias = "gst_player_audio_info_get_language")]
|
2021-05-03 18:35:37 +00:00
|
|
|
#[doc(alias = "get_language")]
|
2021-04-11 19:38:18 +00:00
|
|
|
pub fn language(&self) -> Option<glib::GString> {
|
2017-08-01 12:36:39 +00:00
|
|
|
unsafe {
|
2020-11-22 10:29:02 +00:00
|
|
|
from_glib_none(ffi::gst_player_audio_info_get_language(
|
2019-06-18 10:12:00 +00:00
|
|
|
self.to_glib_none().0,
|
|
|
|
))
|
2017-08-01 12:36:39 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-12-08 13:00:17 +00:00
|
|
|
#[doc(alias = "gst_player_audio_info_get_max_bitrate")]
|
2021-05-03 18:35:37 +00:00
|
|
|
#[doc(alias = "get_max_bitrate")]
|
2021-04-11 19:38:18 +00:00
|
|
|
pub fn max_bitrate(&self) -> i32 {
|
2020-11-22 10:29:02 +00:00
|
|
|
unsafe { ffi::gst_player_audio_info_get_max_bitrate(self.to_glib_none().0) }
|
2017-08-01 12:36:39 +00:00
|
|
|
}
|
|
|
|
|
2020-12-08 13:00:17 +00:00
|
|
|
#[doc(alias = "gst_player_audio_info_get_sample_rate")]
|
2021-05-03 18:35:37 +00:00
|
|
|
#[doc(alias = "get_sample_rate")]
|
2021-04-11 19:38:18 +00:00
|
|
|
pub fn sample_rate(&self) -> i32 {
|
2020-11-22 10:29:02 +00:00
|
|
|
unsafe { ffi::gst_player_audio_info_get_sample_rate(self.to_glib_none().0) }
|
2017-08-01 12:36:39 +00:00
|
|
|
}
|
|
|
|
}
|
2017-08-17 11:50:25 +00:00
|
|
|
|
|
|
|
unsafe impl Send for PlayerAudioInfo {}
|
|
|
|
unsafe impl Sync for PlayerAudioInfo {}
|