mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-25 19:11:06 +00:00
gstreamer: Autogenerate some more API
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1182>
This commit is contained in:
parent
7490846309
commit
a028e807df
35 changed files with 375 additions and 477 deletions
|
@ -159,16 +159,6 @@ name = "GstApp.AppSrc"
|
||||||
status = "generate"
|
status = "generate"
|
||||||
final_type = true
|
final_type = true
|
||||||
|
|
||||||
[[object.function]]
|
|
||||||
name = "push_buffer"
|
|
||||||
# Pass by value
|
|
||||||
manual = true
|
|
||||||
|
|
||||||
[[object.function]]
|
|
||||||
name = "push_buffer_list"
|
|
||||||
# Pass by value
|
|
||||||
manual = true
|
|
||||||
|
|
||||||
[[object.signal]]
|
[[object.signal]]
|
||||||
name = "end-of-stream"
|
name = "end-of-stream"
|
||||||
# Action signal
|
# Action signal
|
||||||
|
|
|
@ -219,29 +219,6 @@ impl AppSrc {
|
||||||
AppSrcBuilder::default()
|
AppSrcBuilder::default()
|
||||||
}
|
}
|
||||||
|
|
||||||
#[doc(alias = "gst_app_src_push_buffer")]
|
|
||||||
pub fn push_buffer(&self, buffer: gst::Buffer) -> Result<gst::FlowSuccess, gst::FlowError> {
|
|
||||||
unsafe {
|
|
||||||
try_from_glib(ffi::gst_app_src_push_buffer(
|
|
||||||
self.to_glib_none().0,
|
|
||||||
buffer.into_glib_ptr(),
|
|
||||||
))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[doc(alias = "gst_app_src_push_buffer_list")]
|
|
||||||
pub fn push_buffer_list(
|
|
||||||
&self,
|
|
||||||
list: gst::BufferList,
|
|
||||||
) -> Result<gst::FlowSuccess, gst::FlowError> {
|
|
||||||
unsafe {
|
|
||||||
try_from_glib(ffi::gst_app_src_push_buffer_list(
|
|
||||||
self.to_glib_none().0,
|
|
||||||
list.into_glib_ptr(),
|
|
||||||
))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[doc(alias = "gst_app_src_set_callbacks")]
|
#[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;
|
||||||
|
|
|
@ -109,6 +109,29 @@ impl AppSrc {
|
||||||
unsafe { from_glib(ffi::gst_app_src_get_stream_type(self.to_glib_none().0)) }
|
unsafe { from_glib(ffi::gst_app_src_get_stream_type(self.to_glib_none().0)) }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[doc(alias = "gst_app_src_push_buffer")]
|
||||||
|
pub fn push_buffer(&self, buffer: gst::Buffer) -> Result<gst::FlowSuccess, gst::FlowError> {
|
||||||
|
unsafe {
|
||||||
|
try_from_glib(ffi::gst_app_src_push_buffer(
|
||||||
|
self.to_glib_none().0,
|
||||||
|
buffer.into_glib_ptr(),
|
||||||
|
))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[doc(alias = "gst_app_src_push_buffer_list")]
|
||||||
|
pub fn push_buffer_list(
|
||||||
|
&self,
|
||||||
|
buffer_list: gst::BufferList,
|
||||||
|
) -> Result<gst::FlowSuccess, gst::FlowError> {
|
||||||
|
unsafe {
|
||||||
|
try_from_glib(ffi::gst_app_src_push_buffer_list(
|
||||||
|
self.to_glib_none().0,
|
||||||
|
buffer_list.into_glib_ptr(),
|
||||||
|
))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[doc(alias = "gst_app_src_push_sample")]
|
#[doc(alias = "gst_app_src_push_sample")]
|
||||||
pub fn push_sample(&self, sample: &gst::Sample) -> Result<gst::FlowSuccess, gst::FlowError> {
|
pub fn push_sample(&self, sample: &gst::Sample) -> Result<gst::FlowSuccess, gst::FlowError> {
|
||||||
unsafe {
|
unsafe {
|
||||||
|
|
|
@ -72,6 +72,15 @@ name = "Gst.ClockTime"
|
||||||
status = "manual"
|
status = "manual"
|
||||||
conversion_type = "Option"
|
conversion_type = "Option"
|
||||||
|
|
||||||
|
[[object]]
|
||||||
|
name = "Gst.FlowReturn"
|
||||||
|
status = "manual"
|
||||||
|
must_use = true
|
||||||
|
[object.conversion_type]
|
||||||
|
variant = "Result"
|
||||||
|
ok_type = "gst::FlowSuccess"
|
||||||
|
err_type = "gst::FlowError"
|
||||||
|
|
||||||
[[object]]
|
[[object]]
|
||||||
name = "Gst.Object"
|
name = "Gst.Object"
|
||||||
# For renaming the trait...
|
# For renaming the trait...
|
||||||
|
@ -142,14 +151,6 @@ name = "GstAudio.AudioDecoder"
|
||||||
status = "generate"
|
status = "generate"
|
||||||
manual_traits = ["AudioDecoderExtManual"]
|
manual_traits = ["AudioDecoderExtManual"]
|
||||||
|
|
||||||
[[object.function]]
|
|
||||||
name = "finish_frame"
|
|
||||||
manual = true
|
|
||||||
|
|
||||||
[[object.function]]
|
|
||||||
name = "finish_subframe"
|
|
||||||
manual = true
|
|
||||||
|
|
||||||
[[object.function]]
|
[[object.function]]
|
||||||
name = "get_latency"
|
name = "get_latency"
|
||||||
[[object.function.parameter]]
|
[[object.function.parameter]]
|
||||||
|
@ -204,11 +205,6 @@ manual_traits = ["AudioDecoderExtManual"]
|
||||||
name = "GstAudio.AudioEncoder"
|
name = "GstAudio.AudioEncoder"
|
||||||
status = "generate"
|
status = "generate"
|
||||||
manual_traits = ["AudioEncoderExtManual"]
|
manual_traits = ["AudioEncoderExtManual"]
|
||||||
|
|
||||||
[[object.function]]
|
|
||||||
name = "finish_frame"
|
|
||||||
manual = true
|
|
||||||
|
|
||||||
[[object.function]]
|
[[object.function]]
|
||||||
name = "negotiate"
|
name = "negotiate"
|
||||||
manual = true
|
manual = true
|
||||||
|
|
|
@ -21,19 +21,6 @@ extern "C" {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait AudioDecoderExtManual: 'static {
|
pub trait AudioDecoderExtManual: 'static {
|
||||||
fn finish_frame(
|
|
||||||
&self,
|
|
||||||
buffer: Option<gst::Buffer>,
|
|
||||||
frames: i32,
|
|
||||||
) -> Result<gst::FlowSuccess, gst::FlowError>;
|
|
||||||
|
|
||||||
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
|
||||||
fn finish_subframe(
|
|
||||||
&self,
|
|
||||||
buffer: Option<gst::Buffer>,
|
|
||||||
) -> Result<gst::FlowSuccess, gst::FlowError>;
|
|
||||||
|
|
||||||
fn negotiate(&self) -> Result<(), gst::FlowError>;
|
fn negotiate(&self) -> Result<(), gst::FlowError>;
|
||||||
|
|
||||||
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
||||||
|
@ -63,35 +50,6 @@ pub trait AudioDecoderExtManual: 'static {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<O: IsA<AudioDecoder>> AudioDecoderExtManual for O {
|
impl<O: IsA<AudioDecoder>> AudioDecoderExtManual for O {
|
||||||
fn finish_frame(
|
|
||||||
&self,
|
|
||||||
buffer: Option<gst::Buffer>,
|
|
||||||
frames: i32,
|
|
||||||
) -> Result<gst::FlowSuccess, gst::FlowError> {
|
|
||||||
unsafe {
|
|
||||||
try_from_glib(ffi::gst_audio_decoder_finish_frame(
|
|
||||||
self.as_ref().to_glib_none().0,
|
|
||||||
buffer.map(|b| b.into_glib_ptr()).unwrap_or(ptr::null_mut()),
|
|
||||||
frames,
|
|
||||||
))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
|
||||||
#[doc(alias = "gst_audio_decoder_finish_subframe")]
|
|
||||||
fn finish_subframe(
|
|
||||||
&self,
|
|
||||||
buffer: Option<gst::Buffer>,
|
|
||||||
) -> Result<gst::FlowSuccess, gst::FlowError> {
|
|
||||||
unsafe {
|
|
||||||
try_from_glib(ffi::gst_audio_decoder_finish_subframe(
|
|
||||||
self.as_ref().to_glib_none().0,
|
|
||||||
buffer.map(|b| b.into_glib_ptr()).unwrap_or(ptr::null_mut()),
|
|
||||||
))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[doc(alias = "gst_audio_decoder_negotiate")]
|
#[doc(alias = "gst_audio_decoder_negotiate")]
|
||||||
fn negotiate(&self) -> Result<(), gst::FlowError> {
|
fn negotiate(&self) -> Result<(), gst::FlowError> {
|
||||||
unsafe {
|
unsafe {
|
||||||
|
|
|
@ -7,13 +7,6 @@ use glib::{prelude::*, translate::*};
|
||||||
use crate::AudioEncoder;
|
use crate::AudioEncoder;
|
||||||
|
|
||||||
pub trait AudioEncoderExtManual: 'static {
|
pub trait AudioEncoderExtManual: 'static {
|
||||||
#[doc(alias = "gst_audio_encoder_finish_frame")]
|
|
||||||
fn finish_frame(
|
|
||||||
&self,
|
|
||||||
buffer: Option<gst::Buffer>,
|
|
||||||
frames: i32,
|
|
||||||
) -> Result<gst::FlowSuccess, gst::FlowError>;
|
|
||||||
|
|
||||||
#[doc(alias = "gst_audio_encoder_negotiate")]
|
#[doc(alias = "gst_audio_encoder_negotiate")]
|
||||||
fn negotiate(&self) -> Result<(), gst::FlowError>;
|
fn negotiate(&self) -> Result<(), gst::FlowError>;
|
||||||
|
|
||||||
|
@ -33,20 +26,6 @@ pub trait AudioEncoderExtManual: 'static {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<O: IsA<AudioEncoder>> AudioEncoderExtManual for O {
|
impl<O: IsA<AudioEncoder>> AudioEncoderExtManual for O {
|
||||||
fn finish_frame(
|
|
||||||
&self,
|
|
||||||
buffer: Option<gst::Buffer>,
|
|
||||||
frames: i32,
|
|
||||||
) -> Result<gst::FlowSuccess, gst::FlowError> {
|
|
||||||
unsafe {
|
|
||||||
try_from_glib(ffi::gst_audio_encoder_finish_frame(
|
|
||||||
self.as_ref().to_glib_none().0,
|
|
||||||
buffer.map(|b| b.into_glib_ptr()).unwrap_or(ptr::null_mut()),
|
|
||||||
frames,
|
|
||||||
))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn negotiate(&self) -> Result<(), gst::FlowError> {
|
fn negotiate(&self) -> Result<(), gst::FlowError> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let ret = from_glib(ffi::gst_audio_encoder_negotiate(
|
let ret = from_glib(ffi::gst_audio_encoder_negotiate(
|
||||||
|
|
|
@ -31,6 +31,19 @@ pub trait AudioDecoderExt: 'static {
|
||||||
#[doc(alias = "gst_audio_decoder_allocate_output_buffer")]
|
#[doc(alias = "gst_audio_decoder_allocate_output_buffer")]
|
||||||
fn allocate_output_buffer(&self, size: usize) -> gst::Buffer;
|
fn allocate_output_buffer(&self, size: usize) -> gst::Buffer;
|
||||||
|
|
||||||
|
#[doc(alias = "gst_audio_decoder_finish_frame")]
|
||||||
|
fn finish_frame(
|
||||||
|
&self,
|
||||||
|
buf: Option<gst::Buffer>,
|
||||||
|
frames: i32,
|
||||||
|
) -> Result<gst::FlowSuccess, gst::FlowError>;
|
||||||
|
|
||||||
|
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
||||||
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
||||||
|
#[doc(alias = "gst_audio_decoder_finish_subframe")]
|
||||||
|
fn finish_subframe(&self, buf: Option<gst::Buffer>)
|
||||||
|
-> Result<gst::FlowSuccess, gst::FlowError>;
|
||||||
|
|
||||||
#[doc(alias = "gst_audio_decoder_get_audio_info")]
|
#[doc(alias = "gst_audio_decoder_get_audio_info")]
|
||||||
#[doc(alias = "get_audio_info")]
|
#[doc(alias = "get_audio_info")]
|
||||||
fn audio_info(&self) -> AudioInfo;
|
fn audio_info(&self) -> AudioInfo;
|
||||||
|
@ -152,6 +165,34 @@ impl<O: IsA<AudioDecoder>> AudioDecoderExt for O {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn finish_frame(
|
||||||
|
&self,
|
||||||
|
buf: Option<gst::Buffer>,
|
||||||
|
frames: i32,
|
||||||
|
) -> Result<gst::FlowSuccess, gst::FlowError> {
|
||||||
|
unsafe {
|
||||||
|
try_from_glib(ffi::gst_audio_decoder_finish_frame(
|
||||||
|
self.as_ref().to_glib_none().0,
|
||||||
|
buf.into_glib_ptr(),
|
||||||
|
frames,
|
||||||
|
))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
||||||
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
||||||
|
fn finish_subframe(
|
||||||
|
&self,
|
||||||
|
buf: Option<gst::Buffer>,
|
||||||
|
) -> Result<gst::FlowSuccess, gst::FlowError> {
|
||||||
|
unsafe {
|
||||||
|
try_from_glib(ffi::gst_audio_decoder_finish_subframe(
|
||||||
|
self.as_ref().to_glib_none().0,
|
||||||
|
buf.into_glib_ptr(),
|
||||||
|
))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fn audio_info(&self) -> AudioInfo {
|
fn audio_info(&self) -> AudioInfo {
|
||||||
unsafe {
|
unsafe {
|
||||||
from_glib_none(ffi::gst_audio_decoder_get_audio_info(
|
from_glib_none(ffi::gst_audio_decoder_get_audio_info(
|
||||||
|
|
|
@ -31,6 +31,13 @@ pub trait AudioEncoderExt: 'static {
|
||||||
#[doc(alias = "gst_audio_encoder_allocate_output_buffer")]
|
#[doc(alias = "gst_audio_encoder_allocate_output_buffer")]
|
||||||
fn allocate_output_buffer(&self, size: usize) -> gst::Buffer;
|
fn allocate_output_buffer(&self, size: usize) -> gst::Buffer;
|
||||||
|
|
||||||
|
#[doc(alias = "gst_audio_encoder_finish_frame")]
|
||||||
|
fn finish_frame(
|
||||||
|
&self,
|
||||||
|
buffer: Option<gst::Buffer>,
|
||||||
|
samples: i32,
|
||||||
|
) -> Result<gst::FlowSuccess, gst::FlowError>;
|
||||||
|
|
||||||
#[doc(alias = "gst_audio_encoder_get_audio_info")]
|
#[doc(alias = "gst_audio_encoder_get_audio_info")]
|
||||||
#[doc(alias = "get_audio_info")]
|
#[doc(alias = "get_audio_info")]
|
||||||
fn audio_info(&self) -> AudioInfo;
|
fn audio_info(&self) -> AudioInfo;
|
||||||
|
@ -156,6 +163,20 @@ impl<O: IsA<AudioEncoder>> AudioEncoderExt for O {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn finish_frame(
|
||||||
|
&self,
|
||||||
|
buffer: Option<gst::Buffer>,
|
||||||
|
samples: i32,
|
||||||
|
) -> Result<gst::FlowSuccess, gst::FlowError> {
|
||||||
|
unsafe {
|
||||||
|
try_from_glib(ffi::gst_audio_encoder_finish_frame(
|
||||||
|
self.as_ref().to_glib_none().0,
|
||||||
|
buffer.into_glib_ptr(),
|
||||||
|
samples,
|
||||||
|
))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fn audio_info(&self) -> AudioInfo {
|
fn audio_info(&self) -> AudioInfo {
|
||||||
unsafe {
|
unsafe {
|
||||||
from_glib_none(ffi::gst_audio_encoder_get_audio_info(
|
from_glib_none(ffi::gst_audio_encoder_get_audio_info(
|
||||||
|
|
|
@ -208,16 +208,6 @@ manual_traits = ["AggregatorExtManual"]
|
||||||
name = "get_allocator"
|
name = "get_allocator"
|
||||||
manual = true
|
manual = true
|
||||||
|
|
||||||
[[object.function]]
|
|
||||||
name = "finish_buffer"
|
|
||||||
# Takes ownership
|
|
||||||
manual = true
|
|
||||||
|
|
||||||
[[object.function]]
|
|
||||||
name = "finish_buffer_list"
|
|
||||||
# Takes ownership
|
|
||||||
manual = true
|
|
||||||
|
|
||||||
[[object.function]]
|
[[object.function]]
|
||||||
name = "selected_samples"
|
name = "selected_samples"
|
||||||
# Info parameter
|
# Info parameter
|
||||||
|
|
|
@ -21,17 +21,6 @@ pub trait AggregatorExtManual: 'static {
|
||||||
#[doc(alias = "gst_aggregator_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>;
|
|
||||||
|
|
||||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
|
||||||
#[doc(alias = "gst_aggregator_finish_buffer_list")]
|
|
||||||
fn finish_buffer_list(
|
|
||||||
&self,
|
|
||||||
bufferlist: gst::BufferList,
|
|
||||||
) -> Result<gst::FlowSuccess, gst::FlowError>;
|
|
||||||
|
|
||||||
#[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 = "min-upstream-latency")]
|
#[doc(alias = "min-upstream-latency")]
|
||||||
|
@ -105,29 +94,6 @@ impl<O: IsA<Aggregator>> AggregatorExtManual for O {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn finish_buffer(&self, buffer: gst::Buffer) -> Result<gst::FlowSuccess, gst::FlowError> {
|
|
||||||
unsafe {
|
|
||||||
try_from_glib(ffi::gst_aggregator_finish_buffer(
|
|
||||||
self.as_ref().to_glib_none().0,
|
|
||||||
buffer.into_glib_ptr(),
|
|
||||||
))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
|
||||||
fn finish_buffer_list(
|
|
||||||
&self,
|
|
||||||
bufferlist: gst::BufferList,
|
|
||||||
) -> Result<gst::FlowSuccess, gst::FlowError> {
|
|
||||||
unsafe {
|
|
||||||
try_from_glib(ffi::gst_aggregator_finish_buffer_list(
|
|
||||||
self.as_ref().to_glib_none().0,
|
|
||||||
bufferlist.into_glib_ptr(),
|
|
||||||
))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[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")))]
|
||||||
fn min_upstream_latency(&self) -> gst::ClockTime {
|
fn min_upstream_latency(&self) -> gst::ClockTime {
|
||||||
|
|
|
@ -30,6 +30,17 @@ unsafe impl Send for Aggregator {}
|
||||||
unsafe impl Sync for Aggregator {}
|
unsafe impl Sync for Aggregator {}
|
||||||
|
|
||||||
pub trait AggregatorExt: 'static {
|
pub trait AggregatorExt: 'static {
|
||||||
|
#[doc(alias = "gst_aggregator_finish_buffer")]
|
||||||
|
fn finish_buffer(&self, buffer: gst::Buffer) -> Result<gst::FlowSuccess, gst::FlowError>;
|
||||||
|
|
||||||
|
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||||
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||||
|
#[doc(alias = "gst_aggregator_finish_buffer_list")]
|
||||||
|
fn finish_buffer_list(
|
||||||
|
&self,
|
||||||
|
bufferlist: gst::BufferList,
|
||||||
|
) -> Result<gst::FlowSuccess, gst::FlowError>;
|
||||||
|
|
||||||
#[doc(alias = "gst_aggregator_get_buffer_pool")]
|
#[doc(alias = "gst_aggregator_get_buffer_pool")]
|
||||||
#[doc(alias = "get_buffer_pool")]
|
#[doc(alias = "get_buffer_pool")]
|
||||||
fn buffer_pool(&self) -> Option<gst::BufferPool>;
|
fn buffer_pool(&self) -> Option<gst::BufferPool>;
|
||||||
|
@ -139,6 +150,29 @@ pub trait AggregatorExt: 'static {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<O: IsA<Aggregator>> AggregatorExt for O {
|
impl<O: IsA<Aggregator>> AggregatorExt for O {
|
||||||
|
fn finish_buffer(&self, buffer: gst::Buffer) -> Result<gst::FlowSuccess, gst::FlowError> {
|
||||||
|
unsafe {
|
||||||
|
try_from_glib(ffi::gst_aggregator_finish_buffer(
|
||||||
|
self.as_ref().to_glib_none().0,
|
||||||
|
buffer.into_glib_ptr(),
|
||||||
|
))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||||
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||||
|
fn finish_buffer_list(
|
||||||
|
&self,
|
||||||
|
bufferlist: gst::BufferList,
|
||||||
|
) -> Result<gst::FlowSuccess, gst::FlowError> {
|
||||||
|
unsafe {
|
||||||
|
try_from_glib(ffi::gst_aggregator_finish_buffer_list(
|
||||||
|
self.as_ref().to_glib_none().0,
|
||||||
|
bufferlist.into_glib_ptr(),
|
||||||
|
))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fn buffer_pool(&self) -> Option<gst::BufferPool> {
|
fn buffer_pool(&self) -> Option<gst::BufferPool> {
|
||||||
unsafe {
|
unsafe {
|
||||||
from_glib_full(ffi::gst_aggregator_get_buffer_pool(
|
from_glib_full(ffi::gst_aggregator_get_buffer_pool(
|
||||||
|
|
|
@ -21,6 +21,7 @@ generate = [
|
||||||
"GstRtp.RTCPSDESType",
|
"GstRtp.RTCPSDESType",
|
||||||
"GstRtp.RTCPType",
|
"GstRtp.RTCPType",
|
||||||
"GstRtp.RTCPXRType",
|
"GstRtp.RTCPXRType",
|
||||||
|
"GstRtp.RTPBaseDepayload",
|
||||||
"GstRtp.RTPHeaderExtensionDirection",
|
"GstRtp.RTPHeaderExtensionDirection",
|
||||||
"GstRtp.RTPHeaderExtensionFlags",
|
"GstRtp.RTPHeaderExtensionFlags",
|
||||||
"GstRtp.RTPPayload",
|
"GstRtp.RTPPayload",
|
||||||
|
@ -80,20 +81,6 @@ status = "generate"
|
||||||
name = "rtp_source_meta_api_get_type"
|
name = "rtp_source_meta_api_get_type"
|
||||||
ignore = true
|
ignore = true
|
||||||
|
|
||||||
[[object]]
|
|
||||||
name = "GstRtp.RTPBaseDepayload"
|
|
||||||
status = "generate"
|
|
||||||
|
|
||||||
[[object.function]]
|
|
||||||
name = "push"
|
|
||||||
# Move buffer
|
|
||||||
manual = true
|
|
||||||
|
|
||||||
[[object.function]]
|
|
||||||
name = "push_list"
|
|
||||||
# Move buffer list
|
|
||||||
manual = true
|
|
||||||
|
|
||||||
[[object]]
|
[[object]]
|
||||||
name = "GstRtp.RTPBasePayload"
|
name = "GstRtp.RTPBasePayload"
|
||||||
status = "generate"
|
status = "generate"
|
||||||
|
@ -104,16 +91,6 @@ manual_traits = ["RTPHeaderExtensionExtManual"]
|
||||||
# varargs function
|
# varargs function
|
||||||
ignore = true
|
ignore = true
|
||||||
|
|
||||||
[[object.function]]
|
|
||||||
name = "push"
|
|
||||||
# Move buffer
|
|
||||||
manual = true
|
|
||||||
|
|
||||||
[[object.function]]
|
|
||||||
name = "push_list"
|
|
||||||
# Move buffer list
|
|
||||||
manual = true
|
|
||||||
|
|
||||||
[[object.function]]
|
[[object.function]]
|
||||||
name = "set_outcaps_structure"
|
name = "set_outcaps_structure"
|
||||||
# StructureRef instead of Structure
|
# StructureRef instead of Structure
|
||||||
|
|
|
@ -35,6 +35,12 @@ pub trait RTPBaseDepayloadExt: 'static {
|
||||||
#[doc(alias = "gst_rtp_base_depayload_is_source_info_enabled")]
|
#[doc(alias = "gst_rtp_base_depayload_is_source_info_enabled")]
|
||||||
fn is_source_info_enabled(&self) -> bool;
|
fn is_source_info_enabled(&self) -> bool;
|
||||||
|
|
||||||
|
#[doc(alias = "gst_rtp_base_depayload_push")]
|
||||||
|
fn push(&self, out_buf: gst::Buffer) -> Result<gst::FlowSuccess, gst::FlowError>;
|
||||||
|
|
||||||
|
#[doc(alias = "gst_rtp_base_depayload_push_list")]
|
||||||
|
fn push_list(&self, out_list: gst::BufferList) -> Result<gst::FlowSuccess, gst::FlowError>;
|
||||||
|
|
||||||
#[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_rtp_base_depayload_set_source_info_enabled")]
|
#[doc(alias = "gst_rtp_base_depayload_set_source_info_enabled")]
|
||||||
|
@ -145,6 +151,24 @@ impl<O: IsA<RTPBaseDepayload>> RTPBaseDepayloadExt for O {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn push(&self, out_buf: gst::Buffer) -> Result<gst::FlowSuccess, gst::FlowError> {
|
||||||
|
unsafe {
|
||||||
|
try_from_glib(ffi::gst_rtp_base_depayload_push(
|
||||||
|
self.as_ref().to_glib_none().0,
|
||||||
|
out_buf.into_glib_ptr(),
|
||||||
|
))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn push_list(&self, out_list: gst::BufferList) -> Result<gst::FlowSuccess, gst::FlowError> {
|
||||||
|
unsafe {
|
||||||
|
try_from_glib(ffi::gst_rtp_base_depayload_push_list(
|
||||||
|
self.as_ref().to_glib_none().0,
|
||||||
|
out_list.into_glib_ptr(),
|
||||||
|
))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[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")))]
|
||||||
fn set_source_info_enabled(&self, enable: bool) {
|
fn set_source_info_enabled(&self, enable: bool) {
|
||||||
|
|
|
@ -49,6 +49,12 @@ pub trait RTPBasePayloadExt: 'static {
|
||||||
#[doc(alias = "gst_rtp_base_payload_is_source_info_enabled")]
|
#[doc(alias = "gst_rtp_base_payload_is_source_info_enabled")]
|
||||||
fn is_source_info_enabled(&self) -> bool;
|
fn is_source_info_enabled(&self) -> bool;
|
||||||
|
|
||||||
|
#[doc(alias = "gst_rtp_base_payload_push")]
|
||||||
|
fn push(&self, buffer: gst::Buffer) -> Result<gst::FlowSuccess, gst::FlowError>;
|
||||||
|
|
||||||
|
#[doc(alias = "gst_rtp_base_payload_push_list")]
|
||||||
|
fn push_list(&self, list: gst::BufferList) -> Result<gst::FlowSuccess, gst::FlowError>;
|
||||||
|
|
||||||
#[doc(alias = "gst_rtp_base_payload_set_options")]
|
#[doc(alias = "gst_rtp_base_payload_set_options")]
|
||||||
fn set_options(&self, media: &str, dynamic: bool, encoding_name: &str, clock_rate: u32);
|
fn set_options(&self, media: &str, dynamic: bool, encoding_name: &str, clock_rate: u32);
|
||||||
|
|
||||||
|
@ -320,6 +326,24 @@ impl<O: IsA<RTPBasePayload>> RTPBasePayloadExt for O {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn push(&self, buffer: gst::Buffer) -> Result<gst::FlowSuccess, gst::FlowError> {
|
||||||
|
unsafe {
|
||||||
|
try_from_glib(ffi::gst_rtp_base_payload_push(
|
||||||
|
self.as_ref().to_glib_none().0,
|
||||||
|
buffer.into_glib_ptr(),
|
||||||
|
))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn push_list(&self, list: gst::BufferList) -> Result<gst::FlowSuccess, gst::FlowError> {
|
||||||
|
unsafe {
|
||||||
|
try_from_glib(ffi::gst_rtp_base_payload_push_list(
|
||||||
|
self.as_ref().to_glib_none().0,
|
||||||
|
list.into_glib_ptr(),
|
||||||
|
))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fn set_options(&self, media: &str, dynamic: bool, encoding_name: &str, clock_rate: u32) {
|
fn set_options(&self, media: &str, dynamic: bool, encoding_name: &str, clock_rate: u32) {
|
||||||
unsafe {
|
unsafe {
|
||||||
ffi::gst_rtp_base_payload_set_options(
|
ffi::gst_rtp_base_payload_set_options(
|
||||||
|
|
|
@ -1,38 +1,14 @@
|
||||||
use glib::{object::IsA, translate::*};
|
use glib::object::IsA;
|
||||||
|
|
||||||
use crate::RTPBaseDepayload;
|
use crate::RTPBaseDepayload;
|
||||||
|
|
||||||
pub trait RTPBaseDepayloadExtManual: 'static {
|
pub trait RTPBaseDepayloadExtManual: 'static {
|
||||||
#[doc(alias = "gst_rtp_base_depayload_push")]
|
|
||||||
fn push(&self, buffer: gst::Buffer) -> Result<gst::FlowSuccess, gst::FlowError>;
|
|
||||||
|
|
||||||
#[doc(alias = "gst_rtp_base_depayload_push_list")]
|
|
||||||
fn push_list(&self, list: gst::BufferList) -> Result<gst::FlowSuccess, gst::FlowError>;
|
|
||||||
|
|
||||||
fn sink_pad(&self) -> &gst::Pad;
|
fn sink_pad(&self) -> &gst::Pad;
|
||||||
|
|
||||||
fn src_pad(&self) -> &gst::Pad;
|
fn src_pad(&self) -> &gst::Pad;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<O: IsA<RTPBaseDepayload>> RTPBaseDepayloadExtManual for O {
|
impl<O: IsA<RTPBaseDepayload>> RTPBaseDepayloadExtManual for O {
|
||||||
fn push(&self, out_buf: gst::Buffer) -> Result<gst::FlowSuccess, gst::FlowError> {
|
|
||||||
unsafe {
|
|
||||||
try_from_glib(ffi::gst_rtp_base_depayload_push(
|
|
||||||
self.as_ref().to_glib_none().0,
|
|
||||||
out_buf.into_glib_ptr(),
|
|
||||||
))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn push_list(&self, out_list: gst::BufferList) -> Result<gst::FlowSuccess, gst::FlowError> {
|
|
||||||
unsafe {
|
|
||||||
try_from_glib(ffi::gst_rtp_base_depayload_push_list(
|
|
||||||
self.as_ref().to_glib_none().0,
|
|
||||||
out_list.into_glib_ptr(),
|
|
||||||
))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn sink_pad(&self) -> &gst::Pad {
|
fn sink_pad(&self) -> &gst::Pad {
|
||||||
unsafe {
|
unsafe {
|
||||||
let elt = &*(self.as_ptr() as *const ffi::GstRTPBaseDepayload);
|
let elt = &*(self.as_ptr() as *const ffi::GstRTPBaseDepayload);
|
||||||
|
|
|
@ -11,12 +11,6 @@ pub trait RTPBasePayloadExtManual: 'static {
|
||||||
#[doc(alias = "gst_rtp_base_payload_set_outcaps")]
|
#[doc(alias = "gst_rtp_base_payload_set_outcaps")]
|
||||||
fn set_outcaps(&self, s: Option<&gst::StructureRef>) -> Result<(), glib::error::BoolError>;
|
fn set_outcaps(&self, s: Option<&gst::StructureRef>) -> Result<(), glib::error::BoolError>;
|
||||||
|
|
||||||
#[doc(alias = "gst_rtp_base_payload_push")]
|
|
||||||
fn push(&self, buffer: gst::Buffer) -> Result<gst::FlowSuccess, gst::FlowError>;
|
|
||||||
|
|
||||||
#[doc(alias = "gst_rtp_base_payload_push_list")]
|
|
||||||
fn push_list(&self, list: gst::BufferList) -> Result<gst::FlowSuccess, gst::FlowError>;
|
|
||||||
|
|
||||||
fn sink_pad(&self) -> &gst::Pad;
|
fn sink_pad(&self) -> &gst::Pad;
|
||||||
|
|
||||||
fn src_pad(&self) -> &gst::Pad;
|
fn src_pad(&self) -> &gst::Pad;
|
||||||
|
@ -39,24 +33,6 @@ impl<O: IsA<RTPBasePayload>> RTPBasePayloadExtManual for O {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn push(&self, buffer: gst::Buffer) -> Result<gst::FlowSuccess, gst::FlowError> {
|
|
||||||
unsafe {
|
|
||||||
try_from_glib(ffi::gst_rtp_base_payload_push(
|
|
||||||
self.as_ref().to_glib_none().0,
|
|
||||||
buffer.into_glib_ptr(),
|
|
||||||
))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn push_list(&self, list: gst::BufferList) -> Result<gst::FlowSuccess, gst::FlowError> {
|
|
||||||
unsafe {
|
|
||||||
try_from_glib(ffi::gst_rtp_base_payload_push_list(
|
|
||||||
self.as_ref().to_glib_none().0,
|
|
||||||
list.into_glib_ptr(),
|
|
||||||
))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn sink_pad(&self) -> &gst::Pad {
|
fn sink_pad(&self) -> &gst::Pad {
|
||||||
unsafe {
|
unsafe {
|
||||||
let elt = &*(self.as_ptr() as *const ffi::GstRTPBasePayload);
|
let elt = &*(self.as_ptr() as *const ffi::GstRTPBasePayload);
|
||||||
|
|
|
@ -54,7 +54,6 @@ manual = [
|
||||||
"Gst.BufferPoolAcquireParams",
|
"Gst.BufferPoolAcquireParams",
|
||||||
"Gst.ClockTimeDiff",
|
"Gst.ClockTimeDiff",
|
||||||
"Gst.Element",
|
"Gst.Element",
|
||||||
"Gst.FlowReturn",
|
|
||||||
"Gst.Format",
|
"Gst.Format",
|
||||||
"Gst.Memory",
|
"Gst.Memory",
|
||||||
"Gst.Message",
|
"Gst.Message",
|
||||||
|
@ -94,13 +93,22 @@ name = "Gst.Event"
|
||||||
status = "manual"
|
status = "manual"
|
||||||
ref_mode = "ref"
|
ref_mode = "ref"
|
||||||
|
|
||||||
|
[[object]]
|
||||||
|
name = "Gst.FlowReturn"
|
||||||
|
status = "manual"
|
||||||
|
must_use = true
|
||||||
|
[object.conversion_type]
|
||||||
|
variant = "Result"
|
||||||
|
ok_type = "gst::FlowSuccess"
|
||||||
|
err_type = "gst::FlowError"
|
||||||
|
|
||||||
[[object]]
|
[[object]]
|
||||||
name = "Gst.Query"
|
name = "Gst.Query"
|
||||||
status = "manual"
|
status = "manual"
|
||||||
ref_mode = "ref"
|
ref_mode = "ref"
|
||||||
|
|
||||||
[[object]]
|
[[object]]
|
||||||
name = "gst.Structure"
|
name = "Gst.Structure"
|
||||||
status = "manual"
|
status = "manual"
|
||||||
ref_mode = "ref"
|
ref_mode = "ref"
|
||||||
|
|
||||||
|
@ -201,11 +209,9 @@ status = "generate"
|
||||||
|
|
||||||
[[object.function]]
|
[[object.function]]
|
||||||
name = "send_event"
|
name = "send_event"
|
||||||
manual = true
|
[[object.function.parameter]]
|
||||||
|
name = "structure"
|
||||||
[[object.function]]
|
move = true
|
||||||
name = "send_event_simple"
|
|
||||||
manual = true
|
|
||||||
|
|
||||||
[[object.function]]
|
[[object.function]]
|
||||||
name = "send_key_event"
|
name = "send_key_event"
|
||||||
|
@ -439,18 +445,6 @@ manual_traits = ["VideoDecoderExtManual"]
|
||||||
name = "allocate_output_frame_with_params"
|
name = "allocate_output_frame_with_params"
|
||||||
ignore = true
|
ignore = true
|
||||||
|
|
||||||
[[object.function]]
|
|
||||||
name = "finish_frame"
|
|
||||||
manual = true
|
|
||||||
|
|
||||||
[[object.function]]
|
|
||||||
name = "release_frame"
|
|
||||||
manual = true
|
|
||||||
|
|
||||||
[[object.function]]
|
|
||||||
name = "drop_frame"
|
|
||||||
manual = true
|
|
||||||
|
|
||||||
[[object.function]]
|
[[object.function]]
|
||||||
name = "finish_subframe"
|
name = "finish_subframe"
|
||||||
manual = true
|
manual = true
|
||||||
|
@ -529,10 +523,6 @@ manual_traits = ["VideoEncoderExtManual"]
|
||||||
name = "allocate_output_frame_with_params"
|
name = "allocate_output_frame_with_params"
|
||||||
ignore = true
|
ignore = true
|
||||||
|
|
||||||
[[object.function]]
|
|
||||||
name = "finish_frame"
|
|
||||||
manual = true
|
|
||||||
|
|
||||||
[[object.function]]
|
[[object.function]]
|
||||||
name = "finish_subframe"
|
name = "finish_subframe"
|
||||||
manual = true
|
manual = true
|
||||||
|
|
|
@ -36,6 +36,14 @@ pub trait NavigationExt: 'static {
|
||||||
#[doc(alias = "gst_navigation_send_command")]
|
#[doc(alias = "gst_navigation_send_command")]
|
||||||
fn send_command(&self, command: NavigationCommand);
|
fn send_command(&self, command: NavigationCommand);
|
||||||
|
|
||||||
|
#[doc(alias = "gst_navigation_send_event")]
|
||||||
|
fn send_event(&self, structure: gst::Structure);
|
||||||
|
|
||||||
|
#[cfg(any(feature = "v1_22", feature = "dox"))]
|
||||||
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))]
|
||||||
|
#[doc(alias = "gst_navigation_send_event_simple")]
|
||||||
|
fn send_event_simple(&self, event: gst::Event);
|
||||||
|
|
||||||
#[doc(alias = "gst_navigation_send_key_event")]
|
#[doc(alias = "gst_navigation_send_key_event")]
|
||||||
fn send_key_event(&self, event: &str, key: &str);
|
fn send_key_event(&self, event: &str, key: &str);
|
||||||
|
|
||||||
|
@ -55,6 +63,26 @@ impl<O: IsA<Navigation>> NavigationExt for O {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn send_event(&self, structure: gst::Structure) {
|
||||||
|
unsafe {
|
||||||
|
ffi::gst_navigation_send_event(
|
||||||
|
self.as_ref().to_glib_none().0,
|
||||||
|
structure.into_glib_ptr(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(any(feature = "v1_22", feature = "dox"))]
|
||||||
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))]
|
||||||
|
fn send_event_simple(&self, event: gst::Event) {
|
||||||
|
unsafe {
|
||||||
|
ffi::gst_navigation_send_event_simple(
|
||||||
|
self.as_ref().to_glib_none().0,
|
||||||
|
event.into_glib_ptr(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fn send_key_event(&self, event: &str, key: &str) {
|
fn send_key_event(&self, event: &str, key: &str) {
|
||||||
unsafe {
|
unsafe {
|
||||||
ffi::gst_navigation_send_key_event(
|
ffi::gst_navigation_send_key_event(
|
||||||
|
|
|
@ -38,6 +38,12 @@ pub trait VideoDecoderExt: 'static {
|
||||||
#[doc(alias = "gst_video_decoder_allocate_output_buffer")]
|
#[doc(alias = "gst_video_decoder_allocate_output_buffer")]
|
||||||
fn allocate_output_buffer(&self) -> Result<gst::Buffer, glib::BoolError>;
|
fn allocate_output_buffer(&self) -> Result<gst::Buffer, glib::BoolError>;
|
||||||
|
|
||||||
|
#[doc(alias = "gst_video_decoder_drop_frame")]
|
||||||
|
fn drop_frame(&self, frame: VideoCodecFrame) -> Result<gst::FlowSuccess, gst::FlowError>;
|
||||||
|
|
||||||
|
#[doc(alias = "gst_video_decoder_finish_frame")]
|
||||||
|
fn finish_frame(&self, frame: VideoCodecFrame) -> Result<gst::FlowSuccess, gst::FlowError>;
|
||||||
|
|
||||||
#[doc(alias = "gst_video_decoder_get_buffer_pool")]
|
#[doc(alias = "gst_video_decoder_get_buffer_pool")]
|
||||||
#[doc(alias = "get_buffer_pool")]
|
#[doc(alias = "get_buffer_pool")]
|
||||||
fn buffer_pool(&self) -> Option<gst::BufferPool>;
|
fn buffer_pool(&self) -> Option<gst::BufferPool>;
|
||||||
|
@ -83,7 +89,7 @@ pub trait VideoDecoderExt: 'static {
|
||||||
fn is_subframe_mode(&self) -> bool;
|
fn is_subframe_mode(&self) -> bool;
|
||||||
|
|
||||||
#[doc(alias = "gst_video_decoder_have_frame")]
|
#[doc(alias = "gst_video_decoder_have_frame")]
|
||||||
fn have_frame(&self) -> gst::FlowReturn;
|
fn have_frame(&self) -> Result<gst::FlowSuccess, gst::FlowError>;
|
||||||
|
|
||||||
#[doc(alias = "gst_video_decoder_merge_tags")]
|
#[doc(alias = "gst_video_decoder_merge_tags")]
|
||||||
fn merge_tags(&self, tags: Option<&gst::TagList>, mode: gst::TagMergeMode);
|
fn merge_tags(&self, tags: Option<&gst::TagList>, mode: gst::TagMergeMode);
|
||||||
|
@ -91,6 +97,9 @@ pub trait VideoDecoderExt: 'static {
|
||||||
#[doc(alias = "gst_video_decoder_proxy_getcaps")]
|
#[doc(alias = "gst_video_decoder_proxy_getcaps")]
|
||||||
fn proxy_getcaps(&self, caps: Option<&gst::Caps>, filter: Option<&gst::Caps>) -> gst::Caps;
|
fn proxy_getcaps(&self, caps: Option<&gst::Caps>, filter: Option<&gst::Caps>) -> gst::Caps;
|
||||||
|
|
||||||
|
#[doc(alias = "gst_video_decoder_release_frame")]
|
||||||
|
fn release_frame(&self, frame: VideoCodecFrame);
|
||||||
|
|
||||||
#[cfg(any(feature = "v1_20", feature = "dox"))]
|
#[cfg(any(feature = "v1_20", feature = "dox"))]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))]
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))]
|
||||||
#[doc(alias = "gst_video_decoder_request_sync_point")]
|
#[doc(alias = "gst_video_decoder_request_sync_point")]
|
||||||
|
@ -234,6 +243,24 @@ impl<O: IsA<VideoDecoder>> VideoDecoderExt for O {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn drop_frame(&self, frame: VideoCodecFrame) -> Result<gst::FlowSuccess, gst::FlowError> {
|
||||||
|
unsafe {
|
||||||
|
try_from_glib(ffi::gst_video_decoder_drop_frame(
|
||||||
|
self.as_ref().to_glib_none().0,
|
||||||
|
frame.into_glib_ptr(),
|
||||||
|
))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn finish_frame(&self, frame: VideoCodecFrame) -> Result<gst::FlowSuccess, gst::FlowError> {
|
||||||
|
unsafe {
|
||||||
|
try_from_glib(ffi::gst_video_decoder_finish_frame(
|
||||||
|
self.as_ref().to_glib_none().0,
|
||||||
|
frame.into_glib_ptr(),
|
||||||
|
))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fn buffer_pool(&self) -> Option<gst::BufferPool> {
|
fn buffer_pool(&self) -> Option<gst::BufferPool> {
|
||||||
unsafe {
|
unsafe {
|
||||||
from_glib_full(ffi::gst_video_decoder_get_buffer_pool(
|
from_glib_full(ffi::gst_video_decoder_get_buffer_pool(
|
||||||
|
@ -303,9 +330,9 @@ impl<O: IsA<VideoDecoder>> VideoDecoderExt for O {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn have_frame(&self) -> gst::FlowReturn {
|
fn have_frame(&self) -> Result<gst::FlowSuccess, gst::FlowError> {
|
||||||
unsafe {
|
unsafe {
|
||||||
from_glib(ffi::gst_video_decoder_have_frame(
|
try_from_glib(ffi::gst_video_decoder_have_frame(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
@ -331,6 +358,15 @@ impl<O: IsA<VideoDecoder>> VideoDecoderExt for O {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn release_frame(&self, frame: VideoCodecFrame) {
|
||||||
|
unsafe {
|
||||||
|
ffi::gst_video_decoder_release_frame(
|
||||||
|
self.as_ref().to_glib_none().0,
|
||||||
|
frame.into_glib_ptr(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v1_20", feature = "dox"))]
|
#[cfg(any(feature = "v1_20", feature = "dox"))]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))]
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))]
|
||||||
fn request_sync_point(
|
fn request_sync_point(
|
||||||
|
|
|
@ -31,6 +31,9 @@ pub trait VideoEncoderExt: 'static {
|
||||||
#[doc(alias = "gst_video_encoder_allocate_output_buffer")]
|
#[doc(alias = "gst_video_encoder_allocate_output_buffer")]
|
||||||
fn allocate_output_buffer(&self, size: usize) -> gst::Buffer;
|
fn allocate_output_buffer(&self, size: usize) -> gst::Buffer;
|
||||||
|
|
||||||
|
#[doc(alias = "gst_video_encoder_finish_frame")]
|
||||||
|
fn finish_frame(&self, frame: VideoCodecFrame) -> Result<gst::FlowSuccess, gst::FlowError>;
|
||||||
|
|
||||||
#[doc(alias = "gst_video_encoder_get_max_encode_time")]
|
#[doc(alias = "gst_video_encoder_get_max_encode_time")]
|
||||||
#[doc(alias = "get_max_encode_time")]
|
#[doc(alias = "get_max_encode_time")]
|
||||||
fn max_encode_time(&self, frame: &VideoCodecFrame) -> gst::ClockTimeDiff;
|
fn max_encode_time(&self, frame: &VideoCodecFrame) -> gst::ClockTimeDiff;
|
||||||
|
@ -87,6 +90,15 @@ impl<O: IsA<VideoEncoder>> VideoEncoderExt for O {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn finish_frame(&self, frame: VideoCodecFrame) -> Result<gst::FlowSuccess, gst::FlowError> {
|
||||||
|
unsafe {
|
||||||
|
try_from_glib(ffi::gst_video_encoder_finish_frame(
|
||||||
|
self.as_ref().to_glib_none().0,
|
||||||
|
frame.into_glib_ptr(),
|
||||||
|
))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fn max_encode_time(&self, frame: &VideoCodecFrame) -> gst::ClockTimeDiff {
|
fn max_encode_time(&self, frame: &VideoCodecFrame) -> gst::ClockTimeDiff {
|
||||||
unsafe {
|
unsafe {
|
||||||
ffi::gst_video_encoder_get_max_encode_time(
|
ffi::gst_video_encoder_get_max_encode_time(
|
||||||
|
|
|
@ -41,8 +41,6 @@ mod enums;
|
||||||
#[cfg(feature = "serde")]
|
#[cfg(feature = "serde")]
|
||||||
mod flag_serde;
|
mod flag_serde;
|
||||||
|
|
||||||
mod navigation;
|
|
||||||
|
|
||||||
mod caps;
|
mod caps;
|
||||||
pub use crate::caps::VideoCapsBuilder;
|
pub use crate::caps::VideoCapsBuilder;
|
||||||
|
|
||||||
|
@ -159,7 +157,7 @@ pub mod prelude {
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
||||||
pub use crate::video_aggregator_pad::VideoAggregatorPadExtManual;
|
pub use crate::video_aggregator_pad::VideoAggregatorPadExtManual;
|
||||||
pub use crate::{
|
pub use crate::{
|
||||||
auto::traits::*, navigation::NavigationExtManual, video_buffer_pool::VideoBufferPoolConfig,
|
auto::traits::*, video_buffer_pool::VideoBufferPoolConfig,
|
||||||
video_decoder::VideoDecoderExtManual, video_encoder::VideoEncoderExtManual,
|
video_decoder::VideoDecoderExtManual, video_encoder::VideoEncoderExtManual,
|
||||||
video_format::VideoFormatIteratorExt, video_frame::VideoBufferExt,
|
video_format::VideoFormatIteratorExt, video_frame::VideoBufferExt,
|
||||||
video_overlay::VideoOverlayExtManual,
|
video_overlay::VideoOverlayExtManual,
|
||||||
|
|
|
@ -1,38 +0,0 @@
|
||||||
use glib::{
|
|
||||||
object::IsA,
|
|
||||||
translate::{IntoGlibPtr, ToGlibPtr},
|
|
||||||
};
|
|
||||||
|
|
||||||
use crate::auto::Navigation;
|
|
||||||
|
|
||||||
pub trait NavigationExtManual: 'static {
|
|
||||||
#[doc(alias = "gst_navigation_send_event")]
|
|
||||||
fn send_event(&self, structure: gst::Structure);
|
|
||||||
|
|
||||||
#[cfg(any(feature = "v1_22", feature = "dox"))]
|
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))]
|
|
||||||
#[doc(alias = "gst_navigation_send_event_simple")]
|
|
||||||
fn send_event_simple(&self, event: gst::Event);
|
|
||||||
}
|
|
||||||
|
|
||||||
impl<O: IsA<Navigation>> NavigationExtManual for O {
|
|
||||||
fn send_event(&self, structure: gst::Structure) {
|
|
||||||
unsafe {
|
|
||||||
ffi::gst_navigation_send_event(
|
|
||||||
self.as_ref().to_glib_none().0,
|
|
||||||
structure.into_glib_ptr(),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(any(feature = "v1_22", feature = "dox"))]
|
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))]
|
|
||||||
fn send_event_simple(&self, event: gst::Event) {
|
|
||||||
unsafe {
|
|
||||||
ffi::gst_navigation_send_event_simple(
|
|
||||||
self.as_ref().to_glib_none().0,
|
|
||||||
event.into_glib_ptr(),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -45,10 +45,6 @@ pub trait VideoDecoderExtManual: 'static {
|
||||||
#[doc(alias = "get_allocator")]
|
#[doc(alias = "get_allocator")]
|
||||||
fn allocator(&self) -> (Option<gst::Allocator>, gst::AllocationParams);
|
fn allocator(&self) -> (Option<gst::Allocator>, gst::AllocationParams);
|
||||||
|
|
||||||
fn finish_frame(&self, frame: VideoCodecFrame) -> Result<gst::FlowSuccess, gst::FlowError>;
|
|
||||||
fn release_frame(&self, frame: VideoCodecFrame);
|
|
||||||
fn drop_frame(&self, frame: VideoCodecFrame) -> Result<gst::FlowSuccess, gst::FlowError>;
|
|
||||||
|
|
||||||
#[cfg(any(feature = "v1_20", feature = "dox"))]
|
#[cfg(any(feature = "v1_20", feature = "dox"))]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))]
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))]
|
||||||
#[doc(alias = "gst_video_decoder_finish_subframe")]
|
#[doc(alias = "gst_video_decoder_finish_subframe")]
|
||||||
|
@ -146,36 +142,6 @@ 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> {
|
|
||||||
unsafe {
|
|
||||||
try_from_glib(ffi::gst_video_decoder_finish_frame(
|
|
||||||
self.as_ref().to_glib_none().0,
|
|
||||||
frame.into_glib_ptr(),
|
|
||||||
))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[doc(alias = "gst_video_decoder_release_frame")]
|
|
||||||
fn release_frame(&self, frame: VideoCodecFrame) {
|
|
||||||
unsafe {
|
|
||||||
ffi::gst_video_decoder_release_frame(
|
|
||||||
self.as_ref().to_glib_none().0,
|
|
||||||
frame.into_glib_ptr(),
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[doc(alias = "gst_video_decoder_drop_frame")]
|
|
||||||
fn drop_frame(&self, frame: VideoCodecFrame) -> Result<gst::FlowSuccess, gst::FlowError> {
|
|
||||||
unsafe {
|
|
||||||
try_from_glib(ffi::gst_video_decoder_drop_frame(
|
|
||||||
self.as_ref().to_glib_none().0,
|
|
||||||
frame.into_glib_ptr(),
|
|
||||||
))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[doc(alias = "gst_video_decoder_get_latency")]
|
#[doc(alias = "gst_video_decoder_get_latency")]
|
||||||
fn latency(&self) -> (gst::ClockTime, Option<gst::ClockTime>) {
|
fn latency(&self) -> (gst::ClockTime, Option<gst::ClockTime>) {
|
||||||
let mut min_latency = gst::ffi::GST_CLOCK_TIME_NONE;
|
let mut min_latency = gst::ffi::GST_CLOCK_TIME_NONE;
|
||||||
|
|
|
@ -32,12 +32,6 @@ pub trait VideoEncoderExtManual: 'static {
|
||||||
#[doc(alias = "gst_video_encoder_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(
|
|
||||||
&self,
|
|
||||||
frame: Option<VideoCodecFrame>,
|
|
||||||
) -> 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_video_encoder_finish_subframe")]
|
#[doc(alias = "gst_video_encoder_finish_subframe")]
|
||||||
|
@ -105,18 +99,6 @@ impl<O: IsA<VideoEncoder>> VideoEncoderExtManual for O {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn finish_frame(
|
|
||||||
&self,
|
|
||||||
frame: Option<VideoCodecFrame>,
|
|
||||||
) -> Result<gst::FlowSuccess, gst::FlowError> {
|
|
||||||
unsafe {
|
|
||||||
try_from_glib(ffi::gst_video_encoder_finish_frame(
|
|
||||||
self.as_ref().to_glib_none().0,
|
|
||||||
frame.map(|f| f.into_glib_ptr()).unwrap_or(ptr::null_mut()),
|
|
||||||
))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[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")))]
|
||||||
fn finish_subframe(&self, frame: &VideoCodecFrame) -> Result<gst::FlowSuccess, gst::FlowError> {
|
fn finish_subframe(&self, frame: &VideoCodecFrame) -> Result<gst::FlowSuccess, gst::FlowError> {
|
||||||
|
|
|
@ -532,11 +532,6 @@ manual_traits = ["BufferPoolExtManual"]
|
||||||
# Params and return value
|
# Params and return value
|
||||||
manual = true
|
manual = true
|
||||||
|
|
||||||
[[object.function]]
|
|
||||||
name = "release_buffer"
|
|
||||||
# Takes ownership
|
|
||||||
manual = true
|
|
||||||
|
|
||||||
[[object.function]]
|
[[object.function]]
|
||||||
name = "set_active"
|
name = "set_active"
|
||||||
[object.function.return]
|
[object.function.return]
|
||||||
|
@ -605,8 +600,8 @@ final_type = true
|
||||||
|
|
||||||
[[object.function]]
|
[[object.function]]
|
||||||
name = "post"
|
name = "post"
|
||||||
# transfer ownership of the message
|
[object.function.return]
|
||||||
manual = true
|
bool_return_is_error = "Failed to post message"
|
||||||
|
|
||||||
[[object]]
|
[[object]]
|
||||||
name = "Gst.Caps"
|
name = "Gst.Caps"
|
||||||
|
@ -1085,8 +1080,8 @@ manual_traits = ["ElementExtManual"]
|
||||||
|
|
||||||
[[object.function]]
|
[[object.function]]
|
||||||
name = "post_message"
|
name = "post_message"
|
||||||
# takes ownership of message
|
[object.function.return]
|
||||||
manual = true
|
bool_return_is_error = "Failed to post message"
|
||||||
|
|
||||||
[[object.function]]
|
[[object.function]]
|
||||||
name = "add_pad"
|
name = "add_pad"
|
||||||
|
@ -1604,26 +1599,6 @@ manual_traits = ["PadExtManual"]
|
||||||
# Don't use a ulong
|
# Don't use a ulong
|
||||||
manual = true
|
manual = true
|
||||||
|
|
||||||
[[object.function]]
|
|
||||||
name = "chain"
|
|
||||||
# Move buffer
|
|
||||||
manual = true
|
|
||||||
|
|
||||||
[[object.function]]
|
|
||||||
name = "push"
|
|
||||||
# Move buffer
|
|
||||||
manual = true
|
|
||||||
|
|
||||||
[[object.function]]
|
|
||||||
name = "chain_list"
|
|
||||||
# Move buffer
|
|
||||||
manual = true
|
|
||||||
|
|
||||||
[[object.function]]
|
|
||||||
name = "push_list"
|
|
||||||
# Move buffer
|
|
||||||
manual = true
|
|
||||||
|
|
||||||
[[object.function]]
|
[[object.function]]
|
||||||
name = "pull_range"
|
name = "pull_range"
|
||||||
# Buffer can be NULL
|
# Buffer can be NULL
|
||||||
|
@ -1926,11 +1901,6 @@ final_type = true
|
||||||
# useless and unsafe
|
# useless and unsafe
|
||||||
ignore = true
|
ignore = true
|
||||||
|
|
||||||
[[object.function]]
|
|
||||||
name = "set_cache_data"
|
|
||||||
# pass by value
|
|
||||||
manual = true
|
|
||||||
|
|
||||||
[[object.function]]
|
[[object.function]]
|
||||||
name = "get_cache_data"
|
name = "get_cache_data"
|
||||||
# structure ref
|
# structure ref
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use crate::Object;
|
use crate::{Buffer, Object};
|
||||||
use glib::{prelude::*, translate::*};
|
use glib::{prelude::*, translate::*};
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
|
@ -45,6 +45,9 @@ pub trait BufferPoolExt: 'static {
|
||||||
#[doc(alias = "gst_buffer_pool_is_active")]
|
#[doc(alias = "gst_buffer_pool_is_active")]
|
||||||
fn is_active(&self) -> bool;
|
fn is_active(&self) -> bool;
|
||||||
|
|
||||||
|
#[doc(alias = "gst_buffer_pool_release_buffer")]
|
||||||
|
fn release_buffer(&self, buffer: Buffer);
|
||||||
|
|
||||||
#[doc(alias = "gst_buffer_pool_set_active")]
|
#[doc(alias = "gst_buffer_pool_set_active")]
|
||||||
fn set_active(&self, active: bool) -> Result<(), glib::error::BoolError>;
|
fn set_active(&self, active: bool) -> Result<(), glib::error::BoolError>;
|
||||||
|
|
||||||
|
@ -78,6 +81,15 @@ impl<O: IsA<BufferPool>> BufferPoolExt for O {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn release_buffer(&self, buffer: Buffer) {
|
||||||
|
unsafe {
|
||||||
|
ffi::gst_buffer_pool_release_buffer(
|
||||||
|
self.as_ref().to_glib_none().0,
|
||||||
|
buffer.into_glib_ptr(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fn set_active(&self, active: bool) -> Result<(), glib::error::BoolError> {
|
fn set_active(&self, active: bool) -> Result<(), glib::error::BoolError> {
|
||||||
unsafe {
|
unsafe {
|
||||||
glib::result_from_gboolean!(
|
glib::result_from_gboolean!(
|
||||||
|
|
|
@ -74,6 +74,16 @@ impl Bus {
|
||||||
unsafe { from_glib_full(ffi::gst_bus_pop(self.to_glib_none().0)) }
|
unsafe { from_glib_full(ffi::gst_bus_pop(self.to_glib_none().0)) }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[doc(alias = "gst_bus_post")]
|
||||||
|
pub fn post(&self, message: Message) -> Result<(), glib::error::BoolError> {
|
||||||
|
unsafe {
|
||||||
|
glib::result_from_gboolean!(
|
||||||
|
ffi::gst_bus_post(self.to_glib_none().0, message.into_glib_ptr()),
|
||||||
|
"Failed to post message"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[doc(alias = "gst_bus_remove_signal_watch")]
|
#[doc(alias = "gst_bus_remove_signal_watch")]
|
||||||
pub fn remove_signal_watch(&self) {
|
pub fn remove_signal_watch(&self) {
|
||||||
unsafe {
|
unsafe {
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
#![allow(deprecated)]
|
#![allow(deprecated)]
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
Bus, Caps, Clock, ClockTime, Context, ElementFactory, Object, Pad, PadTemplate, State,
|
Bus, Caps, Clock, ClockTime, Context, ElementFactory, Message, Object, Pad, PadTemplate, State,
|
||||||
StateChange, StateChangeError, StateChangeReturn, StateChangeSuccess, URIType,
|
StateChange, StateChangeError, StateChangeReturn, StateChangeSuccess, URIType,
|
||||||
};
|
};
|
||||||
use glib::{
|
use glib::{
|
||||||
|
@ -139,6 +139,9 @@ pub trait ElementExt: 'static {
|
||||||
#[doc(alias = "gst_element_no_more_pads")]
|
#[doc(alias = "gst_element_no_more_pads")]
|
||||||
fn no_more_pads(&self);
|
fn no_more_pads(&self);
|
||||||
|
|
||||||
|
#[doc(alias = "gst_element_post_message")]
|
||||||
|
fn post_message(&self, message: Message) -> Result<(), glib::error::BoolError>;
|
||||||
|
|
||||||
#[doc(alias = "gst_element_provide_clock")]
|
#[doc(alias = "gst_element_provide_clock")]
|
||||||
fn provide_clock(&self) -> Option<Clock>;
|
fn provide_clock(&self) -> Option<Clock>;
|
||||||
|
|
||||||
|
@ -437,6 +440,18 @@ impl<O: IsA<Element>> ElementExt for O {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn post_message(&self, message: Message) -> Result<(), glib::error::BoolError> {
|
||||||
|
unsafe {
|
||||||
|
glib::result_from_gboolean!(
|
||||||
|
ffi::gst_element_post_message(
|
||||||
|
self.as_ref().to_glib_none().0,
|
||||||
|
message.into_glib_ptr()
|
||||||
|
),
|
||||||
|
"Failed to post message"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fn provide_clock(&self) -> Option<Clock> {
|
fn provide_clock(&self) -> Option<Clock> {
|
||||||
unsafe {
|
unsafe {
|
||||||
from_glib_full(ffi::gst_element_provide_clock(
|
from_glib_full(ffi::gst_element_provide_clock(
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
Caps, Element, Event, FlowError, FlowSuccess, Object, PadDirection, PadLinkCheck, PadLinkError,
|
Buffer, BufferList, Caps, Element, Event, FlowError, FlowSuccess, Object, PadDirection,
|
||||||
PadLinkSuccess, PadMode, PadTemplate, Stream, TaskState,
|
PadLinkCheck, PadLinkError, PadLinkSuccess, PadMode, PadTemplate, Stream, TaskState,
|
||||||
};
|
};
|
||||||
use glib::{
|
use glib::{
|
||||||
prelude::*,
|
prelude::*,
|
||||||
|
@ -37,6 +37,12 @@ pub trait PadExt: 'static {
|
||||||
#[doc(alias = "gst_pad_can_link")]
|
#[doc(alias = "gst_pad_can_link")]
|
||||||
fn can_link(&self, sinkpad: &impl IsA<Pad>) -> bool;
|
fn can_link(&self, sinkpad: &impl IsA<Pad>) -> bool;
|
||||||
|
|
||||||
|
#[doc(alias = "gst_pad_chain")]
|
||||||
|
fn chain(&self, buffer: Buffer) -> Result<FlowSuccess, FlowError>;
|
||||||
|
|
||||||
|
#[doc(alias = "gst_pad_chain_list")]
|
||||||
|
fn chain_list(&self, list: BufferList) -> Result<FlowSuccess, FlowError>;
|
||||||
|
|
||||||
#[doc(alias = "gst_pad_check_reconfigure")]
|
#[doc(alias = "gst_pad_check_reconfigure")]
|
||||||
fn check_reconfigure(&self) -> bool;
|
fn check_reconfigure(&self) -> bool;
|
||||||
|
|
||||||
|
@ -172,6 +178,12 @@ pub trait PadExt: 'static {
|
||||||
#[doc(alias = "gst_pad_peer_query_caps")]
|
#[doc(alias = "gst_pad_peer_query_caps")]
|
||||||
fn peer_query_caps(&self, filter: Option<&Caps>) -> Caps;
|
fn peer_query_caps(&self, filter: Option<&Caps>) -> Caps;
|
||||||
|
|
||||||
|
#[doc(alias = "gst_pad_push")]
|
||||||
|
fn push(&self, buffer: Buffer) -> Result<FlowSuccess, FlowError>;
|
||||||
|
|
||||||
|
#[doc(alias = "gst_pad_push_list")]
|
||||||
|
fn push_list(&self, list: BufferList) -> Result<FlowSuccess, FlowError>;
|
||||||
|
|
||||||
#[doc(alias = "gst_pad_query_accept_caps")]
|
#[doc(alias = "gst_pad_query_accept_caps")]
|
||||||
fn query_accept_caps(&self, caps: &Caps) -> bool;
|
fn query_accept_caps(&self, caps: &Caps) -> bool;
|
||||||
|
|
||||||
|
@ -238,6 +250,24 @@ impl<O: IsA<Pad>> PadExt for O {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn chain(&self, buffer: Buffer) -> Result<FlowSuccess, FlowError> {
|
||||||
|
unsafe {
|
||||||
|
try_from_glib(ffi::gst_pad_chain(
|
||||||
|
self.as_ref().to_glib_none().0,
|
||||||
|
buffer.into_glib_ptr(),
|
||||||
|
))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn chain_list(&self, list: BufferList) -> Result<FlowSuccess, FlowError> {
|
||||||
|
unsafe {
|
||||||
|
try_from_glib(ffi::gst_pad_chain_list(
|
||||||
|
self.as_ref().to_glib_none().0,
|
||||||
|
list.into_glib_ptr(),
|
||||||
|
))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fn check_reconfigure(&self) -> bool {
|
fn check_reconfigure(&self) -> bool {
|
||||||
unsafe {
|
unsafe {
|
||||||
from_glib(ffi::gst_pad_check_reconfigure(
|
from_glib(ffi::gst_pad_check_reconfigure(
|
||||||
|
@ -501,6 +531,24 @@ impl<O: IsA<Pad>> PadExt for O {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn push(&self, buffer: Buffer) -> Result<FlowSuccess, FlowError> {
|
||||||
|
unsafe {
|
||||||
|
try_from_glib(ffi::gst_pad_push(
|
||||||
|
self.as_ref().to_glib_none().0,
|
||||||
|
buffer.into_glib_ptr(),
|
||||||
|
))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn push_list(&self, list: BufferList) -> Result<FlowSuccess, FlowError> {
|
||||||
|
unsafe {
|
||||||
|
try_from_glib(ffi::gst_pad_push_list(
|
||||||
|
self.as_ref().to_glib_none().0,
|
||||||
|
list.into_glib_ptr(),
|
||||||
|
))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fn query_accept_caps(&self, caps: &Caps) -> bool {
|
fn query_accept_caps(&self, caps: &Caps) -> bool {
|
||||||
unsafe {
|
unsafe {
|
||||||
from_glib(ffi::gst_pad_query_accept_caps(
|
from_glib(ffi::gst_pad_query_accept_caps(
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use crate::{Object, PluginDependencyFlags};
|
use crate::{Object, PluginDependencyFlags, Structure};
|
||||||
use glib::translate::*;
|
use glib::{prelude::*, translate::*};
|
||||||
use std::{fmt, ptr};
|
use std::{fmt, ptr};
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
|
@ -126,6 +126,13 @@ impl Plugin {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[doc(alias = "gst_plugin_set_cache_data")]
|
||||||
|
pub fn set_cache_data(&self, cache_data: Structure) {
|
||||||
|
unsafe {
|
||||||
|
ffi::gst_plugin_set_cache_data(self.to_glib_none().0, cache_data.into_glib_ptr());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[doc(alias = "gst_plugin_load_by_name")]
|
#[doc(alias = "gst_plugin_load_by_name")]
|
||||||
pub fn load_by_name(name: &str) -> Result<Plugin, glib::BoolError> {
|
pub fn load_by_name(name: &str) -> Result<Plugin, glib::BoolError> {
|
||||||
assert_initialized_main_thread!();
|
assert_initialized_main_thread!();
|
||||||
|
|
|
@ -344,8 +344,6 @@ pub trait BufferPoolExtManual: 'static {
|
||||||
&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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<O: IsA<BufferPool>> BufferPoolExtManual for O {
|
impl<O: IsA<BufferPool>> BufferPoolExtManual for O {
|
||||||
|
@ -393,15 +391,6 @@ impl<O: IsA<BufferPool>> BufferPoolExtManual for O {
|
||||||
.map(|_| from_glib_full(buffer))
|
.map(|_| from_glib_full(buffer))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn release_buffer(&self, buffer: crate::Buffer) {
|
|
||||||
unsafe {
|
|
||||||
ffi::gst_buffer_pool_release_buffer(
|
|
||||||
self.as_ref().to_glib_none().0,
|
|
||||||
buffer.into_glib_ptr(),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
|
|
|
@ -304,16 +304,6 @@ impl Bus {
|
||||||
future::ready(message_types.contains(&message_type))
|
future::ready(message_types.contains(&message_type))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
#[doc(alias = "gst_bus_post")]
|
|
||||||
pub fn post(&self, message: crate::Message) -> Result<(), glib::error::BoolError> {
|
|
||||||
unsafe {
|
|
||||||
glib::result_from_gboolean!(
|
|
||||||
ffi::gst_bus_post(self.to_glib_none().0, message.into_glib_ptr()),
|
|
||||||
"Failed to post message"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
|
|
|
@ -155,8 +155,6 @@ 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_error_message(&self, msg: crate::ErrorMessage);
|
fn post_error_message(&self, msg: crate::ErrorMessage);
|
||||||
|
|
||||||
#[doc(alias = "gst_element_iterate_pads")]
|
#[doc(alias = "gst_element_iterate_pads")]
|
||||||
|
@ -430,18 +428,6 @@ impl<O: IsA<Element>> ElementExtManual for O {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn post_message(&self, message: crate::Message) -> Result<(), glib::error::BoolError> {
|
|
||||||
unsafe {
|
|
||||||
glib::result_from_gboolean!(
|
|
||||||
ffi::gst_element_post_message(
|
|
||||||
self.as_ref().to_glib_none().0,
|
|
||||||
message.into_glib_ptr()
|
|
||||||
),
|
|
||||||
"Failed to post message"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn post_error_message(&self, msg: crate::ErrorMessage) {
|
fn post_error_message(&self, msg: crate::ErrorMessage) {
|
||||||
let crate::ErrorMessage {
|
let crate::ErrorMessage {
|
||||||
error_domain,
|
error_domain,
|
||||||
|
|
|
@ -11,9 +11,8 @@ use std::{
|
||||||
use glib::{ffi::gpointer, prelude::*, translate::*};
|
use glib::{ffi::gpointer, prelude::*, translate::*};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
element::ElementExtManual,
|
|
||||||
format::{FormattedValue, SpecificFormattedValueFullRange, SpecificFormattedValueIntrinsic},
|
format::{FormattedValue, SpecificFormattedValueFullRange, SpecificFormattedValueIntrinsic},
|
||||||
prelude::PadExt,
|
prelude::*,
|
||||||
Buffer, BufferList, Event, FlowError, FlowReturn, FlowSuccess, Format, GenericFormattedValue,
|
Buffer, BufferList, Event, FlowError, FlowReturn, FlowSuccess, Format, GenericFormattedValue,
|
||||||
LoggableError, Pad, PadFlags, PadProbeReturn, PadProbeType, Query, QueryRef, StaticPadTemplate,
|
LoggableError, Pad, PadFlags, PadProbeReturn, PadProbeType, Query, QueryRef, StaticPadTemplate,
|
||||||
};
|
};
|
||||||
|
@ -100,16 +99,6 @@ pub trait PadExtManual: 'static {
|
||||||
#[doc(alias = "gst_pad_remove_probe")]
|
#[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>;
|
|
||||||
#[doc(alias = "gst_pad_push")]
|
|
||||||
fn push(&self, buffer: Buffer) -> Result<FlowSuccess, FlowError>;
|
|
||||||
|
|
||||||
#[doc(alias = "gst_pad_chain_list")]
|
|
||||||
fn chain_list(&self, list: BufferList) -> Result<FlowSuccess, FlowError>;
|
|
||||||
#[doc(alias = "gst_pad_push_list")]
|
|
||||||
fn push_list(&self, list: BufferList) -> Result<FlowSuccess, FlowError>;
|
|
||||||
|
|
||||||
#[doc(alias = "gst_pad_pull_range")]
|
#[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(
|
||||||
|
@ -341,42 +330,6 @@ impl<O: IsA<Pad>> PadExtManual for O {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn chain(&self, buffer: Buffer) -> Result<FlowSuccess, FlowError> {
|
|
||||||
unsafe {
|
|
||||||
try_from_glib(ffi::gst_pad_chain(
|
|
||||||
self.as_ref().to_glib_none().0,
|
|
||||||
buffer.into_glib_ptr(),
|
|
||||||
))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn push(&self, buffer: Buffer) -> Result<FlowSuccess, FlowError> {
|
|
||||||
unsafe {
|
|
||||||
try_from_glib(ffi::gst_pad_push(
|
|
||||||
self.as_ref().to_glib_none().0,
|
|
||||||
buffer.into_glib_ptr(),
|
|
||||||
))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn chain_list(&self, list: BufferList) -> Result<FlowSuccess, FlowError> {
|
|
||||||
unsafe {
|
|
||||||
try_from_glib(ffi::gst_pad_chain_list(
|
|
||||||
self.as_ref().to_glib_none().0,
|
|
||||||
list.into_glib_ptr(),
|
|
||||||
))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn push_list(&self, list: BufferList) -> Result<FlowSuccess, FlowError> {
|
|
||||||
unsafe {
|
|
||||||
try_from_glib(ffi::gst_pad_push_list(
|
|
||||||
self.as_ref().to_glib_none().0,
|
|
||||||
list.into_glib_ptr(),
|
|
||||||
))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn range(&self, offset: u64, size: u32) -> Result<Buffer, FlowError> {
|
fn range(&self, offset: u64, size: u32) -> Result<Buffer, FlowError> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut buffer = ptr::null_mut();
|
let mut buffer = ptr::null_mut();
|
||||||
|
@ -1918,7 +1871,6 @@ mod tests {
|
||||||
use std::sync::{atomic::AtomicUsize, mpsc::channel, Arc, Mutex};
|
use std::sync::{atomic::AtomicUsize, mpsc::channel, Arc, Mutex};
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::prelude::*;
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_event_chain_functions() {
|
fn test_event_chain_functions() {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
use glib::{prelude::*, translate::*};
|
use glib::{prelude::*, translate::*};
|
||||||
|
|
||||||
use crate::{Plugin, PluginFlags, Structure, StructureRef};
|
use crate::{Plugin, PluginFlags, StructureRef};
|
||||||
|
|
||||||
impl Plugin {
|
impl Plugin {
|
||||||
#[doc(alias = "get_cache_data")]
|
#[doc(alias = "get_cache_data")]
|
||||||
|
@ -17,13 +17,6 @@ impl Plugin {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[doc(alias = "gst_plugin_set_cache_data")]
|
|
||||||
pub fn set_cache_data(&self, cache_data: Structure) {
|
|
||||||
unsafe {
|
|
||||||
ffi::gst_plugin_set_cache_data(self.to_glib_none().0, cache_data.into_glib_ptr());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait GstPluginExtManual: 'static {
|
pub trait GstPluginExtManual: 'static {
|
||||||
|
|
Loading…
Reference in a new issue