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)
|
2017-08-01 12:36:39 +00:00
|
|
|
// 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! {
|
2017-11-09 11:33:40 +00:00
|
|
|
pub struct PlayerMediaInfo(Object<ffi::GstPlayerMediaInfo, ffi::GstPlayerMediaInfoClass>);
|
2017-08-01 12:36:39 +00:00
|
|
|
|
|
|
|
match fn {
|
|
|
|
get_type => || ffi::gst_player_media_info_get_type(),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-08-17 11:50:25 +00:00
|
|
|
impl PlayerMediaInfo {
|
|
|
|
pub fn get_audio_streams(&self) -> Vec<PlayerAudioInfo> {
|
2017-08-01 12:36:39 +00:00
|
|
|
unsafe {
|
|
|
|
FromGlibPtrContainer::from_glib_none(ffi::gst_player_media_info_get_audio_streams(self.to_glib_none().0))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-08-17 11:50:25 +00:00
|
|
|
pub fn get_container_format(&self) -> Option<String> {
|
2017-08-01 12:36:39 +00:00
|
|
|
unsafe {
|
|
|
|
from_glib_none(ffi::gst_player_media_info_get_container_format(self.to_glib_none().0))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-08-17 11:50:25 +00:00
|
|
|
pub fn get_duration(&self) -> gst::ClockTime {
|
2017-08-01 12:36:39 +00:00
|
|
|
unsafe {
|
2017-11-11 10:21:55 +00:00
|
|
|
from_glib(ffi::gst_player_media_info_get_duration(self.to_glib_none().0))
|
2017-08-01 12:36:39 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-08-17 11:50:25 +00:00
|
|
|
pub fn get_image_sample(&self) -> Option<gst::Sample> {
|
2017-08-01 12:36:39 +00:00
|
|
|
unsafe {
|
|
|
|
from_glib_none(ffi::gst_player_media_info_get_image_sample(self.to_glib_none().0))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-08-17 11:50:25 +00:00
|
|
|
pub fn get_number_of_audio_streams(&self) -> u32 {
|
2017-08-01 12:36:39 +00:00
|
|
|
unsafe {
|
|
|
|
ffi::gst_player_media_info_get_number_of_audio_streams(self.to_glib_none().0)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-08-17 11:50:25 +00:00
|
|
|
pub fn get_number_of_streams(&self) -> u32 {
|
2017-08-01 12:36:39 +00:00
|
|
|
unsafe {
|
|
|
|
ffi::gst_player_media_info_get_number_of_streams(self.to_glib_none().0)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-08-17 11:50:25 +00:00
|
|
|
pub fn get_number_of_subtitle_streams(&self) -> u32 {
|
2017-08-01 12:36:39 +00:00
|
|
|
unsafe {
|
|
|
|
ffi::gst_player_media_info_get_number_of_subtitle_streams(self.to_glib_none().0)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-08-17 11:50:25 +00:00
|
|
|
pub fn get_number_of_video_streams(&self) -> u32 {
|
2017-08-01 12:36:39 +00:00
|
|
|
unsafe {
|
|
|
|
ffi::gst_player_media_info_get_number_of_video_streams(self.to_glib_none().0)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-08-17 11:50:25 +00:00
|
|
|
pub fn get_stream_list(&self) -> Vec<PlayerStreamInfo> {
|
2017-08-01 12:36:39 +00:00
|
|
|
unsafe {
|
|
|
|
FromGlibPtrContainer::from_glib_none(ffi::gst_player_media_info_get_stream_list(self.to_glib_none().0))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-08-17 11:50:25 +00:00
|
|
|
pub fn get_subtitle_streams(&self) -> Vec<PlayerSubtitleInfo> {
|
2017-08-01 12:36:39 +00:00
|
|
|
unsafe {
|
|
|
|
FromGlibPtrContainer::from_glib_none(ffi::gst_player_media_info_get_subtitle_streams(self.to_glib_none().0))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-08-17 11:50:25 +00:00
|
|
|
pub fn get_tags(&self) -> Option<gst::TagList> {
|
2017-08-01 12:36:39 +00:00
|
|
|
unsafe {
|
|
|
|
from_glib_none(ffi::gst_player_media_info_get_tags(self.to_glib_none().0))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-08-17 11:50:25 +00:00
|
|
|
pub fn get_title(&self) -> Option<String> {
|
2017-08-01 12:36:39 +00:00
|
|
|
unsafe {
|
|
|
|
from_glib_none(ffi::gst_player_media_info_get_title(self.to_glib_none().0))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-12-16 09:18:00 +00:00
|
|
|
pub fn get_uri(&self) -> String {
|
2017-08-01 12:36:39 +00:00
|
|
|
unsafe {
|
|
|
|
from_glib_none(ffi::gst_player_media_info_get_uri(self.to_glib_none().0))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-08-17 11:50:25 +00:00
|
|
|
pub fn get_video_streams(&self) -> Vec<PlayerVideoInfo> {
|
2017-08-01 12:36:39 +00:00
|
|
|
unsafe {
|
|
|
|
FromGlibPtrContainer::from_glib_none(ffi::gst_player_media_info_get_video_streams(self.to_glib_none().0))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-08-17 11:50:25 +00:00
|
|
|
pub fn is_live(&self) -> bool {
|
2017-08-01 12:36:39 +00:00
|
|
|
unsafe {
|
|
|
|
from_glib(ffi::gst_player_media_info_is_live(self.to_glib_none().0))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-08-17 11:50:25 +00:00
|
|
|
pub fn is_seekable(&self) -> bool {
|
2017-08-01 12:36:39 +00:00
|
|
|
unsafe {
|
|
|
|
from_glib(ffi::gst_player_media_info_is_seekable(self.to_glib_none().0))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2017-08-17 11:50:25 +00:00
|
|
|
|
|
|
|
unsafe impl Send for PlayerMediaInfo {}
|
|
|
|
unsafe impl Sync for PlayerMediaInfo {}
|