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

125 lines
3.5 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)
// DO NOT EDIT
use PlayerAudioInfo;
use PlayerStreamInfo;
use PlayerSubtitleInfo;
use PlayerVideoInfo;
use ffi;
use glib::translate::*;
use glib_ffi;
use gobject_ffi;
use gst;
use std::mem;
use std::ptr;
glib_wrapper! {
pub struct PlayerMediaInfo(Object<ffi::GstPlayerMediaInfo, ffi::GstPlayerMediaInfoClass>);
match fn {
get_type => || ffi::gst_player_media_info_get_type(),
}
}
impl PlayerMediaInfo {
pub fn get_audio_streams(&self) -> Vec<PlayerAudioInfo> {
unsafe {
FromGlibPtrContainer::from_glib_none(ffi::gst_player_media_info_get_audio_streams(self.to_glib_none().0))
}
}
pub fn get_container_format(&self) -> Option<String> {
unsafe {
from_glib_none(ffi::gst_player_media_info_get_container_format(self.to_glib_none().0))
}
}
pub fn get_duration(&self) -> gst::ClockTime {
unsafe {
from_glib(ffi::gst_player_media_info_get_duration(self.to_glib_none().0))
}
}
pub fn get_image_sample(&self) -> Option<gst::Sample> {
unsafe {
from_glib_none(ffi::gst_player_media_info_get_image_sample(self.to_glib_none().0))
}
}
pub fn get_number_of_audio_streams(&self) -> u32 {
unsafe {
ffi::gst_player_media_info_get_number_of_audio_streams(self.to_glib_none().0)
}
}
pub fn get_number_of_streams(&self) -> u32 {
unsafe {
ffi::gst_player_media_info_get_number_of_streams(self.to_glib_none().0)
}
}
pub fn get_number_of_subtitle_streams(&self) -> u32 {
unsafe {
ffi::gst_player_media_info_get_number_of_subtitle_streams(self.to_glib_none().0)
}
}
pub fn get_number_of_video_streams(&self) -> u32 {
unsafe {
ffi::gst_player_media_info_get_number_of_video_streams(self.to_glib_none().0)
}
}
pub fn get_stream_list(&self) -> Vec<PlayerStreamInfo> {
unsafe {
FromGlibPtrContainer::from_glib_none(ffi::gst_player_media_info_get_stream_list(self.to_glib_none().0))
}
}
pub fn get_subtitle_streams(&self) -> Vec<PlayerSubtitleInfo> {
unsafe {
FromGlibPtrContainer::from_glib_none(ffi::gst_player_media_info_get_subtitle_streams(self.to_glib_none().0))
}
}
pub fn get_tags(&self) -> Option<gst::TagList> {
unsafe {
from_glib_none(ffi::gst_player_media_info_get_tags(self.to_glib_none().0))
}
}
pub fn get_title(&self) -> Option<String> {
unsafe {
from_glib_none(ffi::gst_player_media_info_get_title(self.to_glib_none().0))
}
}
pub fn get_uri(&self) -> String {
unsafe {
from_glib_none(ffi::gst_player_media_info_get_uri(self.to_glib_none().0))
}
}
pub fn get_video_streams(&self) -> Vec<PlayerVideoInfo> {
unsafe {
FromGlibPtrContainer::from_glib_none(ffi::gst_player_media_info_get_video_streams(self.to_glib_none().0))
}
}
pub fn is_live(&self) -> bool {
unsafe {
from_glib(ffi::gst_player_media_info_is_live(self.to_glib_none().0))
}
}
pub fn is_seekable(&self) -> bool {
unsafe {
from_glib(ffi::gst_player_media_info_is_seekable(self.to_glib_none().0))
}
}
}
unsafe impl Send for PlayerMediaInfo {}
unsafe impl Sync for PlayerMediaInfo {}