mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-26 03:21:03 +00:00
audio/video: proxy_getcaps() can't return None and get_caps() vfuncs must not return None
This commit is contained in:
parent
bddb49443d
commit
1348127ca8
10 changed files with 44 additions and 88 deletions
|
@ -163,6 +163,11 @@ status = "generate"
|
||||||
name = "get_allocator"
|
name = "get_allocator"
|
||||||
ignore = true
|
ignore = true
|
||||||
|
|
||||||
|
[[object.function]]
|
||||||
|
name = "proxy_getcaps"
|
||||||
|
[object.function.return]
|
||||||
|
nullable = false
|
||||||
|
|
||||||
[[object]]
|
[[object]]
|
||||||
name = "GstAudio.AudioEncoder"
|
name = "GstAudio.AudioEncoder"
|
||||||
status = "generate"
|
status = "generate"
|
||||||
|
@ -186,3 +191,8 @@ status = "generate"
|
||||||
[[object.function]]
|
[[object.function]]
|
||||||
name = "get_latency"
|
name = "get_latency"
|
||||||
ignore = true
|
ignore = true
|
||||||
|
|
||||||
|
[[object.function]]
|
||||||
|
name = "proxy_getcaps"
|
||||||
|
[object.function.return]
|
||||||
|
nullable = false
|
||||||
|
|
|
@ -155,6 +155,11 @@ status = "generate"
|
||||||
name = "get_allocator"
|
name = "get_allocator"
|
||||||
ignore = true
|
ignore = true
|
||||||
|
|
||||||
|
[[object.function]]
|
||||||
|
name = "proxy_getcaps"
|
||||||
|
[object.function.return]
|
||||||
|
nullable = false
|
||||||
|
|
||||||
[[object]]
|
[[object]]
|
||||||
name = "GstVideo.VideoEncoder"
|
name = "GstVideo.VideoEncoder"
|
||||||
status = "generate"
|
status = "generate"
|
||||||
|
@ -206,3 +211,8 @@ status = "generate"
|
||||||
[[object.function]]
|
[[object.function]]
|
||||||
name = "get_allocator"
|
name = "get_allocator"
|
||||||
ignore = true
|
ignore = true
|
||||||
|
|
||||||
|
[[object.function]]
|
||||||
|
name = "proxy_getcaps"
|
||||||
|
[object.function.return]
|
||||||
|
nullable = false
|
||||||
|
|
|
@ -57,11 +57,7 @@ pub trait AudioDecoderExt: 'static {
|
||||||
|
|
||||||
fn merge_tags(&self, tags: Option<&gst::TagList>, mode: gst::TagMergeMode);
|
fn merge_tags(&self, tags: Option<&gst::TagList>, mode: gst::TagMergeMode);
|
||||||
|
|
||||||
fn proxy_getcaps(
|
fn proxy_getcaps(&self, caps: Option<&gst::Caps>, filter: Option<&gst::Caps>) -> gst::Caps;
|
||||||
&self,
|
|
||||||
caps: Option<&gst::Caps>,
|
|
||||||
filter: Option<&gst::Caps>,
|
|
||||||
) -> Option<gst::Caps>;
|
|
||||||
|
|
||||||
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||||
fn set_allocation_caps(&self, allocation_caps: Option<&gst::Caps>);
|
fn set_allocation_caps(&self, allocation_caps: Option<&gst::Caps>);
|
||||||
|
@ -218,11 +214,7 @@ impl<O: IsA<AudioDecoder>> AudioDecoderExt for O {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn proxy_getcaps(
|
fn proxy_getcaps(&self, caps: Option<&gst::Caps>, filter: Option<&gst::Caps>) -> gst::Caps {
|
||||||
&self,
|
|
||||||
caps: Option<&gst::Caps>,
|
|
||||||
filter: Option<&gst::Caps>,
|
|
||||||
) -> Option<gst::Caps> {
|
|
||||||
unsafe {
|
unsafe {
|
||||||
from_glib_full(gst_audio_sys::gst_audio_decoder_proxy_getcaps(
|
from_glib_full(gst_audio_sys::gst_audio_decoder_proxy_getcaps(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
|
|
|
@ -54,11 +54,7 @@ pub trait AudioEncoderExt: 'static {
|
||||||
|
|
||||||
fn merge_tags(&self, tags: Option<&gst::TagList>, mode: gst::TagMergeMode);
|
fn merge_tags(&self, tags: Option<&gst::TagList>, mode: gst::TagMergeMode);
|
||||||
|
|
||||||
fn proxy_getcaps(
|
fn proxy_getcaps(&self, caps: Option<&gst::Caps>, filter: Option<&gst::Caps>) -> gst::Caps;
|
||||||
&self,
|
|
||||||
caps: Option<&gst::Caps>,
|
|
||||||
filter: Option<&gst::Caps>,
|
|
||||||
) -> Option<gst::Caps>;
|
|
||||||
|
|
||||||
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||||
fn set_allocation_caps(&self, allocation_caps: Option<&gst::Caps>);
|
fn set_allocation_caps(&self, allocation_caps: Option<&gst::Caps>);
|
||||||
|
@ -204,11 +200,7 @@ impl<O: IsA<AudioEncoder>> AudioEncoderExt for O {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn proxy_getcaps(
|
fn proxy_getcaps(&self, caps: Option<&gst::Caps>, filter: Option<&gst::Caps>) -> gst::Caps {
|
||||||
&self,
|
|
||||||
caps: Option<&gst::Caps>,
|
|
||||||
filter: Option<&gst::Caps>,
|
|
||||||
) -> Option<gst::Caps> {
|
|
||||||
unsafe {
|
unsafe {
|
||||||
from_glib_full(gst_audio_sys::gst_audio_encoder_proxy_getcaps(
|
from_glib_full(gst_audio_sys::gst_audio_encoder_proxy_getcaps(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
|
|
|
@ -83,7 +83,7 @@ pub trait AudioDecoderImpl: AudioDecoderImplExt + ElementImpl + Send + Sync + 's
|
||||||
self.parent_negotiate(element)
|
self.parent_negotiate(element)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_caps(&self, element: &AudioDecoder, filter: Option<&gst::Caps>) -> Option<gst::Caps> {
|
fn get_caps(&self, element: &AudioDecoder, filter: Option<&gst::Caps>) -> gst::Caps {
|
||||||
self.parent_get_caps(element, filter)
|
self.parent_get_caps(element, filter)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -157,11 +157,7 @@ pub trait AudioDecoderImplExt {
|
||||||
|
|
||||||
fn parent_negotiate(&self, element: &AudioDecoder) -> Result<(), gst::LoggableError>;
|
fn parent_negotiate(&self, element: &AudioDecoder) -> Result<(), gst::LoggableError>;
|
||||||
|
|
||||||
fn parent_get_caps(
|
fn parent_get_caps(&self, element: &AudioDecoder, filter: Option<&gst::Caps>) -> gst::Caps;
|
||||||
&self,
|
|
||||||
element: &AudioDecoder,
|
|
||||||
filter: Option<&gst::Caps>,
|
|
||||||
) -> Option<gst::Caps>;
|
|
||||||
|
|
||||||
fn parent_sink_event(&self, element: &AudioDecoder, event: gst::Event) -> bool;
|
fn parent_sink_event(&self, element: &AudioDecoder, event: gst::Event) -> bool;
|
||||||
|
|
||||||
|
@ -404,11 +400,7 @@ impl<T: AudioDecoderImpl + ObjectImpl> AudioDecoderImplExt for T {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn parent_get_caps(
|
fn parent_get_caps(&self, element: &AudioDecoder, filter: Option<&gst::Caps>) -> gst::Caps {
|
||||||
&self,
|
|
||||||
element: &AudioDecoder,
|
|
||||||
filter: Option<&gst::Caps>,
|
|
||||||
) -> Option<gst::Caps> {
|
|
||||||
unsafe {
|
unsafe {
|
||||||
let data = self.get_type_data();
|
let data = self.get_type_data();
|
||||||
let parent_class =
|
let parent_class =
|
||||||
|
@ -809,7 +801,7 @@ where
|
||||||
let imp = instance.get_impl();
|
let imp = instance.get_impl();
|
||||||
let wrap: AudioDecoder = from_glib_borrow(ptr);
|
let wrap: AudioDecoder = from_glib_borrow(ptr);
|
||||||
|
|
||||||
gst_panic_to_error!(&wrap, &instance.panicked(), None, {
|
gst_panic_to_error!(&wrap, &instance.panicked(), gst::Caps::new_empty(), {
|
||||||
AudioDecoderImpl::get_caps(
|
AudioDecoderImpl::get_caps(
|
||||||
imp,
|
imp,
|
||||||
&wrap,
|
&wrap,
|
||||||
|
|
|
@ -74,7 +74,7 @@ pub trait AudioEncoderImpl: AudioEncoderImplExt + ElementImpl + Send + Sync + 's
|
||||||
self.parent_negotiate(element)
|
self.parent_negotiate(element)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_caps(&self, element: &AudioEncoder, filter: Option<&gst::Caps>) -> Option<gst::Caps> {
|
fn get_caps(&self, element: &AudioEncoder, filter: Option<&gst::Caps>) -> gst::Caps {
|
||||||
self.parent_get_caps(element, filter)
|
self.parent_get_caps(element, filter)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -142,11 +142,7 @@ pub trait AudioEncoderImplExt {
|
||||||
|
|
||||||
fn parent_negotiate(&self, element: &AudioEncoder) -> Result<(), gst::LoggableError>;
|
fn parent_negotiate(&self, element: &AudioEncoder) -> Result<(), gst::LoggableError>;
|
||||||
|
|
||||||
fn parent_get_caps(
|
fn parent_get_caps(&self, element: &AudioEncoder, filter: Option<&gst::Caps>) -> gst::Caps;
|
||||||
&self,
|
|
||||||
element: &AudioEncoder,
|
|
||||||
filter: Option<&gst::Caps>,
|
|
||||||
) -> Option<gst::Caps>;
|
|
||||||
|
|
||||||
fn parent_sink_event(&self, element: &AudioEncoder, event: gst::Event) -> bool;
|
fn parent_sink_event(&self, element: &AudioEncoder, event: gst::Event) -> bool;
|
||||||
|
|
||||||
|
@ -353,11 +349,7 @@ impl<T: AudioEncoderImpl + ObjectImpl> AudioEncoderImplExt for T {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn parent_get_caps(
|
fn parent_get_caps(&self, element: &AudioEncoder, filter: Option<&gst::Caps>) -> gst::Caps {
|
||||||
&self,
|
|
||||||
element: &AudioEncoder,
|
|
||||||
filter: Option<&gst::Caps>,
|
|
||||||
) -> Option<gst::Caps> {
|
|
||||||
unsafe {
|
unsafe {
|
||||||
let data = self.get_type_data();
|
let data = self.get_type_data();
|
||||||
let parent_class =
|
let parent_class =
|
||||||
|
@ -725,7 +717,7 @@ where
|
||||||
let imp = instance.get_impl();
|
let imp = instance.get_impl();
|
||||||
let wrap: AudioEncoder = from_glib_borrow(ptr);
|
let wrap: AudioEncoder = from_glib_borrow(ptr);
|
||||||
|
|
||||||
gst_panic_to_error!(&wrap, &instance.panicked(), None, {
|
gst_panic_to_error!(&wrap, &instance.panicked(), gst::Caps::new_empty(), {
|
||||||
AudioEncoderImpl::get_caps(
|
AudioEncoderImpl::get_caps(
|
||||||
imp,
|
imp,
|
||||||
&wrap,
|
&wrap,
|
||||||
|
|
|
@ -44,11 +44,7 @@ pub trait VideoDecoderExt: 'static {
|
||||||
|
|
||||||
fn merge_tags(&self, tags: Option<&gst::TagList>, mode: gst::TagMergeMode);
|
fn merge_tags(&self, tags: Option<&gst::TagList>, mode: gst::TagMergeMode);
|
||||||
|
|
||||||
fn proxy_getcaps(
|
fn proxy_getcaps(&self, caps: Option<&gst::Caps>, filter: Option<&gst::Caps>) -> gst::Caps;
|
||||||
&self,
|
|
||||||
caps: Option<&gst::Caps>,
|
|
||||||
filter: Option<&gst::Caps>,
|
|
||||||
) -> Option<gst::Caps>;
|
|
||||||
|
|
||||||
fn set_estimate_rate(&self, enabled: bool);
|
fn set_estimate_rate(&self, enabled: bool);
|
||||||
|
|
||||||
|
@ -141,11 +137,7 @@ impl<O: IsA<VideoDecoder>> VideoDecoderExt for O {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn proxy_getcaps(
|
fn proxy_getcaps(&self, caps: Option<&gst::Caps>, filter: Option<&gst::Caps>) -> gst::Caps {
|
||||||
&self,
|
|
||||||
caps: Option<&gst::Caps>,
|
|
||||||
filter: Option<&gst::Caps>,
|
|
||||||
) -> Option<gst::Caps> {
|
|
||||||
unsafe {
|
unsafe {
|
||||||
from_glib_full(gst_video_sys::gst_video_decoder_proxy_getcaps(
|
from_glib_full(gst_video_sys::gst_video_decoder_proxy_getcaps(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
|
|
|
@ -42,11 +42,7 @@ pub trait VideoEncoderExt: 'static {
|
||||||
|
|
||||||
fn merge_tags(&self, tags: Option<&gst::TagList>, mode: gst::TagMergeMode);
|
fn merge_tags(&self, tags: Option<&gst::TagList>, mode: gst::TagMergeMode);
|
||||||
|
|
||||||
fn proxy_getcaps(
|
fn proxy_getcaps(&self, caps: Option<&gst::Caps>, filter: Option<&gst::Caps>) -> gst::Caps;
|
||||||
&self,
|
|
||||||
caps: Option<&gst::Caps>,
|
|
||||||
filter: Option<&gst::Caps>,
|
|
||||||
) -> Option<gst::Caps>;
|
|
||||||
|
|
||||||
fn set_headers(&self, headers: &[&gst::Buffer]);
|
fn set_headers(&self, headers: &[&gst::Buffer]);
|
||||||
|
|
||||||
|
@ -104,11 +100,7 @@ impl<O: IsA<VideoEncoder>> VideoEncoderExt for O {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn proxy_getcaps(
|
fn proxy_getcaps(&self, caps: Option<&gst::Caps>, filter: Option<&gst::Caps>) -> gst::Caps {
|
||||||
&self,
|
|
||||||
caps: Option<&gst::Caps>,
|
|
||||||
filter: Option<&gst::Caps>,
|
|
||||||
) -> Option<gst::Caps> {
|
|
||||||
unsafe {
|
unsafe {
|
||||||
from_glib_full(gst_video_sys::gst_video_encoder_proxy_getcaps(
|
from_glib_full(gst_video_sys::gst_video_encoder_proxy_getcaps(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
|
|
|
@ -84,7 +84,7 @@ pub trait VideoDecoderImpl: VideoDecoderImplExt + ElementImpl + Send + Sync + 's
|
||||||
self.parent_negotiate(element)
|
self.parent_negotiate(element)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_caps(&self, element: &VideoDecoder, filter: Option<&gst::Caps>) -> Option<gst::Caps> {
|
fn get_caps(&self, element: &VideoDecoder, filter: Option<&gst::Caps>) -> gst::Caps {
|
||||||
self.parent_get_caps(element, filter)
|
self.parent_get_caps(element, filter)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -158,11 +158,7 @@ pub trait VideoDecoderImplExt {
|
||||||
|
|
||||||
fn parent_negotiate(&self, element: &VideoDecoder) -> Result<(), gst::LoggableError>;
|
fn parent_negotiate(&self, element: &VideoDecoder) -> Result<(), gst::LoggableError>;
|
||||||
|
|
||||||
fn parent_get_caps(
|
fn parent_get_caps(&self, element: &VideoDecoder, filter: Option<&gst::Caps>) -> gst::Caps;
|
||||||
&self,
|
|
||||||
element: &VideoDecoder,
|
|
||||||
filter: Option<&gst::Caps>,
|
|
||||||
) -> Option<gst::Caps>;
|
|
||||||
|
|
||||||
fn parent_sink_event(&self, element: &VideoDecoder, event: gst::Event) -> bool;
|
fn parent_sink_event(&self, element: &VideoDecoder, event: gst::Event) -> bool;
|
||||||
|
|
||||||
|
@ -393,11 +389,7 @@ impl<T: VideoDecoderImpl + ObjectImpl> VideoDecoderImplExt for T {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn parent_get_caps(
|
fn parent_get_caps(&self, element: &VideoDecoder, filter: Option<&gst::Caps>) -> gst::Caps {
|
||||||
&self,
|
|
||||||
element: &VideoDecoder,
|
|
||||||
filter: Option<&gst::Caps>,
|
|
||||||
) -> Option<gst::Caps> {
|
|
||||||
unsafe {
|
unsafe {
|
||||||
let data = self.get_type_data();
|
let data = self.get_type_data();
|
||||||
let parent_class =
|
let parent_class =
|
||||||
|
@ -797,7 +789,7 @@ where
|
||||||
let imp = instance.get_impl();
|
let imp = instance.get_impl();
|
||||||
let wrap: VideoDecoder = from_glib_borrow(ptr);
|
let wrap: VideoDecoder = from_glib_borrow(ptr);
|
||||||
|
|
||||||
gst_panic_to_error!(&wrap, &instance.panicked(), None, {
|
gst_panic_to_error!(&wrap, &instance.panicked(), gst::Caps::new_empty(), {
|
||||||
VideoDecoderImpl::get_caps(
|
VideoDecoderImpl::get_caps(
|
||||||
imp,
|
imp,
|
||||||
&wrap,
|
&wrap,
|
||||||
|
|
|
@ -69,7 +69,7 @@ pub trait VideoEncoderImpl: VideoEncoderImplExt + ElementImpl + Send + Sync + 's
|
||||||
self.parent_negotiate(element)
|
self.parent_negotiate(element)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_caps(&self, element: &VideoEncoder, filter: Option<&gst::Caps>) -> Option<gst::Caps> {
|
fn get_caps(&self, element: &VideoEncoder, filter: Option<&gst::Caps>) -> gst::Caps {
|
||||||
self.parent_get_caps(element, filter)
|
self.parent_get_caps(element, filter)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -133,11 +133,7 @@ pub trait VideoEncoderImplExt {
|
||||||
|
|
||||||
fn parent_negotiate(&self, element: &VideoEncoder) -> Result<(), gst::LoggableError>;
|
fn parent_negotiate(&self, element: &VideoEncoder) -> Result<(), gst::LoggableError>;
|
||||||
|
|
||||||
fn parent_get_caps(
|
fn parent_get_caps(&self, element: &VideoEncoder, filter: Option<&gst::Caps>) -> gst::Caps;
|
||||||
&self,
|
|
||||||
element: &VideoEncoder,
|
|
||||||
filter: Option<&gst::Caps>,
|
|
||||||
) -> Option<gst::Caps>;
|
|
||||||
|
|
||||||
fn parent_sink_event(&self, element: &VideoEncoder, event: gst::Event) -> bool;
|
fn parent_sink_event(&self, element: &VideoEncoder, event: gst::Event) -> bool;
|
||||||
|
|
||||||
|
@ -329,11 +325,7 @@ impl<T: VideoEncoderImpl + ObjectImpl> VideoEncoderImplExt for T {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn parent_get_caps(
|
fn parent_get_caps(&self, element: &VideoEncoder, filter: Option<&gst::Caps>) -> gst::Caps {
|
||||||
&self,
|
|
||||||
element: &VideoEncoder,
|
|
||||||
filter: Option<&gst::Caps>,
|
|
||||||
) -> Option<gst::Caps> {
|
|
||||||
unsafe {
|
unsafe {
|
||||||
let data = self.get_type_data();
|
let data = self.get_type_data();
|
||||||
let parent_class =
|
let parent_class =
|
||||||
|
@ -688,7 +680,7 @@ where
|
||||||
let imp = instance.get_impl();
|
let imp = instance.get_impl();
|
||||||
let wrap: VideoEncoder = from_glib_borrow(ptr);
|
let wrap: VideoEncoder = from_glib_borrow(ptr);
|
||||||
|
|
||||||
gst_panic_to_error!(&wrap, &instance.panicked(), None, {
|
gst_panic_to_error!(&wrap, &instance.panicked(), gst::Caps::new_empty(), {
|
||||||
VideoEncoderImpl::get_caps(
|
VideoEncoderImpl::get_caps(
|
||||||
imp,
|
imp,
|
||||||
&wrap,
|
&wrap,
|
||||||
|
|
Loading…
Reference in a new issue