Name: gst-plugins-good
Version: 1.16.2
-Release: 17
+Release: 18
License: LGPL-2.1+
Summary: GStreamer Streaming-Media Framework Plug-Ins
Url: http://gstreamer.freedesktop.org/
GST_OBJECT_FLAG_SET (allocator, flags);
#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
- if (!V4L2_TYPE_IS_OUTPUT (v4l2object->type) &&
+ if (v4l2object->tbm_output &&
+ !V4L2_TYPE_IS_OUTPUT (v4l2object->type) &&
v4l2object->mode == GST_V4L2_IO_DMABUF) {
tbm_surface_h tmp_surface = NULL;
int width = GST_VIDEO_INFO_WIDTH (&v4l2object->info);
group->planes[i].length - group->planes[i].data_offset, i, NULL,
expbuf.fd, group);
#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
- bos[i] = tbm_bo_import_fd (allocator->bufmgr, expbuf.fd);
- GST_INFO_OBJECT (allocator, "obj[%p,i:%d]: fd[%d] -> bo[%p]",
- obj, expbuf.index, expbuf.fd, bos[i]);
+ if (obj->tbm_output) {
+ bos[i] = tbm_bo_import_fd (allocator->bufmgr, expbuf.fd);
+ GST_INFO_OBJECT (allocator, "obj[%p,i:%d]: fd[%d] -> bo[%p]",
+ obj, expbuf.index, expbuf.fd, bos[i]);
+ }
#endif /* TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER */
} else {
/* Take back the allocator reference */
}
#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
- if (!group->surface) {
+ if (obj->tbm_output && !group->surface) {
group->surface = tbm_surface_internal_create_with_bos (&allocator->s_info, bos, group->n_mem);
GST_INFO_OBJECT (allocator, "new surface[%p] in memory group[%p]", group->surface, group);
}
return;
#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
- if (!V4L2_TYPE_IS_OUTPUT(pool->obj->type)) {
+ if (obj->tbm_output && !V4L2_TYPE_IS_OUTPUT(pool->obj->type)) {
g_mutex_lock (&pool->buffer_lock);
GST_INFO_OBJECT (pool, "live buffer[%d]", pool->live_buffer_count);
goto eos;
}
#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
- if (pool->obj->mode == GST_V4L2_IO_DMABUF) {
+ if (pool->obj->tbm_output && pool->obj->mode == GST_V4L2_IO_DMABUF) {
gst_buffer_unref (*buf);
*buf = tmp;
} else {
"driver requires a minimum of %d buffers", control.value);
#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
#define DEFAULT_DECODER_OUTPUT_BUFFER_COUNT 5
- if (!V4L2_TYPE_IS_OUTPUT (v4l2object->type) && control.value == 1) {
+ if (v4l2object->tbm_output &&
+ !V4L2_TYPE_IS_OUTPUT (v4l2object->type) && control.value == 1) {
v4l2object->min_buffers = DEFAULT_DECODER_OUTPUT_BUFFER_COUNT;
GST_WARNING_OBJECT (v4l2object->dbg_obj, "but SET MIN BUFFER COUNT[%d] and it will be [%d] later",
v4l2object->min_buffers, v4l2object->min_buffers + 1);
+ } else {
+ v4l2object->min_buffers = control.value;
}
#else /* TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER */
v4l2object->min_buffers = control.value;
/* auto scan device */
gboolean auto_scan_device;
#endif /* TIZEN_FEATURE_V4L2SRC_AUTO_SCAN_DEVICE_NODE */
+#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
+ gboolean tbm_output;
+#endif /* TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER */
/* the video-device's file descriptor */
gint video_fd;
{
PROP_0,
V4L2_STD_OBJECT_PROPS
+#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
+ , PROP_TBM_OUTPUT
+#endif /* TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER */
};
#define gst_v4l2_video_dec_parent_class parent_class
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
break;
+#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
+ case PROP_TBM_OUTPUT:
+ self->v4l2capture->tbm_output = g_value_get_boolean (value);
+ GST_INFO_OBJECT (self, "tbm output [%d]", self->v4l2capture->tbm_output);
+ break;
+#endif /* TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER */
+
/* By default, only set on output */
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
break;
+#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
+ case PROP_TBM_OUTPUT:
+ GST_INFO_OBJECT (self, "tbm output [%d]", self->v4l2capture->tbm_output);
+ g_value_set_boolean (value, self->v4l2capture->tbm_output);
+ break;
+#endif /* TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER */
/* By default read from output */
default:
GST_OBJECT (GST_VIDEO_DECODER_SRC_PAD (self)),
V4L2_BUF_TYPE_VIDEO_CAPTURE, klass->default_device,
gst_v4l2_get_input, gst_v4l2_set_input, NULL);
+#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
+ self->v4l2capture->tbm_output = TRUE;
+#endif /* TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER */
}
static void
GST_DEBUG_FUNCPTR (gst_v4l2_video_dec_change_state);
gst_v4l2_object_install_m2m_properties_helper (gobject_class);
+#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
+ g_object_class_install_property (gobject_class, PROP_TBM_OUTPUT,
+ g_param_spec_boolean ("tbm-output", "Enable TBM for output buffer",
+ "It works for only DMABUF mode.",
+ TRUE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+#endif /* TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER */
}
static void