mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-04-29 03:11:15 +00:00
video: Update for new decide_allocation() signature
This commit is contained in:
parent
6ec98ec5e4
commit
d17c3483c1
3 changed files with 26 additions and 32 deletions
|
@ -199,14 +199,13 @@ impl VideoDecoderImpl for CdgDec {
|
|||
fn decide_allocation(
|
||||
&self,
|
||||
element: &Self::Type,
|
||||
query: &mut gst::QueryRef,
|
||||
query: gst::query::Allocation<&mut gst::QueryRef>,
|
||||
) -> Result<(), gst::ErrorMessage> {
|
||||
if let gst::query::QueryView::Allocation(allocation) = query.view() {
|
||||
if allocation
|
||||
if query
|
||||
.find_allocation_meta::<gst_video::VideoMeta>()
|
||||
.is_some()
|
||||
{
|
||||
let pools = allocation.allocation_pools();
|
||||
let pools = query.allocation_pools();
|
||||
if let Some((Some(ref pool), _, _, _)) = pools.first() {
|
||||
let mut config = pool.config();
|
||||
config.add_option(&gst_video::BUFFER_POOL_OPTION_VIDEO_META);
|
||||
|
@ -214,7 +213,6 @@ impl VideoDecoderImpl for CdgDec {
|
|||
.map_err(|e| gst::error_msg!(gst::CoreError::Negotiation, [&e.message]))?;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
self.parent_decide_allocation(element, query)
|
||||
}
|
||||
|
|
|
@ -464,13 +464,11 @@ impl VideoDecoderImpl for Dav1dDec {
|
|||
fn decide_allocation(
|
||||
&self,
|
||||
element: &Self::Type,
|
||||
query: &mut gst::QueryRef,
|
||||
query: gst::query::Allocation<&mut gst::QueryRef>,
|
||||
) -> Result<(), gst::ErrorMessage> {
|
||||
if let gst::query::QueryView::Allocation(allocation) = query.view() {
|
||||
self.negotiation_infos.lock().unwrap().video_meta_supported = allocation
|
||||
self.negotiation_infos.lock().unwrap().video_meta_supported = query
|
||||
.find_allocation_meta::<gst_video::VideoMeta>()
|
||||
.is_some();
|
||||
}
|
||||
|
||||
self.parent_decide_allocation(element, query)
|
||||
}
|
||||
|
|
|
@ -454,10 +454,9 @@ impl VideoDecoderImpl for Ffv1Dec {
|
|||
fn decide_allocation(
|
||||
&self,
|
||||
element: &Self::Type,
|
||||
query: &mut gst::QueryRef,
|
||||
query: gst::query::Allocation<&mut gst::QueryRef>,
|
||||
) -> Result<(), gst::ErrorMessage> {
|
||||
if let gst::query::QueryView::Allocation(allocation) = query.view() {
|
||||
let supported = allocation
|
||||
let supported = query
|
||||
.find_allocation_meta::<gst_video::VideoMeta>()
|
||||
.is_some();
|
||||
|
||||
|
@ -469,7 +468,6 @@ impl VideoDecoderImpl for Ffv1Dec {
|
|||
{
|
||||
*video_meta_supported = supported;
|
||||
}
|
||||
}
|
||||
|
||||
self.parent_decide_allocation(element, query)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue