mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-26 03:21:03 +00:00
audio/video: Use proxy_getcaps() function for default handling of getcaps() vfunc
This commit is contained in:
parent
18ced8dda4
commit
a40835351f
4 changed files with 10 additions and 4 deletions
|
@ -21,6 +21,8 @@ use gst_base;
|
||||||
use std::mem;
|
use std::mem;
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
|
|
||||||
|
use crate::prelude::*;
|
||||||
|
|
||||||
use AudioDecoder;
|
use AudioDecoder;
|
||||||
use AudioDecoderClass;
|
use AudioDecoderClass;
|
||||||
|
|
||||||
|
@ -412,7 +414,7 @@ impl<T: AudioDecoderImpl + ObjectImpl> AudioDecoderImplExt for T {
|
||||||
(*parent_class)
|
(*parent_class)
|
||||||
.getcaps
|
.getcaps
|
||||||
.map(|f| from_glib_full(f(element.to_glib_none().0, filter.to_glib_none().0)))
|
.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 std::ptr;
|
||||||
|
|
||||||
|
use crate::prelude::*;
|
||||||
|
|
||||||
use AudioEncoder;
|
use AudioEncoder;
|
||||||
use AudioEncoderClass;
|
use AudioEncoderClass;
|
||||||
use AudioInfo;
|
use AudioInfo;
|
||||||
|
@ -363,7 +365,7 @@ impl<T: AudioEncoderImpl + ObjectImpl> AudioEncoderImplExt for T {
|
||||||
(*parent_class)
|
(*parent_class)
|
||||||
.getcaps
|
.getcaps
|
||||||
.map(|f| from_glib_full(f(element.to_glib_none().0, filter.to_glib_none().0)))
|
.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::MiniObject;
|
||||||
use gst_base;
|
use gst_base;
|
||||||
|
|
||||||
|
use crate::prelude::*;
|
||||||
use video_codec_state::{Readable, VideoCodecState};
|
use video_codec_state::{Readable, VideoCodecState};
|
||||||
use VideoCodecFrame;
|
use VideoCodecFrame;
|
||||||
use VideoDecoder;
|
use VideoDecoder;
|
||||||
|
@ -404,7 +405,7 @@ impl<T: VideoDecoderImpl + ObjectImpl> VideoDecoderImplExt for T {
|
||||||
(*parent_class)
|
(*parent_class)
|
||||||
.getcaps
|
.getcaps
|
||||||
.map(|f| from_glib_full(f(element.to_glib_none().0, filter.to_glib_none().0)))
|
.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::subclass::prelude::*;
|
||||||
use gst::MiniObject;
|
use gst::MiniObject;
|
||||||
|
|
||||||
|
use crate::prelude::*;
|
||||||
use video_codec_state::{Readable, VideoCodecState};
|
use video_codec_state::{Readable, VideoCodecState};
|
||||||
use VideoCodecFrame;
|
use VideoCodecFrame;
|
||||||
use VideoEncoder;
|
use VideoEncoder;
|
||||||
|
@ -340,7 +341,7 @@ impl<T: VideoEncoderImpl + ObjectImpl> VideoEncoderImplExt for T {
|
||||||
(*parent_class)
|
(*parent_class)
|
||||||
.getcaps
|
.getcaps
|
||||||
.map(|f| from_glib_full(f(element.to_glib_none().0, filter.to_glib_none().0)))
|
.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