"unexpected XShm image size (got %d, expected %d)",
mem->xvimage->data_size, expected_size);
}
-
+ GST_INFO("expected XShm image size (got %d, expected %d)",
+ mem->xvimage->data_size, expected_size);
/* Be verbose about our XvImage stride */
{
guint plane;
GST_WARNING("putimage error : ret %d, error_caught %d, displaying buffer count %d",
ret, error_caught, context->displaying_buffer_count);
- /* release gem handle */
- img_data = (XV_DATA_PTR) gst_xvimage_memory_get_xvimage(mem)->data;
- if (img_data && img_data->BufType == XV_BUF_TYPE_DMABUF) {
+ /* release gem handle */
+ img_data = (XV_DATA_PTR) gst_xvimage_memory_get_xvimage(mem)->data;
unsigned int gem_name[XV_BUF_PLANE_NUM] = { 0, };
gem_name[0] = img_data->YBuf;
gem_name[1] = img_data->CbBuf;
gem_name[2] = img_data->CrBuf;
gst_xvcontext_remove_displaying_buffer(context, gem_name);
- }
}
/* Reset error handler */
/* release gem handle */
img_data = (XV_DATA_PTR) gst_xvimage_memory_get_xvimage(mem)->data;
- if (img_data && img_data->BufType == XV_BUF_TYPE_DMABUF) {
+ if (img_data) {
unsigned int gem_name[XV_BUF_PLANE_NUM] = { 0, };
gem_name[0] = img_data->YBuf;
gem_name[1] = img_data->CbBuf;
gem_name[0] = cme->data.l[0];
gem_name[1] = cme->data.l[1];
+ g_mutex_unlock (&xvimagesink->context->lock);
gst_xvcontext_remove_displaying_buffer(xvimagesink->context, gem_name);
+ g_mutex_lock (&xvimagesink->context->lock);
+
break;
}
#endif /* GST_EXT_XV_ENHANCEMENT */
gst_xvcontext_set_colorimetry (context, &info.colorimetry);
size = info.size;
-
+ GST_INFO ("info.size = %d ",size);
/* get aspect ratio from caps if it's present, and
* convert video width and height to a display width and height
* using wd / hd = wv / hv * PARv / PARd */
GST_CAT_LOG_OBJECT (GST_CAT_PERFORMANCE, xvimagesink,
"slow copy buffer %p into bufferpool buffer %p", buf, to_put);
#ifdef GST_EXT_XV_ENHANCEMENT
+ g_mutex_lock (&xvimagesink->flow_lock);
switch (GST_VIDEO_INFO_FORMAT(&xvimagesink->info)) {
/* Cases for specified formats of Samsung extension */
case GST_VIDEO_FORMAT_SN12:
}
/* set current buffer */
gst_xvimage_memory_set_buffer((GstXvImageMemory*)gst_buffer_peek_memory(to_put, 0), buf);
-
- if (img_data && img_data->BufType == XV_BUF_TYPE_DMABUF)
+ if (img_data)
gst_xvcontext_add_displaying_buffer(xvimagesink->context, img_data, gst_xvimage_memory_get_buffer(img_mem));
} else {
} else {
GST_WARNING_OBJECT( xvimagesink, "xvimage->data is NULL. skip xvimage put..." );
+ g_mutex_lock (&xvimagesink->flow_lock);
return GST_FLOW_OK;
}
break;
break;
}
}
+ g_mutex_unlock (&xvimagesink->flow_lock);
#else /* GST_EXT_XV_ENHANCEMENT */
if (!gst_video_frame_map (&src, &xvimagesink->info, buf, GST_MAP_READ))
goto invalid_buffer;
-
if (!gst_video_frame_map (&dest, &xvimagesink->info, to_put, GST_MAP_WRITE)) {
gst_video_frame_unmap (&src);
goto invalid_buffer;
{
/* No Window available to put our image into */
GST_WARNING_OBJECT (xvimagesink, "could not map image");
+#ifdef GST_EXT_XV_ENHANCEMENT
+ g_mutex_unlock (&xvimagesink->flow_lock);
+#endif
res = GST_FLOW_OK;
goto done;
}