gstreamer-rs/gstreamer-player/src/auto/player_stream_info.rs
2020-11-22 19:15:21 +02:00

72 lines
1.9 KiB
Rust

// 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 glib::object::IsA;
use glib::translate::*;
glib::glib_wrapper! {
pub struct PlayerStreamInfo(Object<ffi::GstPlayerStreamInfo, ffi::GstPlayerStreamInfoClass>);
match fn {
get_type => || ffi::gst_player_stream_info_get_type(),
}
}
unsafe impl Send for PlayerStreamInfo {}
unsafe impl Sync for PlayerStreamInfo {}
pub const NONE_PLAYER_STREAM_INFO: Option<&PlayerStreamInfo> = None;
pub trait PlayerStreamInfoExt: 'static {
fn get_caps(&self) -> Option<gst::Caps>;
fn get_codec(&self) -> Option<glib::GString>;
fn get_index(&self) -> i32;
fn get_stream_type(&self) -> glib::GString;
fn get_tags(&self) -> Option<gst::TagList>;
}
impl<O: IsA<PlayerStreamInfo>> PlayerStreamInfoExt for O {
fn get_caps(&self) -> Option<gst::Caps> {
unsafe {
from_glib_none(ffi::gst_player_stream_info_get_caps(const_override(
self.as_ref().to_glib_none().0,
)))
}
}
fn get_codec(&self) -> Option<glib::GString> {
unsafe {
from_glib_none(ffi::gst_player_stream_info_get_codec(const_override(
self.as_ref().to_glib_none().0,
)))
}
}
fn get_index(&self) -> i32 {
unsafe {
ffi::gst_player_stream_info_get_index(const_override(self.as_ref().to_glib_none().0))
}
}
fn get_stream_type(&self) -> glib::GString {
unsafe {
from_glib_none(ffi::gst_player_stream_info_get_stream_type(const_override(
self.as_ref().to_glib_none().0,
)))
}
}
fn get_tags(&self) -> Option<gst::TagList> {
unsafe {
from_glib_none(ffi::gst_player_stream_info_get_tags(const_override(
self.as_ref().to_glib_none().0,
)))
}
}
}