vc->pool = gst_tizen_buffer_pool_new ();
config = gst_buffer_pool_get_config (vc->pool);
- gst_buffer_pool_config_set_params (config, caps, size, 2, 0);
+ gst_buffer_pool_config_set_params (config, caps, size, 4, 10);
gst_buffer_pool_config_add_option (config, GST_BUFFER_POOL_OPTION_VIDEO_META);
gst_buffer_pool_set_config (vc->pool, config);
gst_video_convert_prepare_output_buffer (GstBaseTransform * trans,
GstBuffer *input, GstBuffer **outbuf)
{
+ GstBuffer *buf = NULL;
GstVideoConvert *vc = NULL;
GstVideoFilter *filter = GST_VIDEO_FILTER_CAST (trans);
- vc = GST_VIDEO_CONVERT_CAST(trans);
+ vc = GST_VIDEO_CONVERT_CAST (trans);
if (filter->out_info.finfo->format == GST_VIDEO_FORMAT_SN12 ) {
- if (gst_buffer_pool_acquire_buffer(vc->pool, outbuf, 0) != GST_FLOW_OK) {
+ if (gst_buffer_pool_acquire_buffer (vc->pool, &buf, 0) != GST_FLOW_OK) {
GST_ERROR("[%s] memory prepare failed.",__FUNCTION__);
- return GST_FLOW_ERROR;
+ return GST_FLOW_ERROR;
}
- return GST_FLOW_OK;
- } else
- return GST_BASE_TRANSFORM_CLASS (parent_class)->prepare_output_buffer(trans, input, outbuf);
+
+ if (input != buf)
+ GST_BASE_TRANSFORM_CLASS (parent_class)->copy_metadata (trans, input, buf);
+ *outbuf = buf;
+
+ return GST_FLOW_OK;
+ }
+ return GST_BASE_TRANSFORM_CLASS (parent_class)->prepare_output_buffer(trans, input, outbuf);
}
#endif