Add missing doc aliases to manual code

Using the same script as [1], called with:

    python3 add_doc_alias.py gstreamer*/**/src

[1]: https://github.com/gtk-rs/gtk-rs-core/pull/83
This commit is contained in:
Marijn Suijten 2021-05-19 22:35:47 +02:00
parent b02f2acae5
commit 540062b97c
118 changed files with 907 additions and 0 deletions

View file

@ -236,6 +236,7 @@ unsafe extern "C" fn destroy_callbacks(ptr: gpointer) {
} }
impl AppSink { impl AppSink {
#[doc(alias = "gst_app_sink_set_callbacks")]
pub fn set_callbacks(&self, callbacks: AppSinkCallbacks) { pub fn set_callbacks(&self, callbacks: AppSinkCallbacks) {
use once_cell::sync::Lazy; use once_cell::sync::Lazy;
static SET_ONCE_QUARK: Lazy<glib::Quark> = static SET_ONCE_QUARK: Lazy<glib::Quark> =

View file

@ -207,6 +207,7 @@ unsafe extern "C" fn destroy_callbacks(ptr: gpointer) {
} }
impl AppSrc { impl AppSrc {
#[doc(alias = "gst_app_src_push_buffer")]
pub fn push_buffer(&self, buffer: gst::Buffer) -> Result<gst::FlowSuccess, gst::FlowError> { pub fn push_buffer(&self, buffer: gst::Buffer) -> Result<gst::FlowSuccess, gst::FlowError> {
unsafe { unsafe {
gst::FlowSuccess::try_from_glib(ffi::gst_app_src_push_buffer( gst::FlowSuccess::try_from_glib(ffi::gst_app_src_push_buffer(
@ -218,6 +219,7 @@ impl AppSrc {
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
#[doc(alias = "gst_app_src_push_buffer_list")]
pub fn push_buffer_list( pub fn push_buffer_list(
&self, &self,
list: gst::BufferList, list: gst::BufferList,
@ -230,6 +232,7 @@ impl AppSrc {
} }
} }
#[doc(alias = "gst_app_src_set_callbacks")]
pub fn set_callbacks(&self, callbacks: AppSrcCallbacks) { pub fn set_callbacks(&self, callbacks: AppSrcCallbacks) {
use once_cell::sync::Lazy; use once_cell::sync::Lazy;
static SET_ONCE_QUARK: Lazy<glib::Quark> = static SET_ONCE_QUARK: Lazy<glib::Quark> =
@ -262,6 +265,7 @@ impl AppSrc {
} }
} }
#[doc(alias = "gst_app_src_set_latency")]
pub fn set_latency(&self, min: gst::ClockTime, max: gst::ClockTime) { pub fn set_latency(&self, min: gst::ClockTime, max: gst::ClockTime) {
unsafe { unsafe {
ffi::gst_app_src_set_latency(self.to_glib_none().0, min.into_glib(), max.into_glib()); ffi::gst_app_src_set_latency(self.to_glib_none().0, min.into_glib(), max.into_glib());
@ -269,6 +273,7 @@ impl AppSrc {
} }
#[doc(alias = "get_latency")] #[doc(alias = "get_latency")]
#[doc(alias = "gst_app_src_get_latency")]
pub fn latency(&self) -> (gst::ClockTime, gst::ClockTime) { pub fn latency(&self) -> (gst::ClockTime, gst::ClockTime) {
unsafe { unsafe {
let mut min = mem::MaybeUninit::uninit(); let mut min = mem::MaybeUninit::uninit();

View file

@ -16,6 +16,7 @@ impl AudioChannelPosition {
1 << (pos as u32) 1 << (pos as u32)
} }
#[doc(alias = "gst_audio_channel_positions_to_mask")]
pub fn positions_to_mask( pub fn positions_to_mask(
positions: &[Self], positions: &[Self],
force_order: bool, force_order: bool,
@ -53,6 +54,7 @@ impl AudioChannelPosition {
} }
} }
#[doc(alias = "gst_audio_channel_positions_from_mask")]
pub fn positions_from_mask(mask: u64, positions: &mut [Self]) -> Result<(), glib::BoolError> { pub fn positions_from_mask(mask: u64, positions: &mut [Self]) -> Result<(), glib::BoolError> {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
@ -83,6 +85,7 @@ impl AudioChannelPosition {
} }
} }
#[doc(alias = "gst_audio_channel_positions_to_valid_order")]
pub fn positions_to_valid_order(positions: &mut [Self]) -> Result<(), glib::BoolError> { pub fn positions_to_valid_order(positions: &mut [Self]) -> Result<(), glib::BoolError> {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
@ -119,12 +122,14 @@ impl AudioChannelPosition {
} }
#[doc(alias = "get_fallback_mask")] #[doc(alias = "get_fallback_mask")]
#[doc(alias = "gst_audio_channel_get_fallback_mask")]
pub fn fallback_mask(channels: u32) -> u64 { pub fn fallback_mask(channels: u32) -> u64 {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
unsafe { ffi::gst_audio_channel_get_fallback_mask(channels as i32) } unsafe { ffi::gst_audio_channel_get_fallback_mask(channels as i32) }
} }
#[doc(alias = "gst_audio_check_valid_channel_positions")]
pub fn check_valid_channel_positions(positions: &[Self], force_order: bool) -> bool { pub fn check_valid_channel_positions(positions: &[Self], force_order: bool) -> bool {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
@ -151,6 +156,7 @@ impl AudioChannelPosition {
} }
} }
#[doc(alias = "gst_audio_buffer_reorder_channels")]
pub fn buffer_reorder_channels( pub fn buffer_reorder_channels(
buffer: &mut gst::BufferRef, buffer: &mut gst::BufferRef,
format: crate::AudioFormat, format: crate::AudioFormat,
@ -200,6 +206,7 @@ pub fn buffer_reorder_channels(
} }
} }
#[doc(alias = "gst_audio_reorder_channels")]
pub fn reorder_channels( pub fn reorder_channels(
data: &mut [u8], data: &mut [u8],
format: crate::AudioFormat, format: crate::AudioFormat,
@ -251,6 +258,7 @@ pub fn reorder_channels(
} }
#[doc(alias = "get_channel_reorder_map")] #[doc(alias = "get_channel_reorder_map")]
#[doc(alias = "gst_audio_get_channel_reorder_map")]
pub fn channel_reorder_map( pub fn channel_reorder_map(
from: &[AudioChannelPosition], from: &[AudioChannelPosition],
to: &[AudioChannelPosition], to: &[AudioChannelPosition],

View file

@ -76,6 +76,7 @@ impl<O: IsA<AudioDecoder>> AudioDecoderExtManual for O {
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
#[doc(alias = "gst_audio_decoder_finish_subframe")]
fn finish_subframe( fn finish_subframe(
&self, &self,
buffer: Option<gst::Buffer>, buffer: Option<gst::Buffer>,
@ -88,6 +89,7 @@ impl<O: IsA<AudioDecoder>> AudioDecoderExtManual for O {
} }
} }
#[doc(alias = "gst_audio_decoder_negotiate")]
fn negotiate(&self) -> Result<(), gst::FlowError> { fn negotiate(&self) -> Result<(), gst::FlowError> {
unsafe { unsafe {
let ret = from_glib(ffi::gst_audio_decoder_negotiate( let ret = from_glib(ffi::gst_audio_decoder_negotiate(
@ -103,6 +105,7 @@ impl<O: IsA<AudioDecoder>> AudioDecoderExtManual for O {
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
#[doc(alias = "gst_audio_decoder_set_output_caps")]
fn set_output_caps(&self, caps: &gst::Caps) -> Result<(), gst::FlowError> { fn set_output_caps(&self, caps: &gst::Caps) -> Result<(), gst::FlowError> {
unsafe { unsafe {
let ret = from_glib(ffi::gst_audio_decoder_set_output_caps( let ret = from_glib(ffi::gst_audio_decoder_set_output_caps(
@ -117,6 +120,7 @@ impl<O: IsA<AudioDecoder>> AudioDecoderExtManual for O {
} }
} }
#[doc(alias = "gst_audio_decoder_set_output_format")]
fn set_output_format(&self, info: &AudioInfo) -> Result<(), gst::FlowError> { fn set_output_format(&self, info: &AudioInfo) -> Result<(), gst::FlowError> {
unsafe { unsafe {
let ret = from_glib(ffi::gst_audio_decoder_set_output_format( let ret = from_glib(ffi::gst_audio_decoder_set_output_format(
@ -131,6 +135,7 @@ impl<O: IsA<AudioDecoder>> AudioDecoderExtManual for O {
} }
} }
#[doc(alias = "gst_audio_decoder_get_allocator")]
fn allocator(&self) -> (Option<gst::Allocator>, gst::AllocationParams) { fn allocator(&self) -> (Option<gst::Allocator>, gst::AllocationParams) {
unsafe { unsafe {
let mut allocator = ptr::null_mut(); let mut allocator = ptr::null_mut();

View file

@ -7,20 +7,25 @@ use std::mem;
use std::ptr; use std::ptr;
pub trait AudioEncoderExtManual: 'static { pub trait AudioEncoderExtManual: 'static {
#[doc(alias = "gst_audio_encoder_finish_frame")]
fn finish_frame( fn finish_frame(
&self, &self,
buffer: Option<gst::Buffer>, buffer: Option<gst::Buffer>,
frames: i32, frames: i32,
) -> Result<gst::FlowSuccess, gst::FlowError>; ) -> Result<gst::FlowSuccess, gst::FlowError>;
#[doc(alias = "gst_audio_encoder_negotiate")]
fn negotiate(&self) -> Result<(), gst::FlowError>; fn negotiate(&self) -> Result<(), gst::FlowError>;
#[doc(alias = "gst_audio_encoder_set_output_format")]
fn set_output_format(&self, caps: &gst::Caps) -> Result<(), gst::FlowError>; fn set_output_format(&self, caps: &gst::Caps) -> Result<(), gst::FlowError>;
#[doc(alias = "get_allocator")] #[doc(alias = "get_allocator")]
#[doc(alias = "gst_audio_encoder_get_allocator")]
fn allocator(&self) -> (Option<gst::Allocator>, gst::AllocationParams); fn allocator(&self) -> (Option<gst::Allocator>, gst::AllocationParams);
#[doc(alias = "get_latency")] #[doc(alias = "get_latency")]
#[doc(alias = "gst_audio_encoder_get_latency")]
fn latency(&self) -> (gst::ClockTime, gst::ClockTime); fn latency(&self) -> (gst::ClockTime, gst::ClockTime);
} }

View file

@ -94,6 +94,7 @@ pub static AUDIO_FORMATS_ALL: Lazy<Box<[crate::AudioFormat]>> = Lazy::new(|| {
}); });
impl crate::AudioFormat { impl crate::AudioFormat {
#[doc(alias = "gst_audio_format_build_integer")]
pub fn build_integer( pub fn build_integer(
sign: bool, sign: bool,
endianness: crate::AudioEndianness, endianness: crate::AudioEndianness,
@ -112,6 +113,7 @@ impl crate::AudioFormat {
} }
} }
#[doc(alias = "gst_audio_format_to_string")]
pub fn to_str<'a>(self) -> &'a str { pub fn to_str<'a>(self) -> &'a str {
if self == Self::Unknown { if self == Self::Unknown {
return "UNKNOWN"; return "UNKNOWN";

View file

@ -158,6 +158,8 @@ impl AudioFormatInfo {
} }
} }
#[doc(alias = "gst_audio_format_info_fill_silence")]
#[doc(alias = "gst_audio_format_fill_silence")]
pub fn fill_silence(&self, dest: &mut [u8]) { pub fn fill_silence(&self, dest: &mut [u8]) {
let self_width = self.width() as usize; let self_width = self.width() as usize;

View file

@ -142,6 +142,7 @@ impl AudioInfo {
!self.0.finfo.is_null() && self.0.channels > 0 && self.0.rate > 0 && self.0.bpf > 0 !self.0.finfo.is_null() && self.0.channels > 0 && self.0.rate > 0 && self.0.bpf > 0
} }
#[doc(alias = "gst_audio_info_from_caps")]
pub fn from_caps(caps: &gst::CapsRef) -> Result<Self, glib::error::BoolError> { pub fn from_caps(caps: &gst::CapsRef) -> Result<Self, glib::error::BoolError> {
skip_assert_initialized!(); skip_assert_initialized!();
@ -160,6 +161,7 @@ impl AudioInfo {
} }
} }
#[doc(alias = "gst_audio_info_to_caps")]
pub fn to_caps(&self) -> Result<gst::Caps, glib::error::BoolError> { pub fn to_caps(&self) -> Result<gst::Caps, glib::error::BoolError> {
unsafe { unsafe {
let result = from_glib_full(ffi::gst_audio_info_to_caps(&self.0)); let result = from_glib_full(ffi::gst_audio_info_to_caps(&self.0));
@ -170,6 +172,7 @@ impl AudioInfo {
} }
} }
#[doc(alias = "gst_audio_info_convert")]
pub fn convert<V: Into<gst::GenericFormattedValue>, U: gst::SpecificFormattedValue>( pub fn convert<V: Into<gst::GenericFormattedValue>, U: gst::SpecificFormattedValue>(
&self, &self,
src_val: V, src_val: V,
@ -308,6 +311,7 @@ impl Clone for AudioInfo {
} }
impl PartialEq for AudioInfo { impl PartialEq for AudioInfo {
#[doc(alias = "gst_audio_info_is_equal")]
fn eq(&self, other: &Self) -> bool { fn eq(&self, other: &Self) -> bool {
unsafe { from_glib(ffi::gst_audio_info_is_equal(&self.0, &other.0)) } unsafe { from_glib(ffi::gst_audio_info_is_equal(&self.0, &other.0)) }
} }

View file

@ -21,6 +21,7 @@ unsafe impl Send for AudioClippingMeta {}
unsafe impl Sync for AudioClippingMeta {} unsafe impl Sync for AudioClippingMeta {}
impl AudioClippingMeta { impl AudioClippingMeta {
#[doc(alias = "gst_buffer_add_audio_clipping_meta")]
pub fn add<V: Into<gst::GenericFormattedValue>>( pub fn add<V: Into<gst::GenericFormattedValue>>(
buffer: &mut gst::BufferRef, buffer: &mut gst::BufferRef,
start: V, start: V,
@ -56,6 +57,7 @@ impl AudioClippingMeta {
unsafe impl MetaAPI for AudioClippingMeta { unsafe impl MetaAPI for AudioClippingMeta {
type GstType = ffi::GstAudioClippingMeta; type GstType = ffi::GstAudioClippingMeta;
#[doc(alias = "gst_audio_clipping_meta_api_get_type")]
fn meta_api() -> glib::Type { fn meta_api() -> glib::Type {
unsafe { from_glib(ffi::gst_audio_clipping_meta_api_get_type()) } unsafe { from_glib(ffi::gst_audio_clipping_meta_api_get_type()) }
} }
@ -85,6 +87,7 @@ unsafe impl Sync for AudioMeta {}
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
impl AudioMeta { impl AudioMeta {
#[doc(alias = "gst_buffer_add_audio_meta")]
pub fn add<'a>( pub fn add<'a>(
buffer: &'a mut gst::BufferRef, buffer: &'a mut gst::BufferRef,
info: &crate::AudioInfo, info: &crate::AudioInfo,
@ -196,6 +199,7 @@ impl AudioMeta {
unsafe impl MetaAPI for AudioMeta { unsafe impl MetaAPI for AudioMeta {
type GstType = ffi::GstAudioMeta; type GstType = ffi::GstAudioMeta;
#[doc(alias = "gst_audio_meta_api_get_type")]
fn meta_api() -> glib::Type { fn meta_api() -> glib::Type {
unsafe { from_glib(ffi::gst_audio_meta_api_get_type()) } unsafe { from_glib(ffi::gst_audio_meta_api_get_type()) }
} }

View file

@ -8,6 +8,7 @@ use std::mem;
impl AudioStreamAlign { impl AudioStreamAlign {
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
#[doc(alias = "gst_audio_stream_align_process")]
pub fn process( pub fn process(
&mut self, &mut self,
discont: bool, discont: bool,

View file

@ -5,6 +5,7 @@ use glib::ToSendValue;
use std::i32; use std::i32;
#[doc(alias = "gst_audio_buffer_clip")]
pub fn audio_buffer_clip( pub fn audio_buffer_clip(
buffer: gst::Buffer, buffer: gst::Buffer,
segment: &gst::Segment, segment: &gst::Segment,
@ -25,6 +26,7 @@ pub fn audio_buffer_clip(
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
#[doc(alias = "gst_audio_buffer_truncate")]
pub fn audio_buffer_truncate( pub fn audio_buffer_truncate(
buffer: gst::Buffer, buffer: gst::Buffer,
bpf: u32, bpf: u32,

View file

@ -7,6 +7,7 @@ use std::mem;
use std::ops; use std::ops;
impl Adapter { impl Adapter {
#[doc(alias = "gst_adapter_copy")]
pub fn copy(&self, offset: usize, dest: &mut [u8]) -> Result<(), glib::BoolError> { pub fn copy(&self, offset: usize, dest: &mut [u8]) -> Result<(), glib::BoolError> {
assert!( assert!(
offset offset
@ -32,6 +33,7 @@ impl Adapter {
Ok(()) Ok(())
} }
#[doc(alias = "gst_adapter_copy_bytes")]
pub fn copy_bytes(&self, offset: usize, size: usize) -> Result<glib::Bytes, glib::BoolError> { pub fn copy_bytes(&self, offset: usize, size: usize) -> Result<glib::Bytes, glib::BoolError> {
assert!(offset.checked_add(size).map(|end| end <= self.available()) == Some(true)); assert!(offset.checked_add(size).map(|end| end <= self.available()) == Some(true));
@ -48,6 +50,7 @@ impl Adapter {
} }
} }
#[doc(alias = "gst_adapter_flush")]
pub fn flush(&self, flush: usize) { pub fn flush(&self, flush: usize) {
assert!(flush <= self.available()); assert!(flush <= self.available());
@ -61,6 +64,7 @@ impl Adapter {
} }
#[doc(alias = "get_buffer")] #[doc(alias = "get_buffer")]
#[doc(alias = "gst_adapter_get_buffer")]
pub fn buffer(&self, nbytes: usize) -> Result<gst::Buffer, glib::BoolError> { pub fn buffer(&self, nbytes: usize) -> Result<gst::Buffer, glib::BoolError> {
assert!(nbytes <= self.available()); assert!(nbytes <= self.available());
assert!(nbytes != 0); assert!(nbytes != 0);
@ -72,6 +76,7 @@ impl Adapter {
} }
#[doc(alias = "get_buffer_fast")] #[doc(alias = "get_buffer_fast")]
#[doc(alias = "gst_adapter_get_buffer_fast")]
pub fn buffer_fast(&self, nbytes: usize) -> Result<gst::Buffer, glib::BoolError> { pub fn buffer_fast(&self, nbytes: usize) -> Result<gst::Buffer, glib::BoolError> {
assert!(nbytes <= self.available()); assert!(nbytes <= self.available());
assert!(nbytes != 0); assert!(nbytes != 0);
@ -86,6 +91,7 @@ impl Adapter {
} }
#[doc(alias = "get_buffer_list")] #[doc(alias = "get_buffer_list")]
#[doc(alias = "gst_adapter_get_buffer_list")]
pub fn buffer_list(&self, nbytes: usize) -> Result<gst::BufferList, glib::BoolError> { pub fn buffer_list(&self, nbytes: usize) -> Result<gst::BufferList, glib::BoolError> {
assert!(nbytes <= self.available()); assert!(nbytes <= self.available());
assert!(nbytes != 0); assert!(nbytes != 0);
@ -100,6 +106,7 @@ impl Adapter {
} }
#[doc(alias = "get_list")] #[doc(alias = "get_list")]
#[doc(alias = "gst_adapter_get_list")]
pub fn list(&self, nbytes: usize) -> Result<Vec<gst::Buffer>, glib::BoolError> { pub fn list(&self, nbytes: usize) -> Result<Vec<gst::Buffer>, glib::BoolError> {
assert!(nbytes <= self.available()); assert!(nbytes <= self.available());
assert!(nbytes != 0); assert!(nbytes != 0);
@ -111,6 +118,7 @@ impl Adapter {
} }
} }
#[doc(alias = "gst_adapter_masked_scan_uint32")]
pub fn masked_scan_uint32( pub fn masked_scan_uint32(
&self, &self,
mask: u32, mask: u32,
@ -139,6 +147,7 @@ impl Adapter {
} }
} }
#[doc(alias = "gst_adapter_masked_scan_uint32_peek")]
pub fn masked_scan_uint32_peek( pub fn masked_scan_uint32_peek(
&self, &self,
mask: u32, mask: u32,
@ -171,6 +180,7 @@ impl Adapter {
} }
} }
#[doc(alias = "gst_adapter_take_buffer")]
pub fn take_buffer(&self, nbytes: usize) -> Result<gst::Buffer, glib::BoolError> { pub fn take_buffer(&self, nbytes: usize) -> Result<gst::Buffer, glib::BoolError> {
assert!(nbytes <= self.available()); assert!(nbytes <= self.available());
assert!(nbytes != 0); assert!(nbytes != 0);
@ -181,6 +191,7 @@ impl Adapter {
} }
} }
#[doc(alias = "gst_adapter_take_buffer_fast")]
pub fn take_buffer_fast(&self, nbytes: usize) -> Result<gst::Buffer, glib::BoolError> { pub fn take_buffer_fast(&self, nbytes: usize) -> Result<gst::Buffer, glib::BoolError> {
assert!(nbytes <= self.available()); assert!(nbytes <= self.available());
assert!(nbytes != 0); assert!(nbytes != 0);
@ -194,6 +205,7 @@ impl Adapter {
} }
} }
#[doc(alias = "gst_adapter_take_buffer_list")]
pub fn take_buffer_list(&self, nbytes: usize) -> Result<gst::BufferList, glib::BoolError> { pub fn take_buffer_list(&self, nbytes: usize) -> Result<gst::BufferList, glib::BoolError> {
assert!(nbytes <= self.available()); assert!(nbytes <= self.available());
assert!(nbytes != 0); assert!(nbytes != 0);
@ -207,6 +219,7 @@ impl Adapter {
} }
} }
#[doc(alias = "gst_adapter_take_list")]
pub fn take_list(&self, nbytes: usize) -> Result<Vec<gst::Buffer>, glib::BoolError> { pub fn take_list(&self, nbytes: usize) -> Result<Vec<gst::Buffer>, glib::BoolError> {
assert!(nbytes <= self.available()); assert!(nbytes <= self.available());
assert!(nbytes != 0); assert!(nbytes != 0);
@ -218,6 +231,7 @@ impl Adapter {
} }
} }
#[doc(alias = "gst_adapter_push")]
pub fn push(&self, buf: gst::Buffer) { pub fn push(&self, buf: gst::Buffer) {
unsafe { unsafe {
ffi::gst_adapter_push(self.to_glib_none().0, buf.into_ptr()); ffi::gst_adapter_push(self.to_glib_none().0, buf.into_ptr());
@ -394,6 +408,7 @@ impl UniqueAdapter {
self.0.push(buf); self.0.push(buf);
} }
#[doc(alias = "gst_adapter_map")]
pub fn map(&mut self, nbytes: usize) -> Result<UniqueAdapterMap, glib::error::BoolError> { pub fn map(&mut self, nbytes: usize) -> Result<UniqueAdapterMap, glib::error::BoolError> {
assert!(nbytes <= self.available()); assert!(nbytes <= self.available());
assert!(nbytes != 0); assert!(nbytes != 0);

View file

@ -20,12 +20,15 @@ use std::ptr;
pub trait AggregatorExtManual: 'static { pub trait AggregatorExtManual: 'static {
#[doc(alias = "get_allocator")] #[doc(alias = "get_allocator")]
#[doc(alias = "gst_aggregator_get_allocator")]
fn allocator(&self) -> (Option<gst::Allocator>, gst::AllocationParams); fn allocator(&self) -> (Option<gst::Allocator>, gst::AllocationParams);
#[doc(alias = "gst_aggregator_finish_buffer")]
fn finish_buffer(&self, buffer: gst::Buffer) -> Result<gst::FlowSuccess, gst::FlowError>; fn finish_buffer(&self, buffer: gst::Buffer) -> Result<gst::FlowSuccess, gst::FlowError>;
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
#[doc(alias = "gst_aggregator_finish_buffer_list")]
fn finish_buffer_list( fn finish_buffer_list(
&self, &self,
bufferlist: gst::BufferList, bufferlist: gst::BufferList,
@ -51,10 +54,12 @@ pub trait AggregatorExtManual: 'static {
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
#[doc(alias = "gst_aggregator_update_segment")]
fn update_segment<F: gst::FormattedValue>(&self, segment: &gst::FormattedSegment<F>); fn update_segment<F: gst::FormattedValue>(&self, segment: &gst::FormattedSegment<F>);
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
#[doc(alias = "gst_aggregator_selected_samples")]
fn selected_samples( fn selected_samples(
&self, &self,
pts: gst::ClockTime, pts: gst::ClockTime,

View file

@ -14,9 +14,12 @@ pub trait BaseParseExtManual: 'static {
#[doc(alias = "get_src_pad")] #[doc(alias = "get_src_pad")]
fn src_pad(&self) -> gst::Pad; fn src_pad(&self) -> gst::Pad;
#[doc(alias = "gst_base_parse_set_duration")]
fn set_duration<V: Into<gst::GenericFormattedValue>>(&self, duration: V, interval: u32); fn set_duration<V: Into<gst::GenericFormattedValue>>(&self, duration: V, interval: u32);
#[doc(alias = "gst_base_parse_set_frame_rate")]
fn set_frame_rate(&self, fps: gst::Fraction, lead_in: u32, lead_out: u32); fn set_frame_rate(&self, fps: gst::Fraction, lead_in: u32, lead_out: u32);
#[doc(alias = "gst_base_parse_convert_default")]
fn convert_default<V: Into<gst::GenericFormattedValue>, U: gst::SpecificFormattedValue>( fn convert_default<V: Into<gst::GenericFormattedValue>, U: gst::SpecificFormattedValue>(
&self, &self,
src_val: V, src_val: V,
@ -27,6 +30,7 @@ pub trait BaseParseExtManual: 'static {
dest_format: gst::Format, dest_format: gst::Format,
) -> Option<gst::GenericFormattedValue>; ) -> Option<gst::GenericFormattedValue>;
#[doc(alias = "gst_base_parse_finish_frame")]
fn finish_frame( fn finish_frame(
&self, &self,
frame: BaseParseFrame, frame: BaseParseFrame,

View file

@ -9,6 +9,7 @@ pub trait BaseSinkExtManual: 'static {
#[doc(alias = "get_segment")] #[doc(alias = "get_segment")]
fn segment(&self) -> gst::Segment; fn segment(&self) -> gst::Segment;
#[doc(alias = "gst_base_sink_query_latency")]
fn query_latency( fn query_latency(
&self, &self,
) -> Result<(bool, bool, gst::ClockTime, gst::ClockTime), glib::BoolError>; ) -> Result<(bool, bool, gst::ClockTime, gst::ClockTime), glib::BoolError>;

View file

@ -9,15 +9,18 @@ use crate::BaseSrc;
pub trait BaseSrcExtManual: 'static { pub trait BaseSrcExtManual: 'static {
#[doc(alias = "get_allocator")] #[doc(alias = "get_allocator")]
#[doc(alias = "gst_base_src_get_allocator")]
fn allocator(&self) -> (Option<gst::Allocator>, gst::AllocationParams); fn allocator(&self) -> (Option<gst::Allocator>, gst::AllocationParams);
#[doc(alias = "get_segment")] #[doc(alias = "get_segment")]
fn segment(&self) -> gst::Segment; fn segment(&self) -> gst::Segment;
#[doc(alias = "gst_base_src_query_latency")]
fn query_latency(&self) -> Result<(bool, gst::ClockTime, gst::ClockTime), glib::BoolError>; fn query_latency(&self) -> Result<(bool, gst::ClockTime, gst::ClockTime), glib::BoolError>;
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
#[doc(alias = "gst_base_src_new_segment")]
fn new_segment(&self, segment: &gst::Segment) -> Result<(), glib::BoolError>; fn new_segment(&self, segment: &gst::Segment) -> Result<(), glib::BoolError>;
} }

View file

@ -8,6 +8,7 @@ use std::ptr;
pub trait BaseTransformExtManual: 'static { pub trait BaseTransformExtManual: 'static {
#[doc(alias = "get_allocator")] #[doc(alias = "get_allocator")]
#[doc(alias = "gst_base_transform_get_allocator")]
fn allocator(&self) -> (Option<gst::Allocator>, gst::AllocationParams); fn allocator(&self) -> (Option<gst::Allocator>, gst::AllocationParams);
#[doc(alias = "get_segment")] #[doc(alias = "get_segment")]

View file

@ -31,35 +31,41 @@ glib::wrapper! {
} }
impl FlowCombiner { impl FlowCombiner {
#[doc(alias = "gst_flow_combiner_new")]
pub fn new() -> Self { pub fn new() -> Self {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
unsafe { from_glib_full(ffi::gst_flow_combiner_new()) } unsafe { from_glib_full(ffi::gst_flow_combiner_new()) }
} }
#[doc(alias = "gst_flow_combiner_add_pad")]
pub fn add_pad<P: IsA<gst::Pad>>(&self, pad: &P) { pub fn add_pad<P: IsA<gst::Pad>>(&self, pad: &P) {
unsafe { unsafe {
ffi::gst_flow_combiner_add_pad(self.to_glib_none().0, pad.as_ref().to_glib_none().0); ffi::gst_flow_combiner_add_pad(self.to_glib_none().0, pad.as_ref().to_glib_none().0);
} }
} }
#[doc(alias = "gst_flow_combiner_clear")]
pub fn clear(&self) { pub fn clear(&self) {
unsafe { unsafe {
ffi::gst_flow_combiner_clear(self.to_glib_none().0); ffi::gst_flow_combiner_clear(self.to_glib_none().0);
} }
} }
#[doc(alias = "gst_flow_combiner_remove_pad")]
pub fn remove_pad<P: IsA<gst::Pad>>(&self, pad: &P) { pub fn remove_pad<P: IsA<gst::Pad>>(&self, pad: &P) {
unsafe { unsafe {
ffi::gst_flow_combiner_remove_pad(self.to_glib_none().0, pad.as_ref().to_glib_none().0); ffi::gst_flow_combiner_remove_pad(self.to_glib_none().0, pad.as_ref().to_glib_none().0);
} }
} }
#[doc(alias = "gst_flow_combiner_reset")]
pub fn reset(&self) { pub fn reset(&self) {
unsafe { unsafe {
ffi::gst_flow_combiner_reset(self.to_glib_none().0); ffi::gst_flow_combiner_reset(self.to_glib_none().0);
} }
} }
#[doc(alias = "gst_flow_combiner_update_flow")]
pub fn update_flow<FRet: Into<gst::FlowReturn>>( pub fn update_flow<FRet: Into<gst::FlowReturn>>(
&self, &self,
fret: FRet, fret: FRet,
@ -73,6 +79,7 @@ impl FlowCombiner {
} }
} }
#[doc(alias = "gst_flow_combiner_update_pad_flow")]
pub fn update_pad_flow<P: IsA<gst::Pad>, FRet: Into<gst::FlowReturn>>( pub fn update_pad_flow<P: IsA<gst::Pad>, FRet: Into<gst::FlowReturn>>(
&self, &self,
pad: &P, pad: &P,

View file

@ -4,6 +4,7 @@ use glib::prelude::*;
use glib::translate::*; use glib::translate::*;
use std::mem; use std::mem;
#[doc(alias = "gst_type_find_helper_for_data")]
pub fn type_find_helper_for_data<P: IsA<gst::Object>, R: AsRef<[u8]>>( pub fn type_find_helper_for_data<P: IsA<gst::Object>, R: AsRef<[u8]>>(
obj: Option<&P>, obj: Option<&P>,
data: R, data: R,
@ -29,6 +30,7 @@ pub fn type_find_helper_for_data<P: IsA<gst::Object>, R: AsRef<[u8]>>(
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
#[doc(alias = "gst_type_find_helper_for_data_with_extension")]
pub fn type_find_helper_for_data_with_extension<P: IsA<gst::Object>, R: AsRef<[u8]>>( pub fn type_find_helper_for_data_with_extension<P: IsA<gst::Object>, R: AsRef<[u8]>>(
obj: Option<&P>, obj: Option<&P>,
data: R, data: R,
@ -54,6 +56,7 @@ pub fn type_find_helper_for_data_with_extension<P: IsA<gst::Object>, R: AsRef<[u
} }
} }
#[doc(alias = "gst_type_find_helper_for_buffer")]
pub fn type_find_helper_for_buffer<P: IsA<gst::Object>>( pub fn type_find_helper_for_buffer<P: IsA<gst::Object>>(
obj: Option<&P>, obj: Option<&P>,
buf: &gst::Buffer, buf: &gst::Buffer,
@ -76,6 +79,7 @@ pub fn type_find_helper_for_buffer<P: IsA<gst::Object>>(
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
#[doc(alias = "gst_type_find_helper_for_buffer_with_extension")]
pub fn type_find_helper_for_buffer_with_extension<P: IsA<gst::Object>>( pub fn type_find_helper_for_buffer_with_extension<P: IsA<gst::Object>>(
obj: Option<&P>, obj: Option<&P>,
buf: &gst::Buffer, buf: &gst::Buffer,

View file

@ -7,6 +7,7 @@ pub struct MutexGuard<'a>(&'a glib::ffi::GMutex);
impl<'a> MutexGuard<'a> { impl<'a> MutexGuard<'a> {
#[allow(clippy::trivially_copy_pass_by_ref)] #[allow(clippy::trivially_copy_pass_by_ref)]
#[doc(alias = "g_mutex_lock")]
pub fn lock(mutex: &'a glib::ffi::GMutex) -> Self { pub fn lock(mutex: &'a glib::ffi::GMutex) -> Self {
skip_assert_initialized!(); skip_assert_initialized!();
unsafe { unsafe {

View file

@ -24,6 +24,7 @@ unsafe impl Send for Harness {}
unsafe impl Sync for Harness {} unsafe impl Sync for Harness {}
impl Harness { impl Harness {
#[doc(alias = "gst_harness_add_element_full")]
pub fn add_element_full<P: IsA<gst::Element>>( pub fn add_element_full<P: IsA<gst::Element>>(
&mut self, &mut self,
element: &P, element: &P,
@ -46,6 +47,7 @@ impl Harness {
} }
} }
#[doc(alias = "gst_harness_add_element_sink_pad")]
pub fn add_element_sink_pad<P: IsA<gst::Pad>>(&mut self, sinkpad: &P) { pub fn add_element_sink_pad<P: IsA<gst::Pad>>(&mut self, sinkpad: &P) {
unsafe { unsafe {
ffi::gst_harness_add_element_sink_pad( ffi::gst_harness_add_element_sink_pad(
@ -55,12 +57,14 @@ impl Harness {
} }
} }
#[doc(alias = "gst_harness_add_element_src_pad")]
pub fn add_element_src_pad<P: IsA<gst::Pad>>(&mut self, srcpad: &P) { pub fn add_element_src_pad<P: IsA<gst::Pad>>(&mut self, srcpad: &P) {
unsafe { unsafe {
ffi::gst_harness_add_element_src_pad(self.0.as_ptr(), srcpad.as_ref().to_glib_none().0); ffi::gst_harness_add_element_src_pad(self.0.as_ptr(), srcpad.as_ref().to_glib_none().0);
} }
} }
#[doc(alias = "gst_harness_add_parse")]
pub fn add_parse(&mut self, launchline: &str) { pub fn add_parse(&mut self, launchline: &str) {
unsafe { unsafe {
ffi::gst_harness_add_parse(self.0.as_ptr(), launchline.to_glib_none().0); ffi::gst_harness_add_parse(self.0.as_ptr(), launchline.to_glib_none().0);
@ -85,6 +89,7 @@ impl Harness {
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
#[doc(alias = "gst_harness_add_propose_allocation_meta")]
pub fn add_propose_allocation_meta( pub fn add_propose_allocation_meta(
&mut self, &mut self,
api: glib::types::Type, api: glib::types::Type,
@ -96,12 +101,14 @@ impl Harness {
} }
} }
#[doc(alias = "gst_harness_add_sink")]
pub fn add_sink(&mut self, sink_element_name: &str) { pub fn add_sink(&mut self, sink_element_name: &str) {
unsafe { unsafe {
ffi::gst_harness_add_sink(self.0.as_ptr(), sink_element_name.to_glib_none().0); ffi::gst_harness_add_sink(self.0.as_ptr(), sink_element_name.to_glib_none().0);
} }
} }
#[doc(alias = "gst_harness_add_sink_harness")]
pub fn add_sink_harness(&mut self, sink_harness: Harness) { pub fn add_sink_harness(&mut self, sink_harness: Harness) {
unsafe { unsafe {
let sink_harness = mem::ManuallyDrop::new(sink_harness); let sink_harness = mem::ManuallyDrop::new(sink_harness);
@ -109,12 +116,14 @@ impl Harness {
} }
} }
#[doc(alias = "gst_harness_add_sink_parse")]
pub fn add_sink_parse(&mut self, launchline: &str) { pub fn add_sink_parse(&mut self, launchline: &str) {
unsafe { unsafe {
ffi::gst_harness_add_sink_parse(self.0.as_ptr(), launchline.to_glib_none().0); ffi::gst_harness_add_sink_parse(self.0.as_ptr(), launchline.to_glib_none().0);
} }
} }
#[doc(alias = "gst_harness_add_src")]
pub fn add_src(&mut self, src_element_name: &str, has_clock_wait: bool) { pub fn add_src(&mut self, src_element_name: &str, has_clock_wait: bool) {
unsafe { unsafe {
ffi::gst_harness_add_src( ffi::gst_harness_add_src(
@ -125,6 +134,7 @@ impl Harness {
} }
} }
#[doc(alias = "gst_harness_add_src_harness")]
pub fn add_src_harness(&mut self, src_harness: Harness, has_clock_wait: bool) { pub fn add_src_harness(&mut self, src_harness: Harness, has_clock_wait: bool) {
unsafe { unsafe {
let src_harness = mem::ManuallyDrop::new(src_harness); let src_harness = mem::ManuallyDrop::new(src_harness);
@ -136,6 +146,7 @@ impl Harness {
} }
} }
#[doc(alias = "gst_harness_add_src_parse")]
pub fn add_src_parse(&mut self, launchline: &str, has_clock_wait: bool) { pub fn add_src_parse(&mut self, launchline: &str, has_clock_wait: bool) {
unsafe { unsafe {
ffi::gst_harness_add_src_parse( ffi::gst_harness_add_src_parse(
@ -146,14 +157,17 @@ impl Harness {
} }
} }
#[doc(alias = "gst_harness_buffers_in_queue")]
pub fn buffers_in_queue(&self) -> u32 { pub fn buffers_in_queue(&self) -> u32 {
unsafe { ffi::gst_harness_buffers_in_queue(self.0.as_ptr()) } unsafe { ffi::gst_harness_buffers_in_queue(self.0.as_ptr()) }
} }
#[doc(alias = "gst_harness_buffers_received")]
pub fn buffers_received(&self) -> u32 { pub fn buffers_received(&self) -> u32 {
unsafe { ffi::gst_harness_buffers_received(self.0.as_ptr()) } unsafe { ffi::gst_harness_buffers_received(self.0.as_ptr()) }
} }
#[doc(alias = "gst_harness_crank_multiple_clock_waits")]
pub fn crank_multiple_clock_waits(&mut self, waits: u32) -> Result<(), glib::BoolError> { pub fn crank_multiple_clock_waits(&mut self, waits: u32) -> Result<(), glib::BoolError> {
unsafe { unsafe {
glib::result_from_gboolean!( glib::result_from_gboolean!(
@ -163,6 +177,7 @@ impl Harness {
} }
} }
#[doc(alias = "gst_harness_crank_single_clock_wait")]
pub fn crank_single_clock_wait(&mut self) -> Result<(), glib::BoolError> { pub fn crank_single_clock_wait(&mut self) -> Result<(), glib::BoolError> {
unsafe { unsafe {
glib::result_from_gboolean!( glib::result_from_gboolean!(
@ -172,6 +187,7 @@ impl Harness {
} }
} }
#[doc(alias = "gst_harness_create_buffer")]
pub fn create_buffer(&mut self, size: usize) -> Result<gst::Buffer, glib::BoolError> { pub fn create_buffer(&mut self, size: usize) -> Result<gst::Buffer, glib::BoolError> {
unsafe { unsafe {
Option::<_>::from_glib_full(ffi::gst_harness_create_buffer(self.0.as_ptr(), size)) Option::<_>::from_glib_full(ffi::gst_harness_create_buffer(self.0.as_ptr(), size))
@ -179,6 +195,7 @@ impl Harness {
} }
} }
#[doc(alias = "gst_harness_dump_to_file")]
pub fn dump_to_file<P: AsRef<path::Path>>(&mut self, filename: P) { pub fn dump_to_file<P: AsRef<path::Path>>(&mut self, filename: P) {
let filename = filename.as_ref(); let filename = filename.as_ref();
unsafe { unsafe {
@ -186,14 +203,17 @@ impl Harness {
} }
} }
#[doc(alias = "gst_harness_events_in_queue")]
pub fn events_in_queue(&self) -> u32 { pub fn events_in_queue(&self) -> u32 {
unsafe { ffi::gst_harness_events_in_queue(self.0.as_ptr()) } unsafe { ffi::gst_harness_events_in_queue(self.0.as_ptr()) }
} }
#[doc(alias = "gst_harness_events_received")]
pub fn events_received(&self) -> u32 { pub fn events_received(&self) -> u32 {
unsafe { ffi::gst_harness_events_received(self.0.as_ptr()) } unsafe { ffi::gst_harness_events_received(self.0.as_ptr()) }
} }
#[doc(alias = "gst_harness_find_element")]
pub fn find_element(&mut self, element_name: &str) -> Option<gst::Element> { pub fn find_element(&mut self, element_name: &str) -> Option<gst::Element> {
unsafe { unsafe {
// Work around https://gitlab.freedesktop.org/gstreamer/gstreamer/merge_requests/31 // Work around https://gitlab.freedesktop.org/gstreamer/gstreamer/merge_requests/31
@ -221,21 +241,25 @@ impl Harness {
//} //}
#[doc(alias = "get_last_pushed_timestamp")] #[doc(alias = "get_last_pushed_timestamp")]
#[doc(alias = "gst_harness_get_last_pushed_timestamp")]
pub fn last_pushed_timestamp(&self) -> gst::ClockTime { pub fn last_pushed_timestamp(&self) -> gst::ClockTime {
unsafe { from_glib(ffi::gst_harness_get_last_pushed_timestamp(self.0.as_ptr())) } unsafe { from_glib(ffi::gst_harness_get_last_pushed_timestamp(self.0.as_ptr())) }
} }
#[doc(alias = "get_testclock")] #[doc(alias = "get_testclock")]
#[doc(alias = "gst_harness_get_testclock")]
pub fn testclock(&self) -> Option<TestClock> { pub fn testclock(&self) -> Option<TestClock> {
unsafe { from_glib_full(ffi::gst_harness_get_testclock(self.0.as_ptr())) } unsafe { from_glib_full(ffi::gst_harness_get_testclock(self.0.as_ptr())) }
} }
#[doc(alias = "gst_harness_play")]
pub fn play(&mut self) { pub fn play(&mut self) {
unsafe { unsafe {
ffi::gst_harness_play(self.0.as_ptr()); ffi::gst_harness_play(self.0.as_ptr());
} }
} }
#[doc(alias = "gst_harness_pull")]
pub fn pull(&mut self) -> Result<gst::Buffer, glib::BoolError> { pub fn pull(&mut self) -> Result<gst::Buffer, glib::BoolError> {
unsafe { unsafe {
Option::<_>::from_glib_full(ffi::gst_harness_pull(self.0.as_ptr())) Option::<_>::from_glib_full(ffi::gst_harness_pull(self.0.as_ptr()))
@ -245,6 +269,7 @@ impl Harness {
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
#[doc(alias = "gst_harness_pull_until_eos")]
pub fn pull_until_eos(&mut self) -> Result<Option<gst::Buffer>, glib::BoolError> { pub fn pull_until_eos(&mut self) -> Result<Option<gst::Buffer>, glib::BoolError> {
unsafe { unsafe {
let mut buffer = ptr::null_mut(); let mut buffer = ptr::null_mut();
@ -257,6 +282,7 @@ impl Harness {
} }
} }
#[doc(alias = "gst_harness_pull_event")]
pub fn pull_event(&mut self) -> Result<gst::Event, glib::BoolError> { pub fn pull_event(&mut self) -> Result<gst::Event, glib::BoolError> {
unsafe { unsafe {
Option::<_>::from_glib_full(ffi::gst_harness_pull_event(self.0.as_ptr())) Option::<_>::from_glib_full(ffi::gst_harness_pull_event(self.0.as_ptr()))
@ -264,6 +290,7 @@ impl Harness {
} }
} }
#[doc(alias = "gst_harness_pull_upstream_event")]
pub fn pull_upstream_event(&mut self) -> Result<gst::Event, glib::BoolError> { pub fn pull_upstream_event(&mut self) -> Result<gst::Event, glib::BoolError> {
unsafe { unsafe {
Option::<_>::from_glib_full(ffi::gst_harness_pull_upstream_event(self.0.as_ptr())) Option::<_>::from_glib_full(ffi::gst_harness_pull_upstream_event(self.0.as_ptr()))
@ -271,6 +298,7 @@ impl Harness {
} }
} }
#[doc(alias = "gst_harness_push")]
pub fn push(&mut self, buffer: gst::Buffer) -> Result<gst::FlowSuccess, gst::FlowError> { pub fn push(&mut self, buffer: gst::Buffer) -> Result<gst::FlowSuccess, gst::FlowError> {
unsafe { unsafe {
gst::FlowSuccess::try_from_glib(ffi::gst_harness_push( gst::FlowSuccess::try_from_glib(ffi::gst_harness_push(
@ -280,6 +308,7 @@ impl Harness {
} }
} }
#[doc(alias = "gst_harness_push_and_pull")]
pub fn push_and_pull(&mut self, buffer: gst::Buffer) -> Result<gst::Buffer, glib::BoolError> { pub fn push_and_pull(&mut self, buffer: gst::Buffer) -> Result<gst::Buffer, glib::BoolError> {
unsafe { unsafe {
Option::<_>::from_glib_full(ffi::gst_harness_push_and_pull( Option::<_>::from_glib_full(ffi::gst_harness_push_and_pull(
@ -290,6 +319,7 @@ impl Harness {
} }
} }
#[doc(alias = "gst_harness_push_event")]
pub fn push_event(&mut self, event: gst::Event) -> bool { pub fn push_event(&mut self, event: gst::Event) -> bool {
unsafe { unsafe {
from_glib(ffi::gst_harness_push_event( from_glib(ffi::gst_harness_push_event(
@ -299,14 +329,17 @@ impl Harness {
} }
} }
#[doc(alias = "gst_harness_push_from_src")]
pub fn push_from_src(&mut self) -> Result<gst::FlowSuccess, gst::FlowError> { pub fn push_from_src(&mut self) -> Result<gst::FlowSuccess, gst::FlowError> {
unsafe { gst::FlowSuccess::try_from_glib(ffi::gst_harness_push_from_src(self.0.as_ptr())) } unsafe { gst::FlowSuccess::try_from_glib(ffi::gst_harness_push_from_src(self.0.as_ptr())) }
} }
#[doc(alias = "gst_harness_push_to_sink")]
pub fn push_to_sink(&mut self) -> Result<gst::FlowSuccess, gst::FlowError> { pub fn push_to_sink(&mut self) -> Result<gst::FlowSuccess, gst::FlowError> {
unsafe { gst::FlowSuccess::try_from_glib(ffi::gst_harness_push_to_sink(self.0.as_ptr())) } unsafe { gst::FlowSuccess::try_from_glib(ffi::gst_harness_push_to_sink(self.0.as_ptr())) }
} }
#[doc(alias = "gst_harness_push_upstream_event")]
pub fn push_upstream_event(&mut self, event: gst::Event) -> bool { pub fn push_upstream_event(&mut self, event: gst::Event) -> bool {
unsafe { unsafe {
from_glib(ffi::gst_harness_push_upstream_event( from_glib(ffi::gst_harness_push_upstream_event(
@ -316,6 +349,7 @@ impl Harness {
} }
} }
#[doc(alias = "gst_harness_query_latency")]
pub fn query_latency(&self) -> gst::ClockTime { pub fn query_latency(&self) -> gst::ClockTime {
unsafe { from_glib(ffi::gst_harness_query_latency(self.0.as_ptr())) } unsafe { from_glib(ffi::gst_harness_query_latency(self.0.as_ptr())) }
} }
@ -324,18 +358,21 @@ impl Harness {
// unsafe { TODO: call ffi::gst_harness_set() } // unsafe { TODO: call ffi::gst_harness_set() }
//} //}
#[doc(alias = "gst_harness_set_blocking_push_mode")]
pub fn set_blocking_push_mode(&mut self) { pub fn set_blocking_push_mode(&mut self) {
unsafe { unsafe {
ffi::gst_harness_set_blocking_push_mode(self.0.as_ptr()); ffi::gst_harness_set_blocking_push_mode(self.0.as_ptr());
} }
} }
#[doc(alias = "gst_harness_set_caps")]
pub fn set_caps(&mut self, in_: gst::Caps, out: gst::Caps) { pub fn set_caps(&mut self, in_: gst::Caps, out: gst::Caps) {
unsafe { unsafe {
ffi::gst_harness_set_caps(self.0.as_ptr(), in_.into_ptr(), out.into_ptr()); ffi::gst_harness_set_caps(self.0.as_ptr(), in_.into_ptr(), out.into_ptr());
} }
} }
#[doc(alias = "gst_harness_set_caps_str")]
pub fn set_caps_str(&mut self, in_: &str, out: &str) { pub fn set_caps_str(&mut self, in_: &str, out: &str) {
unsafe { unsafe {
ffi::gst_harness_set_caps_str( ffi::gst_harness_set_caps_str(
@ -346,12 +383,14 @@ impl Harness {
} }
} }
#[doc(alias = "gst_harness_set_drop_buffers")]
pub fn set_drop_buffers(&mut self, drop_buffers: bool) { pub fn set_drop_buffers(&mut self, drop_buffers: bool) {
unsafe { unsafe {
ffi::gst_harness_set_drop_buffers(self.0.as_ptr(), drop_buffers.into_glib()); ffi::gst_harness_set_drop_buffers(self.0.as_ptr(), drop_buffers.into_glib());
} }
} }
#[doc(alias = "gst_harness_set_forwarding")]
pub fn set_forwarding(&mut self, forwarding: bool) { pub fn set_forwarding(&mut self, forwarding: bool) {
unsafe { unsafe {
ffi::gst_harness_set_forwarding(self.0.as_ptr(), forwarding.into_glib()); ffi::gst_harness_set_forwarding(self.0.as_ptr(), forwarding.into_glib());
@ -362,30 +401,35 @@ impl Harness {
// unsafe { TODO: call ffi::gst_harness_set_propose_allocator() } // unsafe { TODO: call ffi::gst_harness_set_propose_allocator() }
//} //}
#[doc(alias = "gst_harness_set_sink_caps")]
pub fn set_sink_caps(&mut self, caps: gst::Caps) { pub fn set_sink_caps(&mut self, caps: gst::Caps) {
unsafe { unsafe {
ffi::gst_harness_set_sink_caps(self.0.as_ptr(), caps.into_ptr()); ffi::gst_harness_set_sink_caps(self.0.as_ptr(), caps.into_ptr());
} }
} }
#[doc(alias = "gst_harness_set_sink_caps_str")]
pub fn set_sink_caps_str(&mut self, str: &str) { pub fn set_sink_caps_str(&mut self, str: &str) {
unsafe { unsafe {
ffi::gst_harness_set_sink_caps_str(self.0.as_ptr(), str.to_glib_none().0); ffi::gst_harness_set_sink_caps_str(self.0.as_ptr(), str.to_glib_none().0);
} }
} }
#[doc(alias = "gst_harness_set_src_caps")]
pub fn set_src_caps(&mut self, caps: gst::Caps) { pub fn set_src_caps(&mut self, caps: gst::Caps) {
unsafe { unsafe {
ffi::gst_harness_set_src_caps(self.0.as_ptr(), caps.into_ptr()); ffi::gst_harness_set_src_caps(self.0.as_ptr(), caps.into_ptr());
} }
} }
#[doc(alias = "gst_harness_set_src_caps_str")]
pub fn set_src_caps_str(&mut self, str: &str) { pub fn set_src_caps_str(&mut self, str: &str) {
unsafe { unsafe {
ffi::gst_harness_set_src_caps_str(self.0.as_ptr(), str.to_glib_none().0); ffi::gst_harness_set_src_caps_str(self.0.as_ptr(), str.to_glib_none().0);
} }
} }
#[doc(alias = "gst_harness_set_time")]
pub fn set_time(&mut self, time: gst::ClockTime) -> Result<(), glib::BoolError> { pub fn set_time(&mut self, time: gst::ClockTime) -> Result<(), glib::BoolError> {
unsafe { unsafe {
glib::result_from_gboolean!( glib::result_from_gboolean!(
@ -395,12 +439,14 @@ impl Harness {
} }
} }
#[doc(alias = "gst_harness_set_upstream_latency")]
pub fn set_upstream_latency(&mut self, latency: gst::ClockTime) { pub fn set_upstream_latency(&mut self, latency: gst::ClockTime) {
unsafe { unsafe {
ffi::gst_harness_set_upstream_latency(self.0.as_ptr(), latency.into_glib()); ffi::gst_harness_set_upstream_latency(self.0.as_ptr(), latency.into_glib());
} }
} }
#[doc(alias = "gst_harness_sink_push_many")]
pub fn sink_push_many(&mut self, pushes: u32) -> Result<gst::FlowSuccess, gst::FlowError> { pub fn sink_push_many(&mut self, pushes: u32) -> Result<gst::FlowSuccess, gst::FlowError> {
unsafe { unsafe {
gst::FlowSuccess::try_from_glib(ffi::gst_harness_sink_push_many( gst::FlowSuccess::try_from_glib(ffi::gst_harness_sink_push_many(
@ -410,6 +456,7 @@ impl Harness {
} }
} }
#[doc(alias = "gst_harness_src_crank_and_push_many")]
pub fn src_crank_and_push_many( pub fn src_crank_and_push_many(
&mut self, &mut self,
cranks: u32, cranks: u32,
@ -424,6 +471,7 @@ impl Harness {
} }
} }
#[doc(alias = "gst_harness_src_push_event")]
pub fn src_push_event(&mut self) -> bool { pub fn src_push_event(&mut self) -> bool {
unsafe { from_glib(ffi::gst_harness_src_push_event(self.0.as_ptr())) } unsafe { from_glib(ffi::gst_harness_src_push_event(self.0.as_ptr())) }
} }
@ -470,6 +518,7 @@ impl Harness {
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
#[doc(alias = "gst_harness_take_all_data_as_buffer")]
pub fn take_all_data_as_buffer(&mut self) -> Result<gst::Buffer, glib::BoolError> { pub fn take_all_data_as_buffer(&mut self) -> Result<gst::Buffer, glib::BoolError> {
unsafe { unsafe {
Option::<_>::from_glib_full(ffi::gst_harness_take_all_data_as_buffer(self.0.as_ptr())) Option::<_>::from_glib_full(ffi::gst_harness_take_all_data_as_buffer(self.0.as_ptr()))
@ -479,6 +528,7 @@ impl Harness {
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
#[doc(alias = "gst_harness_take_all_data_as_bytes")]
pub fn take_all_data_as_bytes(&mut self) -> Result<glib::Bytes, glib::BoolError> { pub fn take_all_data_as_bytes(&mut self) -> Result<glib::Bytes, glib::BoolError> {
unsafe { unsafe {
Option::<_>::from_glib_full(ffi::gst_harness_take_all_data_as_bytes(self.0.as_ptr())) Option::<_>::from_glib_full(ffi::gst_harness_take_all_data_as_bytes(self.0.as_ptr()))
@ -486,38 +536,46 @@ impl Harness {
} }
} }
#[doc(alias = "gst_harness_try_pull")]
pub fn try_pull(&mut self) -> Option<gst::Buffer> { pub fn try_pull(&mut self) -> Option<gst::Buffer> {
unsafe { from_glib_full(ffi::gst_harness_try_pull(self.0.as_ptr())) } unsafe { from_glib_full(ffi::gst_harness_try_pull(self.0.as_ptr())) }
} }
#[doc(alias = "gst_harness_try_pull_event")]
pub fn try_pull_event(&mut self) -> Option<gst::Event> { pub fn try_pull_event(&mut self) -> Option<gst::Event> {
unsafe { from_glib_full(ffi::gst_harness_try_pull_event(self.0.as_ptr())) } unsafe { from_glib_full(ffi::gst_harness_try_pull_event(self.0.as_ptr())) }
} }
#[doc(alias = "gst_harness_try_pull_upstream_event")]
pub fn try_pull_upstream_event(&mut self) -> Option<gst::Event> { pub fn try_pull_upstream_event(&mut self) -> Option<gst::Event> {
unsafe { from_glib_full(ffi::gst_harness_try_pull_upstream_event(self.0.as_ptr())) } unsafe { from_glib_full(ffi::gst_harness_try_pull_upstream_event(self.0.as_ptr())) }
} }
#[doc(alias = "gst_harness_upstream_events_in_queue")]
pub fn upstream_events_in_queue(&self) -> u32 { pub fn upstream_events_in_queue(&self) -> u32 {
unsafe { ffi::gst_harness_upstream_events_in_queue(self.0.as_ptr()) } unsafe { ffi::gst_harness_upstream_events_in_queue(self.0.as_ptr()) }
} }
#[doc(alias = "gst_harness_upstream_events_received")]
pub fn upstream_events_received(&self) -> u32 { pub fn upstream_events_received(&self) -> u32 {
unsafe { ffi::gst_harness_upstream_events_received(self.0.as_ptr()) } unsafe { ffi::gst_harness_upstream_events_received(self.0.as_ptr()) }
} }
#[doc(alias = "gst_harness_use_systemclock")]
pub fn use_systemclock(&mut self) { pub fn use_systemclock(&mut self) {
unsafe { unsafe {
ffi::gst_harness_use_systemclock(self.0.as_ptr()); ffi::gst_harness_use_systemclock(self.0.as_ptr());
} }
} }
#[doc(alias = "gst_harness_use_testclock")]
pub fn use_testclock(&mut self) { pub fn use_testclock(&mut self) {
unsafe { unsafe {
ffi::gst_harness_use_testclock(self.0.as_ptr()); ffi::gst_harness_use_testclock(self.0.as_ptr());
} }
} }
#[doc(alias = "gst_harness_wait_for_clock_id_waits")]
pub fn wait_for_clock_id_waits( pub fn wait_for_clock_id_waits(
&mut self, &mut self,
waits: u32, waits: u32,
@ -537,16 +595,19 @@ impl Harness {
Harness(ptr::NonNull::new_unchecked(ptr)) Harness(ptr::NonNull::new_unchecked(ptr))
} }
#[doc(alias = "gst_harness_new")]
pub fn new(element_name: &str) -> Harness { pub fn new(element_name: &str) -> Harness {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
unsafe { Self::from_glib_full(ffi::gst_harness_new(element_name.to_glib_none().0)) } unsafe { Self::from_glib_full(ffi::gst_harness_new(element_name.to_glib_none().0)) }
} }
#[doc(alias = "gst_harness_new_empty")]
pub fn new_empty() -> Harness { pub fn new_empty() -> Harness {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
unsafe { Self::from_glib_full(ffi::gst_harness_new_empty()) } unsafe { Self::from_glib_full(ffi::gst_harness_new_empty()) }
} }
#[doc(alias = "gst_harness_new_full")]
pub fn new_full<P: IsA<gst::Element>>( pub fn new_full<P: IsA<gst::Element>>(
element: &P, element: &P,
hsrc: Option<&gst::StaticPadTemplate>, hsrc: Option<&gst::StaticPadTemplate>,
@ -568,11 +629,13 @@ impl Harness {
} }
} }
#[doc(alias = "gst_harness_new_parse")]
pub fn new_parse(launchline: &str) -> Harness { pub fn new_parse(launchline: &str) -> Harness {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
unsafe { Self::from_glib_full(ffi::gst_harness_new_parse(launchline.to_glib_none().0)) } unsafe { Self::from_glib_full(ffi::gst_harness_new_parse(launchline.to_glib_none().0)) }
} }
#[doc(alias = "gst_harness_new_with_element")]
pub fn with_element<P: IsA<gst::Element>>( pub fn with_element<P: IsA<gst::Element>>(
element: &P, element: &P,
element_sinkpad_name: Option<&str>, element_sinkpad_name: Option<&str>,
@ -590,6 +653,7 @@ impl Harness {
} }
} }
#[doc(alias = "gst_harness_new_with_padnames")]
pub fn with_padnames( pub fn with_padnames(
element_name: &str, element_name: &str,
element_sinkpad_name: Option<&str>, element_sinkpad_name: Option<&str>,
@ -607,6 +671,7 @@ impl Harness {
} }
} }
#[doc(alias = "gst_harness_new_with_templates")]
pub fn with_templates( pub fn with_templates(
element_name: &str, element_name: &str,
hsrc: Option<&gst::StaticPadTemplate>, hsrc: Option<&gst::StaticPadTemplate>,

View file

@ -5,6 +5,7 @@ use glib::translate::*;
use std::ptr; use std::ptr;
impl TestClock { impl TestClock {
#[doc(alias = "gst_test_clock_has_id")]
pub fn has_id(&self, id: &gst::ClockId) -> bool { pub fn has_id(&self, id: &gst::ClockId) -> bool {
unsafe { unsafe {
from_glib(ffi::gst_test_clock_has_id( from_glib(ffi::gst_test_clock_has_id(
@ -14,6 +15,7 @@ impl TestClock {
} }
} }
#[doc(alias = "gst_test_clock_peek_next_pending_id")]
pub fn peek_next_pending_id(&self) -> Option<gst::ClockId> { pub fn peek_next_pending_id(&self) -> Option<gst::ClockId> {
unsafe { unsafe {
let mut id = ptr::null_mut(); let mut id = ptr::null_mut();
@ -31,6 +33,7 @@ impl TestClock {
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
#[doc(alias = "gst_test_clock_process_id")]
pub fn process_id(&self, pending_id: &gst::ClockId) -> bool { pub fn process_id(&self, pending_id: &gst::ClockId) -> bool {
unsafe { unsafe {
from_glib(ffi::gst_test_clock_process_id( from_glib(ffi::gst_test_clock_process_id(
@ -40,6 +43,7 @@ impl TestClock {
} }
} }
#[doc(alias = "gst_test_clock_process_id_list")]
pub fn process_id_list(&self, pending_list: &[&gst::ClockId]) -> u32 { pub fn process_id_list(&self, pending_list: &[&gst::ClockId]) -> u32 {
unsafe { unsafe {
ffi::gst_test_clock_process_id_list( ffi::gst_test_clock_process_id_list(
@ -49,6 +53,7 @@ impl TestClock {
} }
} }
#[doc(alias = "gst_test_clock_process_next_clock_id")]
pub fn process_next_clock_id(&self) -> Option<gst::ClockId> { pub fn process_next_clock_id(&self) -> Option<gst::ClockId> {
unsafe { unsafe {
from_glib_full(ffi::gst_test_clock_process_next_clock_id( from_glib_full(ffi::gst_test_clock_process_next_clock_id(
@ -57,6 +62,7 @@ impl TestClock {
} }
} }
#[doc(alias = "gst_test_clock_wait_for_multiple_pending_ids")]
pub fn wait_for_multiple_pending_ids(&self, count: u32) -> Vec<gst::ClockId> { pub fn wait_for_multiple_pending_ids(&self, count: u32) -> Vec<gst::ClockId> {
unsafe { unsafe {
let mut pending_list = ptr::null_mut(); let mut pending_list = ptr::null_mut();
@ -69,6 +75,7 @@ impl TestClock {
} }
} }
#[doc(alias = "gst_test_clock_wait_for_next_pending_id")]
pub fn wait_for_next_pending_id(&self) -> gst::ClockId { pub fn wait_for_next_pending_id(&self) -> gst::ClockId {
unsafe { unsafe {
let mut id = ptr::null_mut(); let mut id = ptr::null_mut();
@ -79,6 +86,7 @@ impl TestClock {
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
#[doc(alias = "gst_test_clock_timed_wait_for_multiple_pending_ids")]
pub fn timed_wait_for_multiple_pending_ids( pub fn timed_wait_for_multiple_pending_ids(
&self, &self,
count: u32, count: u32,

View file

@ -15,6 +15,7 @@ use glib::translate::from_glib;
static GES_INIT: Once = Once::new(); static GES_INIT: Once = Once::new();
#[doc(alias = "ges_init")]
pub fn init() -> Result<(), glib::BoolError> { pub fn init() -> Result<(), glib::BoolError> {
if gst::init().is_err() { if gst::init().is_err() {
return Err(glib::bool_error!("Could not initialize GStreamer.")); return Err(glib::bool_error!("Could not initialize GStreamer."));

View file

@ -7,7 +7,9 @@ use std::ptr;
pub trait TimelineElementExtManual: 'static { pub trait TimelineElementExtManual: 'static {
#[doc(alias = "get_child_property")] #[doc(alias = "get_child_property")]
#[doc(alias = "ges_timeline_element_get_child_property")]
fn child_property(&self, name: &str) -> Option<glib::Value>; fn child_property(&self, name: &str) -> Option<glib::Value>;
#[doc(alias = "ges_timeline_element_set_child_property")]
fn set_child_property( fn set_child_property(
&self, &self,
name: &str, name: &str,

View file

@ -8,7 +8,9 @@ use std::ptr;
pub trait ContextGLExt { pub trait ContextGLExt {
#[doc(alias = "get_gl_display")] #[doc(alias = "get_gl_display")]
#[doc(alias = "gst_context_get_gl_display")]
fn gl_display(&self) -> Option<GLDisplay>; fn gl_display(&self) -> Option<GLDisplay>;
#[doc(alias = "gst_context_set_gl_display")]
fn set_gl_display<T: IsA<GLDisplay>>(&self, display: &T); fn set_gl_display<T: IsA<GLDisplay>>(&self, display: &T);
} }

View file

@ -24,12 +24,14 @@ impl GLContext {
} }
#[doc(alias = "get_current_gl_context")] #[doc(alias = "get_current_gl_context")]
#[doc(alias = "gst_gl_context_get_current_gl_context")]
pub fn current_gl_context(context_type: GLPlatform) -> uintptr_t { pub fn current_gl_context(context_type: GLPlatform) -> uintptr_t {
skip_assert_initialized!(); skip_assert_initialized!();
unsafe { ffi::gst_gl_context_get_current_gl_context(context_type.into_glib()) as uintptr_t } unsafe { ffi::gst_gl_context_get_current_gl_context(context_type.into_glib()) as uintptr_t }
} }
#[doc(alias = "get_proc_address_with_platform")] #[doc(alias = "get_proc_address_with_platform")]
#[doc(alias = "gst_gl_context_get_proc_address_with_platform")]
pub fn proc_address_with_platform( pub fn proc_address_with_platform(
context_type: GLPlatform, context_type: GLPlatform,
gl_api: GLAPI, gl_api: GLAPI,
@ -48,9 +50,11 @@ impl GLContext {
pub trait GLContextExtManual: 'static { pub trait GLContextExtManual: 'static {
#[doc(alias = "get_gl_context")] #[doc(alias = "get_gl_context")]
#[doc(alias = "gst_gl_context_get_gl_context")]
fn gl_context(&self) -> uintptr_t; fn gl_context(&self) -> uintptr_t;
#[doc(alias = "get_proc_address")] #[doc(alias = "get_proc_address")]
#[doc(alias = "gst_gl_context_get_proc_address")]
fn proc_address(&self, name: &str) -> uintptr_t; fn proc_address(&self, name: &str) -> uintptr_t;
} }

View file

@ -14,6 +14,7 @@ unsafe impl Send for GLSyncMeta {}
unsafe impl Sync for GLSyncMeta {} unsafe impl Sync for GLSyncMeta {}
impl GLSyncMeta { impl GLSyncMeta {
#[doc(alias = "gst_buffer_add_gl_sync_meta")]
pub fn add<'a, C: IsA<GLContext>>( pub fn add<'a, C: IsA<GLContext>>(
buffer: &'a mut gst::BufferRef, buffer: &'a mut gst::BufferRef,
context: &C, context: &C,
@ -33,6 +34,7 @@ impl GLSyncMeta {
unsafe { from_glib_none(self.0.context) } unsafe { from_glib_none(self.0.context) }
} }
#[doc(alias = "gst_gl_sync_meta_set_sync_point")]
pub fn set_sync_point<C: IsA<GLContext>>(&self, context: &C) { pub fn set_sync_point<C: IsA<GLContext>>(&self, context: &C) {
unsafe { unsafe {
ffi::gst_gl_sync_meta_set_sync_point( ffi::gst_gl_sync_meta_set_sync_point(
@ -42,6 +44,7 @@ impl GLSyncMeta {
} }
} }
#[doc(alias = "gst_gl_sync_meta_wait")]
pub fn wait<C: IsA<GLContext>>(&self, context: &C) { pub fn wait<C: IsA<GLContext>>(&self, context: &C) {
unsafe { unsafe {
ffi::gst_gl_sync_meta_wait( ffi::gst_gl_sync_meta_wait(
@ -51,6 +54,7 @@ impl GLSyncMeta {
} }
} }
#[doc(alias = "gst_gl_sync_meta_wait_cpu")]
pub fn wait_cpu<C: IsA<GLContext>>(&self, context: &C) { pub fn wait_cpu<C: IsA<GLContext>>(&self, context: &C) {
unsafe { unsafe {
ffi::gst_gl_sync_meta_wait_cpu( ffi::gst_gl_sync_meta_wait_cpu(
@ -64,6 +68,7 @@ impl GLSyncMeta {
unsafe impl MetaAPI for GLSyncMeta { unsafe impl MetaAPI for GLSyncMeta {
type GstType = ffi::GstGLSyncMeta; type GstType = ffi::GstGLSyncMeta;
#[doc(alias = "gst_gl_sync_meta_api_get_type")]
fn meta_api() -> glib::Type { fn meta_api() -> glib::Type {
unsafe { from_glib(ffi::gst_gl_sync_meta_api_get_type()) } unsafe { from_glib(ffi::gst_gl_sync_meta_api_get_type()) }
} }

View file

@ -12,6 +12,7 @@ unsafe impl Send for NetAddressMeta {}
unsafe impl Sync for NetAddressMeta {} unsafe impl Sync for NetAddressMeta {}
impl NetAddressMeta { impl NetAddressMeta {
#[doc(alias = "gst_buffer_add_net_address_meta")]
pub fn add<'a, A: IsA<gio::SocketAddress>>( pub fn add<'a, A: IsA<gio::SocketAddress>>(
buffer: &'a mut gst::BufferRef, buffer: &'a mut gst::BufferRef,
addr: &A, addr: &A,
@ -43,6 +44,7 @@ impl NetAddressMeta {
unsafe impl MetaAPI for NetAddressMeta { unsafe impl MetaAPI for NetAddressMeta {
type GstType = ffi::GstNetAddressMeta; type GstType = ffi::GstNetAddressMeta;
#[doc(alias = "gst_net_address_meta_api_get_type")]
fn meta_api() -> glib::Type { fn meta_api() -> glib::Type {
unsafe { from_glib(ffi::gst_net_address_meta_api_get_type()) } unsafe { from_glib(ffi::gst_net_address_meta_api_get_type()) }
} }

View file

@ -6,6 +6,7 @@ use glib::prelude::*;
use glib::translate::*; use glib::translate::*;
impl NetClientClock { impl NetClientClock {
#[doc(alias = "gst_net_client_clock_new")]
pub fn new( pub fn new(
name: Option<&str>, name: Option<&str>,
remote_address: &str, remote_address: &str,

View file

@ -6,6 +6,7 @@ use glib::prelude::*;
use glib::translate::*; use glib::translate::*;
impl NetTimeProvider { impl NetTimeProvider {
#[doc(alias = "gst_net_time_provider_new")]
pub fn new<P: IsA<gst::Clock>>(clock: &P, address: Option<&str>, port: i32) -> NetTimeProvider { pub fn new<P: IsA<gst::Clock>>(clock: &P, address: Option<&str>, port: i32) -> NetTimeProvider {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
let address = address.to_glib_none(); let address = address.to_glib_none();

View file

@ -6,6 +6,7 @@ use glib::prelude::*;
use glib::translate::*; use glib::translate::*;
impl NtpClock { impl NtpClock {
#[doc(alias = "gst_ntp_clock_new")]
pub fn new( pub fn new(
name: Option<&str>, name: Option<&str>,
remote_address: &str, remote_address: &str,

View file

@ -6,6 +6,7 @@ use glib::prelude::*;
use glib::translate::*; use glib::translate::*;
impl PtpClock { impl PtpClock {
#[doc(alias = "gst_ptp_clock_new")]
pub fn new(name: Option<&str>, domain: u32) -> PtpClock { pub fn new(name: Option<&str>, domain: u32) -> PtpClock {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
let name = name.to_glib_none(); let name = name.to_glib_none();

View file

@ -6,6 +6,8 @@ use glib::translate::*;
impl DiscovererVideoInfo { impl DiscovererVideoInfo {
#[doc(alias = "get_framerate")] #[doc(alias = "get_framerate")]
#[doc(alias = "gst_discoverer_video_info_get_framerate_num")]
#[doc(alias = "gst_discoverer_video_info_get_framerate_denom")]
pub fn framerate(&self) -> gst::Fraction { pub fn framerate(&self) -> gst::Fraction {
unsafe { unsafe {
gst::Fraction::new( gst::Fraction::new(
@ -16,6 +18,8 @@ impl DiscovererVideoInfo {
} }
#[doc(alias = "get_par")] #[doc(alias = "get_par")]
#[doc(alias = "gst_discoverer_video_info_get_par_num")]
#[doc(alias = "gst_discoverer_video_info_get_par_denom")]
pub fn par(&self) -> gst::Fraction { pub fn par(&self) -> gst::Fraction {
unsafe { unsafe {
gst::Fraction::new( gst::Fraction::new(

View file

@ -29,6 +29,7 @@ trait EncodingProfileBuilderCommon {
} }
impl<O: IsA<EncodingProfile>> EncodingProfileBuilderCommon for O { impl<O: IsA<EncodingProfile>> EncodingProfileBuilderCommon for O {
#[doc(alias = "gst_encoding_profile_set_allow_dynamic_output")]
fn set_allow_dynamic_output(&self, allow_dynamic_output: bool) { fn set_allow_dynamic_output(&self, allow_dynamic_output: bool) {
unsafe { unsafe {
ffi::gst_encoding_profile_set_allow_dynamic_output( ffi::gst_encoding_profile_set_allow_dynamic_output(
@ -38,6 +39,7 @@ impl<O: IsA<EncodingProfile>> EncodingProfileBuilderCommon for O {
} }
} }
#[doc(alias = "gst_encoding_profile_set_description")]
fn set_description(&self, description: Option<&str>) { fn set_description(&self, description: Option<&str>) {
let description = description.to_glib_none(); let description = description.to_glib_none();
unsafe { unsafe {
@ -48,6 +50,7 @@ impl<O: IsA<EncodingProfile>> EncodingProfileBuilderCommon for O {
} }
} }
#[doc(alias = "gst_encoding_profile_set_enabled")]
fn set_enabled(&self, enabled: bool) { fn set_enabled(&self, enabled: bool) {
unsafe { unsafe {
ffi::gst_encoding_profile_set_enabled( ffi::gst_encoding_profile_set_enabled(
@ -57,6 +60,7 @@ impl<O: IsA<EncodingProfile>> EncodingProfileBuilderCommon for O {
} }
} }
#[doc(alias = "gst_encoding_profile_set_format")]
fn set_format(&self, format: &gst::Caps) { fn set_format(&self, format: &gst::Caps) {
unsafe { unsafe {
ffi::gst_encoding_profile_set_format( ffi::gst_encoding_profile_set_format(
@ -66,6 +70,7 @@ impl<O: IsA<EncodingProfile>> EncodingProfileBuilderCommon for O {
} }
} }
#[doc(alias = "gst_encoding_profile_set_name")]
fn set_name(&self, name: Option<&str>) { fn set_name(&self, name: Option<&str>) {
let name = name.to_glib_none(); let name = name.to_glib_none();
unsafe { unsafe {
@ -73,12 +78,14 @@ impl<O: IsA<EncodingProfile>> EncodingProfileBuilderCommon for O {
} }
} }
#[doc(alias = "gst_encoding_profile_set_presence")]
fn set_presence(&self, presence: u32) { fn set_presence(&self, presence: u32) {
unsafe { unsafe {
ffi::gst_encoding_profile_set_presence(self.as_ref().to_glib_none().0, presence); ffi::gst_encoding_profile_set_presence(self.as_ref().to_glib_none().0, presence);
} }
} }
#[doc(alias = "gst_encoding_profile_set_preset")]
fn set_preset(&self, preset: Option<&str>) { fn set_preset(&self, preset: Option<&str>) {
let preset = preset.to_glib_none(); let preset = preset.to_glib_none();
unsafe { unsafe {
@ -86,6 +93,7 @@ impl<O: IsA<EncodingProfile>> EncodingProfileBuilderCommon for O {
} }
} }
#[doc(alias = "gst_encoding_profile_set_preset_name")]
fn set_preset_name(&self, preset_name: Option<&str>) { fn set_preset_name(&self, preset_name: Option<&str>) {
let preset_name = preset_name.to_glib_none(); let preset_name = preset_name.to_glib_none();
unsafe { unsafe {
@ -110,6 +118,7 @@ pub trait EncodingProfileHasRestrictionGetter {
macro_rules! declare_encoding_profile_has_restriction( macro_rules! declare_encoding_profile_has_restriction(
($name:ident) => { ($name:ident) => {
impl EncodingProfileHasRestrictionSetter for $name { impl EncodingProfileHasRestrictionSetter for $name {
#[doc(alias = "gst_encoding_profile_set_restriction")]
fn set_restriction(&self, restriction: Option<&gst::Caps>) { fn set_restriction(&self, restriction: Option<&gst::Caps>) {
let profile: &EncodingProfile = glib::object::Cast::upcast_ref(self); let profile: &EncodingProfile = glib::object::Cast::upcast_ref(self);
@ -128,6 +137,7 @@ macro_rules! declare_encoding_profile_has_restriction(
} }
impl EncodingProfileHasRestrictionGetter for $name { impl EncodingProfileHasRestrictionGetter for $name {
#[doc(alias = "gst_encoding_profile_get_restriction")]
fn restriction(&self) -> Option<gst::Caps> { fn restriction(&self) -> Option<gst::Caps> {
let profile: &EncodingProfile = glib::object::Cast::upcast_ref(self); let profile: &EncodingProfile = glib::object::Cast::upcast_ref(self);
@ -142,6 +152,7 @@ macro_rules! declare_encoding_profile_has_restriction(
); );
impl EncodingAudioProfile { impl EncodingAudioProfile {
#[doc(alias = "gst_encoding_audio_profile_new")]
fn new( fn new(
format: &gst::Caps, format: &gst::Caps,
preset: Option<&str>, preset: Option<&str>,
@ -165,6 +176,7 @@ impl EncodingAudioProfile {
declare_encoding_profile_has_restriction!(EncodingAudioProfile); declare_encoding_profile_has_restriction!(EncodingAudioProfile);
impl EncodingVideoProfile { impl EncodingVideoProfile {
#[doc(alias = "gst_encoding_video_profile_new")]
fn new( fn new(
format: &gst::Caps, format: &gst::Caps,
preset: Option<&str>, preset: Option<&str>,
@ -184,12 +196,14 @@ impl EncodingVideoProfile {
} }
} }
#[doc(alias = "gst_encoding_video_profile_set_pass")]
fn set_pass(&self, pass: u32) { fn set_pass(&self, pass: u32) {
unsafe { unsafe {
ffi::gst_encoding_video_profile_set_pass(self.to_glib_none().0, pass); ffi::gst_encoding_video_profile_set_pass(self.to_glib_none().0, pass);
} }
} }
#[doc(alias = "gst_encoding_video_profile_set_variableframerate")]
fn set_variableframerate(&self, variableframerate: bool) { fn set_variableframerate(&self, variableframerate: bool) {
unsafe { unsafe {
ffi::gst_encoding_video_profile_set_variableframerate( ffi::gst_encoding_video_profile_set_variableframerate(
@ -203,6 +217,7 @@ impl EncodingVideoProfile {
declare_encoding_profile_has_restriction!(EncodingVideoProfile); declare_encoding_profile_has_restriction!(EncodingVideoProfile);
impl EncodingContainerProfile { impl EncodingContainerProfile {
#[doc(alias = "gst_encoding_container_profile_new")]
fn new( fn new(
name: Option<&str>, name: Option<&str>,
description: Option<&str>, description: Option<&str>,
@ -223,6 +238,7 @@ impl EncodingContainerProfile {
} }
} }
#[doc(alias = "gst_encoding_container_profile_add_profile")]
fn add_profile<P: IsA<EncodingProfile>>( fn add_profile<P: IsA<EncodingProfile>>(
&self, &self,
profile: &P, profile: &P,

View file

@ -29,6 +29,7 @@ pub fn pb_utils_add_codec_description_to_tag_list_for_tag<'a, T: CodecTag<'a>>(
} }
} }
#[doc(alias = "gst_pb_utils_add_codec_description_to_tag_list")]
pub fn pb_utils_add_codec_description_to_tag_list( pub fn pb_utils_add_codec_description_to_tag_list(
taglist: &mut gst::TagListRef, taglist: &mut gst::TagListRef,
caps: &gst::CapsRef, caps: &gst::CapsRef,
@ -46,6 +47,7 @@ pub fn pb_utils_add_codec_description_to_tag_list(
} }
} }
#[doc(alias = "gst_pb_utils_get_encoder_description")]
pub fn pb_utils_get_encoder_description( pub fn pb_utils_get_encoder_description(
caps: &gst::CapsRef, caps: &gst::CapsRef,
) -> Result<glib::GString, glib::error::BoolError> { ) -> Result<glib::GString, glib::error::BoolError> {
@ -58,6 +60,7 @@ pub fn pb_utils_get_encoder_description(
} }
} }
#[doc(alias = "gst_pb_utils_get_decoder_description")]
pub fn pb_utils_get_decoder_description( pub fn pb_utils_get_decoder_description(
caps: &gst::CapsRef, caps: &gst::CapsRef,
) -> Result<glib::GString, glib::error::BoolError> { ) -> Result<glib::GString, glib::error::BoolError> {
@ -70,6 +73,7 @@ pub fn pb_utils_get_decoder_description(
} }
} }
#[doc(alias = "gst_pb_utils_get_codec_description")]
pub fn pb_utils_get_codec_description( pub fn pb_utils_get_codec_description(
caps: &gst::CapsRef, caps: &gst::CapsRef,
) -> Result<glib::GString, glib::error::BoolError> { ) -> Result<glib::GString, glib::error::BoolError> {

View file

@ -36,6 +36,7 @@ impl AsMut<gst::StructureRef> for PlayerConfig {
impl PlayerConfig { impl PlayerConfig {
#[doc(alias = "get_position_update_interval")] #[doc(alias = "get_position_update_interval")]
#[doc(alias = "gst_player_config_get_position_update_interval")]
pub fn position_update_interval(&self) -> u32 { pub fn position_update_interval(&self) -> u32 {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
unsafe { ffi::gst_player_config_get_position_update_interval(self.0.to_glib_none().0) } unsafe { ffi::gst_player_config_get_position_update_interval(self.0.to_glib_none().0) }
@ -52,6 +53,7 @@ impl PlayerConfig {
} }
#[doc(alias = "get_user_agent")] #[doc(alias = "get_user_agent")]
#[doc(alias = "gst_player_config_get_user_agent")]
pub fn user_agent(&self) -> Option<String> { pub fn user_agent(&self) -> Option<String> {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
unsafe { unsafe {
@ -61,6 +63,7 @@ impl PlayerConfig {
} }
} }
#[doc(alias = "gst_player_config_set_position_update_interval")]
pub fn set_position_update_interval(&mut self, interval: u32) { pub fn set_position_update_interval(&mut self, interval: u32) {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
unsafe { unsafe {
@ -78,6 +81,7 @@ impl PlayerConfig {
self.set("accurate-seek", &accurate); self.set("accurate-seek", &accurate);
} }
#[doc(alias = "gst_player_config_set_user_agent")]
pub fn set_user_agent(&mut self, agent: &str) { pub fn set_user_agent(&mut self, agent: &str) {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
unsafe { unsafe {

View file

@ -11,6 +11,7 @@ use std::boxed::Box as Box_;
use std::mem::transmute; use std::mem::transmute;
impl Player { impl Player {
#[doc(alias = "gst_player_new")]
pub fn new( pub fn new(
video_renderer: Option<&PlayerVideoRenderer>, video_renderer: Option<&PlayerVideoRenderer>,
signal_dispatcher: Option<&PlayerSignalDispatcher>, signal_dispatcher: Option<&PlayerSignalDispatcher>,
@ -30,10 +31,12 @@ impl Player {
} }
#[doc(alias = "get_config")] #[doc(alias = "get_config")]
#[doc(alias = "gst_player_get_config")]
pub fn config(&self) -> crate::PlayerConfig { pub fn config(&self) -> crate::PlayerConfig {
unsafe { from_glib_full(ffi::gst_player_get_config(self.to_glib_none().0)) } unsafe { from_glib_full(ffi::gst_player_get_config(self.to_glib_none().0)) }
} }
#[doc(alias = "gst_player_set_config")]
pub fn set_config(&self, config: crate::PlayerConfig) -> Result<(), glib::error::BoolError> { pub fn set_config(&self, config: crate::PlayerConfig) -> Result<(), glib::error::BoolError> {
unsafe { unsafe {
glib::result_from_gboolean!( glib::result_from_gboolean!(

View file

@ -4,6 +4,7 @@ use crate::PlayerGMainContextSignalDispatcher;
use glib::translate::*; use glib::translate::*;
impl PlayerGMainContextSignalDispatcher { impl PlayerGMainContextSignalDispatcher {
#[doc(alias = "gst_player_g_main_context_signal_dispatcher_new")]
pub fn new( pub fn new(
application_context: Option<&glib::MainContext>, application_context: Option<&glib::MainContext>,
) -> PlayerGMainContextSignalDispatcher { ) -> PlayerGMainContextSignalDispatcher {

View file

@ -6,6 +6,7 @@ use std::mem;
impl PlayerVideoInfo { impl PlayerVideoInfo {
#[doc(alias = "get_framerate")] #[doc(alias = "get_framerate")]
#[doc(alias = "gst_player_video_info_get_framerate")]
pub fn framerate(&self) -> gst::Fraction { pub fn framerate(&self) -> gst::Fraction {
unsafe { unsafe {
let mut fps_n = mem::MaybeUninit::uninit(); let mut fps_n = mem::MaybeUninit::uninit();
@ -20,6 +21,7 @@ impl PlayerVideoInfo {
} }
#[doc(alias = "get_pixel_aspect_ratio")] #[doc(alias = "get_pixel_aspect_ratio")]
#[doc(alias = "gst_player_video_info_get_pixel_aspect_ratio")]
pub fn pixel_aspect_ratio(&self) -> gst::Fraction { pub fn pixel_aspect_ratio(&self) -> gst::Fraction {
unsafe { unsafe {
let mut par_n = mem::MaybeUninit::uninit(); let mut par_n = mem::MaybeUninit::uninit();

View file

@ -29,6 +29,7 @@ impl PlayerVideoOverlayVideoRenderer {
) as *mut _) ) as *mut _)
} }
#[doc(alias = "gst_player_video_overlay_video_renderer_new_with_sink")]
pub fn with_sink<P: IsA<gst::Element>>(video_sink: &P) -> PlayerVideoOverlayVideoRenderer { pub fn with_sink<P: IsA<gst::Element>>(video_sink: &P) -> PlayerVideoOverlayVideoRenderer {
assert_initialized_main_thread!(); assert_initialized_main_thread!();

View file

@ -80,42 +80,50 @@ impl<'a> RTPBuffer<'a, Writable> {
} }
} }
#[doc(alias = "gst_rtp_buffer_set_seq")]
pub fn set_seq(&mut self, seq: u16) { pub fn set_seq(&mut self, seq: u16) {
unsafe { unsafe {
ffi::gst_rtp_buffer_set_seq(&mut self.rtp_buffer, seq); ffi::gst_rtp_buffer_set_seq(&mut self.rtp_buffer, seq);
} }
} }
#[doc(alias = "gst_rtp_buffer_set_marker")]
pub fn set_marker(&mut self, m: bool) { pub fn set_marker(&mut self, m: bool) {
unsafe { unsafe {
ffi::gst_rtp_buffer_set_marker(&mut self.rtp_buffer, m.into_glib()); ffi::gst_rtp_buffer_set_marker(&mut self.rtp_buffer, m.into_glib());
} }
} }
#[doc(alias = "gst_rtp_buffer_set_payload_type")]
pub fn set_payload_type(&mut self, pt: u8) { pub fn set_payload_type(&mut self, pt: u8) {
unsafe { unsafe {
ffi::gst_rtp_buffer_set_payload_type(&mut self.rtp_buffer, pt); ffi::gst_rtp_buffer_set_payload_type(&mut self.rtp_buffer, pt);
} }
} }
#[doc(alias = "gst_rtp_buffer_set_ssrc")]
pub fn set_ssrc(&mut self, ssrc: u32) { pub fn set_ssrc(&mut self, ssrc: u32) {
unsafe { ffi::gst_rtp_buffer_set_ssrc(&mut self.rtp_buffer, ssrc) } unsafe { ffi::gst_rtp_buffer_set_ssrc(&mut self.rtp_buffer, ssrc) }
} }
#[doc(alias = "gst_rtp_buffer_set_csrc")]
pub fn set_csrc(&mut self, idx: u8, ssrc: u32) { pub fn set_csrc(&mut self, idx: u8, ssrc: u32) {
unsafe { ffi::gst_rtp_buffer_set_csrc(&mut self.rtp_buffer, idx, ssrc) } unsafe { ffi::gst_rtp_buffer_set_csrc(&mut self.rtp_buffer, idx, ssrc) }
} }
#[doc(alias = "gst_rtp_buffer_set_timestamp")]
pub fn set_timestamp(&mut self, rtptime: u32) { pub fn set_timestamp(&mut self, rtptime: u32) {
unsafe { unsafe {
ffi::gst_rtp_buffer_set_timestamp(&mut self.rtp_buffer, rtptime); ffi::gst_rtp_buffer_set_timestamp(&mut self.rtp_buffer, rtptime);
} }
} }
#[doc(alias = "gst_rtp_buffer_set_extension")]
pub fn set_extension(&mut self, extension: bool) { pub fn set_extension(&mut self, extension: bool) {
unsafe { ffi::gst_rtp_buffer_set_extension(&mut self.rtp_buffer, extension.into_glib()) } unsafe { ffi::gst_rtp_buffer_set_extension(&mut self.rtp_buffer, extension.into_glib()) }
} }
#[doc(alias = "gst_rtp_buffer_add_extension_onebyte_header")]
pub fn add_extension_onebyte_header( pub fn add_extension_onebyte_header(
&mut self, &mut self,
id: u8, id: u8,
@ -144,6 +152,7 @@ impl<'a> RTPBuffer<'a, Writable> {
} }
} }
#[doc(alias = "gst_rtp_buffer_add_extension_twobytes_header")]
pub fn add_extension_twobytes_header( pub fn add_extension_twobytes_header(
&mut self, &mut self,
appbits: u8, appbits: u8,
@ -175,11 +184,13 @@ impl<'a> RTPBuffer<'a, Writable> {
impl<'a, T> RTPBuffer<'a, T> { impl<'a, T> RTPBuffer<'a, T> {
#[doc(alias = "get_seq")] #[doc(alias = "get_seq")]
#[doc(alias = "gst_rtp_buffer_get_seq")]
pub fn seq(&self) -> u16 { pub fn seq(&self) -> u16 {
unsafe { ffi::gst_rtp_buffer_get_seq(glib::translate::mut_override(&self.rtp_buffer)) } unsafe { ffi::gst_rtp_buffer_get_seq(glib::translate::mut_override(&self.rtp_buffer)) }
} }
#[doc(alias = "get_payload_type")] #[doc(alias = "get_payload_type")]
#[doc(alias = "gst_rtp_buffer_get_payload_type")]
pub fn payload_type(&self) -> u8 { pub fn payload_type(&self) -> u8 {
unsafe { unsafe {
ffi::gst_rtp_buffer_get_payload_type(glib::translate::mut_override(&self.rtp_buffer)) ffi::gst_rtp_buffer_get_payload_type(glib::translate::mut_override(&self.rtp_buffer))
@ -187,11 +198,13 @@ impl<'a, T> RTPBuffer<'a, T> {
} }
#[doc(alias = "get_ssrc")] #[doc(alias = "get_ssrc")]
#[doc(alias = "gst_rtp_buffer_get_ssrc")]
pub fn ssrc(&self) -> u32 { pub fn ssrc(&self) -> u32 {
unsafe { ffi::gst_rtp_buffer_get_ssrc(glib::translate::mut_override(&self.rtp_buffer)) } unsafe { ffi::gst_rtp_buffer_get_ssrc(glib::translate::mut_override(&self.rtp_buffer)) }
} }
#[doc(alias = "get_timestamp")] #[doc(alias = "get_timestamp")]
#[doc(alias = "gst_rtp_buffer_get_timestamp")]
pub fn timestamp(&self) -> u32 { pub fn timestamp(&self) -> u32 {
unsafe { unsafe {
ffi::gst_rtp_buffer_get_timestamp(glib::translate::mut_override(&self.rtp_buffer)) ffi::gst_rtp_buffer_get_timestamp(glib::translate::mut_override(&self.rtp_buffer))
@ -199,6 +212,7 @@ impl<'a, T> RTPBuffer<'a, T> {
} }
#[doc(alias = "get_csrc")] #[doc(alias = "get_csrc")]
#[doc(alias = "gst_rtp_buffer_get_csrc")]
pub fn csrc(&self, idx: u8) -> Option<u32> { pub fn csrc(&self, idx: u8) -> Option<u32> {
if idx < self.csrc_count() { if idx < self.csrc_count() {
unsafe { unsafe {
@ -213,6 +227,7 @@ impl<'a, T> RTPBuffer<'a, T> {
} }
#[doc(alias = "get_csrc_count")] #[doc(alias = "get_csrc_count")]
#[doc(alias = "gst_rtp_buffer_get_csrc_count")]
pub fn csrc_count(&self) -> u8 { pub fn csrc_count(&self) -> u8 {
unsafe { unsafe {
ffi::gst_rtp_buffer_get_csrc_count(glib::translate::mut_override(&self.rtp_buffer)) ffi::gst_rtp_buffer_get_csrc_count(glib::translate::mut_override(&self.rtp_buffer))
@ -237,6 +252,7 @@ impl<'a, T> RTPBuffer<'a, T> {
} }
#[doc(alias = "get_payload")] #[doc(alias = "get_payload")]
#[doc(alias = "gst_rtp_buffer_get_payload")]
pub fn payload(&self) -> Result<&[u8], glib::error::BoolError> { pub fn payload(&self) -> Result<&[u8], glib::error::BoolError> {
let size = self.payload_size(); let size = self.payload_size();
if size == 0 { if size == 0 {
@ -263,6 +279,7 @@ impl<'a, T> RTPBuffer<'a, T> {
} }
#[doc(alias = "get_extension_bytes")] #[doc(alias = "get_extension_bytes")]
#[doc(alias = "gst_rtp_buffer_get_extension_bytes")]
pub fn extension_bytes(&self) -> Option<(u16, glib::Bytes)> { pub fn extension_bytes(&self) -> Option<(u16, glib::Bytes)> {
unsafe { unsafe {
let mut bits: u16 = 0; let mut bits: u16 = 0;
@ -275,6 +292,7 @@ impl<'a, T> RTPBuffer<'a, T> {
} }
#[doc(alias = "get_extension_onebyte_header")] #[doc(alias = "get_extension_onebyte_header")]
#[doc(alias = "gst_rtp_buffer_get_extension_onebyte_header")]
pub fn extension_onebyte_header(&self, id: u8, nth: u32) -> Option<&[u8]> { pub fn extension_onebyte_header(&self, id: u8, nth: u32) -> Option<&[u8]> {
unsafe { unsafe {
let mut data = ptr::null_mut(); let mut data = ptr::null_mut();
@ -297,6 +315,7 @@ impl<'a, T> RTPBuffer<'a, T> {
} }
#[doc(alias = "get_extension_twobytes_header")] #[doc(alias = "get_extension_twobytes_header")]
#[doc(alias = "gst_rtp_buffer_get_extension_twobytes_header")]
pub fn extension_twobytes_header(&self, id: u8, nth: u32) -> Option<(u8, &[u8])> { pub fn extension_twobytes_header(&self, id: u8, nth: u32) -> Option<(u8, &[u8])> {
unsafe { unsafe {
let mut data = ptr::null_mut(); let mut data = ptr::null_mut();
@ -358,6 +377,7 @@ impl RTPBufferExt for gst::Buffer {
} }
} }
#[doc(alias = "gst_rtp_buffer_compare_seqnum")]
pub fn compare_seqnum(seqnum1: u16, seqnum2: u16) -> i32 { pub fn compare_seqnum(seqnum1: u16, seqnum2: u16) -> i32 {
skip_assert_initialized!(); skip_assert_initialized!();
unsafe { ffi::gst_rtp_buffer_compare_seqnum(seqnum1, seqnum2) } unsafe { ffi::gst_rtp_buffer_compare_seqnum(seqnum1, seqnum2) }

View file

@ -8,6 +8,7 @@ use glib::translate::*;
use std::ptr; use std::ptr;
pub trait RTSPAddressPoolExtManual: 'static { pub trait RTSPAddressPoolExtManual: 'static {
#[doc(alias = "gst_rtsp_address_pool_reserve_address")]
fn reserve_address( fn reserve_address(
&self, &self,
ip_address: &str, ip_address: &str,

View file

@ -12,6 +12,7 @@ use crate::RTSPAuth;
use crate::RTSPToken; use crate::RTSPToken;
pub trait RTSPAuthExtManual: 'static { pub trait RTSPAuthExtManual: 'static {
#[doc(alias = "gst_rtsp_auth_set_default_token")]
fn set_default_token(&self, token: Option<&mut RTSPToken>); fn set_default_token(&self, token: Option<&mut RTSPToken>);
fn connect_accept_certificate< fn connect_accept_certificate<

View file

@ -6,6 +6,7 @@ use glib::source::SourceId;
use glib::translate::*; use glib::translate::*;
pub trait RTSPClientExtManual: 'static { pub trait RTSPClientExtManual: 'static {
#[doc(alias = "gst_rtsp_client_attach")]
fn attach(&self, context: Option<&glib::MainContext>) -> SourceId; fn attach(&self, context: Option<&glib::MainContext>) -> SourceId;
} }

View file

@ -6,6 +6,7 @@ use glib::translate::*;
use crate::RTSPMedia; use crate::RTSPMedia;
pub trait RTSPMediaExtManual: 'static { pub trait RTSPMediaExtManual: 'static {
#[doc(alias = "gst_rtsp_media_take_pipeline")]
fn take_pipeline<P: IsA<gst::Pipeline>>(&self, pipeline: &P); fn take_pipeline<P: IsA<gst::Pipeline>>(&self, pipeline: &P);
} }

View file

@ -10,6 +10,7 @@ use glib::translate::*;
pub trait RTSPMediaFactoryExtManual: 'static { pub trait RTSPMediaFactoryExtManual: 'static {
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
#[doc(alias = "gst_rtsp_media_factory_add_role_from_structure")]
fn add_role_from_structure(&self, structure: &gst::StructureRef); fn add_role_from_structure(&self, structure: &gst::StructureRef);
} }

View file

@ -6,6 +6,7 @@ use glib::source::SourceId;
use glib::translate::*; use glib::translate::*;
pub trait RTSPServerExtManual: 'static { pub trait RTSPServerExtManual: 'static {
#[doc(alias = "gst_rtsp_server_attach")]
fn attach( fn attach(
&self, &self,
context: Option<&glib::MainContext>, context: Option<&glib::MainContext>,

View file

@ -31,6 +31,7 @@ fn into_raw_watch<F: FnMut(&RTSPSessionPool) -> Continue + Send + 'static>(func:
} }
pub trait RTSPSessionPoolExtManual: 'static { pub trait RTSPSessionPoolExtManual: 'static {
#[doc(alias = "gst_rtsp_session_pool_create_watch")]
fn create_watch<F>(&self, name: Option<&str>, priority: Priority, func: F) -> glib::Source fn create_watch<F>(&self, name: Option<&str>, priority: Priority, func: F) -> glib::Source
where where
F: FnMut(&RTSPSessionPool) -> Continue + Send + 'static; F: FnMut(&RTSPSessionPool) -> Continue + Send + 'static;

View file

@ -7,6 +7,7 @@ gst::mini_object_wrapper!(RTSPThread, RTSPThreadRef, ffi::GstRTSPThread, || {
}); });
impl RTSPThread { impl RTSPThread {
#[doc(alias = "gst_rtsp_thread_new")]
pub fn new(type_: crate::RTSPThreadType) -> Option<Self> { pub fn new(type_: crate::RTSPThreadType) -> Option<Self> {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
unsafe { from_glib_full(ffi::gst_rtsp_thread_new(type_.into_glib())) } unsafe { from_glib_full(ffi::gst_rtsp_thread_new(type_.into_glib())) }
@ -14,10 +15,12 @@ impl RTSPThread {
} }
impl RTSPThreadRef { impl RTSPThreadRef {
#[doc(alias = "gst_rtsp_thread_reuse")]
pub fn reuse(&self) -> bool { pub fn reuse(&self) -> bool {
unsafe { from_glib(ffi::gst_rtsp_thread_reuse(self.as_mut_ptr())) } unsafe { from_glib(ffi::gst_rtsp_thread_reuse(self.as_mut_ptr())) }
} }
#[doc(alias = "gst_rtsp_thread_stop")]
pub fn stop(&self) { pub fn stop(&self) {
unsafe { unsafe {
ffi::gst_rtsp_thread_stop(self.as_mut_ptr()); ffi::gst_rtsp_thread_stop(self.as_mut_ptr());

View file

@ -10,6 +10,7 @@ gst::mini_object_wrapper!(RTSPToken, RTSPTokenRef, ffi::GstRTSPToken, || {
}); });
impl RTSPToken { impl RTSPToken {
#[doc(alias = "gst_rtsp_token_new_empty")]
pub fn new_empty() -> Self { pub fn new_empty() -> Self {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
unsafe { from_glib_full(ffi::gst_rtsp_token_new_empty()) } unsafe { from_glib_full(ffi::gst_rtsp_token_new_empty()) }
@ -34,6 +35,7 @@ impl RTSPToken {
impl RTSPTokenRef { impl RTSPTokenRef {
#[doc(alias = "get_string")] #[doc(alias = "get_string")]
#[doc(alias = "gst_rtsp_token_get_string")]
pub fn string(&self, field: &str) -> Option<String> { pub fn string(&self, field: &str) -> Option<String> {
unsafe { unsafe {
from_glib_none(ffi::gst_rtsp_token_get_string( from_glib_none(ffi::gst_rtsp_token_get_string(
@ -44,10 +46,12 @@ impl RTSPTokenRef {
} }
#[doc(alias = "get_structure")] #[doc(alias = "get_structure")]
#[doc(alias = "gst_rtsp_token_get_structure")]
pub fn structure(&self) -> Option<gst::Structure> { pub fn structure(&self) -> Option<gst::Structure> {
unsafe { from_glib_none(ffi::gst_rtsp_token_get_structure(self.as_mut_ptr())) } unsafe { from_glib_none(ffi::gst_rtsp_token_get_structure(self.as_mut_ptr())) }
} }
#[doc(alias = "gst_rtsp_token_is_allowed")]
pub fn is_allowed(&self, field: &str) -> bool { pub fn is_allowed(&self, field: &str) -> bool {
unsafe { unsafe {
from_glib(ffi::gst_rtsp_token_is_allowed( from_glib(ffi::gst_rtsp_token_is_allowed(

View file

@ -31,6 +31,7 @@ glib::wrapper! {
} }
impl SDPMedia { impl SDPMedia {
#[doc(alias = "gst_sdp_media_new")]
pub fn new() -> Self { pub fn new() -> Self {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
unsafe { unsafe {
@ -121,17 +122,20 @@ unsafe impl Send for SDPMediaRef {}
unsafe impl Sync for SDPMediaRef {} unsafe impl Sync for SDPMediaRef {}
impl SDPMediaRef { impl SDPMediaRef {
#[doc(alias = "gst_sdp_media_add_attribute")]
pub fn add_attribute(&mut self, key: &str, value: Option<&str>) { pub fn add_attribute(&mut self, key: &str, value: Option<&str>) {
let value = value.to_glib_none(); let value = value.to_glib_none();
unsafe { ffi::gst_sdp_media_add_attribute(&mut self.0, key.to_glib_none().0, value.0) }; unsafe { ffi::gst_sdp_media_add_attribute(&mut self.0, key.to_glib_none().0, value.0) };
} }
#[doc(alias = "gst_sdp_media_add_bandwidth")]
pub fn add_bandwidth(&mut self, bwtype: &str, bandwidth: u32) { pub fn add_bandwidth(&mut self, bwtype: &str, bandwidth: u32) {
unsafe { unsafe {
ffi::gst_sdp_media_add_bandwidth(&mut self.0, bwtype.to_glib_none().0, bandwidth) ffi::gst_sdp_media_add_bandwidth(&mut self.0, bwtype.to_glib_none().0, bandwidth)
}; };
} }
#[doc(alias = "gst_sdp_media_add_connection")]
pub fn add_connection( pub fn add_connection(
&mut self, &mut self,
nettype: &str, nettype: &str,
@ -152,10 +156,12 @@ impl SDPMediaRef {
}; };
} }
#[doc(alias = "gst_sdp_media_add_format")]
pub fn add_format(&mut self, format: &str) { pub fn add_format(&mut self, format: &str) {
unsafe { ffi::gst_sdp_media_add_format(&mut self.0, format.to_glib_none().0) }; unsafe { ffi::gst_sdp_media_add_format(&mut self.0, format.to_glib_none().0) };
} }
#[doc(alias = "gst_sdp_media_as_text")]
pub fn as_text(&self) -> Result<String, glib::error::BoolError> { pub fn as_text(&self) -> Result<String, glib::error::BoolError> {
unsafe { unsafe {
match from_glib_full(ffi::gst_sdp_media_as_text(&self.0)) { match from_glib_full(ffi::gst_sdp_media_as_text(&self.0)) {
@ -183,10 +189,12 @@ impl SDPMediaRef {
ConnectionsIter::new(self) ConnectionsIter::new(self)
} }
#[doc(alias = "gst_sdp_media_attributes_len")]
pub fn attributes_len(&self) -> u32 { pub fn attributes_len(&self) -> u32 {
unsafe { ffi::gst_sdp_media_attributes_len(&self.0) } unsafe { ffi::gst_sdp_media_attributes_len(&self.0) }
} }
#[doc(alias = "gst_sdp_media_attributes_to_caps")]
pub fn attributes_to_caps(&self, caps: &mut gst::CapsRef) -> Result<(), glib::BoolError> { pub fn attributes_to_caps(&self, caps: &mut gst::CapsRef) -> Result<(), glib::BoolError> {
let result = unsafe { ffi::gst_sdp_media_attributes_to_caps(&self.0, caps.as_mut_ptr()) }; let result = unsafe { ffi::gst_sdp_media_attributes_to_caps(&self.0, caps.as_mut_ptr()) };
match result { match result {
@ -195,19 +203,23 @@ impl SDPMediaRef {
} }
} }
#[doc(alias = "gst_sdp_media_bandwidths_len")]
pub fn bandwidths_len(&self) -> u32 { pub fn bandwidths_len(&self) -> u32 {
unsafe { ffi::gst_sdp_media_bandwidths_len(&self.0) } unsafe { ffi::gst_sdp_media_bandwidths_len(&self.0) }
} }
#[doc(alias = "gst_sdp_media_connections_len")]
pub fn connections_len(&self) -> u32 { pub fn connections_len(&self) -> u32 {
unsafe { ffi::gst_sdp_media_connections_len(&self.0) } unsafe { ffi::gst_sdp_media_connections_len(&self.0) }
} }
#[doc(alias = "gst_sdp_media_formats_len")]
pub fn formats_len(&self) -> u32 { pub fn formats_len(&self) -> u32 {
unsafe { ffi::gst_sdp_media_formats_len(&self.0) } unsafe { ffi::gst_sdp_media_formats_len(&self.0) }
} }
#[doc(alias = "get_attribute")] #[doc(alias = "get_attribute")]
#[doc(alias = "gst_sdp_media_get_attribute")]
pub fn attribute(&self, idx: u32) -> Option<&SDPAttribute> { pub fn attribute(&self, idx: u32) -> Option<&SDPAttribute> {
if idx >= self.attributes_len() { if idx >= self.attributes_len() {
return None; return None;
@ -224,6 +236,7 @@ impl SDPMediaRef {
} }
#[doc(alias = "get_attribute_val")] #[doc(alias = "get_attribute_val")]
#[doc(alias = "gst_sdp_media_get_attribute_val")]
pub fn attribute_val(&self, key: &str) -> Option<&str> { pub fn attribute_val(&self, key: &str) -> Option<&str> {
unsafe { unsafe {
let ptr = ffi::gst_sdp_media_get_attribute_val(&self.0, key.to_glib_none().0); let ptr = ffi::gst_sdp_media_get_attribute_val(&self.0, key.to_glib_none().0);
@ -236,6 +249,7 @@ impl SDPMediaRef {
} }
#[doc(alias = "get_attribute_val_n")] #[doc(alias = "get_attribute_val_n")]
#[doc(alias = "gst_sdp_media_get_attribute_val_n")]
pub fn attribute_val_n(&self, key: &str, nth: u32) -> Option<&str> { pub fn attribute_val_n(&self, key: &str, nth: u32) -> Option<&str> {
unsafe { unsafe {
let ptr = ffi::gst_sdp_media_get_attribute_val_n(&self.0, key.to_glib_none().0, nth); let ptr = ffi::gst_sdp_media_get_attribute_val_n(&self.0, key.to_glib_none().0, nth);
@ -248,6 +262,7 @@ impl SDPMediaRef {
} }
#[doc(alias = "get_bandwidth")] #[doc(alias = "get_bandwidth")]
#[doc(alias = "gst_sdp_media_get_bandwidth")]
pub fn bandwidth(&self, idx: u32) -> Option<&SDPBandwidth> { pub fn bandwidth(&self, idx: u32) -> Option<&SDPBandwidth> {
if idx >= self.bandwidths_len() { if idx >= self.bandwidths_len() {
return None; return None;
@ -264,11 +279,13 @@ impl SDPMediaRef {
} }
#[doc(alias = "get_caps_from_media")] #[doc(alias = "get_caps_from_media")]
#[doc(alias = "gst_sdp_media_get_caps_from_media")]
pub fn caps_from_media(&self, pt: i32) -> Option<gst::Caps> { pub fn caps_from_media(&self, pt: i32) -> Option<gst::Caps> {
unsafe { from_glib_full(ffi::gst_sdp_media_get_caps_from_media(&self.0, pt)) } unsafe { from_glib_full(ffi::gst_sdp_media_get_caps_from_media(&self.0, pt)) }
} }
#[doc(alias = "get_connection")] #[doc(alias = "get_connection")]
#[doc(alias = "gst_sdp_media_get_connection")]
pub fn connection(&self, idx: u32) -> Option<&SDPConnection> { pub fn connection(&self, idx: u32) -> Option<&SDPConnection> {
if idx >= self.connections_len() { if idx >= self.connections_len() {
return None; return None;
@ -285,6 +302,7 @@ impl SDPMediaRef {
} }
#[doc(alias = "get_format")] #[doc(alias = "get_format")]
#[doc(alias = "gst_sdp_media_get_format")]
pub fn format(&self, idx: u32) -> Option<&str> { pub fn format(&self, idx: u32) -> Option<&str> {
if idx >= self.formats_len() { if idx >= self.formats_len() {
return None; return None;
@ -301,6 +319,7 @@ impl SDPMediaRef {
} }
#[doc(alias = "get_information")] #[doc(alias = "get_information")]
#[doc(alias = "gst_sdp_media_get_information")]
pub fn information(&self) -> Option<&str> { pub fn information(&self) -> Option<&str> {
unsafe { unsafe {
let ptr = ffi::gst_sdp_media_get_information(&self.0); let ptr = ffi::gst_sdp_media_get_information(&self.0);
@ -313,6 +332,7 @@ impl SDPMediaRef {
} }
#[doc(alias = "get_key")] #[doc(alias = "get_key")]
#[doc(alias = "gst_sdp_media_get_key")]
pub fn key(&self) -> Option<&SDPKey> { pub fn key(&self) -> Option<&SDPKey> {
unsafe { unsafe {
let ptr = ffi::gst_sdp_media_get_key(&self.0); let ptr = ffi::gst_sdp_media_get_key(&self.0);
@ -325,6 +345,7 @@ impl SDPMediaRef {
} }
#[doc(alias = "get_media")] #[doc(alias = "get_media")]
#[doc(alias = "gst_sdp_media_get_media")]
pub fn media(&self) -> Option<&str> { pub fn media(&self) -> Option<&str> {
unsafe { unsafe {
let ptr = ffi::gst_sdp_media_get_media(&self.0); let ptr = ffi::gst_sdp_media_get_media(&self.0);
@ -337,16 +358,19 @@ impl SDPMediaRef {
} }
#[doc(alias = "get_num_ports")] #[doc(alias = "get_num_ports")]
#[doc(alias = "gst_sdp_media_get_num_ports")]
pub fn num_ports(&self) -> u32 { pub fn num_ports(&self) -> u32 {
unsafe { ffi::gst_sdp_media_get_num_ports(&self.0) } unsafe { ffi::gst_sdp_media_get_num_ports(&self.0) }
} }
#[doc(alias = "get_port")] #[doc(alias = "get_port")]
#[doc(alias = "gst_sdp_media_get_port")]
pub fn port(&self) -> u32 { pub fn port(&self) -> u32 {
unsafe { ffi::gst_sdp_media_get_port(&self.0) } unsafe { ffi::gst_sdp_media_get_port(&self.0) }
} }
#[doc(alias = "get_proto")] #[doc(alias = "get_proto")]
#[doc(alias = "gst_sdp_media_get_proto")]
pub fn proto(&self) -> Option<&str> { pub fn proto(&self) -> Option<&str> {
unsafe { unsafe {
let ptr = ffi::gst_sdp_media_get_proto(&self.0); let ptr = ffi::gst_sdp_media_get_proto(&self.0);
@ -358,6 +382,7 @@ impl SDPMediaRef {
} }
} }
#[doc(alias = "gst_sdp_media_insert_attribute")]
pub fn insert_attribute( pub fn insert_attribute(
&mut self, &mut self,
idx: Option<u32>, idx: Option<u32>,
@ -378,6 +403,7 @@ impl SDPMediaRef {
} }
} }
#[doc(alias = "gst_sdp_media_insert_bandwidth")]
pub fn insert_bandwidth( pub fn insert_bandwidth(
&mut self, &mut self,
idx: Option<u32>, idx: Option<u32>,
@ -398,6 +424,7 @@ impl SDPMediaRef {
} }
} }
#[doc(alias = "gst_sdp_media_insert_connection")]
pub fn insert_connection( pub fn insert_connection(
&mut self, &mut self,
idx: Option<u32>, idx: Option<u32>,
@ -418,6 +445,7 @@ impl SDPMediaRef {
} }
} }
#[doc(alias = "gst_sdp_media_insert_format")]
pub fn insert_format(&mut self, idx: Option<u32>, format: &str) -> Result<(), glib::BoolError> { pub fn insert_format(&mut self, idx: Option<u32>, format: &str) -> Result<(), glib::BoolError> {
if let Some(idx) = idx { if let Some(idx) = idx {
if idx >= self.formats_len() { if idx >= self.formats_len() {
@ -434,6 +462,7 @@ impl SDPMediaRef {
} }
} }
#[doc(alias = "gst_sdp_media_remove_attribute")]
pub fn remove_attribute(&mut self, idx: u32) -> Result<(), glib::BoolError> { pub fn remove_attribute(&mut self, idx: u32) -> Result<(), glib::BoolError> {
if idx >= self.attributes_len() { if idx >= self.attributes_len() {
return Err(glib::bool_error!("Failed to remove attribute")); return Err(glib::bool_error!("Failed to remove attribute"));
@ -446,6 +475,7 @@ impl SDPMediaRef {
} }
} }
#[doc(alias = "gst_sdp_media_remove_bandwidth")]
pub fn remove_bandwidth(&mut self, idx: u32) -> Result<(), glib::BoolError> { pub fn remove_bandwidth(&mut self, idx: u32) -> Result<(), glib::BoolError> {
if idx >= self.bandwidths_len() { if idx >= self.bandwidths_len() {
return Err(glib::bool_error!("Failed to remove bandwidth")); return Err(glib::bool_error!("Failed to remove bandwidth"));
@ -458,6 +488,7 @@ impl SDPMediaRef {
} }
} }
#[doc(alias = "gst_sdp_media_remove_connection")]
pub fn remove_connection(&mut self, idx: u32) -> Result<(), glib::BoolError> { pub fn remove_connection(&mut self, idx: u32) -> Result<(), glib::BoolError> {
if idx >= self.connections_len() { if idx >= self.connections_len() {
return Err(glib::bool_error!("Failed to remove connection")); return Err(glib::bool_error!("Failed to remove connection"));
@ -470,6 +501,7 @@ impl SDPMediaRef {
} }
} }
#[doc(alias = "gst_sdp_media_remove_format")]
pub fn remove_format(&mut self, idx: u32) -> Result<(), glib::BoolError> { pub fn remove_format(&mut self, idx: u32) -> Result<(), glib::BoolError> {
if idx >= self.formats_len() { if idx >= self.formats_len() {
return Err(glib::bool_error!("Failed to remove format")); return Err(glib::bool_error!("Failed to remove format"));
@ -482,6 +514,7 @@ impl SDPMediaRef {
} }
} }
#[doc(alias = "gst_sdp_media_replace_attribute")]
pub fn replace_attribute( pub fn replace_attribute(
&mut self, &mut self,
idx: u32, idx: u32,
@ -499,6 +532,7 @@ impl SDPMediaRef {
} }
} }
#[doc(alias = "gst_sdp_media_replace_bandwidth")]
pub fn replace_bandwidth(&mut self, idx: u32, bw: SDPBandwidth) -> Result<(), glib::BoolError> { pub fn replace_bandwidth(&mut self, idx: u32, bw: SDPBandwidth) -> Result<(), glib::BoolError> {
if idx >= self.bandwidths_len() { if idx >= self.bandwidths_len() {
return Err(glib::bool_error!("Failed to replace bandwidth")); return Err(glib::bool_error!("Failed to replace bandwidth"));
@ -512,6 +546,7 @@ impl SDPMediaRef {
} }
} }
#[doc(alias = "gst_sdp_media_replace_connection")]
pub fn replace_connection( pub fn replace_connection(
&mut self, &mut self,
idx: u32, idx: u32,
@ -530,6 +565,7 @@ impl SDPMediaRef {
} }
} }
#[doc(alias = "gst_sdp_media_replace_format")]
pub fn replace_format(&mut self, idx: u32, format: &str) -> Result<(), glib::BoolError> { pub fn replace_format(&mut self, idx: u32, format: &str) -> Result<(), glib::BoolError> {
if idx >= self.formats_len() { if idx >= self.formats_len() {
return Err(glib::bool_error!("Failed to replace format")); return Err(glib::bool_error!("Failed to replace format"));
@ -543,28 +579,34 @@ impl SDPMediaRef {
} }
} }
#[doc(alias = "gst_sdp_media_set_information")]
pub fn set_information(&mut self, information: &str) { pub fn set_information(&mut self, information: &str) {
unsafe { ffi::gst_sdp_media_set_information(&mut self.0, information.to_glib_none().0) }; unsafe { ffi::gst_sdp_media_set_information(&mut self.0, information.to_glib_none().0) };
} }
#[doc(alias = "gst_sdp_media_set_key")]
pub fn set_key(&mut self, type_: &str, data: &str) { pub fn set_key(&mut self, type_: &str, data: &str) {
unsafe { unsafe {
ffi::gst_sdp_media_set_key(&mut self.0, type_.to_glib_none().0, data.to_glib_none().0) ffi::gst_sdp_media_set_key(&mut self.0, type_.to_glib_none().0, data.to_glib_none().0)
}; };
} }
#[doc(alias = "gst_sdp_media_set_media")]
pub fn set_media(&mut self, med: &str) { pub fn set_media(&mut self, med: &str) {
unsafe { ffi::gst_sdp_media_set_media(&mut self.0, med.to_glib_none().0) }; unsafe { ffi::gst_sdp_media_set_media(&mut self.0, med.to_glib_none().0) };
} }
#[doc(alias = "gst_sdp_media_set_port_info")]
pub fn set_port_info(&mut self, port: u32, num_ports: u32) { pub fn set_port_info(&mut self, port: u32, num_ports: u32) {
unsafe { ffi::gst_sdp_media_set_port_info(&mut self.0, port, num_ports) }; unsafe { ffi::gst_sdp_media_set_port_info(&mut self.0, port, num_ports) };
} }
#[doc(alias = "gst_sdp_media_set_proto")]
pub fn set_proto(&mut self, proto: &str) { pub fn set_proto(&mut self, proto: &str) {
unsafe { ffi::gst_sdp_media_set_proto(&mut self.0, proto.to_glib_none().0) }; unsafe { ffi::gst_sdp_media_set_proto(&mut self.0, proto.to_glib_none().0) };
} }
#[doc(alias = "gst_sdp_media_set_media_from_caps")]
pub fn set_media_from_caps( pub fn set_media_from_caps(
caps: &gst::Caps, caps: &gst::Caps,
media: &mut SDPMedia, media: &mut SDPMedia,

View file

@ -71,6 +71,7 @@ impl fmt::Display for SDPMessage {
} }
impl SDPMessage { impl SDPMessage {
#[doc(alias = "gst_sdp_message_new")]
pub fn new() -> SDPMessage { pub fn new() -> SDPMessage {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
unsafe { unsafe {
@ -80,6 +81,7 @@ impl SDPMessage {
} }
} }
#[doc(alias = "gst_sdp_message_parse_buffer")]
pub fn parse_buffer(data: &[u8]) -> Result<Self, glib::BoolError> { pub fn parse_buffer(data: &[u8]) -> Result<Self, glib::BoolError> {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
unsafe { unsafe {
@ -97,6 +99,7 @@ impl SDPMessage {
} }
} }
#[doc(alias = "gst_sdp_message_parse_uri")]
pub fn parse_uri(uri: &str) -> Result<Self, glib::BoolError> { pub fn parse_uri(uri: &str) -> Result<Self, glib::BoolError> {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
unsafe { unsafe {
@ -163,6 +166,7 @@ unsafe impl Send for SDPMessageRef {}
unsafe impl Sync for SDPMessageRef {} unsafe impl Sync for SDPMessageRef {}
impl SDPMessageRef { impl SDPMessageRef {
#[doc(alias = "gst_sdp_message_add_attribute")]
pub fn add_attribute(&mut self, key: &str, value: Option<&str>) { pub fn add_attribute(&mut self, key: &str, value: Option<&str>) {
unsafe { unsafe {
ffi::gst_sdp_message_add_attribute( ffi::gst_sdp_message_add_attribute(
@ -173,10 +177,12 @@ impl SDPMessageRef {
} }
} }
#[doc(alias = "gst_sdp_message_add_email")]
pub fn add_email(&mut self, email: &str) { pub fn add_email(&mut self, email: &str) {
unsafe { ffi::gst_sdp_message_add_email(&mut self.0, email.to_glib_none().0) }; unsafe { ffi::gst_sdp_message_add_email(&mut self.0, email.to_glib_none().0) };
} }
#[doc(alias = "gst_sdp_message_add_media")]
pub fn add_media(&mut self, media: SDPMedia) { pub fn add_media(&mut self, media: SDPMedia) {
unsafe { unsafe {
ffi::gst_sdp_message_add_media( ffi::gst_sdp_message_add_media(
@ -186,10 +192,12 @@ impl SDPMessageRef {
} }
} }
#[doc(alias = "gst_sdp_message_add_phone")]
pub fn add_phone(&mut self, phone: &str) { pub fn add_phone(&mut self, phone: &str) {
unsafe { ffi::gst_sdp_message_add_phone(&mut self.0, phone.to_glib_none().0) }; unsafe { ffi::gst_sdp_message_add_phone(&mut self.0, phone.to_glib_none().0) };
} }
#[doc(alias = "gst_sdp_message_add_time")]
pub fn add_time(&mut self, start: &str, stop: &str, repeat: &[&str]) { pub fn add_time(&mut self, start: &str, stop: &str, repeat: &[&str]) {
unsafe { unsafe {
ffi::gst_sdp_message_add_time( ffi::gst_sdp_message_add_time(
@ -201,6 +209,7 @@ impl SDPMessageRef {
}; };
} }
#[doc(alias = "gst_sdp_message_add_zone")]
pub fn add_zone(&mut self, adj_time: &str, typed_time: &str) { pub fn add_zone(&mut self, adj_time: &str, typed_time: &str) {
unsafe { unsafe {
ffi::gst_sdp_message_add_zone( ffi::gst_sdp_message_add_zone(
@ -211,6 +220,7 @@ impl SDPMessageRef {
}; };
} }
#[doc(alias = "gst_sdp_message_as_text")]
pub fn as_text(&self) -> Result<String, glib::error::BoolError> { pub fn as_text(&self) -> Result<String, glib::error::BoolError> {
unsafe { unsafe {
match from_glib_full(ffi::gst_sdp_message_as_text(&self.0)) { match from_glib_full(ffi::gst_sdp_message_as_text(&self.0)) {
@ -222,10 +232,12 @@ impl SDPMessageRef {
} }
} }
#[doc(alias = "gst_sdp_message_attributes_len")]
pub fn attributes_len(&self) -> u32 { pub fn attributes_len(&self) -> u32 {
unsafe { ffi::gst_sdp_message_attributes_len(&self.0) } unsafe { ffi::gst_sdp_message_attributes_len(&self.0) }
} }
#[doc(alias = "gst_sdp_message_attributes_to_caps")]
pub fn attributes_to_caps(&self, caps: &mut gst::CapsRef) -> Result<(), glib::BoolError> { pub fn attributes_to_caps(&self, caps: &mut gst::CapsRef) -> Result<(), glib::BoolError> {
let result = unsafe { ffi::gst_sdp_message_attributes_to_caps(&self.0, caps.as_mut_ptr()) }; let result = unsafe { ffi::gst_sdp_message_attributes_to_caps(&self.0, caps.as_mut_ptr()) };
match result { match result {
@ -234,19 +246,23 @@ impl SDPMessageRef {
} }
} }
#[doc(alias = "gst_sdp_message_bandwidths_len")]
pub fn bandwidths_len(&self) -> u32 { pub fn bandwidths_len(&self) -> u32 {
unsafe { ffi::gst_sdp_message_bandwidths_len(&self.0) } unsafe { ffi::gst_sdp_message_bandwidths_len(&self.0) }
} }
#[doc(alias = "gst_sdp_message_dump")]
pub fn dump(&self) { pub fn dump(&self) {
unsafe { ffi::gst_sdp_message_dump(&self.0) }; unsafe { ffi::gst_sdp_message_dump(&self.0) };
} }
#[doc(alias = "gst_sdp_message_emails_len")]
pub fn emails_len(&self) -> u32 { pub fn emails_len(&self) -> u32 {
unsafe { ffi::gst_sdp_message_emails_len(&self.0) } unsafe { ffi::gst_sdp_message_emails_len(&self.0) }
} }
#[doc(alias = "get_attribute")] #[doc(alias = "get_attribute")]
#[doc(alias = "gst_sdp_message_get_attribute")]
pub fn attribute(&self, idx: u32) -> Option<&SDPAttribute> { pub fn attribute(&self, idx: u32) -> Option<&SDPAttribute> {
if idx >= self.attributes_len() { if idx >= self.attributes_len() {
return None; return None;
@ -263,6 +279,7 @@ impl SDPMessageRef {
} }
#[doc(alias = "get_attribute_val")] #[doc(alias = "get_attribute_val")]
#[doc(alias = "gst_sdp_message_get_attribute_val")]
pub fn attribute_val(&self, key: &str) -> Option<&str> { pub fn attribute_val(&self, key: &str) -> Option<&str> {
unsafe { unsafe {
let ptr = ffi::gst_sdp_message_get_attribute_val(&self.0, key.to_glib_none().0); let ptr = ffi::gst_sdp_message_get_attribute_val(&self.0, key.to_glib_none().0);
@ -275,6 +292,7 @@ impl SDPMessageRef {
} }
#[doc(alias = "get_attribute_val_n")] #[doc(alias = "get_attribute_val_n")]
#[doc(alias = "gst_sdp_message_get_attribute_val_n")]
pub fn attribute_val_n(&self, key: &str, nth: u32) -> Option<&str> { pub fn attribute_val_n(&self, key: &str, nth: u32) -> Option<&str> {
unsafe { unsafe {
let ptr = ffi::gst_sdp_message_get_attribute_val_n(&self.0, key.to_glib_none().0, nth); let ptr = ffi::gst_sdp_message_get_attribute_val_n(&self.0, key.to_glib_none().0, nth);
@ -287,6 +305,7 @@ impl SDPMessageRef {
} }
#[doc(alias = "get_bandwidth")] #[doc(alias = "get_bandwidth")]
#[doc(alias = "gst_sdp_message_get_bandwidth")]
pub fn bandwidth(&self, idx: u32) -> Option<&SDPBandwidth> { pub fn bandwidth(&self, idx: u32) -> Option<&SDPBandwidth> {
if idx >= self.bandwidths_len() { if idx >= self.bandwidths_len() {
return None; return None;
@ -303,6 +322,7 @@ impl SDPMessageRef {
} }
#[doc(alias = "get_connection")] #[doc(alias = "get_connection")]
#[doc(alias = "gst_sdp_message_get_connection")]
pub fn connection(&self) -> Option<&SDPConnection> { pub fn connection(&self) -> Option<&SDPConnection> {
unsafe { unsafe {
let ptr = ffi::gst_sdp_message_get_connection(&self.0); let ptr = ffi::gst_sdp_message_get_connection(&self.0);
@ -315,6 +335,7 @@ impl SDPMessageRef {
} }
#[doc(alias = "get_email")] #[doc(alias = "get_email")]
#[doc(alias = "gst_sdp_message_get_email")]
pub fn email(&self, idx: u32) -> Option<&str> { pub fn email(&self, idx: u32) -> Option<&str> {
if idx >= self.emails_len() { if idx >= self.emails_len() {
return None; return None;
@ -331,6 +352,7 @@ impl SDPMessageRef {
} }
#[doc(alias = "get_information")] #[doc(alias = "get_information")]
#[doc(alias = "gst_sdp_message_get_information")]
pub fn information(&self) -> Option<&str> { pub fn information(&self) -> Option<&str> {
unsafe { unsafe {
let ptr = ffi::gst_sdp_message_get_information(&self.0); let ptr = ffi::gst_sdp_message_get_information(&self.0);
@ -343,6 +365,7 @@ impl SDPMessageRef {
} }
#[doc(alias = "get_key")] #[doc(alias = "get_key")]
#[doc(alias = "gst_sdp_message_get_key")]
pub fn key(&self) -> Option<&SDPKey> { pub fn key(&self) -> Option<&SDPKey> {
unsafe { unsafe {
let ptr = ffi::gst_sdp_message_get_key(&self.0); let ptr = ffi::gst_sdp_message_get_key(&self.0);
@ -355,6 +378,7 @@ impl SDPMessageRef {
} }
#[doc(alias = "get_media")] #[doc(alias = "get_media")]
#[doc(alias = "gst_sdp_message_get_media")]
pub fn media(&self, idx: u32) -> Option<&SDPMediaRef> { pub fn media(&self, idx: u32) -> Option<&SDPMediaRef> {
if idx >= self.medias_len() { if idx >= self.medias_len() {
return None; return None;
@ -387,6 +411,7 @@ impl SDPMessageRef {
} }
#[doc(alias = "get_origin")] #[doc(alias = "get_origin")]
#[doc(alias = "gst_sdp_message_get_origin")]
pub fn origin(&self) -> Option<&SDPOrigin> { pub fn origin(&self) -> Option<&SDPOrigin> {
unsafe { unsafe {
let ptr = ffi::gst_sdp_message_get_origin(&self.0); let ptr = ffi::gst_sdp_message_get_origin(&self.0);
@ -399,6 +424,7 @@ impl SDPMessageRef {
} }
#[doc(alias = "get_phone")] #[doc(alias = "get_phone")]
#[doc(alias = "gst_sdp_message_get_phone")]
pub fn phone(&self, idx: u32) -> Option<&str> { pub fn phone(&self, idx: u32) -> Option<&str> {
if idx >= self.phones_len() { if idx >= self.phones_len() {
return None; return None;
@ -415,6 +441,7 @@ impl SDPMessageRef {
} }
#[doc(alias = "get_session_name")] #[doc(alias = "get_session_name")]
#[doc(alias = "gst_sdp_message_get_session_name")]
pub fn session_name(&self) -> Option<&str> { pub fn session_name(&self) -> Option<&str> {
unsafe { unsafe {
let ptr = ffi::gst_sdp_message_get_session_name(&self.0); let ptr = ffi::gst_sdp_message_get_session_name(&self.0);
@ -427,6 +454,7 @@ impl SDPMessageRef {
} }
#[doc(alias = "get_time")] #[doc(alias = "get_time")]
#[doc(alias = "gst_sdp_message_get_time")]
pub fn time(&self, idx: u32) -> Option<&SDPTime> { pub fn time(&self, idx: u32) -> Option<&SDPTime> {
if idx >= self.times_len() { if idx >= self.times_len() {
return None; return None;
@ -443,6 +471,7 @@ impl SDPMessageRef {
} }
#[doc(alias = "get_uri")] #[doc(alias = "get_uri")]
#[doc(alias = "gst_sdp_message_get_uri")]
pub fn uri(&self) -> Option<&str> { pub fn uri(&self) -> Option<&str> {
unsafe { unsafe {
let ptr = ffi::gst_sdp_message_get_uri(&self.0); let ptr = ffi::gst_sdp_message_get_uri(&self.0);
@ -455,6 +484,7 @@ impl SDPMessageRef {
} }
#[doc(alias = "get_version")] #[doc(alias = "get_version")]
#[doc(alias = "gst_sdp_message_get_version")]
pub fn version(&self) -> Option<&str> { pub fn version(&self) -> Option<&str> {
unsafe { unsafe {
let ptr = ffi::gst_sdp_message_get_version(&self.0); let ptr = ffi::gst_sdp_message_get_version(&self.0);
@ -467,6 +497,7 @@ impl SDPMessageRef {
} }
#[doc(alias = "get_zone")] #[doc(alias = "get_zone")]
#[doc(alias = "gst_sdp_message_get_zone")]
pub fn zone(&self, idx: u32) -> Option<&SDPZone> { pub fn zone(&self, idx: u32) -> Option<&SDPZone> {
if idx >= self.zones_len() { if idx >= self.zones_len() {
return None; return None;
@ -482,6 +513,7 @@ impl SDPMessageRef {
} }
} }
#[doc(alias = "gst_sdp_message_insert_attribute")]
pub fn insert_attribute( pub fn insert_attribute(
&mut self, &mut self,
idx: Option<u32>, idx: Option<u32>,
@ -503,6 +535,7 @@ impl SDPMessageRef {
} }
} }
#[doc(alias = "gst_sdp_message_insert_bandwidth")]
pub fn insert_bandwidth( pub fn insert_bandwidth(
&mut self, &mut self,
idx: Option<u32>, idx: Option<u32>,
@ -523,6 +556,7 @@ impl SDPMessageRef {
} }
} }
#[doc(alias = "gst_sdp_message_insert_email")]
pub fn insert_email(&mut self, idx: Option<u32>, email: &str) -> Result<(), glib::BoolError> { pub fn insert_email(&mut self, idx: Option<u32>, email: &str) -> Result<(), glib::BoolError> {
if let Some(idx) = idx { if let Some(idx) = idx {
if idx >= self.emails_len() { if idx >= self.emails_len() {
@ -539,6 +573,7 @@ impl SDPMessageRef {
} }
} }
#[doc(alias = "gst_sdp_message_insert_phone")]
pub fn insert_phone(&mut self, idx: Option<u32>, phone: &str) -> Result<(), glib::BoolError> { pub fn insert_phone(&mut self, idx: Option<u32>, phone: &str) -> Result<(), glib::BoolError> {
if let Some(idx) = idx { if let Some(idx) = idx {
if idx >= self.phones_len() { if idx >= self.phones_len() {
@ -555,6 +590,7 @@ impl SDPMessageRef {
} }
} }
#[doc(alias = "gst_sdp_message_insert_time")]
pub fn insert_time(&mut self, idx: Option<u32>, time: SDPTime) -> Result<(), glib::BoolError> { pub fn insert_time(&mut self, idx: Option<u32>, time: SDPTime) -> Result<(), glib::BoolError> {
if let Some(idx) = idx { if let Some(idx) = idx {
if idx >= self.times_len() { if idx >= self.times_len() {
@ -571,6 +607,7 @@ impl SDPMessageRef {
} }
} }
#[doc(alias = "gst_sdp_message_insert_zone")]
pub fn insert_zone(&mut self, idx: Option<u32>, zone: SDPZone) -> Result<(), glib::BoolError> { pub fn insert_zone(&mut self, idx: Option<u32>, zone: SDPZone) -> Result<(), glib::BoolError> {
if let Some(idx) = idx { if let Some(idx) = idx {
if idx >= self.zones_len() { if idx >= self.zones_len() {
@ -587,14 +624,17 @@ impl SDPMessageRef {
} }
} }
#[doc(alias = "gst_sdp_message_medias_len")]
pub fn medias_len(&self) -> u32 { pub fn medias_len(&self) -> u32 {
unsafe { ffi::gst_sdp_message_medias_len(&self.0) } unsafe { ffi::gst_sdp_message_medias_len(&self.0) }
} }
#[doc(alias = "gst_sdp_message_phones_len")]
pub fn phones_len(&self) -> u32 { pub fn phones_len(&self) -> u32 {
unsafe { ffi::gst_sdp_message_phones_len(&self.0) } unsafe { ffi::gst_sdp_message_phones_len(&self.0) }
} }
#[doc(alias = "gst_sdp_message_remove_attribute")]
pub fn remove_attribute(&mut self, idx: u32) -> Result<(), glib::BoolError> { pub fn remove_attribute(&mut self, idx: u32) -> Result<(), glib::BoolError> {
if idx >= self.attributes_len() { if idx >= self.attributes_len() {
return Err(glib::bool_error!("Failed to remove attribute")); return Err(glib::bool_error!("Failed to remove attribute"));
@ -607,6 +647,7 @@ impl SDPMessageRef {
} }
} }
#[doc(alias = "gst_sdp_message_remove_bandwidth")]
pub fn remove_bandwidth(&mut self, idx: u32) -> Result<(), glib::BoolError> { pub fn remove_bandwidth(&mut self, idx: u32) -> Result<(), glib::BoolError> {
if idx >= self.bandwidths_len() { if idx >= self.bandwidths_len() {
return Err(glib::bool_error!("Failed to remove bandwidth")); return Err(glib::bool_error!("Failed to remove bandwidth"));
@ -619,6 +660,7 @@ impl SDPMessageRef {
} }
} }
#[doc(alias = "gst_sdp_message_remove_email")]
pub fn remove_email(&mut self, idx: u32) -> Result<(), glib::BoolError> { pub fn remove_email(&mut self, idx: u32) -> Result<(), glib::BoolError> {
if idx >= self.emails_len() { if idx >= self.emails_len() {
return Err(glib::bool_error!("Failed to remove email")); return Err(glib::bool_error!("Failed to remove email"));
@ -631,6 +673,7 @@ impl SDPMessageRef {
} }
} }
#[doc(alias = "gst_sdp_message_remove_phone")]
pub fn remove_phone(&mut self, idx: u32) -> Result<(), glib::BoolError> { pub fn remove_phone(&mut self, idx: u32) -> Result<(), glib::BoolError> {
if idx >= self.phones_len() { if idx >= self.phones_len() {
return Err(glib::bool_error!("Failed to remove phone")); return Err(glib::bool_error!("Failed to remove phone"));
@ -643,6 +686,7 @@ impl SDPMessageRef {
} }
} }
#[doc(alias = "gst_sdp_message_remove_time")]
pub fn remove_time(&mut self, idx: u32) -> Result<(), glib::BoolError> { pub fn remove_time(&mut self, idx: u32) -> Result<(), glib::BoolError> {
if idx >= self.times_len() { if idx >= self.times_len() {
return Err(glib::bool_error!("Failed to remove time")); return Err(glib::bool_error!("Failed to remove time"));
@ -655,6 +699,7 @@ impl SDPMessageRef {
} }
} }
#[doc(alias = "gst_sdp_message_remove_zone")]
pub fn remove_zone(&mut self, idx: u32) -> Result<(), glib::BoolError> { pub fn remove_zone(&mut self, idx: u32) -> Result<(), glib::BoolError> {
if idx >= self.zones_len() { if idx >= self.zones_len() {
return Err(glib::bool_error!("Failed to remove zone")); return Err(glib::bool_error!("Failed to remove zone"));
@ -667,6 +712,7 @@ impl SDPMessageRef {
} }
} }
#[doc(alias = "gst_sdp_message_replace_attribute")]
pub fn replace_attribute( pub fn replace_attribute(
&mut self, &mut self,
idx: u32, idx: u32,
@ -685,6 +731,7 @@ impl SDPMessageRef {
} }
} }
#[doc(alias = "gst_sdp_message_replace_bandwidth")]
pub fn replace_bandwidth(&mut self, idx: u32, bw: SDPBandwidth) -> Result<(), glib::BoolError> { pub fn replace_bandwidth(&mut self, idx: u32, bw: SDPBandwidth) -> Result<(), glib::BoolError> {
if idx >= self.bandwidths_len() { if idx >= self.bandwidths_len() {
return Err(glib::bool_error!("Failed to replace bandwidth")); return Err(glib::bool_error!("Failed to replace bandwidth"));
@ -698,6 +745,7 @@ impl SDPMessageRef {
} }
} }
#[doc(alias = "gst_sdp_message_replace_email")]
pub fn replace_email(&mut self, idx: u32, email: &str) -> Result<(), glib::BoolError> { pub fn replace_email(&mut self, idx: u32, email: &str) -> Result<(), glib::BoolError> {
if idx >= self.emails_len() { if idx >= self.emails_len() {
return Err(glib::bool_error!("Failed to replace email")); return Err(glib::bool_error!("Failed to replace email"));
@ -711,6 +759,7 @@ impl SDPMessageRef {
} }
} }
#[doc(alias = "gst_sdp_message_replace_phone")]
pub fn replace_phone(&mut self, idx: u32, phone: &str) -> Result<(), glib::BoolError> { pub fn replace_phone(&mut self, idx: u32, phone: &str) -> Result<(), glib::BoolError> {
if idx >= self.phones_len() { if idx >= self.phones_len() {
return Err(glib::bool_error!("Failed to replace phone")); return Err(glib::bool_error!("Failed to replace phone"));
@ -724,6 +773,7 @@ impl SDPMessageRef {
} }
} }
#[doc(alias = "gst_sdp_message_replace_time")]
pub fn replace_time(&mut self, idx: u32, time: SDPTime) -> Result<(), glib::BoolError> { pub fn replace_time(&mut self, idx: u32, time: SDPTime) -> Result<(), glib::BoolError> {
if idx >= self.times_len() { if idx >= self.times_len() {
return Err(glib::bool_error!("Failed to replace time")); return Err(glib::bool_error!("Failed to replace time"));
@ -737,6 +787,7 @@ impl SDPMessageRef {
} }
} }
#[doc(alias = "gst_sdp_message_replace_zone")]
pub fn replace_zone(&mut self, idx: u32, zone: SDPZone) -> Result<(), glib::BoolError> { pub fn replace_zone(&mut self, idx: u32, zone: SDPZone) -> Result<(), glib::BoolError> {
if idx >= self.zones_len() { if idx >= self.zones_len() {
return Err(glib::bool_error!("Failed to replace zone")); return Err(glib::bool_error!("Failed to replace zone"));
@ -750,6 +801,7 @@ impl SDPMessageRef {
} }
} }
#[doc(alias = "gst_sdp_message_set_connection")]
pub fn set_connection( pub fn set_connection(
&mut self, &mut self,
nettype: &str, nettype: &str,
@ -770,16 +822,19 @@ impl SDPMessageRef {
}; };
} }
#[doc(alias = "gst_sdp_message_set_information")]
pub fn set_information(&mut self, information: &str) { pub fn set_information(&mut self, information: &str) {
unsafe { ffi::gst_sdp_message_set_information(&mut self.0, information.to_glib_none().0) }; unsafe { ffi::gst_sdp_message_set_information(&mut self.0, information.to_glib_none().0) };
} }
#[doc(alias = "gst_sdp_message_set_key")]
pub fn set_key(&mut self, type_: &str, data: &str) { pub fn set_key(&mut self, type_: &str, data: &str) {
unsafe { unsafe {
ffi::gst_sdp_message_set_key(&mut self.0, type_.to_glib_none().0, data.to_glib_none().0) ffi::gst_sdp_message_set_key(&mut self.0, type_.to_glib_none().0, data.to_glib_none().0)
}; };
} }
#[doc(alias = "gst_sdp_message_set_origin")]
pub fn set_origin( pub fn set_origin(
&mut self, &mut self,
username: &str, username: &str,
@ -802,28 +857,34 @@ impl SDPMessageRef {
}; };
} }
#[doc(alias = "gst_sdp_message_set_session_name")]
pub fn set_session_name(&mut self, session_name: &str) { pub fn set_session_name(&mut self, session_name: &str) {
unsafe { unsafe {
ffi::gst_sdp_message_set_session_name(&mut self.0, session_name.to_glib_none().0) ffi::gst_sdp_message_set_session_name(&mut self.0, session_name.to_glib_none().0)
}; };
} }
#[doc(alias = "gst_sdp_message_set_uri")]
pub fn set_uri(&mut self, uri: &str) { pub fn set_uri(&mut self, uri: &str) {
unsafe { ffi::gst_sdp_message_set_uri(&mut self.0, uri.to_glib_none().0) }; unsafe { ffi::gst_sdp_message_set_uri(&mut self.0, uri.to_glib_none().0) };
} }
#[doc(alias = "gst_sdp_message_set_version")]
pub fn set_version(&mut self, version: &str) { pub fn set_version(&mut self, version: &str) {
unsafe { ffi::gst_sdp_message_set_version(&mut self.0, version.to_glib_none().0) }; unsafe { ffi::gst_sdp_message_set_version(&mut self.0, version.to_glib_none().0) };
} }
#[doc(alias = "gst_sdp_message_times_len")]
pub fn times_len(&self) -> u32 { pub fn times_len(&self) -> u32 {
unsafe { ffi::gst_sdp_message_times_len(&self.0) } unsafe { ffi::gst_sdp_message_times_len(&self.0) }
} }
#[doc(alias = "gst_sdp_message_zones_len")]
pub fn zones_len(&self) -> u32 { pub fn zones_len(&self) -> u32 {
unsafe { ffi::gst_sdp_message_zones_len(&self.0) } unsafe { ffi::gst_sdp_message_zones_len(&self.0) }
} }
#[doc(alias = "gst_sdp_message_as_uri")]
pub fn as_uri(&self, scheme: &str) -> Result<String, glib::error::BoolError> { pub fn as_uri(&self, scheme: &str) -> Result<String, glib::error::BoolError> {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
unsafe { unsafe {

View file

@ -7,6 +7,7 @@ use std::i32;
use std::mem; use std::mem;
use std::ptr; use std::ptr;
#[doc(alias = "gst_video_convert_sample")]
pub fn convert_sample( pub fn convert_sample(
sample: &gst::Sample, sample: &gst::Sample,
caps: &gst::Caps, caps: &gst::Caps,
@ -132,6 +133,7 @@ pub fn convert_sample_future(
Box::pin(future) Box::pin(future)
} }
#[doc(alias = "gst_video_calculate_display_ratio")]
pub fn calculate_display_ratio( pub fn calculate_display_ratio(
video_width: u32, video_width: u32,
video_height: u32, video_height: u32,
@ -165,6 +167,7 @@ pub fn calculate_display_ratio(
} }
} }
#[doc(alias = "gst_video_guess_framerate")]
pub fn guess_framerate(duration: gst::ClockTime) -> Option<gst::Fraction> { pub fn guess_framerate(duration: gst::ClockTime) -> Option<gst::Fraction> {
skip_assert_initialized!(); skip_assert_initialized!();

View file

@ -105,6 +105,7 @@ pub trait VideoBufferPoolConfig {
} }
impl VideoBufferPoolConfig for gst::BufferPoolConfig { impl VideoBufferPoolConfig for gst::BufferPoolConfig {
#[doc(alias = "gst_buffer_pool_config_get_video_alignment")]
fn video_alignment(&self) -> Option<VideoAlignment> { fn video_alignment(&self) -> Option<VideoAlignment> {
unsafe { unsafe {
let mut alignment = mem::MaybeUninit::zeroed(); let mut alignment = mem::MaybeUninit::zeroed();
@ -120,6 +121,7 @@ impl VideoBufferPoolConfig for gst::BufferPoolConfig {
} }
} }
#[doc(alias = "gst_buffer_pool_config_set_video_alignment")]
fn set_video_alignment(&mut self, align: &VideoAlignment) { fn set_video_alignment(&mut self, align: &VideoAlignment) {
unsafe { unsafe {
ffi::gst_buffer_pool_config_set_video_alignment( ffi::gst_buffer_pool_config_set_video_alignment(

View file

@ -21,6 +21,7 @@ unsafe impl Send for VideoConverter {}
unsafe impl Sync for VideoConverter {} unsafe impl Sync for VideoConverter {}
impl VideoConverter { impl VideoConverter {
#[doc(alias = "gst_video_converter_new")]
pub fn new( pub fn new(
in_info: &crate::VideoInfo, in_info: &crate::VideoInfo,
out_info: &crate::VideoInfo, out_info: &crate::VideoInfo,
@ -50,6 +51,7 @@ impl VideoConverter {
} }
#[doc(alias = "get_config")] #[doc(alias = "get_config")]
#[doc(alias = "gst_video_converter_get_config")]
pub fn config(&self) -> VideoConverterConfig { pub fn config(&self) -> VideoConverterConfig {
unsafe { unsafe {
VideoConverterConfig( VideoConverterConfig(
@ -61,12 +63,14 @@ impl VideoConverter {
} }
} }
#[doc(alias = "gst_video_converter_set_config")]
pub fn set_config(&mut self, config: VideoConverterConfig) { pub fn set_config(&mut self, config: VideoConverterConfig) {
unsafe { unsafe {
ffi::gst_video_converter_set_config(self.0.as_ptr(), config.0.into_ptr()); ffi::gst_video_converter_set_config(self.0.as_ptr(), config.0.into_ptr());
} }
} }
#[doc(alias = "gst_video_converter_frame")]
pub fn frame<T>( pub fn frame<T>(
&self, &self,
src: &crate::VideoFrame<T>, src: &crate::VideoFrame<T>,

View file

@ -112,6 +112,7 @@ impl<O: IsA<VideoDecoder>> VideoDecoderExtManual for O {
} }
} }
#[doc(alias = "gst_video_decoder_get_allocator")]
fn allocator(&self) -> (Option<gst::Allocator>, gst::AllocationParams) { fn allocator(&self) -> (Option<gst::Allocator>, gst::AllocationParams) {
unsafe { unsafe {
let mut allocator = ptr::null_mut(); let mut allocator = ptr::null_mut();
@ -125,6 +126,7 @@ impl<O: IsA<VideoDecoder>> VideoDecoderExtManual for O {
} }
} }
#[doc(alias = "gst_video_decoder_finish_frame")]
fn finish_frame(&self, frame: VideoCodecFrame) -> Result<gst::FlowSuccess, gst::FlowError> { fn finish_frame(&self, frame: VideoCodecFrame) -> Result<gst::FlowSuccess, gst::FlowError> {
unsafe { unsafe {
gst::FlowSuccess::try_from_glib(ffi::gst_video_decoder_finish_frame( gst::FlowSuccess::try_from_glib(ffi::gst_video_decoder_finish_frame(
@ -134,12 +136,14 @@ impl<O: IsA<VideoDecoder>> VideoDecoderExtManual for O {
} }
} }
#[doc(alias = "gst_video_decoder_release_frame")]
fn release_frame(&self, frame: VideoCodecFrame) { fn release_frame(&self, frame: VideoCodecFrame) {
unsafe { unsafe {
ffi::gst_video_decoder_release_frame(self.as_ref().to_glib_none().0, frame.into_ptr()) ffi::gst_video_decoder_release_frame(self.as_ref().to_glib_none().0, frame.into_ptr())
} }
} }
#[doc(alias = "gst_video_decoder_drop_frame")]
fn drop_frame(&self, frame: VideoCodecFrame) -> Result<gst::FlowSuccess, gst::FlowError> { fn drop_frame(&self, frame: VideoCodecFrame) -> Result<gst::FlowSuccess, gst::FlowError> {
unsafe { unsafe {
gst::FlowSuccess::try_from_glib(ffi::gst_video_decoder_drop_frame( gst::FlowSuccess::try_from_glib(ffi::gst_video_decoder_drop_frame(
@ -149,6 +153,7 @@ impl<O: IsA<VideoDecoder>> VideoDecoderExtManual for O {
} }
} }
#[doc(alias = "gst_video_decoder_get_latency")]
fn latency(&self) -> (gst::ClockTime, gst::ClockTime) { fn latency(&self) -> (gst::ClockTime, gst::ClockTime) {
let mut min_latency = gst::ffi::GST_CLOCK_TIME_NONE; let mut min_latency = gst::ffi::GST_CLOCK_TIME_NONE;
let mut max_latency = gst::ffi::GST_CLOCK_TIME_NONE; let mut max_latency = gst::ffi::GST_CLOCK_TIME_NONE;
@ -164,6 +169,7 @@ impl<O: IsA<VideoDecoder>> VideoDecoderExtManual for O {
} }
} }
#[doc(alias = "gst_video_decoder_set_latency")]
fn set_latency(&self, min_latency: gst::ClockTime, max_latency: gst::ClockTime) { fn set_latency(&self, min_latency: gst::ClockTime, max_latency: gst::ClockTime) {
unsafe { unsafe {
ffi::gst_video_decoder_set_latency( ffi::gst_video_decoder_set_latency(
@ -174,6 +180,7 @@ impl<O: IsA<VideoDecoder>> VideoDecoderExtManual for O {
} }
} }
#[doc(alias = "gst_video_decoder_get_frame")]
fn frame(&self, frame_number: i32) -> Option<VideoCodecFrame> { fn frame(&self, frame_number: i32) -> Option<VideoCodecFrame> {
let frame = unsafe { let frame = unsafe {
ffi::gst_video_decoder_get_frame(self.as_ref().to_glib_none().0, frame_number) ffi::gst_video_decoder_get_frame(self.as_ref().to_glib_none().0, frame_number)
@ -186,6 +193,7 @@ impl<O: IsA<VideoDecoder>> VideoDecoderExtManual for O {
} }
} }
#[doc(alias = "gst_video_decoder_get_frames")]
fn frames(&self) -> Vec<VideoCodecFrame> { fn frames(&self) -> Vec<VideoCodecFrame> {
unsafe { unsafe {
let frames = ffi::gst_video_decoder_get_frames(self.as_ref().to_glib_none().0); let frames = ffi::gst_video_decoder_get_frames(self.as_ref().to_glib_none().0);
@ -205,6 +213,7 @@ impl<O: IsA<VideoDecoder>> VideoDecoderExtManual for O {
} }
} }
#[doc(alias = "gst_video_decoder_get_oldest_frame")]
fn oldest_frame(&self) -> Option<VideoCodecFrame> { fn oldest_frame(&self) -> Option<VideoCodecFrame> {
let frame = let frame =
unsafe { ffi::gst_video_decoder_get_oldest_frame(self.as_ref().to_glib_none().0) }; unsafe { ffi::gst_video_decoder_get_oldest_frame(self.as_ref().to_glib_none().0) };
@ -216,6 +225,7 @@ impl<O: IsA<VideoDecoder>> VideoDecoderExtManual for O {
} }
} }
#[doc(alias = "gst_video_decoder_get_output_state")]
fn output_state(&self) -> Option<VideoCodecState<'static, Readable>> { fn output_state(&self) -> Option<VideoCodecState<'static, Readable>> {
let state = let state =
unsafe { ffi::gst_video_decoder_get_output_state(self.as_ref().to_glib_none().0) }; unsafe { ffi::gst_video_decoder_get_output_state(self.as_ref().to_glib_none().0) };
@ -227,6 +237,7 @@ impl<O: IsA<VideoDecoder>> VideoDecoderExtManual for O {
} }
} }
#[doc(alias = "gst_video_decoder_set_output_state")]
fn set_output_state( fn set_output_state(
&self, &self,
fmt: VideoFormat, fmt: VideoFormat,
@ -257,6 +268,7 @@ impl<O: IsA<VideoDecoder>> VideoDecoderExtManual for O {
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
#[doc(alias = "gst_video_decoder_set_interlaced_output_state")]
fn set_interlaced_output_state( fn set_interlaced_output_state(
&self, &self,
fmt: VideoFormat, fmt: VideoFormat,
@ -287,6 +299,7 @@ impl<O: IsA<VideoDecoder>> VideoDecoderExtManual for O {
} }
} }
#[doc(alias = "gst_video_decoder_negotiate")]
fn negotiate<'a>( fn negotiate<'a>(
&'a self, &'a self,
output_state: VideoCodecState<'a, InNegotiation<'a>>, output_state: VideoCodecState<'a, InNegotiation<'a>>,

View file

@ -12,6 +12,7 @@ use std::ptr;
pub trait VideoEncoderExtManual: 'static { pub trait VideoEncoderExtManual: 'static {
#[cfg(any(feature = "v1_12", feature = "dox"))] #[cfg(any(feature = "v1_12", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
#[doc(alias = "gst_video_encoder_allocate_output_frame")]
fn allocate_output_frame( fn allocate_output_frame(
&self, &self,
frame: &mut VideoCodecFrame, frame: &mut VideoCodecFrame,
@ -19,15 +20,20 @@ pub trait VideoEncoderExtManual: 'static {
) -> Result<gst::FlowSuccess, gst::FlowError>; ) -> Result<gst::FlowSuccess, gst::FlowError>;
#[doc(alias = "get_frame")] #[doc(alias = "get_frame")]
#[doc(alias = "gst_video_encoder_get_frame")]
fn frame(&self, frame_number: i32) -> Option<VideoCodecFrame>; fn frame(&self, frame_number: i32) -> Option<VideoCodecFrame>;
#[doc(alias = "get_frames")] #[doc(alias = "get_frames")]
#[doc(alias = "gst_video_encoder_get_frames")]
fn frames(&self) -> Vec<VideoCodecFrame>; fn frames(&self) -> Vec<VideoCodecFrame>;
#[doc(alias = "get_oldest_frame")] #[doc(alias = "get_oldest_frame")]
#[doc(alias = "gst_video_encoder_get_oldest_frame")]
fn oldest_frame(&self) -> Option<VideoCodecFrame>; fn oldest_frame(&self) -> Option<VideoCodecFrame>;
#[doc(alias = "get_allocator")] #[doc(alias = "get_allocator")]
#[doc(alias = "gst_video_encoder_get_allocator")]
fn allocator(&self) -> (Option<gst::Allocator>, gst::AllocationParams); fn allocator(&self) -> (Option<gst::Allocator>, gst::AllocationParams);
#[doc(alias = "gst_video_encoder_finish_frame")]
fn finish_frame( fn finish_frame(
&self, &self,
frame: Option<VideoCodecFrame>, frame: Option<VideoCodecFrame>,
@ -35,20 +41,26 @@ pub trait VideoEncoderExtManual: 'static {
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
#[doc(alias = "gst_video_encoder_finish_subframe")]
fn finish_subframe(&self, frame: &VideoCodecFrame) -> Result<gst::FlowSuccess, gst::FlowError>; fn finish_subframe(&self, frame: &VideoCodecFrame) -> Result<gst::FlowSuccess, gst::FlowError>;
#[doc(alias = "get_latency")] #[doc(alias = "get_latency")]
#[doc(alias = "gst_video_encoder_get_latency")]
fn latency(&self) -> (gst::ClockTime, gst::ClockTime); fn latency(&self) -> (gst::ClockTime, gst::ClockTime);
#[doc(alias = "gst_video_encoder_set_latency")]
fn set_latency(&self, min_latency: gst::ClockTime, max_latency: gst::ClockTime); fn set_latency(&self, min_latency: gst::ClockTime, max_latency: gst::ClockTime);
#[doc(alias = "get_output_state")] #[doc(alias = "get_output_state")]
#[doc(alias = "gst_video_encoder_get_output_state")]
fn output_state(&self) -> Option<VideoCodecState<'static, Readable>>; fn output_state(&self) -> Option<VideoCodecState<'static, Readable>>;
#[doc(alias = "gst_video_encoder_set_output_state")]
fn set_output_state( fn set_output_state(
&self, &self,
caps: gst::Caps, caps: gst::Caps,
reference: Option<&VideoCodecState<Readable>>, reference: Option<&VideoCodecState<Readable>>,
) -> Result<VideoCodecState<InNegotiation>, gst::FlowError>; ) -> Result<VideoCodecState<InNegotiation>, gst::FlowError>;
#[doc(alias = "gst_video_encoder_negotiate")]
fn negotiate<'a>( fn negotiate<'a>(
&'a self, &'a self,
output_state: VideoCodecState<'a, InNegotiation<'a>>, output_state: VideoCodecState<'a, InNegotiation<'a>>,

View file

@ -144,6 +144,7 @@ impl DownstreamForceKeyUnitEvent {
DownstreamForceKeyUnitEventBuilder::new() DownstreamForceKeyUnitEventBuilder::new()
} }
#[doc(alias = "gst_video_event_parse_downstream_force_key_unit")]
pub fn parse(event: &gst::EventRef) -> Result<Self, glib::error::BoolError> { pub fn parse(event: &gst::EventRef) -> Result<Self, glib::error::BoolError> {
skip_assert_initialized!(); skip_assert_initialized!();
unsafe { unsafe {
@ -237,6 +238,7 @@ impl UpstreamForceKeyUnitEvent {
UpstreamForceKeyUnitEventBuilder::new() UpstreamForceKeyUnitEventBuilder::new()
} }
#[doc(alias = "gst_video_event_parse_upstream_force_key_unit")]
pub fn parse(event: &gst::EventRef) -> Result<Self, glib::error::BoolError> { pub fn parse(event: &gst::EventRef) -> Result<Self, glib::error::BoolError> {
skip_assert_initialized!(); skip_assert_initialized!();
unsafe { unsafe {
@ -270,6 +272,7 @@ pub enum ForceKeyUnitEvent {
} }
impl ForceKeyUnitEvent { impl ForceKeyUnitEvent {
#[doc(alias = "gst_video_event_is_force_key_unit")]
pub fn is(event: &gst::EventRef) -> bool { pub fn is(event: &gst::EventRef) -> bool {
skip_assert_initialized!(); skip_assert_initialized!();
unsafe { from_glib(ffi::gst_video_event_is_force_key_unit(event.as_mut_ptr())) } unsafe { from_glib(ffi::gst_video_event_is_force_key_unit(event.as_mut_ptr())) }
@ -319,6 +322,7 @@ impl StillFrameEvent {
StillFrameEventBuilder::new(in_still) StillFrameEventBuilder::new(in_still)
} }
#[doc(alias = "gst_video_event_parse_still_frame")]
pub fn parse(event: &gst::EventRef) -> Result<Self, glib::error::BoolError> { pub fn parse(event: &gst::EventRef) -> Result<Self, glib::error::BoolError> {
skip_assert_initialized!(); skip_assert_initialized!();
unsafe { unsafe {

View file

@ -282,6 +282,7 @@ impl IntoGlib for VideoEndianness {
} }
impl crate::VideoFormat { impl crate::VideoFormat {
#[doc(alias = "gst_video_format_from_masks")]
pub fn from_masks( pub fn from_masks(
depth: u32, depth: u32,
bpp: u32, bpp: u32,
@ -306,6 +307,7 @@ impl crate::VideoFormat {
} }
} }
#[doc(alias = "gst_video_format_to_string")]
pub fn to_str<'a>(self) -> &'a str { pub fn to_str<'a>(self) -> &'a str {
if self == Self::Unknown { if self == Self::Unknown {
return "UNKNOWN"; return "UNKNOWN";

View file

@ -50,6 +50,7 @@ impl<T> VideoFrame<T> {
self.buffer.take().unwrap() self.buffer.take().unwrap()
} }
#[doc(alias = "gst_video_frame_copy")]
pub fn copy(&self, dest: &mut VideoFrame<Writable>) -> Result<(), glib::BoolError> { pub fn copy(&self, dest: &mut VideoFrame<Writable>) -> Result<(), glib::BoolError> {
unsafe { unsafe {
let res: bool = from_glib(ffi::gst_video_frame_copy(&mut dest.frame, &self.frame)); let res: bool = from_glib(ffi::gst_video_frame_copy(&mut dest.frame, &self.frame));
@ -61,6 +62,7 @@ impl<T> VideoFrame<T> {
} }
} }
#[doc(alias = "gst_video_frame_copy_plane")]
pub fn copy_plane( pub fn copy_plane(
&self, &self,
dest: &mut VideoFrame<Writable>, dest: &mut VideoFrame<Writable>,
@ -421,6 +423,7 @@ impl<T> VideoFrameRef<T> {
self.frame.id self.frame.id
} }
#[doc(alias = "gst_video_frame_copy")]
pub fn copy( pub fn copy(
&self, &self,
dest: &mut VideoFrameRef<&mut gst::BufferRef>, dest: &mut VideoFrameRef<&mut gst::BufferRef>,
@ -435,6 +438,7 @@ impl<T> VideoFrameRef<T> {
} }
} }
#[doc(alias = "gst_video_frame_copy_plane")]
pub fn copy_plane( pub fn copy_plane(
&self, &self,
dest: &mut VideoFrameRef<&mut gst::BufferRef>, dest: &mut VideoFrameRef<&mut gst::BufferRef>,

View file

@ -127,6 +127,7 @@ impl Clone for VideoColorimetry {
} }
impl PartialEq for VideoColorimetry { impl PartialEq for VideoColorimetry {
#[doc(alias = "gst_video_colorimetry_is_equal")]
fn eq(&self, other: &Self) -> bool { fn eq(&self, other: &Self) -> bool {
unsafe { from_glib(ffi::gst_video_colorimetry_is_equal(&self.0, &other.0)) } unsafe { from_glib(ffi::gst_video_colorimetry_is_equal(&self.0, &other.0)) }
} }
@ -137,6 +138,7 @@ impl Eq for VideoColorimetry {}
impl str::FromStr for crate::VideoColorimetry { impl str::FromStr for crate::VideoColorimetry {
type Err = glib::error::BoolError; type Err = glib::error::BoolError;
#[doc(alias = "gst_video_colorimetry_from_string")]
fn from_str(s: &str) -> Result<Self, Self::Err> { fn from_str(s: &str) -> Result<Self, Self::Err> {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
@ -175,6 +177,8 @@ impl fmt::Display for crate::VideoColorimetry {
} }
impl crate::VideoChromaSite { impl crate::VideoChromaSite {
#[doc(alias = "gst_video_chroma_site_to_string")]
#[doc(alias = "gst_video_chroma_to_string")]
pub fn to_str(self) -> glib::GString { pub fn to_str(self) -> glib::GString {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
@ -193,6 +197,7 @@ impl crate::VideoChromaSite {
impl str::FromStr for crate::VideoChromaSite { impl str::FromStr for crate::VideoChromaSite {
type Err = glib::error::BoolError; type Err = glib::error::BoolError;
#[doc(alias = "gst_video_chroma_from_string")]
fn from_str(s: &str) -> Result<Self, Self::Err> { fn from_str(s: &str) -> Result<Self, Self::Err> {
skip_assert_initialized!(); skip_assert_initialized!();
@ -598,6 +603,7 @@ impl VideoInfo {
!self.0.finfo.is_null() && self.0.width > 0 && self.0.height > 0 && self.0.size > 0 !self.0.finfo.is_null() && self.0.width > 0 && self.0.height > 0 && self.0.size > 0
} }
#[doc(alias = "gst_video_info_from_caps")]
pub fn from_caps(caps: &gst::CapsRef) -> Result<Self, glib::error::BoolError> { pub fn from_caps(caps: &gst::CapsRef) -> Result<Self, glib::error::BoolError> {
skip_assert_initialized!(); skip_assert_initialized!();
@ -614,6 +620,7 @@ impl VideoInfo {
} }
} }
#[doc(alias = "gst_video_info_to_caps")]
pub fn to_caps(&self) -> Result<gst::Caps, glib::error::BoolError> { pub fn to_caps(&self) -> Result<gst::Caps, glib::error::BoolError> {
unsafe { unsafe {
let result = from_glib_full(ffi::gst_video_info_to_caps(&self.0 as *const _ as *mut _)); let result = from_glib_full(ffi::gst_video_info_to_caps(&self.0 as *const _ as *mut _));
@ -745,6 +752,7 @@ impl VideoInfo {
self.format_info().n_components() self.format_info().n_components()
} }
#[doc(alias = "gst_video_info_convert")]
pub fn convert<V: Into<gst::GenericFormattedValue>, U: gst::SpecificFormattedValue>( pub fn convert<V: Into<gst::GenericFormattedValue>, U: gst::SpecificFormattedValue>(
&self, &self,
src_val: V, src_val: V,
@ -795,6 +803,7 @@ impl VideoInfo {
} }
} }
#[doc(alias = "gst_video_info_align")]
pub fn align(&mut self, align: &mut crate::VideoAlignment) -> Result<(), glib::BoolError> { pub fn align(&mut self, align: &mut crate::VideoAlignment) -> Result<(), glib::BoolError> {
cfg_if::cfg_if! { cfg_if::cfg_if! {
if #[cfg(feature = "v1_12")] { if #[cfg(feature = "v1_12")] {
@ -825,6 +834,7 @@ impl VideoInfo {
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
#[doc(alias = "gst_video_info_align_full")]
pub fn align_full( pub fn align_full(
&mut self, &mut self,
align: &mut crate::VideoAlignment, align: &mut crate::VideoAlignment,
@ -854,6 +864,7 @@ impl Clone for VideoInfo {
} }
impl PartialEq for VideoInfo { impl PartialEq for VideoInfo {
#[doc(alias = "gst_video_info_is_equal")]
fn eq(&self, other: &Self) -> bool { fn eq(&self, other: &Self) -> bool {
unsafe { from_glib(ffi::gst_video_info_is_equal(&self.0, &other.0)) } unsafe { from_glib(ffi::gst_video_info_is_equal(&self.0, &other.0)) }
} }
@ -965,6 +976,7 @@ impl glib::translate::FromGlibPtrFull<*mut ffi::GstVideoInfo> for VideoInfo {
#[cfg(any(feature = "v1_12", feature = "dox"))] #[cfg(any(feature = "v1_12", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
impl crate::VideoFieldOrder { impl crate::VideoFieldOrder {
#[doc(alias = "gst_video_field_order_to_string")]
pub fn to_str<'a>(self) -> &'a str { pub fn to_str<'a>(self) -> &'a str {
use std::ffi::CStr; use std::ffi::CStr;

View file

@ -13,6 +13,7 @@ unsafe impl Send for VideoMeta {}
unsafe impl Sync for VideoMeta {} unsafe impl Sync for VideoMeta {}
impl VideoMeta { impl VideoMeta {
#[doc(alias = "gst_buffer_add_video_meta")]
pub fn add( pub fn add(
buffer: &mut gst::BufferRef, buffer: &mut gst::BufferRef,
flags: crate::VideoFrameFlags, flags: crate::VideoFrameFlags,
@ -166,6 +167,7 @@ impl VideoMeta {
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
#[doc(alias = "get_plane_size")] #[doc(alias = "get_plane_size")]
#[doc(alias = "gst_video_meta_get_plane_size")]
pub fn plane_size(&self) -> Result<[usize; crate::VIDEO_MAX_PLANES], glib::BoolError> { pub fn plane_size(&self) -> Result<[usize; crate::VIDEO_MAX_PLANES], glib::BoolError> {
let mut plane_size = [0; crate::VIDEO_MAX_PLANES]; let mut plane_size = [0; crate::VIDEO_MAX_PLANES];
@ -185,6 +187,7 @@ impl VideoMeta {
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
#[doc(alias = "get_plane_height")] #[doc(alias = "get_plane_height")]
#[doc(alias = "gst_video_meta_get_plane_height")]
pub fn plane_height(&self) -> Result<[u32; crate::VIDEO_MAX_PLANES], glib::BoolError> { pub fn plane_height(&self) -> Result<[u32; crate::VIDEO_MAX_PLANES], glib::BoolError> {
let mut plane_height = [0; crate::VIDEO_MAX_PLANES]; let mut plane_height = [0; crate::VIDEO_MAX_PLANES];
@ -203,6 +206,7 @@ impl VideoMeta {
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
#[doc(alias = "gst_video_meta_set_alignment")]
pub fn set_alignment( pub fn set_alignment(
&mut self, &mut self,
alignment: &crate::VideoAlignment, alignment: &crate::VideoAlignment,
@ -219,6 +223,7 @@ impl VideoMeta {
unsafe impl MetaAPI for VideoMeta { unsafe impl MetaAPI for VideoMeta {
type GstType = ffi::GstVideoMeta; type GstType = ffi::GstVideoMeta;
#[doc(alias = "gst_video_meta_api_get_type")]
fn meta_api() -> glib::Type { fn meta_api() -> glib::Type {
unsafe { from_glib(ffi::gst_video_meta_api_get_type()) } unsafe { from_glib(ffi::gst_video_meta_api_get_type()) }
} }
@ -246,6 +251,7 @@ unsafe impl Send for VideoCropMeta {}
unsafe impl Sync for VideoCropMeta {} unsafe impl Sync for VideoCropMeta {}
impl VideoCropMeta { impl VideoCropMeta {
#[doc(alias = "gst_buffer_add_meta")]
pub fn add( pub fn add(
buffer: &mut gst::BufferRef, buffer: &mut gst::BufferRef,
rect: (u32, u32, u32, u32), rect: (u32, u32, u32, u32),
@ -286,6 +292,7 @@ impl VideoCropMeta {
unsafe impl MetaAPI for VideoCropMeta { unsafe impl MetaAPI for VideoCropMeta {
type GstType = ffi::GstVideoCropMeta; type GstType = ffi::GstVideoCropMeta;
#[doc(alias = "gst_video_crop_meta_api_get_type")]
fn meta_api() -> glib::Type { fn meta_api() -> glib::Type {
unsafe { from_glib(ffi::gst_video_crop_meta_api_get_type()) } unsafe { from_glib(ffi::gst_video_crop_meta_api_get_type()) }
} }
@ -306,6 +313,7 @@ unsafe impl Send for VideoRegionOfInterestMeta {}
unsafe impl Sync for VideoRegionOfInterestMeta {} unsafe impl Sync for VideoRegionOfInterestMeta {}
impl VideoRegionOfInterestMeta { impl VideoRegionOfInterestMeta {
#[doc(alias = "gst_buffer_add_video_region_of_interest_meta")]
pub fn add<'a>( pub fn add<'a>(
buffer: &'a mut gst::BufferRef, buffer: &'a mut gst::BufferRef,
roi_type: &str, roi_type: &str,
@ -377,6 +385,7 @@ impl VideoRegionOfInterestMeta {
} }
#[cfg(feature = "v1_14")] #[cfg(feature = "v1_14")]
#[doc(alias = "gst_video_region_of_interest_meta_add_param")]
pub fn add_param(&mut self, s: gst::Structure) { pub fn add_param(&mut self, s: gst::Structure) {
unsafe { unsafe {
ffi::gst_video_region_of_interest_meta_add_param(&mut self.0, s.into_ptr()); ffi::gst_video_region_of_interest_meta_add_param(&mut self.0, s.into_ptr());
@ -414,6 +423,7 @@ impl<'a> Iterator for ParamsIter<'a> {
unsafe impl MetaAPI for VideoRegionOfInterestMeta { unsafe impl MetaAPI for VideoRegionOfInterestMeta {
type GstType = ffi::GstVideoRegionOfInterestMeta; type GstType = ffi::GstVideoRegionOfInterestMeta;
#[doc(alias = "gst_video_region_of_interest_meta_api_get_type")]
fn meta_api() -> glib::Type { fn meta_api() -> glib::Type {
unsafe { from_glib(ffi::gst_video_region_of_interest_meta_api_get_type()) } unsafe { from_glib(ffi::gst_video_region_of_interest_meta_api_get_type()) }
} }
@ -444,6 +454,7 @@ unsafe impl Send for VideoAffineTransformationMeta {}
unsafe impl Sync for VideoAffineTransformationMeta {} unsafe impl Sync for VideoAffineTransformationMeta {}
impl VideoAffineTransformationMeta { impl VideoAffineTransformationMeta {
#[doc(alias = "gst_buffer_add_meta")]
pub fn add<'a>( pub fn add<'a>(
buffer: &'a mut gst::BufferRef, buffer: &'a mut gst::BufferRef,
matrix: Option<&[f32; 16]>, matrix: Option<&[f32; 16]>,
@ -474,6 +485,7 @@ impl VideoAffineTransformationMeta {
self.0.matrix.copy_from_slice(matrix); self.0.matrix.copy_from_slice(matrix);
} }
#[doc(alias = "gst_video_affine_transformation_meta_apply_matrix")]
pub fn apply_matrix(&mut self, matrix: &[f32; 16]) { pub fn apply_matrix(&mut self, matrix: &[f32; 16]) {
unsafe { unsafe {
ffi::gst_video_affine_transformation_meta_apply_matrix(&mut self.0, matrix); ffi::gst_video_affine_transformation_meta_apply_matrix(&mut self.0, matrix);
@ -484,6 +496,7 @@ impl VideoAffineTransformationMeta {
unsafe impl MetaAPI for VideoAffineTransformationMeta { unsafe impl MetaAPI for VideoAffineTransformationMeta {
type GstType = ffi::GstVideoAffineTransformationMeta; type GstType = ffi::GstVideoAffineTransformationMeta;
#[doc(alias = "gst_video_affine_transformation_meta_api_get_type")]
fn meta_api() -> glib::Type { fn meta_api() -> glib::Type {
unsafe { from_glib(ffi::gst_video_affine_transformation_meta_api_get_type()) } unsafe { from_glib(ffi::gst_video_affine_transformation_meta_api_get_type()) }
} }
@ -504,6 +517,7 @@ unsafe impl Send for VideoOverlayCompositionMeta {}
unsafe impl Sync for VideoOverlayCompositionMeta {} unsafe impl Sync for VideoOverlayCompositionMeta {}
impl VideoOverlayCompositionMeta { impl VideoOverlayCompositionMeta {
#[doc(alias = "gst_buffer_add_video_overlay_composition_meta")]
pub fn add<'a>( pub fn add<'a>(
buffer: &'a mut gst::BufferRef, buffer: &'a mut gst::BufferRef,
overlay: &crate::VideoOverlayComposition, overlay: &crate::VideoOverlayComposition,
@ -542,6 +556,7 @@ impl VideoOverlayCompositionMeta {
unsafe impl MetaAPI for VideoOverlayCompositionMeta { unsafe impl MetaAPI for VideoOverlayCompositionMeta {
type GstType = ffi::GstVideoOverlayCompositionMeta; type GstType = ffi::GstVideoOverlayCompositionMeta;
#[doc(alias = "gst_video_overlay_composition_meta_api_get_type")]
fn meta_api() -> glib::Type { fn meta_api() -> glib::Type {
unsafe { from_glib(ffi::gst_video_overlay_composition_meta_api_get_type()) } unsafe { from_glib(ffi::gst_video_overlay_composition_meta_api_get_type()) }
} }
@ -570,6 +585,7 @@ unsafe impl Sync for VideoCaptionMeta {}
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
impl VideoCaptionMeta { impl VideoCaptionMeta {
#[doc(alias = "gst_buffer_add_video_caption_meta")]
pub fn add<'a>( pub fn add<'a>(
buffer: &'a mut gst::BufferRef, buffer: &'a mut gst::BufferRef,
caption_type: crate::VideoCaptionType, caption_type: crate::VideoCaptionType,
@ -609,6 +625,7 @@ impl VideoCaptionMeta {
unsafe impl MetaAPI for VideoCaptionMeta { unsafe impl MetaAPI for VideoCaptionMeta {
type GstType = ffi::GstVideoCaptionMeta; type GstType = ffi::GstVideoCaptionMeta;
#[doc(alias = "gst_video_caption_meta_api_get_type")]
fn meta_api() -> glib::Type { fn meta_api() -> glib::Type {
unsafe { from_glib(ffi::gst_video_caption_meta_api_get_type()) } unsafe { from_glib(ffi::gst_video_caption_meta_api_get_type()) }
} }
@ -640,6 +657,7 @@ unsafe impl Sync for VideoAFDMeta {}
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
impl VideoAFDMeta { impl VideoAFDMeta {
#[doc(alias = "gst_buffer_add_video_afd_meta")]
pub fn add( pub fn add(
buffer: &mut gst::BufferRef, buffer: &mut gst::BufferRef,
field: u8, field: u8,
@ -681,6 +699,7 @@ impl VideoAFDMeta {
unsafe impl MetaAPI for VideoAFDMeta { unsafe impl MetaAPI for VideoAFDMeta {
type GstType = ffi::GstVideoAFDMeta; type GstType = ffi::GstVideoAFDMeta;
#[doc(alias = "gst_video_afd_meta_api_get_type")]
fn meta_api() -> glib::Type { fn meta_api() -> glib::Type {
unsafe { from_glib(ffi::gst_video_afd_meta_api_get_type()) } unsafe { from_glib(ffi::gst_video_afd_meta_api_get_type()) }
} }
@ -713,6 +732,7 @@ unsafe impl Sync for VideoBarMeta {}
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
impl VideoBarMeta { impl VideoBarMeta {
#[doc(alias = "gst_buffer_add_video_bar_meta")]
pub fn add( pub fn add(
buffer: &mut gst::BufferRef, buffer: &mut gst::BufferRef,
field: u8, field: u8,
@ -760,6 +780,7 @@ impl VideoBarMeta {
unsafe impl MetaAPI for VideoBarMeta { unsafe impl MetaAPI for VideoBarMeta {
type GstType = ffi::GstVideoBarMeta; type GstType = ffi::GstVideoBarMeta;
#[doc(alias = "gst_video_bar_meta_api_get_type")]
fn meta_api() -> glib::Type { fn meta_api() -> glib::Type {
unsafe { from_glib(ffi::gst_video_bar_meta_api_get_type()) } unsafe { from_glib(ffi::gst_video_bar_meta_api_get_type()) }
} }

View file

@ -21,6 +21,7 @@ impl<O: IsA<VideoOverlay>> VideoOverlayExtManual for O {
} }
} }
#[doc(alias = "gst_is_video_overlay_prepare_window_handle_message")]
pub fn is_video_overlay_prepare_window_handle_message(msg: &gst::MessageRef) -> bool { pub fn is_video_overlay_prepare_window_handle_message(msg: &gst::MessageRef) -> bool {
skip_assert_initialized!(); skip_assert_initialized!();
unsafe { unsafe {

View file

@ -29,6 +29,7 @@ impl fmt::Debug for VideoOverlayRectangleRef {
} }
impl VideoOverlayRectangle { impl VideoOverlayRectangle {
#[doc(alias = "gst_video_overlay_rectangle_new_raw")]
pub fn new_raw( pub fn new_raw(
buffer: &gst::Buffer, buffer: &gst::Buffer,
render_x: i32, render_x: i32,
@ -54,6 +55,7 @@ impl VideoOverlayRectangle {
impl VideoOverlayRectangleRef { impl VideoOverlayRectangleRef {
#[doc(alias = "get_flags")] #[doc(alias = "get_flags")]
#[doc(alias = "gst_video_overlay_rectangle_get_flags")]
pub fn flags(&self) -> crate::VideoOverlayFormatFlags { pub fn flags(&self) -> crate::VideoOverlayFormatFlags {
unsafe { unsafe {
from_glib(ffi::gst_video_overlay_rectangle_get_flags( from_glib(ffi::gst_video_overlay_rectangle_get_flags(
@ -63,20 +65,24 @@ impl VideoOverlayRectangleRef {
} }
#[doc(alias = "get_global_alpha")] #[doc(alias = "get_global_alpha")]
#[doc(alias = "gst_video_overlay_rectangle_get_global_alpha")]
pub fn global_alpha(&self) -> f32 { pub fn global_alpha(&self) -> f32 {
unsafe { ffi::gst_video_overlay_rectangle_get_global_alpha(self.as_mut_ptr()) } unsafe { ffi::gst_video_overlay_rectangle_get_global_alpha(self.as_mut_ptr()) }
} }
#[doc(alias = "gst_video_overlay_rectangle_set_global_alpha")]
pub fn set_global_alpha(&mut self, alpha: f32) { pub fn set_global_alpha(&mut self, alpha: f32) {
unsafe { ffi::gst_video_overlay_rectangle_set_global_alpha(self.as_mut_ptr(), alpha) } unsafe { ffi::gst_video_overlay_rectangle_set_global_alpha(self.as_mut_ptr(), alpha) }
} }
#[doc(alias = "get_seqnum")] #[doc(alias = "get_seqnum")]
#[doc(alias = "gst_video_overlay_rectangle_get_seqnum")]
pub fn seqnum(&self) -> u32 { pub fn seqnum(&self) -> u32 {
unsafe { ffi::gst_video_overlay_rectangle_get_seqnum(self.as_mut_ptr()) } unsafe { ffi::gst_video_overlay_rectangle_get_seqnum(self.as_mut_ptr()) }
} }
#[doc(alias = "get_render_rectangle")] #[doc(alias = "get_render_rectangle")]
#[doc(alias = "gst_video_overlay_rectangle_get_render_rectangle")]
pub fn render_rectangle(&self) -> (i32, i32, u32, u32) { pub fn render_rectangle(&self) -> (i32, i32, u32, u32) {
unsafe { unsafe {
let mut render_x = mem::MaybeUninit::uninit(); let mut render_x = mem::MaybeUninit::uninit();
@ -101,6 +107,7 @@ impl VideoOverlayRectangleRef {
} }
} }
#[doc(alias = "gst_video_overlay_rectangle_set_render_rectangle")]
pub fn set_render_rectangle( pub fn set_render_rectangle(
&mut self, &mut self,
render_x: i32, render_x: i32,
@ -120,6 +127,7 @@ impl VideoOverlayRectangleRef {
} }
#[doc(alias = "get_pixels_unscaled_raw")] #[doc(alias = "get_pixels_unscaled_raw")]
#[doc(alias = "gst_video_overlay_rectangle_get_pixels_unscaled_raw")]
pub fn pixels_unscaled_raw(&self, flags: crate::VideoOverlayFormatFlags) -> gst::Buffer { pub fn pixels_unscaled_raw(&self, flags: crate::VideoOverlayFormatFlags) -> gst::Buffer {
unsafe { unsafe {
from_glib_none(ffi::gst_video_overlay_rectangle_get_pixels_unscaled_raw( from_glib_none(ffi::gst_video_overlay_rectangle_get_pixels_unscaled_raw(
@ -130,6 +138,7 @@ impl VideoOverlayRectangleRef {
} }
#[doc(alias = "get_pixels_unscaled_ayuv")] #[doc(alias = "get_pixels_unscaled_ayuv")]
#[doc(alias = "gst_video_overlay_rectangle_get_pixels_unscaled_ayuv")]
pub fn pixels_unscaled_ayuv(&self, flags: crate::VideoOverlayFormatFlags) -> gst::Buffer { pub fn pixels_unscaled_ayuv(&self, flags: crate::VideoOverlayFormatFlags) -> gst::Buffer {
unsafe { unsafe {
from_glib_none(ffi::gst_video_overlay_rectangle_get_pixels_unscaled_ayuv( from_glib_none(ffi::gst_video_overlay_rectangle_get_pixels_unscaled_ayuv(
@ -140,6 +149,7 @@ impl VideoOverlayRectangleRef {
} }
#[doc(alias = "get_pixels_unscaled_argb")] #[doc(alias = "get_pixels_unscaled_argb")]
#[doc(alias = "gst_video_overlay_rectangle_get_pixels_unscaled_argb")]
pub fn pixels_unscaled_argb(&self, flags: crate::VideoOverlayFormatFlags) -> gst::Buffer { pub fn pixels_unscaled_argb(&self, flags: crate::VideoOverlayFormatFlags) -> gst::Buffer {
unsafe { unsafe {
from_glib_none(ffi::gst_video_overlay_rectangle_get_pixels_unscaled_argb( from_glib_none(ffi::gst_video_overlay_rectangle_get_pixels_unscaled_argb(
@ -150,6 +160,7 @@ impl VideoOverlayRectangleRef {
} }
#[doc(alias = "get_pixels_raw")] #[doc(alias = "get_pixels_raw")]
#[doc(alias = "gst_video_overlay_rectangle_get_pixels_raw")]
pub fn pixels_raw(&self, flags: crate::VideoOverlayFormatFlags) -> gst::Buffer { pub fn pixels_raw(&self, flags: crate::VideoOverlayFormatFlags) -> gst::Buffer {
unsafe { unsafe {
from_glib_none(ffi::gst_video_overlay_rectangle_get_pixels_raw( from_glib_none(ffi::gst_video_overlay_rectangle_get_pixels_raw(
@ -160,6 +171,7 @@ impl VideoOverlayRectangleRef {
} }
#[doc(alias = "get_pixels_ayuv")] #[doc(alias = "get_pixels_ayuv")]
#[doc(alias = "gst_video_overlay_rectangle_get_pixels_ayuv")]
pub fn pixels_ayuv(&self, flags: crate::VideoOverlayFormatFlags) -> gst::Buffer { pub fn pixels_ayuv(&self, flags: crate::VideoOverlayFormatFlags) -> gst::Buffer {
unsafe { unsafe {
from_glib_none(ffi::gst_video_overlay_rectangle_get_pixels_ayuv( from_glib_none(ffi::gst_video_overlay_rectangle_get_pixels_ayuv(
@ -170,6 +182,7 @@ impl VideoOverlayRectangleRef {
} }
#[doc(alias = "get_pixels_argb")] #[doc(alias = "get_pixels_argb")]
#[doc(alias = "gst_video_overlay_rectangle_get_pixels_argb")]
pub fn pixels_argb(&self, flags: crate::VideoOverlayFormatFlags) -> gst::Buffer { pub fn pixels_argb(&self, flags: crate::VideoOverlayFormatFlags) -> gst::Buffer {
unsafe { unsafe {
from_glib_none(ffi::gst_video_overlay_rectangle_get_pixels_argb( from_glib_none(ffi::gst_video_overlay_rectangle_get_pixels_argb(
@ -200,6 +213,7 @@ impl fmt::Debug for VideoOverlayCompositionRef {
} }
impl VideoOverlayComposition { impl VideoOverlayComposition {
#[doc(alias = "gst_video_overlay_composition_new")]
pub fn new<'a, T: IntoIterator<Item = &'a VideoOverlayRectangle>>( pub fn new<'a, T: IntoIterator<Item = &'a VideoOverlayRectangle>>(
rects: T, rects: T,
) -> Result<Self, glib::error::BoolError> { ) -> Result<Self, glib::error::BoolError> {
@ -232,11 +246,13 @@ impl VideoOverlayComposition {
} }
impl VideoOverlayCompositionRef { impl VideoOverlayCompositionRef {
#[doc(alias = "gst_video_overlay_composition_n_rectangles")]
pub fn n_rectangles(&self) -> u32 { pub fn n_rectangles(&self) -> u32 {
unsafe { ffi::gst_video_overlay_composition_n_rectangles(self.as_mut_ptr()) } unsafe { ffi::gst_video_overlay_composition_n_rectangles(self.as_mut_ptr()) }
} }
#[doc(alias = "get_rectangle")] #[doc(alias = "get_rectangle")]
#[doc(alias = "gst_video_overlay_composition_get_rectangle")]
pub fn rectangle(&self, idx: u32) -> Result<VideoOverlayRectangle, glib::error::BoolError> { pub fn rectangle(&self, idx: u32) -> Result<VideoOverlayRectangle, glib::error::BoolError> {
if idx >= self.n_rectangles() { if idx >= self.n_rectangles() {
return Err(glib::bool_error!("Invalid index")); return Err(glib::bool_error!("Invalid index"));
@ -254,10 +270,12 @@ impl VideoOverlayCompositionRef {
} }
#[doc(alias = "get_seqnum")] #[doc(alias = "get_seqnum")]
#[doc(alias = "gst_video_overlay_composition_get_seqnum")]
pub fn seqnum(&self) -> u32 { pub fn seqnum(&self) -> u32 {
unsafe { ffi::gst_video_overlay_composition_get_seqnum(self.as_mut_ptr()) } unsafe { ffi::gst_video_overlay_composition_get_seqnum(self.as_mut_ptr()) }
} }
#[doc(alias = "gst_video_overlay_composition_blend")]
pub fn blend( pub fn blend(
&self, &self,
frame: &mut crate::VideoFrameRef<&mut gst::BufferRef>, frame: &mut crate::VideoFrameRef<&mut gst::BufferRef>,

View file

@ -62,6 +62,7 @@ impl VideoTimeCode {
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
#[doc(alias = "gst_video_time_code_init_from_date_time_full")]
pub fn from_date_time( pub fn from_date_time(
fps: gst::Fraction, fps: gst::Fraction,
dt: &glib::DateTime, dt: &glib::DateTime,
@ -89,6 +90,7 @@ impl VideoTimeCode {
} }
} }
#[doc(alias = "gst_video_time_code_is_valid")]
pub fn is_valid(&self) -> bool { pub fn is_valid(&self) -> bool {
unsafe { from_glib(ffi::gst_video_time_code_is_valid(self.to_glib_none().0)) } unsafe { from_glib(ffi::gst_video_time_code_is_valid(self.to_glib_none().0)) }
} }
@ -183,6 +185,7 @@ impl ValidVideoTimeCode {
// tc.and_then(|tc| tc.try_into().ok()) // tc.and_then(|tc| tc.try_into().ok())
// } // }
#[doc(alias = "gst_video_time_code_add_frames")]
pub fn add_frames(&mut self, frames: i64) { pub fn add_frames(&mut self, frames: i64) {
skip_assert_initialized!(); skip_assert_initialized!();
unsafe { unsafe {
@ -192,6 +195,7 @@ impl ValidVideoTimeCode {
#[cfg(any(feature = "v1_12", feature = "dox"))] #[cfg(any(feature = "v1_12", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
#[doc(alias = "gst_video_time_code_add_interval")]
pub fn add_interval( pub fn add_interval(
&self, &self,
tc_inter: &VideoTimeCodeInterval, tc_inter: &VideoTimeCodeInterval,
@ -207,24 +211,29 @@ impl ValidVideoTimeCode {
} }
} }
#[doc(alias = "gst_video_time_code_compare")]
fn compare(&self, tc2: &Self) -> i32 { fn compare(&self, tc2: &Self) -> i32 {
unsafe { ffi::gst_video_time_code_compare(self.to_glib_none().0, tc2.to_glib_none().0) } unsafe { ffi::gst_video_time_code_compare(self.to_glib_none().0, tc2.to_glib_none().0) }
} }
#[doc(alias = "gst_video_time_code_frames_since_daily_jam")]
pub fn frames_since_daily_jam(&self) -> u64 { pub fn frames_since_daily_jam(&self) -> u64 {
unsafe { ffi::gst_video_time_code_frames_since_daily_jam(self.to_glib_none().0) } unsafe { ffi::gst_video_time_code_frames_since_daily_jam(self.to_glib_none().0) }
} }
#[doc(alias = "gst_video_time_code_increment_frame")]
pub fn increment_frame(&mut self) { pub fn increment_frame(&mut self) {
unsafe { unsafe {
ffi::gst_video_time_code_increment_frame(self.to_glib_none_mut().0); ffi::gst_video_time_code_increment_frame(self.to_glib_none_mut().0);
} }
} }
#[doc(alias = "gst_video_time_code_nsec_since_daily_jam")]
pub fn nsec_since_daily_jam(&self) -> u64 { pub fn nsec_since_daily_jam(&self) -> u64 {
unsafe { ffi::gst_video_time_code_nsec_since_daily_jam(self.to_glib_none().0) } unsafe { ffi::gst_video_time_code_nsec_since_daily_jam(self.to_glib_none().0) }
} }
#[doc(alias = "gst_video_time_code_to_date_time")]
pub fn to_date_time(&self) -> Result<glib::DateTime, glib::error::BoolError> { pub fn to_date_time(&self) -> Result<glib::DateTime, glib::error::BoolError> {
unsafe { unsafe {
match from_glib_full(ffi::gst_video_time_code_to_date_time(self.to_glib_none().0)) { match from_glib_full(ffi::gst_video_time_code_to_date_time(self.to_glib_none().0)) {
@ -485,6 +494,7 @@ generic_impl!(ValidVideoTimeCode);
impl str::FromStr for VideoTimeCode { impl str::FromStr for VideoTimeCode {
type Err = glib::error::BoolError; type Err = glib::error::BoolError;
#[doc(alias = "gst_video_time_code_new_from_string")]
fn from_str(s: &str) -> Result<Self, Self::Err> { fn from_str(s: &str) -> Result<Self, Self::Err> {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
unsafe { unsafe {
@ -537,6 +547,7 @@ unsafe impl Send for VideoTimeCodeMeta {}
unsafe impl Sync for VideoTimeCodeMeta {} unsafe impl Sync for VideoTimeCodeMeta {}
impl VideoTimeCodeMeta { impl VideoTimeCodeMeta {
#[doc(alias = "gst_buffer_add_video_time_code_meta")]
pub fn add<'a>( pub fn add<'a>(
buffer: &'a mut gst::BufferRef, buffer: &'a mut gst::BufferRef,
tc: &ValidVideoTimeCode, tc: &ValidVideoTimeCode,
@ -573,6 +584,7 @@ impl VideoTimeCodeMeta {
unsafe impl MetaAPI for VideoTimeCodeMeta { unsafe impl MetaAPI for VideoTimeCodeMeta {
type GstType = ffi::GstVideoTimeCodeMeta; type GstType = ffi::GstVideoTimeCodeMeta;
#[doc(alias = "gst_video_time_code_meta_api_get_type")]
fn meta_api() -> glib::Type { fn meta_api() -> glib::Type {
unsafe { from_glib(ffi::gst_video_time_code_meta_api_get_type()) } unsafe { from_glib(ffi::gst_video_time_code_meta_api_get_type()) }
} }

View file

@ -117,6 +117,7 @@ impl fmt::Display for VideoTimeCodeInterval {
impl str::FromStr for VideoTimeCodeInterval { impl str::FromStr for VideoTimeCodeInterval {
type Err = glib::error::BoolError; type Err = glib::error::BoolError;
#[doc(alias = "gst_video_time_code_interval_new_from_string")]
fn from_str(s: &str) -> Result<Self, Self::Err> { fn from_str(s: &str) -> Result<Self, Self::Err> {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
unsafe { unsafe {

View file

@ -4,6 +4,7 @@ use crate::WebRTCDataChannel;
use glib::translate::*; use glib::translate::*;
impl WebRTCDataChannel { impl WebRTCDataChannel {
#[doc(alias = "gst_webrtc_data_channel_on_error")]
pub fn on_error(&self, error: glib::Error) { pub fn on_error(&self, error: glib::Error) {
unsafe { unsafe {
ffi::gst_webrtc_data_channel_on_error(self.to_glib_none().0, error.into_raw()); ffi::gst_webrtc_data_channel_on_error(self.to_glib_none().0, error.into_raw());

View file

@ -6,6 +6,7 @@ use glib::translate::*;
use std::mem; use std::mem;
impl WebRTCSessionDescription { impl WebRTCSessionDescription {
#[doc(alias = "gst_webrtc_session_description_new")]
pub fn new(type_: WebRTCSDPType, sdp: gst_sdp::SDPMessage) -> WebRTCSessionDescription { pub fn new(type_: WebRTCSDPType, sdp: gst_sdp::SDPMessage) -> WebRTCSessionDescription {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
unsafe { unsafe {

View file

@ -26,12 +26,19 @@ pub trait GstBinExtManual: 'static {
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
#[doc(alias = "gst_bin_iterate_all_by_element_factory_name")]
fn iterate_all_by_element_factory_name(&self, factory_name: &str) -> crate::Iterator<Element>; fn iterate_all_by_element_factory_name(&self, factory_name: &str) -> crate::Iterator<Element>;
#[doc(alias = "gst_bin_iterate_all_by_interface")]
fn iterate_all_by_interface(&self, iface: glib::types::Type) -> crate::Iterator<Element>; fn iterate_all_by_interface(&self, iface: glib::types::Type) -> crate::Iterator<Element>;
#[doc(alias = "gst_bin_iterate_elements")]
fn iterate_elements(&self) -> crate::Iterator<Element>; fn iterate_elements(&self) -> crate::Iterator<Element>;
#[doc(alias = "gst_bin_iterate_recurse")]
fn iterate_recurse(&self) -> crate::Iterator<Element>; fn iterate_recurse(&self) -> crate::Iterator<Element>;
#[doc(alias = "gst_bin_iterate_sinks")]
fn iterate_sinks(&self) -> crate::Iterator<Element>; fn iterate_sinks(&self) -> crate::Iterator<Element>;
#[doc(alias = "gst_bin_iterate_sorted")]
fn iterate_sorted(&self) -> crate::Iterator<Element>; fn iterate_sorted(&self) -> crate::Iterator<Element>;
#[doc(alias = "gst_bin_iterate_sources")]
fn iterate_sources(&self) -> crate::Iterator<Element>; fn iterate_sources(&self) -> crate::Iterator<Element>;
#[doc(alias = "get_children")] #[doc(alias = "get_children")]
fn children(&self) -> Vec<Element>; fn children(&self) -> Vec<Element>;

View file

@ -39,6 +39,7 @@ pub struct MappedBuffer<T> {
} }
impl Buffer { impl Buffer {
#[doc(alias = "gst_buffer_new")]
pub fn new() -> Self { pub fn new() -> Self {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
@ -155,6 +156,7 @@ impl Buffer {
BufferCursor::new_writable(self) BufferCursor::new_writable(self)
} }
#[doc(alias = "gst_buffer_append")]
pub fn append(&mut self, other: Self) { pub fn append(&mut self, other: Self) {
skip_assert_initialized!(); skip_assert_initialized!();
unsafe { unsafe {
@ -208,6 +210,7 @@ impl BufferRef {
} }
} }
#[doc(alias = "gst_buffer_copy_region")]
pub fn copy_region( pub fn copy_region(
&self, &self,
flags: crate::BufferCopyFlags, flags: crate::BufferCopyFlags,
@ -226,6 +229,7 @@ impl BufferRef {
} }
} }
#[doc(alias = "gst_buffer_copy_into")]
pub fn copy_into( pub fn copy_into(
&self, &self,
dest: &mut BufferRef, dest: &mut BufferRef,
@ -289,6 +293,7 @@ impl BufferRef {
} }
} }
#[doc(alias = "gst_buffer_copy_deep")]
pub fn copy_deep(&self) -> Result<Buffer, glib::BoolError> { pub fn copy_deep(&self) -> Result<Buffer, glib::BoolError> {
unsafe { unsafe {
Option::<_>::from_glib_full(ffi::gst_buffer_copy_deep(self.as_ptr())) Option::<_>::from_glib_full(ffi::gst_buffer_copy_deep(self.as_ptr()))
@ -297,6 +302,7 @@ impl BufferRef {
} }
#[doc(alias = "get_size")] #[doc(alias = "get_size")]
#[doc(alias = "gst_buffer_get_size")]
pub fn size(&self) -> usize { pub fn size(&self) -> usize {
unsafe { ffi::gst_buffer_get_size(self.as_mut_ptr()) } unsafe { ffi::gst_buffer_get_size(self.as_mut_ptr()) }
} }
@ -317,6 +323,7 @@ impl BufferRef {
} }
} }
#[doc(alias = "gst_buffer_set_size")]
pub fn set_size(&mut self, size: usize) { pub fn set_size(&mut self, size: usize) {
assert!(self.maxsize() >= size); assert!(self.maxsize() >= size);
@ -394,6 +401,7 @@ impl BufferRef {
} }
#[doc(alias = "get_meta")] #[doc(alias = "get_meta")]
#[doc(alias = "gst_buffer_get_meta")]
pub fn meta<T: MetaAPI>(&self) -> Option<MetaRef<T>> { pub fn meta<T: MetaAPI>(&self) -> Option<MetaRef<T>> {
unsafe { unsafe {
let meta = ffi::gst_buffer_get_meta(self.as_mut_ptr(), T::meta_api().into_glib()); let meta = ffi::gst_buffer_get_meta(self.as_mut_ptr(), T::meta_api().into_glib());
@ -425,6 +433,7 @@ impl BufferRef {
MetaIterMut::new(self) MetaIterMut::new(self)
} }
#[doc(alias = "gst_buffer_foreach_meta")]
pub fn foreach_meta<F: FnMut(MetaRef<Meta>) -> bool>(&self, func: F) -> bool { pub fn foreach_meta<F: FnMut(MetaRef<Meta>) -> bool>(&self, func: F) -> bool {
unsafe extern "C" fn trampoline<F: FnMut(MetaRef<Meta>) -> bool>( unsafe extern "C" fn trampoline<F: FnMut(MetaRef<Meta>) -> bool>(
buffer: *mut ffi::GstBuffer, buffer: *mut ffi::GstBuffer,
@ -484,10 +493,12 @@ impl BufferRef {
} }
} }
#[doc(alias = "gst_buffer_append_memory")]
pub fn append_memory(&mut self, mem: Memory) { pub fn append_memory(&mut self, mem: Memory) {
unsafe { ffi::gst_buffer_append_memory(self.as_mut_ptr(), mem.into_ptr()) } unsafe { ffi::gst_buffer_append_memory(self.as_mut_ptr(), mem.into_ptr()) }
} }
#[doc(alias = "gst_buffer_find_memory")]
pub fn find_memory(&self, offset: usize, size: Option<usize>) -> Option<(u32, u32, usize)> { pub fn find_memory(&self, offset: usize, size: Option<usize>) -> Option<(u32, u32, usize)> {
unsafe { unsafe {
let mut idx = mem::MaybeUninit::uninit(); let mut idx = mem::MaybeUninit::uninit();
@ -512,6 +523,7 @@ impl BufferRef {
} }
#[doc(alias = "get_all_memory")] #[doc(alias = "get_all_memory")]
#[doc(alias = "gst_buffer_get_all_memory")]
pub fn all_memory(&self) -> Option<Memory> { pub fn all_memory(&self) -> Option<Memory> {
unsafe { unsafe {
let res = ffi::gst_buffer_get_all_memory(self.as_mut_ptr()); let res = ffi::gst_buffer_get_all_memory(self.as_mut_ptr());
@ -524,11 +536,13 @@ impl BufferRef {
} }
#[doc(alias = "get_max_memory")] #[doc(alias = "get_max_memory")]
#[doc(alias = "gst_buffer_get_max_memory")]
pub fn max_memory() -> u32 { pub fn max_memory() -> u32 {
unsafe { ffi::gst_buffer_get_max_memory() } unsafe { ffi::gst_buffer_get_max_memory() }
} }
#[doc(alias = "get_memory")] #[doc(alias = "get_memory")]
#[doc(alias = "gst_buffer_get_memory")]
pub fn memory(&self, idx: u32) -> Option<Memory> { pub fn memory(&self, idx: u32) -> Option<Memory> {
if idx >= self.n_memory() { if idx >= self.n_memory() {
None None
@ -545,6 +559,7 @@ impl BufferRef {
} }
#[doc(alias = "get_memory_range")] #[doc(alias = "get_memory_range")]
#[doc(alias = "gst_buffer_get_memory_range")]
pub fn memory_range(&self, idx: u32, length: Option<u32>) -> Option<Memory> { pub fn memory_range(&self, idx: u32, length: Option<u32>) -> Option<Memory> {
assert!(idx + length.unwrap_or(0) < self.n_memory()); assert!(idx + length.unwrap_or(0) < self.n_memory());
unsafe { unsafe {
@ -564,6 +579,7 @@ impl BufferRef {
} }
} }
#[doc(alias = "gst_buffer_insert_memory")]
pub fn insert_memory(&mut self, idx: Option<u32>, mem: Memory) { pub fn insert_memory(&mut self, idx: Option<u32>, mem: Memory) {
unsafe { unsafe {
ffi::gst_buffer_insert_memory( ffi::gst_buffer_insert_memory(
@ -577,10 +593,12 @@ impl BufferRef {
} }
} }
#[doc(alias = "gst_buffer_is_all_memory_writable")]
pub fn is_all_memory_writable(&self) -> bool { pub fn is_all_memory_writable(&self) -> bool {
unsafe { from_glib(ffi::gst_buffer_is_all_memory_writable(self.as_mut_ptr())) } unsafe { from_glib(ffi::gst_buffer_is_all_memory_writable(self.as_mut_ptr())) }
} }
#[doc(alias = "gst_buffer_is_memory_range_writable")]
pub fn is_memory_range_writable(&self, idx: u32, length: Option<u16>) -> bool { pub fn is_memory_range_writable(&self, idx: u32, length: Option<u16>) -> bool {
unsafe { unsafe {
from_glib(ffi::gst_buffer_is_memory_range_writable( from_glib(ffi::gst_buffer_is_memory_range_writable(
@ -594,10 +612,12 @@ impl BufferRef {
} }
} }
#[doc(alias = "gst_buffer_n_memory")]
pub fn n_memory(&self) -> u32 { pub fn n_memory(&self) -> u32 {
unsafe { ffi::gst_buffer_n_memory(self.as_ptr() as *mut _) } unsafe { ffi::gst_buffer_n_memory(self.as_ptr() as *mut _) }
} }
#[doc(alias = "gst_buffer_peek_memory")]
pub fn peek_memory(&self, idx: u32) -> &MemoryRef { pub fn peek_memory(&self, idx: u32) -> &MemoryRef {
assert!(idx < self.n_memory()); assert!(idx < self.n_memory());
unsafe { MemoryRef::from_ptr(ffi::gst_buffer_peek_memory(self.as_mut_ptr(), idx)) } unsafe { MemoryRef::from_ptr(ffi::gst_buffer_peek_memory(self.as_mut_ptr(), idx)) }
@ -618,19 +638,23 @@ impl BufferRef {
} }
} }
#[doc(alias = "gst_buffer_prepend_memory")]
pub fn prepend_memory(&mut self, mem: Memory) { pub fn prepend_memory(&mut self, mem: Memory) {
unsafe { ffi::gst_buffer_prepend_memory(self.as_mut_ptr(), mem.into_ptr()) } unsafe { ffi::gst_buffer_prepend_memory(self.as_mut_ptr(), mem.into_ptr()) }
} }
#[doc(alias = "gst_buffer_remove_all_memory")]
pub fn remove_all_memory(&mut self) { pub fn remove_all_memory(&mut self) {
unsafe { ffi::gst_buffer_remove_all_memory(self.as_mut_ptr()) } unsafe { ffi::gst_buffer_remove_all_memory(self.as_mut_ptr()) }
} }
#[doc(alias = "gst_buffer_remove_memory")]
pub fn remove_memory(&mut self, idx: u32) { pub fn remove_memory(&mut self, idx: u32) {
assert!(idx < self.n_memory()); assert!(idx < self.n_memory());
unsafe { ffi::gst_buffer_remove_memory(self.as_mut_ptr(), idx) } unsafe { ffi::gst_buffer_remove_memory(self.as_mut_ptr(), idx) }
} }
#[doc(alias = "gst_buffer_remove_memory_range")]
pub fn remove_memory_range(&mut self, idx: u32, length: Option<u32>) { pub fn remove_memory_range(&mut self, idx: u32, length: Option<u32>) {
assert!(idx + length.unwrap_or(0) < self.n_memory()); assert!(idx + length.unwrap_or(0) < self.n_memory());
unsafe { unsafe {
@ -645,15 +669,18 @@ impl BufferRef {
} }
} }
#[doc(alias = "gst_buffer_replace_all_memory")]
pub fn replace_all_memory(&mut self, mem: Memory) { pub fn replace_all_memory(&mut self, mem: Memory) {
unsafe { ffi::gst_buffer_replace_all_memory(self.as_mut_ptr(), mem.into_ptr()) } unsafe { ffi::gst_buffer_replace_all_memory(self.as_mut_ptr(), mem.into_ptr()) }
} }
#[doc(alias = "gst_buffer_replace_memory")]
pub fn replace_memory(&mut self, idx: u32, mem: Memory) { pub fn replace_memory(&mut self, idx: u32, mem: Memory) {
assert!(idx < self.n_memory()); assert!(idx < self.n_memory());
unsafe { ffi::gst_buffer_replace_memory(self.as_mut_ptr(), idx, mem.into_ptr()) } unsafe { ffi::gst_buffer_replace_memory(self.as_mut_ptr(), idx, mem.into_ptr()) }
} }
#[doc(alias = "gst_buffer_replace_memory_range")]
pub fn replace_memory_range(&mut self, idx: u32, length: Option<u32>, mem: Memory) { pub fn replace_memory_range(&mut self, idx: u32, length: Option<u32>, mem: Memory) {
assert!(idx + length.unwrap_or(0) < self.n_memory()); assert!(idx + length.unwrap_or(0) < self.n_memory());
unsafe { unsafe {

View file

@ -42,6 +42,7 @@ impl AsMut<crate::StructureRef> for BufferPoolConfig {
} }
impl BufferPoolConfig { impl BufferPoolConfig {
#[doc(alias = "gst_buffer_pool_config_add_option")]
pub fn add_option(&mut self, option: &str) { pub fn add_option(&mut self, option: &str) {
unsafe { unsafe {
ffi::gst_buffer_pool_config_add_option( ffi::gst_buffer_pool_config_add_option(
@ -51,6 +52,7 @@ impl BufferPoolConfig {
} }
} }
#[doc(alias = "gst_buffer_pool_config_has_option")]
pub fn has_option(&self, option: &str) -> bool { pub fn has_option(&self, option: &str) -> bool {
unsafe { unsafe {
from_glib(ffi::gst_buffer_pool_config_has_option( from_glib(ffi::gst_buffer_pool_config_has_option(
@ -61,6 +63,7 @@ impl BufferPoolConfig {
} }
#[doc(alias = "get_options")] #[doc(alias = "get_options")]
#[doc(alias = "gst_buffer_pool_config_n_options")]
pub fn options(&self) -> Vec<String> { pub fn options(&self) -> Vec<String> {
unsafe { unsafe {
let n = ffi::gst_buffer_pool_config_n_options(self.0.to_glib_none().0) as usize; let n = ffi::gst_buffer_pool_config_n_options(self.0.to_glib_none().0) as usize;
@ -77,6 +80,7 @@ impl BufferPoolConfig {
} }
} }
#[doc(alias = "gst_buffer_pool_config_set_params")]
pub fn set_params( pub fn set_params(
&mut self, &mut self,
caps: Option<&crate::Caps>, caps: Option<&crate::Caps>,
@ -96,6 +100,7 @@ impl BufferPoolConfig {
} }
#[doc(alias = "get_params")] #[doc(alias = "get_params")]
#[doc(alias = "gst_buffer_pool_config_get_params")]
pub fn params(&self) -> Option<(Option<crate::Caps>, u32, u32, u32)> { pub fn params(&self) -> Option<(Option<crate::Caps>, u32, u32, u32)> {
unsafe { unsafe {
let mut caps = ptr::null_mut(); let mut caps = ptr::null_mut();
@ -123,6 +128,7 @@ impl BufferPoolConfig {
} }
} }
#[doc(alias = "gst_buffer_pool_config_validate_params")]
pub fn validate_params( pub fn validate_params(
&self, &self,
caps: Option<&crate::Caps>, caps: Option<&crate::Caps>,
@ -145,6 +151,7 @@ impl BufferPoolConfig {
} }
#[doc(alias = "get_allocator")] #[doc(alias = "get_allocator")]
#[doc(alias = "gst_buffer_pool_config_get_allocator")]
pub fn allocator(&self) -> Option<(Option<Allocator>, AllocationParams)> { pub fn allocator(&self) -> Option<(Option<Allocator>, AllocationParams)> {
unsafe { unsafe {
let mut allocator = ptr::null_mut(); let mut allocator = ptr::null_mut();
@ -162,6 +169,7 @@ impl BufferPoolConfig {
} }
} }
#[doc(alias = "gst_buffer_pool_config_set_allocator")]
pub fn set_allocator(&self, allocator: Option<&Allocator>, params: Option<&AllocationParams>) { pub fn set_allocator(&self, allocator: Option<&Allocator>, params: Option<&AllocationParams>) {
assert!(allocator.is_some() || params.is_some()); assert!(allocator.is_some() || params.is_some());
unsafe { unsafe {
@ -263,6 +271,7 @@ impl<'a> ToGlibPtrMut<'a, *mut ffi::GstBufferPoolAcquireParams> for BufferPoolAc
} }
impl BufferPool { impl BufferPool {
#[doc(alias = "gst_buffer_pool_new")]
pub fn new() -> BufferPool { pub fn new() -> BufferPool {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
let (major, minor, _, _) = crate::version(); let (major, minor, _, _) = crate::version();
@ -283,15 +292,19 @@ impl Default for BufferPool {
pub trait BufferPoolExtManual: 'static { pub trait BufferPoolExtManual: 'static {
#[doc(alias = "get_config")] #[doc(alias = "get_config")]
#[doc(alias = "gst_buffer_pool_get_config")]
fn config(&self) -> BufferPoolConfig; fn config(&self) -> BufferPoolConfig;
#[doc(alias = "gst_buffer_pool_set_config")]
fn set_config(&self, config: BufferPoolConfig) -> Result<(), glib::error::BoolError>; fn set_config(&self, config: BufferPoolConfig) -> Result<(), glib::error::BoolError>;
fn is_flushing(&self) -> bool; fn is_flushing(&self) -> bool;
#[doc(alias = "gst_buffer_pool_acquire_buffer")]
fn acquire_buffer( fn acquire_buffer(
&self, &self,
params: Option<&BufferPoolAcquireParams>, params: Option<&BufferPoolAcquireParams>,
) -> Result<crate::Buffer, crate::FlowError>; ) -> Result<crate::Buffer, crate::FlowError>;
#[doc(alias = "gst_buffer_pool_release_buffer")]
fn release_buffer(&self, buffer: crate::Buffer); fn release_buffer(&self, buffer: crate::Buffer);
} }

View file

@ -12,11 +12,13 @@ mini_object_wrapper!(BufferList, BufferListRef, ffi::GstBufferList, || {
}); });
impl BufferList { impl BufferList {
#[doc(alias = "gst_buffer_list_new")]
pub fn new() -> Self { pub fn new() -> Self {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
unsafe { from_glib_full(ffi::gst_buffer_list_new()) } unsafe { from_glib_full(ffi::gst_buffer_list_new()) }
} }
#[doc(alias = "gst_buffer_list_new_sized")]
pub fn new_sized(size: usize) -> Self { pub fn new_sized(size: usize) -> Self {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
unsafe { from_glib_full(ffi::gst_buffer_list_new_sized(size as u32)) } unsafe { from_glib_full(ffi::gst_buffer_list_new_sized(size as u32)) }
@ -24,6 +26,7 @@ impl BufferList {
} }
impl BufferListRef { impl BufferListRef {
#[doc(alias = "gst_buffer_list_insert")]
pub fn insert(&mut self, idx: i32, buffer: Buffer) { pub fn insert(&mut self, idx: i32, buffer: Buffer) {
unsafe { unsafe {
ffi::gst_buffer_list_insert(self.as_mut_ptr(), idx, buffer.into_ptr()); ffi::gst_buffer_list_insert(self.as_mut_ptr(), idx, buffer.into_ptr());
@ -34,14 +37,17 @@ impl BufferListRef {
self.insert(-1, buffer); self.insert(-1, buffer);
} }
#[doc(alias = "gst_buffer_list_copy_deep")]
pub fn copy_deep(&self) -> BufferList { pub fn copy_deep(&self) -> BufferList {
unsafe { from_glib_full(ffi::gst_buffer_list_copy_deep(self.as_ptr())) } unsafe { from_glib_full(ffi::gst_buffer_list_copy_deep(self.as_ptr())) }
} }
#[doc(alias = "gst_buffer_list_remove")]
pub fn remove(&mut self, idx: u32, len: u32) { pub fn remove(&mut self, idx: u32, len: u32) {
unsafe { ffi::gst_buffer_list_remove(self.as_mut_ptr(), idx, len) } unsafe { ffi::gst_buffer_list_remove(self.as_mut_ptr(), idx, len) }
} }
#[doc(alias = "gst_buffer_list_get")]
pub fn get(&self, idx: u32) -> Option<&BufferRef> { pub fn get(&self, idx: u32) -> Option<&BufferRef> {
unsafe { unsafe {
let ptr = ffi::gst_buffer_list_get(self.as_mut_ptr(), idx); let ptr = ffi::gst_buffer_list_get(self.as_mut_ptr(), idx);
@ -75,12 +81,14 @@ impl BufferListRef {
} }
} }
#[doc(alias = "gst_buffer_list_length")]
pub fn len(&self) -> usize { pub fn len(&self) -> usize {
unsafe { ffi::gst_buffer_list_length(self.as_mut_ptr()) as usize } unsafe { ffi::gst_buffer_list_length(self.as_mut_ptr()) as usize }
} }
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
#[doc(alias = "gst_buffer_list_calculate_size")]
pub fn calculate_size(&self) -> usize { pub fn calculate_size(&self) -> usize {
unsafe { ffi::gst_buffer_list_calculate_size(self.as_mut_ptr()) as usize } unsafe { ffi::gst_buffer_list_calculate_size(self.as_mut_ptr()) as usize }
} }
@ -97,6 +105,7 @@ impl BufferListRef {
IterOwned::new(self) IterOwned::new(self)
} }
#[doc(alias = "gst_buffer_list_foreach")]
pub fn foreach<F: FnMut(&BufferRef, u32) -> bool>(&self, func: F) -> bool { pub fn foreach<F: FnMut(&BufferRef, u32) -> bool>(&self, func: F) -> bool {
unsafe extern "C" fn trampoline<F: FnMut(&BufferRef, u32) -> bool>( unsafe extern "C" fn trampoline<F: FnMut(&BufferRef, u32) -> bool>(
buffer: *mut *mut ffi::GstBuffer, buffer: *mut *mut ffi::GstBuffer,

View file

@ -72,12 +72,14 @@ fn into_raw_sync<F: Fn(&Bus, &Message) -> BusSyncReply + Send + Sync + 'static>(
} }
impl Bus { impl Bus {
#[doc(alias = "gst_bus_add_signal_watch_full")]
pub fn add_signal_watch_full(&self, priority: Priority) { pub fn add_signal_watch_full(&self, priority: Priority) {
unsafe { unsafe {
ffi::gst_bus_add_signal_watch_full(self.to_glib_none().0, priority.into_glib()); ffi::gst_bus_add_signal_watch_full(self.to_glib_none().0, priority.into_glib());
} }
} }
#[doc(alias = "gst_bus_create_watch")]
pub fn create_watch<F>(&self, name: Option<&str>, priority: Priority, func: F) -> glib::Source pub fn create_watch<F>(&self, name: Option<&str>, priority: Priority, func: F) -> glib::Source
where where
F: FnMut(&Bus, &Message) -> Continue + Send + 'static, F: FnMut(&Bus, &Message) -> Continue + Send + 'static,
@ -104,6 +106,7 @@ impl Bus {
} }
} }
#[doc(alias = "gst_bus_add_watch_full")]
pub fn add_watch<F>(&self, func: F) -> Result<SourceId, glib::BoolError> pub fn add_watch<F>(&self, func: F) -> Result<SourceId, glib::BoolError>
where where
F: FnMut(&Bus, &Message) -> Continue + Send + 'static, F: FnMut(&Bus, &Message) -> Continue + Send + 'static,
@ -148,6 +151,7 @@ impl Bus {
} }
} }
#[doc(alias = "gst_bus_set_sync_handler")]
pub fn set_sync_handler<F>(&self, func: F) pub fn set_sync_handler<F>(&self, func: F)
where where
F: Fn(&Bus, &Message) -> BusSyncReply + Send + Sync + 'static, F: Fn(&Bus, &Message) -> BusSyncReply + Send + Sync + 'static,

View file

@ -20,6 +20,7 @@ use super::Bus;
pub trait UnixBusExtManual: 'static { pub trait UnixBusExtManual: 'static {
#[doc(alias = "get_pollfd")] #[doc(alias = "get_pollfd")]
#[doc(alias = "gst_bus_get_pollfd")]
fn pollfd(&self) -> unix::io::RawFd; fn pollfd(&self) -> unix::io::RawFd;
} }

View file

@ -20,6 +20,7 @@ use super::Bus;
pub trait WindowsBusExtManual: 'static { pub trait WindowsBusExtManual: 'static {
#[doc(alias = "get_pollfd")] #[doc(alias = "get_pollfd")]
#[doc(alias = "gst_bus_get_pollfd")]
fn pollfd(&self) -> windows::io::RawHandle; fn pollfd(&self) -> windows::io::RawHandle;
} }

View file

@ -35,11 +35,13 @@ impl Caps {
BuilderFull::with_any_features() BuilderFull::with_any_features()
} }
#[doc(alias = "gst_caps_new_empty")]
pub fn new_empty() -> Self { pub fn new_empty() -> Self {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
unsafe { from_glib_full(ffi::gst_caps_new_empty()) } unsafe { from_glib_full(ffi::gst_caps_new_empty()) }
} }
#[doc(alias = "gst_caps_new_any")]
pub fn new_any() -> Self { pub fn new_any() -> Self {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
unsafe { from_glib_full(ffi::gst_caps_new_any()) } unsafe { from_glib_full(ffi::gst_caps_new_any()) }
@ -85,6 +87,7 @@ impl Caps {
caps caps
} }
#[doc(alias = "gst_caps_fixate")]
pub fn fixate(&mut self) { pub fn fixate(&mut self) {
skip_assert_initialized!(); skip_assert_initialized!();
unsafe { unsafe {
@ -99,6 +102,7 @@ impl Caps {
} }
} }
#[doc(alias = "gst_caps_merge")]
pub fn merge(&mut self, other: Self) { pub fn merge(&mut self, other: Self) {
skip_assert_initialized!(); skip_assert_initialized!();
unsafe { unsafe {
@ -107,6 +111,7 @@ impl Caps {
} }
} }
#[doc(alias = "gst_caps_merge_structure")]
pub fn merge_structure(&mut self, structure: Structure) { pub fn merge_structure(&mut self, structure: Structure) {
skip_assert_initialized!(); skip_assert_initialized!();
unsafe { unsafe {
@ -115,6 +120,7 @@ impl Caps {
} }
} }
#[doc(alias = "gst_caps_merge_structure_full")]
pub fn merge_structure_full(&mut self, structure: Structure, features: Option<CapsFeatures>) { pub fn merge_structure_full(&mut self, structure: Structure, features: Option<CapsFeatures>) {
skip_assert_initialized!(); skip_assert_initialized!();
unsafe { unsafe {
@ -127,6 +133,7 @@ impl Caps {
} }
} }
#[doc(alias = "gst_caps_normalize")]
pub fn normalize(&mut self) { pub fn normalize(&mut self) {
skip_assert_initialized!(); skip_assert_initialized!();
unsafe { unsafe {
@ -135,6 +142,7 @@ impl Caps {
} }
} }
#[doc(alias = "gst_caps_simplify")]
pub fn simplify(&mut self) { pub fn simplify(&mut self) {
skip_assert_initialized!(); skip_assert_initialized!();
unsafe { unsafe {
@ -143,6 +151,7 @@ impl Caps {
} }
} }
#[doc(alias = "gst_caps_truncate")]
pub fn truncate(&mut self) { pub fn truncate(&mut self) {
skip_assert_initialized!(); skip_assert_initialized!();
unsafe { unsafe {
@ -155,6 +164,7 @@ impl Caps {
impl str::FromStr for Caps { impl str::FromStr for Caps {
type Err = glib::BoolError; type Err = glib::BoolError;
#[doc(alias = "gst_caps_from_string")]
fn from_str(s: &str) -> Result<Self, Self::Err> { fn from_str(s: &str) -> Result<Self, Self::Err> {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
unsafe { unsafe {
@ -180,6 +190,7 @@ impl CapsRef {
} }
#[doc(alias = "get_structure")] #[doc(alias = "get_structure")]
#[doc(alias = "gst_caps_get_structure")]
pub fn structure(&self, idx: u32) -> Option<&StructureRef> { pub fn structure(&self, idx: u32) -> Option<&StructureRef> {
if idx >= self.size() { if idx >= self.size() {
return None; return None;
@ -212,6 +223,7 @@ impl CapsRef {
} }
#[doc(alias = "get_features")] #[doc(alias = "get_features")]
#[doc(alias = "gst_caps_get_features")]
pub fn features(&self, idx: u32) -> Option<&CapsFeaturesRef> { pub fn features(&self, idx: u32) -> Option<&CapsFeaturesRef> {
if idx >= self.size() { if idx >= self.size() {
return None; return None;
@ -235,6 +247,7 @@ impl CapsRef {
} }
} }
#[doc(alias = "gst_caps_set_features")]
pub fn set_features(&mut self, idx: u32, features: Option<CapsFeatures>) { pub fn set_features(&mut self, idx: u32, features: Option<CapsFeatures>) {
assert!(idx < self.size()); assert!(idx < self.size());
@ -249,6 +262,7 @@ impl CapsRef {
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
#[doc(alias = "gst_caps_set_features_simple")]
pub fn set_features_simple(&mut self, features: Option<CapsFeatures>) { pub fn set_features_simple(&mut self, features: Option<CapsFeatures>) {
unsafe { unsafe {
ffi::gst_caps_set_features_simple( ffi::gst_caps_set_features_simple(
@ -259,6 +273,7 @@ impl CapsRef {
} }
#[doc(alias = "get_size")] #[doc(alias = "get_size")]
#[doc(alias = "gst_caps_get_size")]
pub fn size(&self) -> u32 { pub fn size(&self) -> u32 {
unsafe { ffi::gst_caps_get_size(self.as_ptr()) } unsafe { ffi::gst_caps_get_size(self.as_ptr()) }
} }
@ -279,10 +294,12 @@ impl CapsRef {
IterFeaturesMut::new(self) IterFeaturesMut::new(self)
} }
#[doc(alias = "gst_caps_append_structure")]
pub fn append_structure(&mut self, structure: Structure) { pub fn append_structure(&mut self, structure: Structure) {
unsafe { ffi::gst_caps_append_structure(self.as_mut_ptr(), structure.into_ptr()) } unsafe { ffi::gst_caps_append_structure(self.as_mut_ptr(), structure.into_ptr()) }
} }
#[doc(alias = "gst_caps_append_structure_full")]
pub fn append_structure_full(&mut self, structure: Structure, features: Option<CapsFeatures>) { pub fn append_structure_full(&mut self, structure: Structure, features: Option<CapsFeatures>) {
unsafe { unsafe {
ffi::gst_caps_append_structure_full( ffi::gst_caps_append_structure_full(
@ -293,18 +310,22 @@ impl CapsRef {
} }
} }
#[doc(alias = "gst_caps_remove_structure")]
pub fn remove_structure(&mut self, idx: u32) { pub fn remove_structure(&mut self, idx: u32) {
unsafe { ffi::gst_caps_remove_structure(self.as_mut_ptr(), idx) } unsafe { ffi::gst_caps_remove_structure(self.as_mut_ptr(), idx) }
} }
#[doc(alias = "gst_caps_append")]
pub fn append(&mut self, other: Caps) { pub fn append(&mut self, other: Caps) {
unsafe { ffi::gst_caps_append(self.as_mut_ptr(), other.into_ptr()) } unsafe { ffi::gst_caps_append(self.as_mut_ptr(), other.into_ptr()) }
} }
#[doc(alias = "gst_caps_can_intersect")]
pub fn can_intersect(&self, other: &Self) -> bool { pub fn can_intersect(&self, other: &Self) -> bool {
unsafe { from_glib(ffi::gst_caps_can_intersect(self.as_ptr(), other.as_ptr())) } unsafe { from_glib(ffi::gst_caps_can_intersect(self.as_ptr(), other.as_ptr())) }
} }
#[doc(alias = "gst_caps_intersect")]
pub fn intersect(&self, other: &Self) -> Caps { pub fn intersect(&self, other: &Self) -> Caps {
unsafe { unsafe {
from_glib_full(ffi::gst_caps_intersect( from_glib_full(ffi::gst_caps_intersect(
@ -324,6 +345,7 @@ impl CapsRef {
} }
} }
#[doc(alias = "gst_caps_is_always_compatible")]
pub fn is_always_compatible(&self, other: &Self) -> bool { pub fn is_always_compatible(&self, other: &Self) -> bool {
unsafe { unsafe {
from_glib(ffi::gst_caps_is_always_compatible( from_glib(ffi::gst_caps_is_always_compatible(
@ -333,22 +355,27 @@ impl CapsRef {
} }
} }
#[doc(alias = "gst_caps_is_any")]
pub fn is_any(&self) -> bool { pub fn is_any(&self) -> bool {
unsafe { from_glib(ffi::gst_caps_is_any(self.as_ptr())) } unsafe { from_glib(ffi::gst_caps_is_any(self.as_ptr())) }
} }
#[doc(alias = "gst_caps_is_empty")]
pub fn is_empty(&self) -> bool { pub fn is_empty(&self) -> bool {
unsafe { from_glib(ffi::gst_caps_is_empty(self.as_ptr())) } unsafe { from_glib(ffi::gst_caps_is_empty(self.as_ptr())) }
} }
#[doc(alias = "gst_caps_is_fixed")]
pub fn is_fixed(&self) -> bool { pub fn is_fixed(&self) -> bool {
unsafe { from_glib(ffi::gst_caps_is_fixed(self.as_ptr())) } unsafe { from_glib(ffi::gst_caps_is_fixed(self.as_ptr())) }
} }
#[doc(alias = "gst_caps_is_equal_fixed")]
pub fn is_equal_fixed(&self, other: &Self) -> bool { pub fn is_equal_fixed(&self, other: &Self) -> bool {
unsafe { from_glib(ffi::gst_caps_is_equal_fixed(self.as_ptr(), other.as_ptr())) } unsafe { from_glib(ffi::gst_caps_is_equal_fixed(self.as_ptr(), other.as_ptr())) }
} }
#[doc(alias = "gst_caps_is_strictly_equal")]
pub fn is_strictly_equal(&self, other: &Self) -> bool { pub fn is_strictly_equal(&self, other: &Self) -> bool {
unsafe { unsafe {
from_glib(ffi::gst_caps_is_strictly_equal( from_glib(ffi::gst_caps_is_strictly_equal(
@ -358,10 +385,12 @@ impl CapsRef {
} }
} }
#[doc(alias = "gst_caps_is_subset")]
pub fn is_subset(&self, superset: &Self) -> bool { pub fn is_subset(&self, superset: &Self) -> bool {
unsafe { from_glib(ffi::gst_caps_is_subset(self.as_ptr(), superset.as_ptr())) } unsafe { from_glib(ffi::gst_caps_is_subset(self.as_ptr(), superset.as_ptr())) }
} }
#[doc(alias = "gst_caps_is_subset_structure")]
pub fn is_subset_structure(&self, structure: &StructureRef) -> bool { pub fn is_subset_structure(&self, structure: &StructureRef) -> bool {
unsafe { unsafe {
from_glib(ffi::gst_caps_is_subset_structure( from_glib(ffi::gst_caps_is_subset_structure(
@ -371,6 +400,7 @@ impl CapsRef {
} }
} }
#[doc(alias = "gst_caps_is_subset_structure_full")]
pub fn is_subset_structure_full( pub fn is_subset_structure_full(
&self, &self,
structure: &StructureRef, structure: &StructureRef,
@ -385,6 +415,7 @@ impl CapsRef {
} }
} }
#[doc(alias = "gst_caps_subtract")]
pub fn subtract(&self, other: &Self) -> Caps { pub fn subtract(&self, other: &Self) -> Caps {
skip_assert_initialized!(); skip_assert_initialized!();
unsafe { unsafe {
@ -561,6 +592,7 @@ impl fmt::Display for CapsRef {
} }
impl PartialEq for CapsRef { impl PartialEq for CapsRef {
#[doc(alias = "gst_caps_is_equal")]
fn eq(&self, other: &CapsRef) -> bool { fn eq(&self, other: &CapsRef) -> bool {
unsafe { from_glib(ffi::gst_caps_is_equal(self.as_ptr(), other.as_ptr())) } unsafe { from_glib(ffi::gst_caps_is_equal(self.as_ptr(), other.as_ptr())) }
} }

View file

@ -40,6 +40,7 @@ impl CapsFeatures {
f f
} }
#[doc(alias = "gst_caps_features_new_empty")]
pub fn new_empty() -> Self { pub fn new_empty() -> Self {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
unsafe { unsafe {
@ -49,6 +50,7 @@ impl CapsFeatures {
} }
} }
#[doc(alias = "gst_caps_features_new_any")]
pub fn new_any() -> Self { pub fn new_any() -> Self {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
unsafe { CapsFeatures(ptr::NonNull::new_unchecked(ffi::gst_caps_features_new_any())) } unsafe { CapsFeatures(ptr::NonNull::new_unchecked(ffi::gst_caps_features_new_any())) }
@ -121,6 +123,7 @@ impl fmt::Display for CapsFeatures {
impl str::FromStr for CapsFeatures { impl str::FromStr for CapsFeatures {
type Err = glib::BoolError; type Err = glib::BoolError;
#[doc(alias = "gst_caps_features_from_string")]
fn from_str(s: &str) -> Result<Self, Self::Err> { fn from_str(s: &str) -> Result<Self, Self::Err> {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
unsafe { unsafe {
@ -304,10 +307,12 @@ impl CapsFeaturesRef {
self.size() == 0 && !self.is_any() self.size() == 0 && !self.is_any()
} }
#[doc(alias = "gst_caps_features_is_any")]
pub fn is_any(&self) -> bool { pub fn is_any(&self) -> bool {
unsafe { from_glib(ffi::gst_caps_features_is_any(self.as_ptr())) } unsafe { from_glib(ffi::gst_caps_features_is_any(self.as_ptr())) }
} }
#[doc(alias = "gst_caps_features_contains")]
pub fn contains(&self, feature: &str) -> bool { pub fn contains(&self, feature: &str) -> bool {
unsafe { unsafe {
from_glib(ffi::gst_caps_features_contains( from_glib(ffi::gst_caps_features_contains(
@ -327,11 +332,13 @@ impl CapsFeaturesRef {
} }
#[doc(alias = "get_size")] #[doc(alias = "get_size")]
#[doc(alias = "gst_caps_features_get_size")]
pub fn size(&self) -> u32 { pub fn size(&self) -> u32 {
unsafe { ffi::gst_caps_features_get_size(self.as_ptr()) } unsafe { ffi::gst_caps_features_get_size(self.as_ptr()) }
} }
#[doc(alias = "get_nth")] #[doc(alias = "get_nth")]
#[doc(alias = "gst_caps_features_get_nth")]
pub fn nth(&self, idx: u32) -> Option<&str> { pub fn nth(&self, idx: u32) -> Option<&str> {
if idx >= self.size() { if idx >= self.size() {
return None; return None;
@ -358,10 +365,12 @@ impl CapsFeaturesRef {
} }
} }
#[doc(alias = "gst_caps_features_add")]
pub fn add(&mut self, feature: &str) { pub fn add(&mut self, feature: &str) {
unsafe { ffi::gst_caps_features_add(self.as_mut_ptr(), feature.to_glib_none().0) } unsafe { ffi::gst_caps_features_add(self.as_mut_ptr(), feature.to_glib_none().0) }
} }
#[doc(alias = "gst_caps_features_remove")]
pub fn remove(&mut self, feature: &str) { pub fn remove(&mut self, feature: &str) {
unsafe { ffi::gst_caps_features_remove(self.as_mut_ptr(), feature.to_glib_none().0) } unsafe { ffi::gst_caps_features_remove(self.as_mut_ptr(), feature.to_glib_none().0) }
} }
@ -379,6 +388,7 @@ impl CapsFeaturesRef {
} }
// This is not an equivalence relation with regards to ANY. Everything is equal to ANY // This is not an equivalence relation with regards to ANY. Everything is equal to ANY
#[doc(alias = "gst_caps_features_is_equal")]
pub fn is_equal(&self, other: &CapsFeaturesRef) -> bool { pub fn is_equal(&self, other: &CapsFeaturesRef) -> bool {
unsafe { unsafe {
from_glib(ffi::gst_caps_features_is_equal( from_glib(ffi::gst_caps_features_is_equal(

View file

@ -34,14 +34,17 @@ glib::wrapper! {
impl ClockId { impl ClockId {
#[doc(alias = "get_time")] #[doc(alias = "get_time")]
#[doc(alias = "gst_clock_id_get_time")]
pub fn time(&self) -> ClockTime { pub fn time(&self) -> ClockTime {
unsafe { from_glib(ffi::gst_clock_id_get_time(self.to_glib_none().0)) } unsafe { from_glib(ffi::gst_clock_id_get_time(self.to_glib_none().0)) }
} }
#[doc(alias = "gst_clock_id_unschedule")]
pub fn unschedule(&self) { pub fn unschedule(&self) {
unsafe { ffi::gst_clock_id_unschedule(self.to_glib_none().0) } unsafe { ffi::gst_clock_id_unschedule(self.to_glib_none().0) }
} }
#[doc(alias = "gst_clock_id_wait")]
pub fn wait(&self) -> (Result<ClockSuccess, ClockError>, ClockTimeDiff) { pub fn wait(&self) -> (Result<ClockSuccess, ClockError>, ClockTimeDiff) {
unsafe { unsafe {
let mut jitter = 0; let mut jitter = 0;
@ -63,12 +66,14 @@ impl ClockId {
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
#[doc(alias = "get_clock")] #[doc(alias = "get_clock")]
#[doc(alias = "gst_clock_id_get_clock")]
pub fn clock(&self) -> Option<Clock> { pub fn clock(&self) -> Option<Clock> {
unsafe { from_glib_full(ffi::gst_clock_id_get_clock(self.to_glib_none().0)) } unsafe { from_glib_full(ffi::gst_clock_id_get_clock(self.to_glib_none().0)) }
} }
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
#[doc(alias = "gst_clock_id_uses_clock")]
pub fn uses_clock<P: IsA<Clock>>(&self, clock: &P) -> bool { pub fn uses_clock<P: IsA<Clock>>(&self, clock: &P) -> bool {
unsafe { unsafe {
from_glib(ffi::gst_clock_id_uses_clock( from_glib(ffi::gst_clock_id_uses_clock(
@ -130,6 +135,7 @@ impl SingleShotClockId {
self.0.compare_by_time(&other.0) self.0.compare_by_time(&other.0)
} }
#[doc(alias = "gst_clock_id_wait_async")]
pub fn wait_async<F>(&self, func: F) -> Result<ClockSuccess, ClockError> pub fn wait_async<F>(&self, func: F) -> Result<ClockSuccess, ClockError>
where where
F: FnOnce(&Clock, ClockTime, &ClockId) + Send + 'static, F: FnOnce(&Clock, ClockTime, &ClockId) + Send + 'static,
@ -239,6 +245,7 @@ impl PeriodicClockId {
self.0.compare_by_time(&other.0) self.0.compare_by_time(&other.0)
} }
#[doc(alias = "gst_clock_id_wait_async")]
pub fn wait_async<F>(&self, func: F) -> Result<ClockSuccess, ClockError> pub fn wait_async<F>(&self, func: F) -> Result<ClockSuccess, ClockError>
where where
F: Fn(&Clock, ClockTime, &ClockId) + Send + 'static, F: Fn(&Clock, ClockTime, &ClockId) + Send + 'static,
@ -337,6 +344,7 @@ unsafe impl Send for ClockId {}
unsafe impl Sync for ClockId {} unsafe impl Sync for ClockId {}
impl Clock { impl Clock {
#[doc(alias = "gst_clock_adjust_with_calibration")]
pub fn adjust_with_calibration( pub fn adjust_with_calibration(
internal_target: ClockTime, internal_target: ClockTime,
cinternal: ClockTime, cinternal: ClockTime,
@ -357,6 +365,7 @@ impl Clock {
} }
} }
#[doc(alias = "gst_clock_unadjust_with_calibration")]
pub fn unadjust_with_calibration( pub fn unadjust_with_calibration(
external_target: ClockTime, external_target: ClockTime,
cinternal: ClockTime, cinternal: ClockTime,
@ -379,8 +388,10 @@ impl Clock {
} }
pub trait ClockExtManual: 'static { pub trait ClockExtManual: 'static {
#[doc(alias = "gst_clock_new_periodic_id")]
fn new_periodic_id(&self, start_time: ClockTime, interval: ClockTime) -> PeriodicClockId; fn new_periodic_id(&self, start_time: ClockTime, interval: ClockTime) -> PeriodicClockId;
#[doc(alias = "gst_clock_periodic_id_reinit")]
fn periodic_id_reinit( fn periodic_id_reinit(
&self, &self,
id: &PeriodicClockId, id: &PeriodicClockId,
@ -388,8 +399,10 @@ pub trait ClockExtManual: 'static {
interval: ClockTime, interval: ClockTime,
) -> Result<(), glib::BoolError>; ) -> Result<(), glib::BoolError>;
#[doc(alias = "gst_clock_new_single_shot_id")]
fn new_single_shot_id(&self, time: ClockTime) -> SingleShotClockId; fn new_single_shot_id(&self, time: ClockTime) -> SingleShotClockId;
#[doc(alias = "gst_clock_single_shot_id_reinit")]
fn single_shot_id_reinit( fn single_shot_id_reinit(
&self, &self,
id: &SingleShotClockId, id: &SingleShotClockId,

View file

@ -12,6 +12,7 @@ mini_object_wrapper!(Context, ContextRef, ffi::GstContext, || {
}); });
impl Context { impl Context {
#[doc(alias = "gst_context_new")]
pub fn new(context_type: &str, persistent: bool) -> Self { pub fn new(context_type: &str, persistent: bool) -> Self {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
unsafe { unsafe {
@ -25,6 +26,7 @@ impl Context {
impl ContextRef { impl ContextRef {
#[doc(alias = "get_context_type")] #[doc(alias = "get_context_type")]
#[doc(alias = "gst_context_get_context_type")]
pub fn context_type(&self) -> &str { pub fn context_type(&self) -> &str {
unsafe { unsafe {
let raw = ffi::gst_context_get_context_type(self.as_mut_ptr()); let raw = ffi::gst_context_get_context_type(self.as_mut_ptr());
@ -32,6 +34,7 @@ impl ContextRef {
} }
} }
#[doc(alias = "gst_context_has_context_type")]
pub fn has_context_type(&self, context_type: &str) -> bool { pub fn has_context_type(&self, context_type: &str) -> bool {
unsafe { unsafe {
from_glib(ffi::gst_context_has_context_type( from_glib(ffi::gst_context_has_context_type(
@ -41,11 +44,13 @@ impl ContextRef {
} }
} }
#[doc(alias = "gst_context_is_persistent")]
pub fn is_persistent(&self) -> bool { pub fn is_persistent(&self) -> bool {
unsafe { from_glib(ffi::gst_context_is_persistent(self.as_mut_ptr())) } unsafe { from_glib(ffi::gst_context_is_persistent(self.as_mut_ptr())) }
} }
#[doc(alias = "get_structure")] #[doc(alias = "get_structure")]
#[doc(alias = "gst_context_get_structure")]
pub fn structure(&self) -> &StructureRef { pub fn structure(&self) -> &StructureRef {
unsafe { StructureRef::from_glib_borrow(ffi::gst_context_get_structure(self.as_mut_ptr())) } unsafe { StructureRef::from_glib_borrow(ffi::gst_context_get_structure(self.as_mut_ptr())) }
} }

View file

@ -7,6 +7,7 @@ use glib::translate::*;
pub trait ControlBindingExtManual: 'static { pub trait ControlBindingExtManual: 'static {
#[doc(alias = "get_g_value_array")] #[doc(alias = "get_g_value_array")]
#[doc(alias = "gst_control_binding_get_g_value_array")]
fn g_value_array( fn g_value_array(
&self, &self,
timestamp: ClockTime, timestamp: ClockTime,

View file

@ -7,6 +7,7 @@ use glib::translate::*;
pub trait ControlSourceExtManual: 'static { pub trait ControlSourceExtManual: 'static {
#[doc(alias = "get_value_array")] #[doc(alias = "get_value_array")]
#[doc(alias = "gst_control_source_get_value_array")]
fn value_array( fn value_array(
&self, &self,
timestamp: ClockTime, timestamp: ClockTime,

View file

@ -108,6 +108,7 @@ fn validate(
} }
impl DateTime { impl DateTime {
#[doc(alias = "gst_date_time_new")]
pub fn new< pub fn new<
TZ: Into<Option<f32>>, TZ: Into<Option<f32>>,
Y: Into<i32>, Y: Into<i32>,
@ -151,6 +152,7 @@ impl DateTime {
} }
} }
#[doc(alias = "gst_date_time_new_local_time")]
pub fn new_local_time< pub fn new_local_time<
Y: Into<i32>, Y: Into<i32>,
MO: Into<Option<i32>>, MO: Into<Option<i32>>,
@ -190,6 +192,7 @@ impl DateTime {
} }
} }
#[doc(alias = "gst_date_time_new_y")]
pub fn new_y(year: i32) -> Result<DateTime, glib::BoolError> { pub fn new_y(year: i32) -> Result<DateTime, glib::BoolError> {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
@ -201,6 +204,7 @@ impl DateTime {
} }
} }
#[doc(alias = "gst_date_time_new_ym")]
pub fn new_ym(year: i32, month: i32) -> Result<DateTime, glib::BoolError> { pub fn new_ym(year: i32, month: i32) -> Result<DateTime, glib::BoolError> {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
@ -212,6 +216,7 @@ impl DateTime {
} }
} }
#[doc(alias = "gst_date_time_new_ymd")]
pub fn new_ymd(year: i32, month: i32, day: i32) -> Result<DateTime, glib::BoolError> { pub fn new_ymd(year: i32, month: i32, day: i32) -> Result<DateTime, glib::BoolError> {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
@ -224,6 +229,7 @@ impl DateTime {
} }
#[doc(alias = "get_day")] #[doc(alias = "get_day")]
#[doc(alias = "gst_date_time_get_day")]
pub fn day(&self) -> Option<i32> { pub fn day(&self) -> Option<i32> {
if !self.has_day() { if !self.has_day() {
return None; return None;
@ -233,6 +239,7 @@ impl DateTime {
} }
#[doc(alias = "get_hour")] #[doc(alias = "get_hour")]
#[doc(alias = "gst_date_time_get_hour")]
pub fn hour(&self) -> Option<i32> { pub fn hour(&self) -> Option<i32> {
if !self.has_time() { if !self.has_time() {
return None; return None;
@ -242,6 +249,7 @@ impl DateTime {
} }
#[doc(alias = "get_microsecond")] #[doc(alias = "get_microsecond")]
#[doc(alias = "gst_date_time_get_microsecond")]
pub fn microsecond(&self) -> Option<i32> { pub fn microsecond(&self) -> Option<i32> {
if !self.has_second() { if !self.has_second() {
return None; return None;
@ -251,6 +259,7 @@ impl DateTime {
} }
#[doc(alias = "get_minute")] #[doc(alias = "get_minute")]
#[doc(alias = "gst_date_time_get_minute")]
pub fn minute(&self) -> Option<i32> { pub fn minute(&self) -> Option<i32> {
if !self.has_time() { if !self.has_time() {
return None; return None;
@ -260,6 +269,7 @@ impl DateTime {
} }
#[doc(alias = "get_month")] #[doc(alias = "get_month")]
#[doc(alias = "gst_date_time_get_month")]
pub fn month(&self) -> Option<i32> { pub fn month(&self) -> Option<i32> {
if !self.has_month() { if !self.has_month() {
return None; return None;
@ -269,6 +279,7 @@ impl DateTime {
} }
#[doc(alias = "get_second")] #[doc(alias = "get_second")]
#[doc(alias = "gst_date_time_get_second")]
pub fn second(&self) -> Option<i32> { pub fn second(&self) -> Option<i32> {
if !self.has_second() { if !self.has_second() {
return None; return None;
@ -278,6 +289,7 @@ impl DateTime {
} }
#[doc(alias = "get_time_zone_offset")] #[doc(alias = "get_time_zone_offset")]
#[doc(alias = "gst_date_time_get_time_zone_offset")]
pub fn time_zone_offset(&self) -> Option<f32> { pub fn time_zone_offset(&self) -> Option<f32> {
if !self.has_time() { if !self.has_time() {
return None; return None;

View file

@ -9,6 +9,7 @@ use glib::translate::*;
use std::num::NonZeroU32; use std::num::NonZeroU32;
impl DeviceMonitor { impl DeviceMonitor {
#[doc(alias = "gst_device_monitor_new")]
pub fn new() -> DeviceMonitor { pub fn new() -> DeviceMonitor {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
let (major, minor, _, _) = crate::version(); let (major, minor, _, _) = crate::version();
@ -47,12 +48,14 @@ impl FromGlib<libc::c_uint> for DeviceMonitorFilterId {
} }
pub trait DeviceMonitorExtManual: 'static { pub trait DeviceMonitorExtManual: 'static {
#[doc(alias = "gst_device_monitor_add_filter")]
fn add_filter( fn add_filter(
&self, &self,
classes: Option<&str>, classes: Option<&str>,
caps: Option<&Caps>, caps: Option<&Caps>,
) -> Option<DeviceMonitorFilterId>; ) -> Option<DeviceMonitorFilterId>;
#[doc(alias = "gst_device_monitor_remove_filter")]
fn remove_filter(&self, filter_id: DeviceMonitorFilterId) fn remove_filter(&self, filter_id: DeviceMonitorFilterId)
-> Result<(), glib::error::BoolError>; -> Result<(), glib::error::BoolError>;
} }

View file

@ -10,6 +10,7 @@ use glib::translate::*;
use std::ffi::CStr; use std::ffi::CStr;
impl DeviceProvider { impl DeviceProvider {
#[doc(alias = "gst_device_provider_register")]
pub fn register( pub fn register(
plugin: Option<&Plugin>, plugin: Option<&Plugin>,
name: &str, name: &str,
@ -33,6 +34,7 @@ impl DeviceProvider {
pub trait DeviceProviderExtManual: 'static { pub trait DeviceProviderExtManual: 'static {
#[doc(alias = "get_metadata")] #[doc(alias = "get_metadata")]
#[doc(alias = "gst_device_provider_class_get_metadata")]
fn metadata<'a>(&self, key: &str) -> Option<&'a str>; fn metadata<'a>(&self, key: &str) -> Option<&'a str>;
} }

View file

@ -61,6 +61,7 @@ impl Element {
} }
} }
#[doc(alias = "gst_element_register")]
pub fn register( pub fn register(
plugin: Option<&Plugin>, plugin: Option<&Plugin>,
name: &str, name: &str,
@ -118,8 +119,10 @@ pub trait ElementExtManual: 'static {
#[doc(alias = "get_pending_state")] #[doc(alias = "get_pending_state")]
fn pending_state(&self) -> State; fn pending_state(&self) -> State;
#[doc(alias = "gst_element_query")]
fn query(&self, query: &mut QueryRef) -> bool; fn query(&self, query: &mut QueryRef) -> bool;
#[doc(alias = "gst_element_send_event")]
fn send_event(&self, event: Event) -> bool; fn send_event(&self, event: Event) -> bool;
#[doc(alias = "get_metadata")] #[doc(alias = "get_metadata")]
@ -131,6 +134,7 @@ pub trait ElementExtManual: 'static {
fn pad_template_list(&self) -> Vec<PadTemplate>; fn pad_template_list(&self) -> Vec<PadTemplate>;
#[allow(clippy::too_many_arguments)] #[allow(clippy::too_many_arguments)]
#[doc(alias = "gst_element_message_full")]
fn message_full<T: crate::MessageErrorDomain>( fn message_full<T: crate::MessageErrorDomain>(
&self, &self,
type_: ElementMessageType, type_: ElementMessageType,
@ -152,6 +156,7 @@ pub trait ElementExtManual: 'static {
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
#[allow(clippy::too_many_arguments)] #[allow(clippy::too_many_arguments)]
#[doc(alias = "gst_element_message_full_with_details")]
fn message_full_with_details<T: crate::MessageErrorDomain>( fn message_full_with_details<T: crate::MessageErrorDomain>(
&self, &self,
type_: ElementMessageType, type_: ElementMessageType,
@ -164,11 +169,15 @@ pub trait ElementExtManual: 'static {
structure: crate::Structure, structure: crate::Structure,
); );
#[doc(alias = "gst_element_post_message")]
fn post_message(&self, message: crate::Message) -> Result<(), glib::error::BoolError>; fn post_message(&self, message: crate::Message) -> Result<(), glib::error::BoolError>;
fn post_error_message(&self, msg: crate::ErrorMessage); fn post_error_message(&self, msg: crate::ErrorMessage);
#[doc(alias = "gst_element_iterate_pads")]
fn iterate_pads(&self) -> crate::Iterator<Pad>; fn iterate_pads(&self) -> crate::Iterator<Pad>;
#[doc(alias = "gst_element_iterate_sink_pads")]
fn iterate_sink_pads(&self) -> crate::Iterator<Pad>; fn iterate_sink_pads(&self) -> crate::Iterator<Pad>;
#[doc(alias = "gst_element_iterate_src_pads")]
fn iterate_src_pads(&self) -> crate::Iterator<Pad>; fn iterate_src_pads(&self) -> crate::Iterator<Pad>;
#[doc(alias = "get_pads")] #[doc(alias = "get_pads")]
@ -184,6 +193,7 @@ pub trait ElementExtManual: 'static {
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
#[doc(alias = "gst_element_add_property_deep_notify_watch")]
fn add_property_deep_notify_watch( fn add_property_deep_notify_watch(
&self, &self,
property_name: Option<&str>, property_name: Option<&str>,
@ -192,6 +202,7 @@ pub trait ElementExtManual: 'static {
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
#[doc(alias = "gst_element_add_property_notify_watch")]
fn add_property_notify_watch( fn add_property_notify_watch(
&self, &self,
property_name: Option<&str>, property_name: Option<&str>,
@ -200,8 +211,10 @@ pub trait ElementExtManual: 'static {
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
#[doc(alias = "gst_element_remove_property_notify_watch")]
fn remove_property_notify_watch(&self, watch_id: NotifyWatchId); fn remove_property_notify_watch(&self, watch_id: NotifyWatchId);
#[doc(alias = "gst_element_query_convert")]
fn query_convert<V: Into<GenericFormattedValue>, U: SpecificFormattedValue>( fn query_convert<V: Into<GenericFormattedValue>, U: SpecificFormattedValue>(
&self, &self,
src_val: V, src_val: V,
@ -212,12 +225,15 @@ pub trait ElementExtManual: 'static {
dest_format: Format, dest_format: Format,
) -> Option<GenericFormattedValue>; ) -> Option<GenericFormattedValue>;
#[doc(alias = "gst_element_query_duration")]
fn query_duration<T: SpecificFormattedValue>(&self) -> Option<T>; fn query_duration<T: SpecificFormattedValue>(&self) -> Option<T>;
fn query_duration_generic(&self, format: Format) -> Option<GenericFormattedValue>; fn query_duration_generic(&self, format: Format) -> Option<GenericFormattedValue>;
#[doc(alias = "gst_element_query_position")]
fn query_position<T: SpecificFormattedValue>(&self) -> Option<T>; fn query_position<T: SpecificFormattedValue>(&self) -> Option<T>;
fn query_position_generic(&self, format: Format) -> Option<GenericFormattedValue>; fn query_position_generic(&self, format: Format) -> Option<GenericFormattedValue>;
#[doc(alias = "gst_element_seek")]
fn seek<V: Into<GenericFormattedValue>>( fn seek<V: Into<GenericFormattedValue>>(
&self, &self,
rate: f64, rate: f64,
@ -227,6 +243,7 @@ pub trait ElementExtManual: 'static {
stop_type: crate::SeekType, stop_type: crate::SeekType,
stop: V, stop: V,
) -> Result<(), glib::error::BoolError>; ) -> Result<(), glib::error::BoolError>;
#[doc(alias = "gst_element_seek_simple")]
fn seek_simple<V: Into<GenericFormattedValue>>( fn seek_simple<V: Into<GenericFormattedValue>>(
&self, &self,
seek_flags: crate::SeekFlags, seek_flags: crate::SeekFlags,
@ -235,6 +252,7 @@ pub trait ElementExtManual: 'static {
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
#[doc(alias = "gst_element_call_async")]
fn call_async<F>(&self, func: F) fn call_async<F>(&self, func: F)
where where
F: FnOnce(&Self) + Send + 'static; F: FnOnce(&Self) + Send + 'static;
@ -773,6 +791,7 @@ impl<O: IsA<Element>> ElementExtManual for O {
pub unsafe trait ElementClassExt { pub unsafe trait ElementClassExt {
#[doc(alias = "get_metadata")] #[doc(alias = "get_metadata")]
#[doc(alias = "gst_element_class_get_metadata")]
fn metadata<'a>(&self, key: &str) -> Option<&'a str> { fn metadata<'a>(&self, key: &str) -> Option<&'a str> {
unsafe { unsafe {
let klass = self as *const _ as *const ffi::GstElementClass; let klass = self as *const _ as *const ffi::GstElementClass;
@ -788,6 +807,7 @@ pub unsafe trait ElementClassExt {
} }
#[doc(alias = "get_pad_template")] #[doc(alias = "get_pad_template")]
#[doc(alias = "gst_element_class_get_pad_template")]
fn pad_template(&self, name: &str) -> Option<PadTemplate> { fn pad_template(&self, name: &str) -> Option<PadTemplate> {
unsafe { unsafe {
let klass = self as *const _ as *const ffi::GstElementClass; let klass = self as *const _ as *const ffi::GstElementClass;
@ -800,6 +820,7 @@ pub unsafe trait ElementClassExt {
} }
#[doc(alias = "get_pad_template_list")] #[doc(alias = "get_pad_template_list")]
#[doc(alias = "gst_element_class_get_pad_template_list")]
fn pad_template_list(&self) -> Vec<PadTemplate> { fn pad_template_list(&self) -> Vec<PadTemplate> {
unsafe { unsafe {
let klass = self as *const _ as *const ffi::GstElementClass; let klass = self as *const _ as *const ffi::GstElementClass;

View file

@ -655,6 +655,7 @@ impl StateChange {
} }
#[doc(alias = "get_name")] #[doc(alias = "get_name")]
#[doc(alias = "gst_state_change_get_name")]
pub fn name<'a>(self) -> &'a str { pub fn name<'a>(self) -> &'a str {
cfg_if::cfg_if! { cfg_if::cfg_if! {
if #[cfg(feature = "v1_14")] { if #[cfg(feature = "v1_14")] {

View file

@ -24,6 +24,7 @@ use crate::EventType;
pub struct Seqnum(pub(crate) NonZeroU32); pub struct Seqnum(pub(crate) NonZeroU32);
impl Seqnum { impl Seqnum {
#[doc(alias = "gst_util_seqnum_next")]
pub fn next() -> Self { pub fn next() -> Self {
unsafe { unsafe {
let v = ffi::gst_util_seqnum_next(); let v = ffi::gst_util_seqnum_next();
@ -63,6 +64,7 @@ impl cmp::Ord for Seqnum {
pub struct GroupId(pub(crate) NonZeroU32); pub struct GroupId(pub(crate) NonZeroU32);
impl GroupId { impl GroupId {
#[doc(alias = "gst_util_group_id_next")]
pub fn next() -> Self { pub fn next() -> Self {
unsafe { unsafe {
let v = ffi::gst_util_group_id_next(); let v = ffi::gst_util_group_id_next();
@ -135,6 +137,7 @@ mini_object_wrapper!(Event, EventRef, ffi::GstEvent, || {
impl EventRef { impl EventRef {
#[doc(alias = "get_seqnum")] #[doc(alias = "get_seqnum")]
#[doc(alias = "gst_event_get_seqnum")]
pub fn seqnum(&self) -> Seqnum { pub fn seqnum(&self) -> Seqnum {
unsafe { unsafe {
let seqnum = ffi::gst_event_get_seqnum(self.as_mut_ptr()); let seqnum = ffi::gst_event_get_seqnum(self.as_mut_ptr());
@ -144,15 +147,18 @@ impl EventRef {
} }
#[doc(alias = "get_running_time_offset")] #[doc(alias = "get_running_time_offset")]
#[doc(alias = "gst_event_get_running_time_offset")]
pub fn running_time_offset(&self) -> i64 { pub fn running_time_offset(&self) -> i64 {
unsafe { ffi::gst_event_get_running_time_offset(self.as_mut_ptr()) } unsafe { ffi::gst_event_get_running_time_offset(self.as_mut_ptr()) }
} }
#[doc(alias = "gst_event_set_running_time_offset")]
pub fn set_running_time_offset(&mut self, offset: i64) { pub fn set_running_time_offset(&mut self, offset: i64) {
unsafe { ffi::gst_event_set_running_time_offset(self.as_mut_ptr(), offset) } unsafe { ffi::gst_event_set_running_time_offset(self.as_mut_ptr(), offset) }
} }
#[doc(alias = "get_structure")] #[doc(alias = "get_structure")]
#[doc(alias = "gst_event_get_structure")]
pub fn structure(&self) -> Option<&StructureRef> { pub fn structure(&self) -> Option<&StructureRef> {
unsafe { unsafe {
let structure = ffi::gst_event_get_structure(self.as_mut_ptr()); let structure = ffi::gst_event_get_structure(self.as_mut_ptr());
@ -367,6 +373,7 @@ impl<'a> StreamStart<'a> {
} }
#[doc(alias = "get_stream_flags")] #[doc(alias = "get_stream_flags")]
#[doc(alias = "gst_event_parse_stream_flags")]
pub fn stream_flags(&self) -> crate::StreamFlags { pub fn stream_flags(&self) -> crate::StreamFlags {
unsafe { unsafe {
let mut stream_flags = mem::MaybeUninit::uninit(); let mut stream_flags = mem::MaybeUninit::uninit();
@ -378,6 +385,7 @@ impl<'a> StreamStart<'a> {
} }
#[doc(alias = "get_group_id")] #[doc(alias = "get_group_id")]
#[doc(alias = "gst_event_parse_group_id")]
pub fn group_id(&self) -> Option<GroupId> { pub fn group_id(&self) -> Option<GroupId> {
unsafe { unsafe {
let mut group_id = mem::MaybeUninit::uninit(); let mut group_id = mem::MaybeUninit::uninit();
@ -396,6 +404,7 @@ impl<'a> StreamStart<'a> {
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
#[doc(alias = "get_stream")] #[doc(alias = "get_stream")]
#[doc(alias = "gst_event_parse_stream")]
pub fn stream(&self) -> Option<crate::Stream> { pub fn stream(&self) -> Option<crate::Stream> {
unsafe { unsafe {
let mut stream = ptr::null_mut(); let mut stream = ptr::null_mut();
@ -419,6 +428,7 @@ impl<'a> Caps<'a> {
} }
#[doc(alias = "get_caps")] #[doc(alias = "get_caps")]
#[doc(alias = "gst_event_parse_caps")]
pub fn caps(&self) -> &'a crate::CapsRef { pub fn caps(&self) -> &'a crate::CapsRef {
unsafe { unsafe {
let mut caps = ptr::null_mut(); let mut caps = ptr::null_mut();
@ -450,6 +460,7 @@ impl<'a> Segment<'a> {
} }
#[doc(alias = "get_segment")] #[doc(alias = "get_segment")]
#[doc(alias = "gst_event_parse_segment")]
pub fn segment(&self) -> &'a crate::Segment { pub fn segment(&self) -> &'a crate::Segment {
unsafe { unsafe {
let mut segment = ptr::null(); let mut segment = ptr::null();
@ -480,6 +491,7 @@ impl<'a> StreamCollection<'a> {
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
#[doc(alias = "get_stream_collection")] #[doc(alias = "get_stream_collection")]
#[doc(alias = "gst_event_parse_stream_collection")]
pub fn stream_collection(&self) -> crate::StreamCollection { pub fn stream_collection(&self) -> crate::StreamCollection {
unsafe { unsafe {
let mut stream_collection = ptr::null_mut(); let mut stream_collection = ptr::null_mut();
@ -504,6 +516,7 @@ impl<'a> Tag<'a> {
} }
#[doc(alias = "get_tag")] #[doc(alias = "get_tag")]
#[doc(alias = "gst_event_parse_tag")]
pub fn tag(&self) -> &'a crate::TagListRef { pub fn tag(&self) -> &'a crate::TagListRef {
unsafe { unsafe {
let mut tags = ptr::null_mut(); let mut tags = ptr::null_mut();
@ -577,6 +590,7 @@ impl<'a> SinkMessage<'a> {
} }
#[doc(alias = "get_message")] #[doc(alias = "get_message")]
#[doc(alias = "gst_event_parse_sink_message")]
pub fn message(&self) -> crate::Message { pub fn message(&self) -> crate::Message {
unsafe { unsafe {
let mut msg = ptr::null_mut(); let mut msg = ptr::null_mut();
@ -650,6 +664,7 @@ impl<'a> Toc<'a> {
} }
#[doc(alias = "get_toc")] #[doc(alias = "get_toc")]
#[doc(alias = "gst_event_parse_toc")]
pub fn toc(&self) -> (&'a crate::TocRef, bool) { pub fn toc(&self) -> (&'a crate::TocRef, bool) {
unsafe { unsafe {
let mut toc = ptr::null_mut(); let mut toc = ptr::null_mut();
@ -903,6 +918,7 @@ impl<'a> Seek<'a> {
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
#[doc(alias = "get_trickmode_interval")] #[doc(alias = "get_trickmode_interval")]
#[doc(alias = "gst_event_parse_seek_trickmode_interval")]
pub fn trickmode_interval(&self) -> crate::ClockTime { pub fn trickmode_interval(&self) -> crate::ClockTime {
unsafe { unsafe {
let mut trickmode_interval = mem::MaybeUninit::uninit(); let mut trickmode_interval = mem::MaybeUninit::uninit();
@ -945,6 +961,7 @@ impl<'a> Latency<'a> {
} }
#[doc(alias = "get_latency")] #[doc(alias = "get_latency")]
#[doc(alias = "gst_event_parse_latency")]
pub fn latency(&self) -> crate::ClockTime { pub fn latency(&self) -> crate::ClockTime {
unsafe { unsafe {
let mut latency = mem::MaybeUninit::uninit(); let mut latency = mem::MaybeUninit::uninit();
@ -1068,6 +1085,7 @@ impl<'a> SelectStreams<'a> {
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
#[doc(alias = "get_streams")] #[doc(alias = "get_streams")]
#[doc(alias = "gst_event_parse_select_streams")]
pub fn streams(&self) -> Vec<String> { pub fn streams(&self) -> Vec<String> {
unsafe { unsafe {
let mut streams = ptr::null_mut(); let mut streams = ptr::null_mut();

View file

@ -27,6 +27,7 @@ pub fn parse_bin_from_description_with_name(
Ok(bin) Ok(bin)
} }
#[doc(alias = "gst_parse_bin_from_description_full")]
pub fn parse_bin_from_description_full( pub fn parse_bin_from_description_full(
bin_description: &str, bin_description: &str,
ghost_unlinked_pads: bool, ghost_unlinked_pads: bool,
@ -70,6 +71,7 @@ pub fn parse_bin_from_description_with_name_full(
Ok(bin) Ok(bin)
} }
#[doc(alias = "gst_parse_launch_full")]
pub fn parse_launch_full( pub fn parse_launch_full(
pipeline_description: &str, pipeline_description: &str,
mut context: Option<&mut ParseContext>, mut context: Option<&mut ParseContext>,
@ -92,6 +94,7 @@ pub fn parse_launch_full(
} }
} }
#[doc(alias = "gst_parse_launchv_full")]
pub fn parse_launchv_full( pub fn parse_launchv_full(
argv: &[&str], argv: &[&str],
mut context: Option<&mut ParseContext>, mut context: Option<&mut ParseContext>,
@ -116,6 +119,7 @@ pub fn parse_launchv_full(
#[cfg(any(feature = "v1_12", feature = "dox"))] #[cfg(any(feature = "v1_12", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
#[doc(alias = "gst_calculate_linear_regression")]
pub fn calculate_linear_regression( pub fn calculate_linear_regression(
xy: &[(u64, u64)], xy: &[(u64, u64)],
temp: Option<&mut [(u64, u64)]>, temp: Option<&mut [(u64, u64)]>,
@ -166,6 +170,7 @@ pub fn calculate_linear_regression(
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
#[doc(alias = "gst_type_is_plugin_api")]
pub fn type_is_plugin_api(type_: glib::types::Type) -> Option<crate::PluginAPIFlags> { pub fn type_is_plugin_api(type_: glib::types::Type) -> Option<crate::PluginAPIFlags> {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
unsafe { unsafe {

View file

@ -15,6 +15,7 @@ use crate::StaticPadTemplate;
use glib::translate::*; use glib::translate::*;
impl GhostPad { impl GhostPad {
#[doc(alias = "gst_ghost_pad_activate_mode_default")]
pub fn activate_mode_default<P: IsA<GhostPad>, Q: IsA<Object>>( pub fn activate_mode_default<P: IsA<GhostPad>, Q: IsA<Object>>(
pad: &P, pad: &P,
parent: Option<&Q>, parent: Option<&Q>,
@ -35,6 +36,7 @@ impl GhostPad {
} }
} }
#[doc(alias = "gst_ghost_pad_internal_activate_mode_default")]
pub fn internal_activate_mode_default<P: IsA<GhostPad>, Q: IsA<Object>>( pub fn internal_activate_mode_default<P: IsA<GhostPad>, Q: IsA<Object>>(
pad: &P, pad: &P,
parent: Option<&Q>, parent: Option<&Q>,

View file

@ -39,6 +39,7 @@ where
} }
#[allow(clippy::should_implement_trait)] #[allow(clippy::should_implement_trait)]
#[doc(alias = "gst_iterator_next")]
pub fn next(&mut self) -> Result<Option<T>, IteratorError> { pub fn next(&mut self) -> Result<Option<T>, IteratorError> {
unsafe { unsafe {
let mut value = Value::uninitialized(); let mut value = Value::uninitialized();
@ -57,12 +58,14 @@ where
} }
} }
#[doc(alias = "gst_iterator_resync")]
pub fn resync(&mut self) { pub fn resync(&mut self) {
unsafe { unsafe {
ffi::gst_iterator_resync(self.to_glib_none_mut().0); ffi::gst_iterator_resync(self.to_glib_none_mut().0);
} }
} }
#[doc(alias = "gst_iterator_filter")]
pub fn filter<F>(self, func: F) -> Self pub fn filter<F>(self, func: F) -> Self
where where
F: Fn(T) -> bool + Send + Sync + 'static, F: Fn(T) -> bool + Send + Sync + 'static,
@ -84,6 +87,7 @@ where
} }
} }
#[doc(alias = "gst_iterator_find_custom")]
pub fn find<F>(&mut self, func: F) -> Option<T> pub fn find<F>(&mut self, func: F) -> Option<T>
where where
F: FnMut(T) -> bool, F: FnMut(T) -> bool,
@ -108,6 +112,7 @@ where
} }
} }
#[doc(alias = "gst_iterator_foreach")]
pub fn foreach<F>(&mut self, func: F) -> Result<(), IteratorError> pub fn foreach<F>(&mut self, func: F) -> Result<(), IteratorError>
where where
F: FnMut(T), F: FnMut(T),
@ -131,6 +136,7 @@ where
} }
} }
#[doc(alias = "gst_iterator_fold")]
pub fn fold<F, U>(&mut self, init: U, func: F) -> Result<U, IteratorError> pub fn fold<F, U>(&mut self, init: U, func: F) -> Result<U, IteratorError>
where where
F: FnMut(U, T) -> Result<U, U>, F: FnMut(U, T) -> Result<U, U>,
@ -167,6 +173,7 @@ impl<T> Iterator<T>
where where
for<'a> T: FromValue<'a> + StaticType + ToValue + Send + 'static, for<'a> T: FromValue<'a> + StaticType + ToValue + Send + 'static,
{ {
#[doc(alias = "gst_iterator_new")]
pub fn new<I: IteratorImpl<T>>(imp: I) -> Self { pub fn new<I: IteratorImpl<T>>(imp: I) -> Self {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
static DUMMY_COOKIE: u32 = 0; static DUMMY_COOKIE: u32 = 0;

View file

@ -232,6 +232,7 @@ pub use crate::functions::*;
use std::ptr; use std::ptr;
#[doc(alias = "gst_init_check")]
pub fn init() -> Result<(), glib::Error> { pub fn init() -> Result<(), glib::Error> {
unsafe { unsafe {
let mut error = ptr::null_mut(); let mut error = ptr::null_mut();

View file

@ -24,6 +24,7 @@ impl fmt::Debug for DebugMessage {
} }
impl DebugMessage { impl DebugMessage {
#[doc(alias = "gst_debug_message_get")]
pub fn get(&self) -> Option<Cow<str>> { pub fn get(&self) -> Option<Cow<str>> {
unsafe { unsafe {
let message = ffi::gst_debug_message_get(self.0.as_ptr()); let message = ffi::gst_debug_message_get(self.0.as_ptr());
@ -85,6 +86,7 @@ impl DebugCategory {
} }
#[doc(alias = "get_threshold")] #[doc(alias = "get_threshold")]
#[doc(alias = "gst_debug_category_get_threshold")]
pub fn threshold(self) -> crate::DebugLevel { pub fn threshold(self) -> crate::DebugLevel {
match self.0 { match self.0 {
Some(cat) => unsafe { from_glib(ffi::gst_debug_category_get_threshold(cat.as_ptr())) }, Some(cat) => unsafe { from_glib(ffi::gst_debug_category_get_threshold(cat.as_ptr())) },
@ -92,12 +94,14 @@ impl DebugCategory {
} }
} }
#[doc(alias = "gst_debug_category_set_threshold")]
pub fn set_threshold(self, threshold: crate::DebugLevel) { pub fn set_threshold(self, threshold: crate::DebugLevel) {
if let Some(cat) = self.0 { if let Some(cat) = self.0 {
unsafe { ffi::gst_debug_category_set_threshold(cat.as_ptr(), threshold.into_glib()) } unsafe { ffi::gst_debug_category_set_threshold(cat.as_ptr(), threshold.into_glib()) }
} }
} }
#[doc(alias = "gst_debug_category_reset_threshold")]
pub fn reset_threshold(self) { pub fn reset_threshold(self) {
if let Some(cat) = self.0 { if let Some(cat) = self.0 {
unsafe { ffi::gst_debug_category_reset_threshold(cat.as_ptr()) } unsafe { ffi::gst_debug_category_reset_threshold(cat.as_ptr()) }
@ -105,6 +109,7 @@ impl DebugCategory {
} }
#[doc(alias = "get_color")] #[doc(alias = "get_color")]
#[doc(alias = "gst_debug_category_get_color")]
pub fn color(self) -> crate::DebugColorFlags { pub fn color(self) -> crate::DebugColorFlags {
match self.0 { match self.0 {
Some(cat) => unsafe { from_glib(ffi::gst_debug_category_get_color(cat.as_ptr())) }, Some(cat) => unsafe { from_glib(ffi::gst_debug_category_get_color(cat.as_ptr())) },
@ -113,6 +118,7 @@ impl DebugCategory {
} }
#[doc(alias = "get_name")] #[doc(alias = "get_name")]
#[doc(alias = "gst_debug_category_get_name")]
pub fn name<'a>(self) -> &'a str { pub fn name<'a>(self) -> &'a str {
match self.0 { match self.0 {
Some(cat) => unsafe { Some(cat) => unsafe {
@ -125,6 +131,7 @@ impl DebugCategory {
} }
#[doc(alias = "get_description")] #[doc(alias = "get_description")]
#[doc(alias = "gst_debug_category_get_description")]
pub fn description<'a>(self) -> Option<&'a str> { pub fn description<'a>(self) -> Option<&'a str> {
match self.0 { match self.0 {
Some(cat) => unsafe { Some(cat) => unsafe {
@ -141,6 +148,7 @@ impl DebugCategory {
} }
#[inline] #[inline]
#[doc(alias = "gst_debug_log")]
pub fn log<O: IsA<glib::Object>>( pub fn log<O: IsA<glib::Object>>(
self, self,
obj: Option<&O>, obj: Option<&O>,
@ -456,6 +464,7 @@ impl fmt::Display for LoggedObject {
} }
} }
#[doc(alias = "gst_debug_add_log_function")]
pub fn debug_add_log_function<T>(function: T) -> DebugLogFunction pub fn debug_add_log_function<T>(function: T) -> DebugLogFunction
where where
T: Fn(DebugCategory, DebugLevel, &str, &str, u32, Option<&LoggedObject>, &DebugMessage) T: Fn(DebugCategory, DebugLevel, &str, &str, u32, Option<&LoggedObject>, &DebugMessage)
@ -483,6 +492,7 @@ pub fn debug_remove_default_log_function() {
} }
} }
#[doc(alias = "gst_debug_remove_log_function_by_data")]
pub fn debug_remove_log_function(log_fn: DebugLogFunction) { pub fn debug_remove_log_function(log_fn: DebugLogFunction) {
skip_assert_initialized!(); skip_assert_initialized!();
unsafe { unsafe {

View file

@ -225,6 +225,7 @@ impl MemoryRef {
} }
} }
#[doc(alias = "gst_memory_is_span")]
pub fn is_span(&self, mem2: &MemoryRef) -> Option<usize> { pub fn is_span(&self, mem2: &MemoryRef) -> Option<usize> {
unsafe { unsafe {
let mut offset = mem::MaybeUninit::uninit(); let mut offset = mem::MaybeUninit::uninit();
@ -241,6 +242,7 @@ impl MemoryRef {
} }
} }
#[doc(alias = "gst_memory_is_type")]
pub fn is_type(&self, mem_type: &str) -> bool { pub fn is_type(&self, mem_type: &str) -> bool {
unsafe { unsafe {
from_glib(ffi::gst_memory_is_type( from_glib(ffi::gst_memory_is_type(
@ -287,6 +289,7 @@ impl MemoryRef {
} }
} }
#[doc(alias = "gst_memory_share")]
pub fn share(&self, offset: isize, size: Option<usize>) -> Memory { pub fn share(&self, offset: isize, size: Option<usize>) -> Memory {
let pos_sz = match size { let pos_sz = match size {
Some(val) => val as isize, Some(val) => val as isize,
@ -305,6 +308,7 @@ impl MemoryRef {
} }
} }
#[doc(alias = "gst_memory_resize")]
pub fn resize(&mut self, offset: isize, size: usize) { pub fn resize(&mut self, offset: isize, size: usize) {
assert!(offset + (size as isize) < (self.maxsize() as isize)); assert!(offset + (size as isize) < (self.maxsize() as isize));
unsafe { ffi::gst_memory_resize(self.as_mut_ptr(), offset, size) } unsafe { ffi::gst_memory_resize(self.as_mut_ptr(), offset, size) }

View file

@ -31,6 +31,7 @@ impl MessageRef {
} }
#[doc(alias = "get_seqnum")] #[doc(alias = "get_seqnum")]
#[doc(alias = "gst_message_get_seqnum")]
pub fn seqnum(&self) -> Seqnum { pub fn seqnum(&self) -> Seqnum {
unsafe { unsafe {
let seqnum = ffi::gst_message_get_seqnum(self.as_mut_ptr()); let seqnum = ffi::gst_message_get_seqnum(self.as_mut_ptr());
@ -55,6 +56,7 @@ impl MessageRef {
} }
#[doc(alias = "get_structure")] #[doc(alias = "get_structure")]
#[doc(alias = "gst_message_get_structure")]
pub fn structure(&self) -> Option<&StructureRef> { pub fn structure(&self) -> Option<&StructureRef> {
unsafe { unsafe {
let structure = ffi::gst_message_get_structure(self.as_mut_ptr()); let structure = ffi::gst_message_get_structure(self.as_mut_ptr());
@ -252,6 +254,7 @@ impl<'a> Error<'a> {
} }
#[doc(alias = "get_error")] #[doc(alias = "get_error")]
#[doc(alias = "gst_message_parse_error")]
pub fn error(&self) -> glib::Error { pub fn error(&self) -> glib::Error {
unsafe { unsafe {
let mut error = ptr::null_mut(); let mut error = ptr::null_mut();
@ -276,6 +279,7 @@ impl<'a> Error<'a> {
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
#[doc(alias = "get_details")] #[doc(alias = "get_details")]
#[doc(alias = "gst_message_parse_error_details")]
pub fn details(&self) -> Option<&StructureRef> { pub fn details(&self) -> Option<&StructureRef> {
unsafe { unsafe {
let mut details = ptr::null(); let mut details = ptr::null();
@ -329,6 +333,7 @@ impl<'a> Warning<'a> {
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
#[doc(alias = "get_details")] #[doc(alias = "get_details")]
#[doc(alias = "gst_message_parse_error_details")]
pub fn details(&self) -> Option<&StructureRef> { pub fn details(&self) -> Option<&StructureRef> {
unsafe { unsafe {
let mut details = ptr::null(); let mut details = ptr::null();
@ -382,6 +387,7 @@ impl<'a> Info<'a> {
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
#[doc(alias = "get_details")] #[doc(alias = "get_details")]
#[doc(alias = "gst_message_parse_error_details")]
pub fn details(&self) -> Option<&StructureRef> { pub fn details(&self) -> Option<&StructureRef> {
unsafe { unsafe {
let mut details = ptr::null(); let mut details = ptr::null();
@ -443,6 +449,7 @@ impl<'a> Buffering<'a> {
} }
#[doc(alias = "get_buffering_stats")] #[doc(alias = "get_buffering_stats")]
#[doc(alias = "gst_message_parse_buffering_stats")]
pub fn buffering_stats(&self) -> (crate::BufferingMode, i32, i32, i64) { pub fn buffering_stats(&self) -> (crate::BufferingMode, i32, i32, i64) {
unsafe { unsafe {
let mut mode = mem::MaybeUninit::uninit(); let mut mode = mem::MaybeUninit::uninit();
@ -652,6 +659,7 @@ impl<'a> ClockProvide<'a> {
} }
#[doc(alias = "get_clock")] #[doc(alias = "get_clock")]
#[doc(alias = "gst_message_parse_clock_provide")]
pub fn clock(&self) -> Option<crate::Clock> { pub fn clock(&self) -> Option<crate::Clock> {
let mut clock = ptr::null_mut(); let mut clock = ptr::null_mut();
@ -692,6 +700,7 @@ impl<'a> ClockLost<'a> {
} }
#[doc(alias = "get_clock")] #[doc(alias = "get_clock")]
#[doc(alias = "gst_message_parse_clock_lost")]
pub fn clock(&self) -> Option<crate::Clock> { pub fn clock(&self) -> Option<crate::Clock> {
let mut clock = ptr::null_mut(); let mut clock = ptr::null_mut();
@ -717,6 +726,7 @@ impl<'a> NewClock<'a> {
} }
#[doc(alias = "get_clock")] #[doc(alias = "get_clock")]
#[doc(alias = "gst_message_parse_new_clock")]
pub fn clock(&self) -> Option<crate::Clock> { pub fn clock(&self) -> Option<crate::Clock> {
let mut clock = ptr::null_mut(); let mut clock = ptr::null_mut();
@ -792,6 +802,7 @@ impl<'a> StreamStatus<'a> {
} }
#[doc(alias = "get_stream_status_object")] #[doc(alias = "get_stream_status_object")]
#[doc(alias = "gst_message_get_stream_status_object")]
pub fn stream_status_object(&self) -> Option<glib::Value> { pub fn stream_status_object(&self) -> Option<glib::Value> {
unsafe { unsafe {
let value = ffi::gst_message_get_stream_status_object(self.as_mut_ptr()); let value = ffi::gst_message_get_stream_status_object(self.as_mut_ptr());
@ -1100,6 +1111,7 @@ impl<'a> Qos<'a> {
} }
#[doc(alias = "get_values")] #[doc(alias = "get_values")]
#[doc(alias = "gst_message_parse_qos_values")]
pub fn values(&self) -> (i64, f64, i32) { pub fn values(&self) -> (i64, f64, i32) {
unsafe { unsafe {
let mut jitter = mem::MaybeUninit::uninit(); let mut jitter = mem::MaybeUninit::uninit();
@ -1122,6 +1134,7 @@ impl<'a> Qos<'a> {
} }
#[doc(alias = "get_stats")] #[doc(alias = "get_stats")]
#[doc(alias = "gst_message_parse_qos_stats")]
pub fn stats(&self) -> (GenericFormattedValue, GenericFormattedValue) { pub fn stats(&self) -> (GenericFormattedValue, GenericFormattedValue) {
unsafe { unsafe {
let mut format = mem::MaybeUninit::uninit(); let mut format = mem::MaybeUninit::uninit();
@ -1203,6 +1216,7 @@ impl<'a> Toc<'a> {
} }
#[doc(alias = "get_toc")] #[doc(alias = "get_toc")]
#[doc(alias = "gst_message_parse_toc")]
pub fn toc(&self) -> (crate::Toc, bool) { pub fn toc(&self) -> (crate::Toc, bool) {
unsafe { unsafe {
let mut toc = ptr::null_mut(); let mut toc = ptr::null_mut();
@ -1252,6 +1266,7 @@ impl<'a> StreamStart<'a> {
} }
#[doc(alias = "get_group_id")] #[doc(alias = "get_group_id")]
#[doc(alias = "gst_message_parse_group_id")]
pub fn group_id(&self) -> Option<GroupId> { pub fn group_id(&self) -> Option<GroupId> {
unsafe { unsafe {
let mut group_id = mem::MaybeUninit::uninit(); let mut group_id = mem::MaybeUninit::uninit();
@ -1287,6 +1302,7 @@ impl<'a> NeedContext<'a> {
} }
#[doc(alias = "get_context_type")] #[doc(alias = "get_context_type")]
#[doc(alias = "gst_message_parse_context_type")]
pub fn context_type(&self) -> &str { pub fn context_type(&self) -> &str {
unsafe { unsafe {
let mut context_type = ptr::null(); let mut context_type = ptr::null();
@ -1312,6 +1328,7 @@ impl<'a> HaveContext<'a> {
} }
#[doc(alias = "get_context")] #[doc(alias = "get_context")]
#[doc(alias = "gst_message_parse_have_context")]
pub fn context(&self) -> crate::Context { pub fn context(&self) -> crate::Context {
unsafe { unsafe {
let mut context = ptr::null_mut(); let mut context = ptr::null_mut();
@ -1335,6 +1352,7 @@ impl<'a> DeviceAdded<'a> {
} }
#[doc(alias = "get_device")] #[doc(alias = "get_device")]
#[doc(alias = "gst_message_parse_device_added")]
pub fn device(&self) -> crate::Device { pub fn device(&self) -> crate::Device {
unsafe { unsafe {
let mut device = ptr::null_mut(); let mut device = ptr::null_mut();
@ -1360,6 +1378,7 @@ impl<'a> DeviceRemoved<'a> {
} }
#[doc(alias = "get_device")] #[doc(alias = "get_device")]
#[doc(alias = "gst_message_parse_device_removed")]
pub fn device(&self) -> crate::Device { pub fn device(&self) -> crate::Device {
unsafe { unsafe {
let mut device = ptr::null_mut(); let mut device = ptr::null_mut();
@ -1436,6 +1455,7 @@ impl<'a> StreamCollection<'a> {
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
#[doc(alias = "get_stream_collection")] #[doc(alias = "get_stream_collection")]
#[doc(alias = "gst_message_parse_stream_collection")]
pub fn stream_collection(&self) -> crate::StreamCollection { pub fn stream_collection(&self) -> crate::StreamCollection {
unsafe { unsafe {
let mut collection = ptr::null_mut(); let mut collection = ptr::null_mut();
@ -1480,6 +1500,8 @@ impl<'a> StreamsSelected<'a> {
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
#[doc(alias = "get_streams")] #[doc(alias = "get_streams")]
#[doc(alias = "gst_message_streams_selected_get_size")]
#[doc(alias = "gst_message_streams_selected_get_stream")]
pub fn streams(&self) -> Vec<crate::Stream> { pub fn streams(&self) -> Vec<crate::Stream> {
unsafe { unsafe {
let n = ffi::gst_message_streams_selected_get_size(self.as_mut_ptr()); let n = ffi::gst_message_streams_selected_get_size(self.as_mut_ptr());
@ -1516,6 +1538,7 @@ impl<'a> Redirect<'a> {
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
#[doc(alias = "get_entries")] #[doc(alias = "get_entries")]
#[doc(alias = "gst_message_get_num_redirect_entries")]
pub fn entries(&self) -> Vec<(&str, Option<TagList>, Option<&StructureRef>)> { pub fn entries(&self) -> Vec<(&str, Option<TagList>, Option<&StructureRef>)> {
unsafe { unsafe {
let n = ffi::gst_message_get_num_redirect_entries(self.as_mut_ptr()); let n = ffi::gst_message_get_num_redirect_entries(self.as_mut_ptr());
@ -1574,6 +1597,7 @@ impl<'a> DeviceChanged<'a> {
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
#[doc(alias = "get_device_changed")] #[doc(alias = "get_device_changed")]
#[doc(alias = "gst_message_parse_device_changed")]
pub fn device_changed(&self) -> (crate::Device, crate::Device) { pub fn device_changed(&self) -> (crate::Device, crate::Device) {
unsafe { unsafe {
let mut device = ptr::null_mut(); let mut device = ptr::null_mut();

View file

@ -151,6 +151,7 @@ impl<'a, T: MetaAPI> MetaRef<'a, T> {
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
#[doc(alias = "get_seqnum")] #[doc(alias = "get_seqnum")]
#[doc(alias = "gst_meta_get_seqnum")]
pub fn seqnum(&self) -> MetaSeqnum { pub fn seqnum(&self) -> MetaSeqnum {
unsafe { unsafe {
let meta = self.meta as *const _ as *const ffi::GstMeta; let meta = self.meta as *const _ as *const ffi::GstMeta;
@ -189,6 +190,7 @@ impl<'a, T: MetaAPI, U> MetaRefMut<'a, T, U> {
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
#[doc(alias = "get_seqnum")] #[doc(alias = "get_seqnum")]
#[doc(alias = "gst_meta_get_seqnum")]
pub fn seqnum(&self) -> u64 { pub fn seqnum(&self) -> u64 {
unsafe { unsafe {
let meta = self.meta as *const _ as *const ffi::GstMeta; let meta = self.meta as *const _ as *const ffi::GstMeta;
@ -206,6 +208,7 @@ impl<'a, T: MetaAPI, U> MetaRefMut<'a, T, U> {
} }
impl<'a, T: MetaAPI> MetaRefMut<'a, T, Standalone> { impl<'a, T: MetaAPI> MetaRefMut<'a, T, Standalone> {
#[doc(alias = "gst_buffer_remove_meta")]
pub fn remove(mut self) { pub fn remove(mut self) {
unsafe { unsafe {
let res = ffi::gst_buffer_remove_meta( let res = ffi::gst_buffer_remove_meta(
@ -264,6 +267,7 @@ unsafe impl Send for ParentBufferMeta {}
unsafe impl Sync for ParentBufferMeta {} unsafe impl Sync for ParentBufferMeta {}
impl ParentBufferMeta { impl ParentBufferMeta {
#[doc(alias = "gst_buffer_add_parent_buffer_meta")]
pub fn add<'a>(buffer: &'a mut BufferRef, parent: &Buffer) -> MetaRefMut<'a, Self, Standalone> { pub fn add<'a>(buffer: &'a mut BufferRef, parent: &Buffer) -> MetaRefMut<'a, Self, Standalone> {
skip_assert_initialized!(); skip_assert_initialized!();
unsafe { unsafe {
@ -290,6 +294,7 @@ impl ParentBufferMeta {
unsafe impl MetaAPI for ParentBufferMeta { unsafe impl MetaAPI for ParentBufferMeta {
type GstType = ffi::GstParentBufferMeta; type GstType = ffi::GstParentBufferMeta;
#[doc(alias = "gst_parent_buffer_meta_api_get_type")]
fn meta_api() -> glib::Type { fn meta_api() -> glib::Type {
unsafe { from_glib(ffi::gst_parent_buffer_meta_api_get_type()) } unsafe { from_glib(ffi::gst_parent_buffer_meta_api_get_type()) }
} }
@ -310,6 +315,7 @@ unsafe impl Send for ProtectionMeta {}
unsafe impl Sync for ProtectionMeta {} unsafe impl Sync for ProtectionMeta {}
impl ProtectionMeta { impl ProtectionMeta {
#[doc(alias = "gst_buffer_add_protection_meta")]
pub fn add(buffer: &mut BufferRef, info: crate::Structure) -> MetaRefMut<Self, Standalone> { pub fn add(buffer: &mut BufferRef, info: crate::Structure) -> MetaRefMut<Self, Standalone> {
skip_assert_initialized!(); skip_assert_initialized!();
unsafe { unsafe {
@ -333,6 +339,7 @@ impl ProtectionMeta {
unsafe impl MetaAPI for ProtectionMeta { unsafe impl MetaAPI for ProtectionMeta {
type GstType = ffi::GstProtectionMeta; type GstType = ffi::GstProtectionMeta;
#[doc(alias = "gst_protection_meta_api_get_type")]
fn meta_api() -> glib::Type { fn meta_api() -> glib::Type {
unsafe { from_glib(ffi::gst_protection_meta_api_get_type()) } unsafe { from_glib(ffi::gst_protection_meta_api_get_type()) }
} }
@ -361,6 +368,7 @@ unsafe impl Sync for ReferenceTimestampMeta {}
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
impl ReferenceTimestampMeta { impl ReferenceTimestampMeta {
#[doc(alias = "gst_buffer_add_reference_timestamp_meta")]
pub fn add<'a>( pub fn add<'a>(
buffer: &'a mut BufferRef, buffer: &'a mut BufferRef,
reference: &Caps, reference: &Caps,
@ -406,6 +414,7 @@ impl ReferenceTimestampMeta {
unsafe impl MetaAPI for ReferenceTimestampMeta { unsafe impl MetaAPI for ReferenceTimestampMeta {
type GstType = ffi::GstReferenceTimestampMeta; type GstType = ffi::GstReferenceTimestampMeta;
#[doc(alias = "gst_reference_timestamp_meta_api_get_type")]
fn meta_api() -> glib::Type { fn meta_api() -> glib::Type {
unsafe { from_glib(ffi::gst_reference_timestamp_meta_api_get_type()) } unsafe { from_glib(ffi::gst_reference_timestamp_meta_api_get_type()) }
} }

View file

@ -69,6 +69,7 @@ macro_rules! mini_object_wrapper (
} }
} }
#[doc(alias = "gst_mini_object_is_writable")]
pub fn is_writable(&self) -> bool { pub fn is_writable(&self) -> bool {
unsafe { unsafe {
$crate::glib::translate::from_glib($crate::ffi::gst_mini_object_is_writable( $crate::glib::translate::from_glib($crate::ffi::gst_mini_object_is_writable(
@ -383,6 +384,7 @@ macro_rules! mini_object_wrapper (
&mut *(ptr as *mut Self) &mut *(ptr as *mut Self)
} }
#[doc(alias = "gst_mini_object_copy")]
pub fn copy(&self) -> $name { pub fn copy(&self) -> $name {
unsafe { unsafe {
$name::from_glib_full($crate::ffi::gst_mini_object_copy( $name::from_glib_full($crate::ffi::gst_mini_object_copy(

View file

@ -22,6 +22,7 @@ pub trait GstObjectExtManual: 'static {
fn object_flags(&self) -> ObjectFlags; fn object_flags(&self) -> ObjectFlags;
#[doc(alias = "get_g_value_array")] #[doc(alias = "get_g_value_array")]
#[doc(alias = "gst_object_get_g_value_array")]
fn g_value_array( fn g_value_array(
&self, &self,
property_name: &str, property_name: &str,

View file

@ -89,17 +89,24 @@ pub enum PadGetRangeSuccess {
} }
pub trait PadExtManual: 'static { pub trait PadExtManual: 'static {
#[doc(alias = "gst_pad_add_probe")]
fn add_probe<F>(&self, mask: PadProbeType, func: F) -> Option<PadProbeId> fn add_probe<F>(&self, mask: PadProbeType, func: F) -> Option<PadProbeId>
where where
F: Fn(&Self, &mut PadProbeInfo) -> PadProbeReturn + Send + Sync + 'static; F: Fn(&Self, &mut PadProbeInfo) -> PadProbeReturn + Send + Sync + 'static;
#[doc(alias = "gst_pad_remove_probe")]
fn remove_probe(&self, id: PadProbeId); fn remove_probe(&self, id: PadProbeId);
#[doc(alias = "gst_pad_chain")]
fn chain(&self, buffer: Buffer) -> Result<FlowSuccess, FlowError>; fn chain(&self, buffer: Buffer) -> Result<FlowSuccess, FlowError>;
#[doc(alias = "gst_pad_push")]
fn push(&self, buffer: Buffer) -> Result<FlowSuccess, FlowError>; fn push(&self, buffer: Buffer) -> Result<FlowSuccess, FlowError>;
#[doc(alias = "gst_pad_chain_list")]
fn chain_list(&self, list: BufferList) -> Result<FlowSuccess, FlowError>; fn chain_list(&self, list: BufferList) -> Result<FlowSuccess, FlowError>;
#[doc(alias = "gst_pad_push_list")]
fn push_list(&self, list: BufferList) -> Result<FlowSuccess, FlowError>; fn push_list(&self, list: BufferList) -> Result<FlowSuccess, FlowError>;
#[doc(alias = "gst_pad_pull_range")]
fn pull_range(&self, offset: u64, size: u32) -> Result<Buffer, FlowError>; fn pull_range(&self, offset: u64, size: u32) -> Result<Buffer, FlowError>;
fn pull_range_fill( fn pull_range_fill(
&self, &self,
@ -108,6 +115,7 @@ pub trait PadExtManual: 'static {
size: u32, size: u32,
) -> Result<(), FlowError>; ) -> Result<(), FlowError>;
#[doc(alias = "get_range")] #[doc(alias = "get_range")]
#[doc(alias = "gst_pad_get_range")]
fn range(&self, offset: u64, size: u32) -> Result<Buffer, FlowError>; fn range(&self, offset: u64, size: u32) -> Result<Buffer, FlowError>;
#[doc(alias = "get_range_fill")] #[doc(alias = "get_range_fill")]
fn range_fill( fn range_fill(
@ -117,21 +125,30 @@ pub trait PadExtManual: 'static {
size: u32, size: u32,
) -> Result<(), FlowError>; ) -> Result<(), FlowError>;
#[doc(alias = "gst_pad_peer_query")]
fn peer_query(&self, query: &mut QueryRef) -> bool; fn peer_query(&self, query: &mut QueryRef) -> bool;
#[doc(alias = "gst_pad_query")]
fn query(&self, query: &mut QueryRef) -> bool; fn query(&self, query: &mut QueryRef) -> bool;
#[doc(alias = "gst_pad_query_default")]
fn query_default<P: IsA<crate::Object>>( fn query_default<P: IsA<crate::Object>>(
&self, &self,
parent: Option<&P>, parent: Option<&P>,
query: &mut QueryRef, query: &mut QueryRef,
) -> bool; ) -> bool;
fn proxy_query_caps(&self, query: &mut QueryRef) -> bool; fn proxy_query_caps(&self, query: &mut QueryRef) -> bool;
#[doc(alias = "gst_pad_proxy_query_accept_caps")]
fn proxy_query_accept_caps(&self, query: &mut QueryRef) -> bool; fn proxy_query_accept_caps(&self, query: &mut QueryRef) -> bool;
#[doc(alias = "gst_pad_event_default")]
fn event_default<P: IsA<crate::Object>>(&self, parent: Option<&P>, event: Event) -> bool; fn event_default<P: IsA<crate::Object>>(&self, parent: Option<&P>, event: Event) -> bool;
#[doc(alias = "gst_pad_push_event")]
fn push_event(&self, event: Event) -> bool; fn push_event(&self, event: Event) -> bool;
#[doc(alias = "gst_pad_send_event")]
fn send_event(&self, event: Event) -> bool; fn send_event(&self, event: Event) -> bool;
#[doc(alias = "gst_pad_iterate_internal_links")]
fn iterate_internal_links(&self) -> crate::Iterator<Pad>; fn iterate_internal_links(&self) -> crate::Iterator<Pad>;
#[doc(alias = "gst_pad_iterate_internal_links_default")]
fn iterate_internal_links_default<P: IsA<crate::Object>>( fn iterate_internal_links_default<P: IsA<crate::Object>>(
&self, &self,
parent: Option<&P>, parent: Option<&P>,
@ -211,8 +228,10 @@ pub trait PadExtManual: 'static {
where where
F: Fn(&Self, Option<&crate::Object>) + Send + Sync + 'static; F: Fn(&Self, Option<&crate::Object>) + Send + Sync + 'static;
#[doc(alias = "gst_pad_start_task")]
fn start_task<F: FnMut() + Send + 'static>(&self, func: F) -> Result<(), glib::BoolError>; fn start_task<F: FnMut() + Send + 'static>(&self, func: F) -> Result<(), glib::BoolError>;
#[doc(alias = "gst_pad_peer_query_convert")]
fn peer_query_convert<V: Into<GenericFormattedValue>, U: SpecificFormattedValue>( fn peer_query_convert<V: Into<GenericFormattedValue>, U: SpecificFormattedValue>(
&self, &self,
src_val: V, src_val: V,
@ -223,12 +242,15 @@ pub trait PadExtManual: 'static {
dest_format: Format, dest_format: Format,
) -> Option<GenericFormattedValue>; ) -> Option<GenericFormattedValue>;
#[doc(alias = "gst_pad_peer_query_duration")]
fn peer_query_duration<T: SpecificFormattedValue>(&self) -> Option<T>; fn peer_query_duration<T: SpecificFormattedValue>(&self) -> Option<T>;
fn peer_query_duration_generic(&self, format: Format) -> Option<GenericFormattedValue>; fn peer_query_duration_generic(&self, format: Format) -> Option<GenericFormattedValue>;
#[doc(alias = "gst_pad_peer_query_position")]
fn peer_query_position<T: SpecificFormattedValue>(&self) -> Option<T>; fn peer_query_position<T: SpecificFormattedValue>(&self) -> Option<T>;
fn peer_query_position_generic(&self, format: Format) -> Option<GenericFormattedValue>; fn peer_query_position_generic(&self, format: Format) -> Option<GenericFormattedValue>;
#[doc(alias = "gst_pad_query_convert")]
fn query_convert<V: Into<GenericFormattedValue>, U: SpecificFormattedValue>( fn query_convert<V: Into<GenericFormattedValue>, U: SpecificFormattedValue>(
&self, &self,
src_val: V, src_val: V,
@ -239,15 +261,18 @@ pub trait PadExtManual: 'static {
dest_format: Format, dest_format: Format,
) -> Option<GenericFormattedValue>; ) -> Option<GenericFormattedValue>;
#[doc(alias = "gst_pad_query_duration")]
fn query_duration<T: SpecificFormattedValue>(&self) -> Option<T>; fn query_duration<T: SpecificFormattedValue>(&self) -> Option<T>;
fn query_duration_generic(&self, format: Format) -> Option<GenericFormattedValue>; fn query_duration_generic(&self, format: Format) -> Option<GenericFormattedValue>;
#[doc(alias = "gst_pad_query_position")]
fn query_position<T: SpecificFormattedValue>(&self) -> Option<T>; fn query_position<T: SpecificFormattedValue>(&self) -> Option<T>;
fn query_position_generic(&self, format: Format) -> Option<GenericFormattedValue>; fn query_position_generic(&self, format: Format) -> Option<GenericFormattedValue>;
#[doc(alias = "get_mode")] #[doc(alias = "get_mode")]
fn mode(&self) -> crate::PadMode; fn mode(&self) -> crate::PadMode;
#[doc(alias = "gst_pad_sticky_events_foreach")]
fn sticky_events_foreach<F: FnMut(Event) -> Result<Option<Event>, Option<Event>>>( fn sticky_events_foreach<F: FnMut(Event) -> Result<Option<Event>, Option<Event>>>(
&self, &self,
func: F, func: F,

View file

@ -11,6 +11,7 @@ use glib::translate::*;
impl PadTemplate { impl PadTemplate {
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
#[doc(alias = "gst_pad_template_new_from_static_pad_template_with_gtype")]
pub fn from_static_pad_template_with_gtype( pub fn from_static_pad_template_with_gtype(
pad_template: &StaticPadTemplate, pad_template: &StaticPadTemplate,
pad_type: glib::types::Type, pad_type: glib::types::Type,

View file

@ -25,11 +25,13 @@ unsafe impl Send for ParseContext {}
unsafe impl Sync for ParseContext {} unsafe impl Sync for ParseContext {}
impl ParseContext { impl ParseContext {
#[doc(alias = "gst_parse_context_new")]
pub fn new() -> Self { pub fn new() -> Self {
unsafe { from_glib_full(ffi::gst_parse_context_new()) } unsafe { from_glib_full(ffi::gst_parse_context_new()) }
} }
#[doc(alias = "get_missing_elements")] #[doc(alias = "get_missing_elements")]
#[doc(alias = "gst_parse_context_get_missing_elements")]
pub fn missing_elements(&self) -> Vec<String> { pub fn missing_elements(&self) -> Vec<String> {
unsafe { unsafe {
FromGlibPtrContainer::from_glib_full(ffi::gst_parse_context_get_missing_elements( FromGlibPtrContainer::from_glib_full(ffi::gst_parse_context_get_missing_elements(

Some files were not shown because too many files have changed in this diff Show more