GstEvent * event);
static gboolean gst_video_decoder_decide_allocation_default (GstVideoDecoder *
decoder, GstQuery * query);
+static gboolean gst_video_decoder_propose_allocation_default (GstVideoDecoder *
+ decoder, GstQuery * query);
/* we can't use G_DEFINE_ABSTRACT_TYPE because we need the klass in the _init
* method to get to the padtemplates */
klass->sink_event = gst_video_decoder_sink_event_default;
klass->src_event = gst_video_decoder_src_event_default;
klass->decide_allocation = gst_video_decoder_decide_allocation_default;
+ klass->propose_allocation = gst_video_decoder_propose_allocation_default;
}
static void
gst_query_set_convert (query, src_fmt, src_val, dest_fmt, dest_val);
break;
}
+ case GST_QUERY_ALLOCATION:{
+ GstVideoDecoderClass *klass = GST_VIDEO_DECODER_GET_CLASS (decoder);
+
+ if (klass->propose_allocation)
+ res = klass->propose_allocation (decoder, query);
+ break;
+ }
default:
res = gst_pad_query_default (pad, parent, query);
break;
return TRUE;
}
+static gboolean
+gst_video_decoder_propose_allocation_default (GstVideoDecoder * decoder,
+ GstQuery * query)
+{
+ return TRUE;
+}
+
/**
* gst_video_decoder_set_src_caps:
* @decoder: a #GstVideoDecoder
* Setup the allocation parameters for allocating output
* buffers. The passed in query contains the result of the
* downstream allocation query.
+ * @propose_allocation: Optional.
+ * Propose buffer allocation parameters for upstream elements.
*
* Subclasses can override any of the available virtual methods or not, as
* needed. At minimum @handle_frame needs to be overridden, and @set_format
gboolean (*decide_allocation) (GstVideoDecoder *decoder, GstQuery *query);
+ gboolean (*propose_allocation) (GstVideoDecoder *decoder, GstQuery * query);
/*< private >*/
/* FIXME before moving to base */