gstreamer-rs/gstreamer-player/src/auto/player_audio_info.rs

56 lines
1.8 KiB
Rust
Raw Normal View History

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)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
// DO NOT EDIT
use crate::{ffi, PlayerStreamInfo};
use glib::translate::*;
2020-12-17 22:34:53 +00:00
glib::wrapper! {
#[doc(alias = "GstPlayerAudioInfo")]
2020-11-22 10:29:02 +00:00
pub struct PlayerAudioInfo(Object<ffi::GstPlayerAudioInfo, ffi::GstPlayerAudioInfoClass>) @extends PlayerStreamInfo;
match fn {
type_ => || ffi::gst_player_audio_info_get_type(),
}
}
impl PlayerAudioInfo {
2020-12-08 13:00:17 +00:00
#[doc(alias = "gst_player_audio_info_get_bitrate")]
#[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) }
}
2020-12-08 13:00:17 +00:00
#[doc(alias = "gst_player_audio_info_get_channels")]
#[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) }
}
2020-12-08 13:00:17 +00:00
#[doc(alias = "gst_player_audio_info_get_language")]
#[doc(alias = "get_language")]
2021-04-11 19:38:18 +00:00
pub fn language(&self) -> Option<glib::GString> {
unsafe {
2020-11-22 10:29:02 +00:00
from_glib_none(ffi::gst_player_audio_info_get_language(
self.to_glib_none().0,
))
}
}
2020-12-08 13:00:17 +00:00
#[doc(alias = "gst_player_audio_info_get_max_bitrate")]
#[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) }
}
2020-12-08 13:00:17 +00:00
#[doc(alias = "gst_player_audio_info_get_sample_rate")]
#[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) }
}
}
unsafe impl Send for PlayerAudioInfo {}
unsafe impl Sync for PlayerAudioInfo {}