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

86 lines
2.4 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 glib::object::IsA;
use glib::translate::*;
2020-12-17 22:34:53 +00:00
glib::wrapper! {
#[doc(alias = "GstPlayerStreamInfo")]
2020-11-22 10:29:02 +00:00
pub struct PlayerStreamInfo(Object<ffi::GstPlayerStreamInfo, ffi::GstPlayerStreamInfoClass>);
match fn {
type_ => || ffi::gst_player_stream_info_get_type(),
}
}
2021-11-03 17:28:46 +00:00
impl PlayerStreamInfo {
pub const NONE: Option<&'static PlayerStreamInfo> = None;
}
2019-01-16 11:32:39 +00:00
2021-11-16 14:02:58 +00:00
unsafe impl Send for PlayerStreamInfo {}
unsafe impl Sync for PlayerStreamInfo {}
pub trait PlayerStreamInfoExt: 'static {
2020-12-08 13:00:17 +00:00
#[doc(alias = "gst_player_stream_info_get_caps")]
#[doc(alias = "get_caps")]
2021-04-11 19:38:18 +00:00
fn caps(&self) -> Option<gst::Caps>;
2020-12-08 13:00:17 +00:00
#[doc(alias = "gst_player_stream_info_get_codec")]
#[doc(alias = "get_codec")]
2021-04-11 19:38:18 +00:00
fn codec(&self) -> Option<glib::GString>;
2020-12-08 13:00:17 +00:00
#[doc(alias = "gst_player_stream_info_get_index")]
#[doc(alias = "get_index")]
2021-04-11 19:38:18 +00:00
fn index(&self) -> i32;
2020-12-08 13:00:17 +00:00
#[doc(alias = "gst_player_stream_info_get_stream_type")]
#[doc(alias = "get_stream_type")]
2021-04-11 19:38:18 +00:00
fn stream_type(&self) -> glib::GString;
2020-12-08 13:00:17 +00:00
#[doc(alias = "gst_player_stream_info_get_tags")]
#[doc(alias = "get_tags")]
2021-04-11 19:38:18 +00:00
fn tags(&self) -> Option<gst::TagList>;
}
impl<O: IsA<PlayerStreamInfo>> PlayerStreamInfoExt for O {
2021-04-11 19:38:18 +00:00
fn caps(&self) -> Option<gst::Caps> {
unsafe {
2020-11-22 10:29:02 +00:00
from_glib_none(ffi::gst_player_stream_info_get_caps(const_override(
self.as_ref().to_glib_none().0,
)))
}
}
2021-04-11 19:38:18 +00:00
fn codec(&self) -> Option<glib::GString> {
unsafe {
2020-11-22 10:29:02 +00:00
from_glib_none(ffi::gst_player_stream_info_get_codec(const_override(
self.as_ref().to_glib_none().0,
)))
}
}
2021-04-11 19:38:18 +00:00
fn index(&self) -> i32 {
unsafe {
2020-11-22 10:29:02 +00:00
ffi::gst_player_stream_info_get_index(const_override(self.as_ref().to_glib_none().0))
}
}
2021-04-11 19:38:18 +00:00
fn stream_type(&self) -> glib::GString {
unsafe {
2020-11-22 10:29:02 +00:00
from_glib_none(ffi::gst_player_stream_info_get_stream_type(const_override(
self.as_ref().to_glib_none().0,
)))
}
}
2021-04-11 19:38:18 +00:00
fn tags(&self) -> Option<gst::TagList> {
unsafe {
2020-11-22 10:29:02 +00:00
from_glib_none(ffi::gst_player_stream_info_get_tags(const_override(
self.as_ref().to_glib_none().0,
)))
}
}
}