forked from mirrors/gstreamer-rs
audio/video: Use proxy_getcaps() function for default handling of getcaps() vfunc
This commit is contained in:
parent
b238d07db0
commit
bddb49443d
4 changed files with 10 additions and 4 deletions
|
@ -21,6 +21,8 @@ use gst_base;
|
|||
use std::mem;
|
||||
use std::ptr;
|
||||
|
||||
use crate::prelude::*;
|
||||
|
||||
use AudioDecoder;
|
||||
use AudioDecoderClass;
|
||||
|
||||
|
@ -414,7 +416,7 @@ impl<T: AudioDecoderImpl + ObjectImpl> AudioDecoderImplExt for T {
|
|||
(*parent_class)
|
||||
.getcaps
|
||||
.map(|f| from_glib_full(f(element.to_glib_none().0, filter.to_glib_none().0)))
|
||||
.unwrap_or(None)
|
||||
.unwrap_or(element.proxy_getcaps(None, filter))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -19,6 +19,8 @@ use gst::MiniObject;
|
|||
|
||||
use std::ptr;
|
||||
|
||||
use crate::prelude::*;
|
||||
|
||||
use AudioEncoder;
|
||||
use AudioEncoderClass;
|
||||
use AudioInfo;
|
||||
|
@ -363,7 +365,7 @@ impl<T: AudioEncoderImpl + ObjectImpl> AudioEncoderImplExt for T {
|
|||
(*parent_class)
|
||||
.getcaps
|
||||
.map(|f| from_glib_full(f(element.to_glib_none().0, filter.to_glib_none().0)))
|
||||
.unwrap_or(None)
|
||||
.unwrap_or(element.proxy_getcaps(None, filter))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@ use gst::subclass::prelude::*;
|
|||
use gst::MiniObject;
|
||||
use gst_base;
|
||||
|
||||
use crate::prelude::*;
|
||||
use video_codec_state::{Readable, VideoCodecState};
|
||||
use VideoCodecFrame;
|
||||
use VideoDecoder;
|
||||
|
@ -404,7 +405,7 @@ impl<T: VideoDecoderImpl + ObjectImpl> VideoDecoderImplExt for T {
|
|||
(*parent_class)
|
||||
.getcaps
|
||||
.map(|f| from_glib_full(f(element.to_glib_none().0, filter.to_glib_none().0)))
|
||||
.unwrap_or(None)
|
||||
.unwrap_or(element.proxy_getcaps(None, filter))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ use gst;
|
|||
use gst::subclass::prelude::*;
|
||||
use gst::MiniObject;
|
||||
|
||||
use crate::prelude::*;
|
||||
use video_codec_state::{Readable, VideoCodecState};
|
||||
use VideoCodecFrame;
|
||||
use VideoEncoder;
|
||||
|
@ -340,7 +341,7 @@ impl<T: VideoEncoderImpl + ObjectImpl> VideoEncoderImplExt for T {
|
|||
(*parent_class)
|
||||
.getcaps
|
||||
.map(|f| from_glib_full(f(element.to_glib_none().0, filter.to_glib_none().0)))
|
||||
.unwrap_or(None)
|
||||
.unwrap_or(element.proxy_getcaps(None, filter))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue