Update for decide/propose_allocation() API changes

This commit is contained in:
Sebastian Dröge 2021-12-06 19:11:06 +02:00
parent 66e987c174
commit 3ed9e291c2
7 changed files with 8 additions and 8 deletions

View file

@ -201,7 +201,7 @@ impl VideoDecoderImpl for CdgDec {
&self,
element: &Self::Type,
query: gst::query::Allocation<&mut gst::QueryRef>,
) -> Result<(), gst::ErrorMessage> {
) -> Result<(), gst::LoggableError> {
if query
.find_allocation_meta::<gst_video::VideoMeta>()
.is_some()
@ -211,7 +211,7 @@ impl VideoDecoderImpl for CdgDec {
let mut config = pool.config();
config.add_option(&gst_video::BUFFER_POOL_OPTION_VIDEO_META);
pool.set_config(config)
.map_err(|e| gst::error_msg!(gst::CoreError::Negotiation, [&e.message]))?;
.map_err(|_| gst::loggable_error!(CAT, "Failed to configure buffer pool"))?;
}
}

View file

@ -462,7 +462,7 @@ impl VideoDecoderImpl for Dav1dDec {
&self,
element: &Self::Type,
query: gst::query::Allocation<&mut gst::QueryRef>,
) -> Result<(), gst::ErrorMessage> {
) -> Result<(), gst::LoggableError> {
self.negotiation_infos.lock().unwrap().video_meta_supported = query
.find_allocation_meta::<gst_video::VideoMeta>()
.is_some();

View file

@ -457,7 +457,7 @@ impl VideoDecoderImpl for Ffv1Dec {
&self,
element: &Self::Type,
query: gst::query::Allocation<&mut gst::QueryRef>,
) -> Result<(), gst::ErrorMessage> {
) -> Result<(), gst::LoggableError> {
let supported = query
.find_allocation_meta::<gst_video::VideoMeta>()
.is_some();

View file

@ -274,7 +274,7 @@ impl VideoEncoderImpl for GifEnc {
&self,
element: &Self::Type,
mut query: gst::query::Allocation<&mut gst::QueryRef>,
) -> Result<(), gst::ErrorMessage> {
) -> Result<(), gst::LoggableError> {
query.add_allocation_meta::<gst_video::VideoMeta>(None);
self.parent_propose_allocation(element, query)
}

View file

@ -226,7 +226,7 @@ impl BaseSinkImpl for PaintableSink {
&self,
element: &Self::Type,
mut query: gst::query::Allocation<&mut gst::QueryRef>,
) -> Result<(), gst::ErrorMessage> {
) -> Result<(), gst::LoggableError> {
query.add_allocation_meta::<gst_video::VideoMeta>(None);
// TODO: Provide a preferred "window size" here for higher-resolution rendering

View file

@ -487,7 +487,7 @@ impl VideoEncoderImpl for Rav1Enc {
&self,
element: &Self::Type,
mut query: gst::query::Allocation<&mut gst::QueryRef>,
) -> Result<(), gst::ErrorMessage> {
) -> Result<(), gst::LoggableError> {
query.add_allocation_meta::<gst_video::VideoMeta>(None);
self.parent_propose_allocation(element, query)
}

View file

@ -612,7 +612,7 @@ impl BaseTransformImpl for RoundedCorners {
element: &Self::Type,
decide_query: Option<gst::query::Allocation<&gst::QueryRef>>,
mut query: gst::query::Allocation<&mut gst::QueryRef>,
) -> Result<(), gst::ErrorMessage> {
) -> Result<(), gst::LoggableError> {
query.add_allocation_meta::<gst_video::VideoMeta>(None);
self.parent_propose_allocation(element, decide_query, query)
}