gstreamer-rs/gstreamer-pbutils/src/auto/discoverer_stream_info.rs

137 lines
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::{prelude::*, translate::*};
2020-12-17 22:34:53 +00:00
glib::wrapper! {
#[doc(alias = "GstDiscovererStreamInfo")]
2020-11-22 10:08:08 +00:00
pub struct DiscovererStreamInfo(Object<ffi::GstDiscovererStreamInfo>);
match fn {
type_ => || ffi::gst_discoverer_stream_info_get_type(),
}
}
2021-11-03 17:28:46 +00:00
impl DiscovererStreamInfo {
pub const NONE: Option<&'static DiscovererStreamInfo> = None;
}
2019-01-16 11:32:39 +00:00
2021-11-16 14:02:58 +00:00
unsafe impl Send for DiscovererStreamInfo {}
unsafe impl Sync for DiscovererStreamInfo {}
pub trait DiscovererStreamInfoExt: 'static {
2020-12-08 13:00:17 +00:00
#[doc(alias = "gst_discoverer_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_discoverer_stream_info_get_misc")]
#[doc(alias = "get_misc")]
2021-04-11 19:38:18 +00:00
fn misc(&self) -> Option<gst::Structure>;
2020-12-08 13:00:17 +00:00
#[doc(alias = "gst_discoverer_stream_info_get_next")]
#[doc(alias = "get_next")]
#[must_use]
2021-04-11 19:38:18 +00:00
fn next(&self) -> Option<DiscovererStreamInfo>;
2020-12-08 13:00:17 +00:00
#[doc(alias = "gst_discoverer_stream_info_get_previous")]
#[doc(alias = "get_previous")]
#[must_use]
2021-04-11 19:38:18 +00:00
fn previous(&self) -> Option<DiscovererStreamInfo>;
2020-12-08 13:00:17 +00:00
#[doc(alias = "gst_discoverer_stream_info_get_stream_id")]
#[doc(alias = "get_stream_id")]
fn stream_id(&self) -> Option<glib::GString>;
#[cfg(feature = "v1_20")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
2021-10-30 11:27:17 +00:00
#[doc(alias = "gst_discoverer_stream_info_get_stream_number")]
#[doc(alias = "get_stream_number")]
fn stream_number(&self) -> i32;
2020-12-08 13:00:17 +00:00
#[doc(alias = "gst_discoverer_stream_info_get_stream_type_nick")]
#[doc(alias = "get_stream_type_nick")]
2021-04-11 19:38:18 +00:00
fn stream_type_nick(&self) -> glib::GString;
2020-12-08 13:00:17 +00:00
#[doc(alias = "gst_discoverer_stream_info_get_tags")]
#[doc(alias = "get_tags")]
2021-04-11 19:38:18 +00:00
fn tags(&self) -> Option<gst::TagList>;
2020-12-08 13:00:17 +00:00
#[doc(alias = "gst_discoverer_stream_info_get_toc")]
#[doc(alias = "get_toc")]
2021-04-11 19:38:18 +00:00
fn toc(&self) -> Option<gst::Toc>;
}
impl<O: IsA<DiscovererStreamInfo>> DiscovererStreamInfoExt for O {
2021-04-11 19:38:18 +00:00
fn caps(&self) -> Option<gst::Caps> {
unsafe {
2020-11-22 10:08:08 +00:00
from_glib_full(ffi::gst_discoverer_stream_info_get_caps(
self.as_ref().to_glib_none().0,
))
}
}
2021-04-11 19:38:18 +00:00
fn misc(&self) -> Option<gst::Structure> {
unsafe {
2020-11-22 10:08:08 +00:00
from_glib_none(ffi::gst_discoverer_stream_info_get_misc(
self.as_ref().to_glib_none().0,
))
}
}
2021-04-11 19:38:18 +00:00
fn next(&self) -> Option<DiscovererStreamInfo> {
unsafe {
2020-11-22 10:08:08 +00:00
from_glib_full(ffi::gst_discoverer_stream_info_get_next(
self.as_ref().to_glib_none().0,
))
}
}
2021-04-11 19:38:18 +00:00
fn previous(&self) -> Option<DiscovererStreamInfo> {
unsafe {
2020-11-22 10:08:08 +00:00
from_glib_full(ffi::gst_discoverer_stream_info_get_previous(
self.as_ref().to_glib_none().0,
))
}
}
fn stream_id(&self) -> Option<glib::GString> {
unsafe {
2020-11-22 10:08:08 +00:00
from_glib_none(ffi::gst_discoverer_stream_info_get_stream_id(
self.as_ref().to_glib_none().0,
))
}
}
#[cfg(feature = "v1_20")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
2021-10-30 11:27:17 +00:00
fn stream_number(&self) -> i32 {
unsafe { ffi::gst_discoverer_stream_info_get_stream_number(self.as_ref().to_glib_none().0) }
}
2021-04-11 19:38:18 +00:00
fn stream_type_nick(&self) -> glib::GString {
unsafe {
2020-11-22 10:08:08 +00:00
from_glib_none(ffi::gst_discoverer_stream_info_get_stream_type_nick(
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:08:08 +00:00
from_glib_none(ffi::gst_discoverer_stream_info_get_tags(
self.as_ref().to_glib_none().0,
))
}
}
2021-04-11 19:38:18 +00:00
fn toc(&self) -> Option<gst::Toc> {
unsafe {
2020-11-22 10:08:08 +00:00
from_glib_none(ffi::gst_discoverer_stream_info_get_toc(
self.as_ref().to_glib_none().0,
))
}
}
}