Name: gst-plugins-good
Version: 1.16.2
-Release: 19
+Release: 20
License: LGPL-2.1+
Summary: GStreamer Streaming-Media Framework Plug-Ins
Url: http://gstreamer.freedesktop.org/
-DTIZEN_FEATURE_AVIDEMUX_MODIFICATION\
-DTIZEN_FEATURE_USE_LIBV4L2\
-DTIZEN_FEATURE_V4L2_ADDITIONAL_CID_SUPPORT\
- -DTIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER\
+ -DTIZEN_FEATURE_V4L2_TBM_SUPPORT\
-fstack-protector-strong\
-Wl,-z,relro\
-D_FORTIFY_SOURCE=2"
GstStructure *alt_t = NULL;
switch (format.pixelformat) {
-#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
+#ifdef TIZEN_FEATURE_V4L2_TBM_SUPPORT
case V4L2_PIX_FMT_YUV420:
alt_t = gst_structure_copy (template);
gst_structure_set (alt_t, "format", G_TYPE_STRING, "S420", NULL);
alt_t = gst_structure_copy (template);
gst_structure_set (alt_t, "format", G_TYPE_STRING, "SN12", NULL);
break;
-#endif /* TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER */
+#endif /* TIZEN_FEATURE_V4L2_TBM_SUPPORT */
case V4L2_PIX_FMT_RGB32:
alt_t = gst_structure_copy (template);
gst_structure_set (alt_t, "format", G_TYPE_STRING, "ARGB", NULL);
#include <sys/types.h>
#include <sys/mman.h>
#include <unistd.h>
-#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
+#ifdef TIZEN_FEATURE_V4L2_TBM_SUPPORT
#include <tbm_surface.h>
#include <tbm_surface_internal.h>
-#endif /* TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER */
+#endif /* TIZEN_FEATURE_V4L2_TBM_SUPPORT */
#define GST_V4L2_MEMORY_TYPE "V4l2Memory"
if (mem)
gst_memory_unref (mem);
}
-#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
+#ifdef TIZEN_FEATURE_V4L2_TBM_SUPPORT
if (group->surface) {
GST_INFO ("unref surface[%p]", group->surface);
tbm_surface_destroy (group->surface);
group->surface = NULL;
}
-#endif /* TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER */
+#endif /* TIZEN_FEATURE_V4L2_TBM_SUPPORT */
g_slice_free (GstV4l2MemoryGroup, group);
}
GstV4l2Allocator *allocator = (GstV4l2Allocator *) obj;
GST_LOG_OBJECT (obj, "called");
-#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
+#ifdef TIZEN_FEATURE_V4L2_TBM_SUPPORT
if (allocator->bufmgr) {
GST_INFO_OBJECT (obj, "deinit tbm bufmgr %p", allocator->bufmgr);
tbm_bufmgr_deinit (allocator->bufmgr);
allocator->bufmgr = NULL;
}
-#endif /* TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER */
+#endif /* TIZEN_FEATURE_V4L2_TBM_SUPPORT */
gst_atomic_queue_unref (allocator->free_queue);
gst_object_unref (allocator->obj->element);
}
}
-#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
+#ifdef TIZEN_FEATURE_V4L2_TBM_SUPPORT
static tbm_format __get_tbm_format (GstVideoFormat gst_format)
{
switch (gst_format) {
return TBM_FORMAT_YUV420;
}
}
-#endif /* TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER */
+#endif /* TIZEN_FEATURE_V4L2_TBM_SUPPORT */
GstV4l2Allocator *
gst_v4l2_allocator_new (GstObject * parent, GstV4l2Object * v4l2object)
GST_OBJECT_FLAG_SET (allocator, flags);
-#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
+#ifdef TIZEN_FEATURE_V4L2_TBM_SUPPORT
if (v4l2object->tbm_output &&
!V4L2_TYPE_IS_OUTPUT (v4l2object->type) &&
v4l2object->mode == GST_V4L2_IO_DMABUF) {
return NULL;
}
}
-#endif /* TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER */
+#endif /* TIZEN_FEATURE_V4L2_TBM_SUPPORT */
return allocator;
}
GstV4l2Object *obj = allocator->obj;
GstV4l2MemoryGroup *group;
gint i;
-#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
+#ifdef TIZEN_FEATURE_V4L2_TBM_SUPPORT
tbm_bo bos[VIDEO_MAX_PLANES] = {NULL, };
-#endif /* TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER */
+#endif /* TIZEN_FEATURE_V4L2_TBM_SUPPORT */
g_return_val_if_fail (allocator->memory == V4L2_MEMORY_MMAP, NULL);
NULL, group->planes[i].length, 0, group->planes[i].data_offset,
group->planes[i].length - group->planes[i].data_offset, i, NULL,
expbuf.fd, group);
-#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
+#ifdef TIZEN_FEATURE_V4L2_TBM_SUPPORT
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 */
+#endif /* TIZEN_FEATURE_V4L2_TBM_SUPPORT */
} else {
/* Take back the allocator reference */
gst_object_ref (allocator);
group->mem[i] = dma_mem;
}
-#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
+#ifdef TIZEN_FEATURE_V4L2_TBM_SUPPORT
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);
/* release bos - they will be kept in surface. */
for (i = 0 ; i < VIDEO_MAX_PLANES && bos[i] ; i++)
tbm_bo_unref (bos[i]);
-#endif /* TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER */
+#endif /* TIZEN_FEATURE_V4L2_TBM_SUPPORT */
gst_v4l2_allocator_reset_size (allocator, group);
#include "ext/videodev2.h"
#include <gst/gst.h>
#include <gst/gstatomicqueue.h>
-#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
+#ifdef TIZEN_FEATURE_V4L2_TBM_SUPPORT
#include <tbm_surface.h>
#include <tbm_surface_internal.h>
-#endif /* TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER */
+#endif /* TIZEN_FEATURE_V4L2_TBM_SUPPORT */
G_BEGIN_DECLS
gint mems_allocated;
struct v4l2_buffer buffer;
struct v4l2_plane planes[VIDEO_MAX_PLANES];
-#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
+#ifdef TIZEN_FEATURE_V4L2_TBM_SUPPORT
tbm_surface_h surface;
-#endif /* TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER */
+#endif /* TIZEN_FEATURE_V4L2_TBM_SUPPORT */
};
struct _GstV4l2Allocator
GstV4l2MemoryGroup * groups[VIDEO_MAX_FRAME];
GstAtomicQueue *free_queue;
GstAtomicQueue *pending_queue;
-#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
+#ifdef TIZEN_FEATURE_V4L2_TBM_SUPPORT
tbm_bufmgr bufmgr;
tbm_surface_info_s s_info;
gint live_buffer_count;
-#endif /* TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER */
+#endif /* TIZEN_FEATURE_V4L2_TBM_SUPPORT */
};
struct _GstV4l2AllocatorClass {
#include "gstv4l2object.h"
#include "gst/gst-i18n-plugin.h"
#include <gst/glib-compat-private.h>
-#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
+#ifdef TIZEN_FEATURE_V4L2_TBM_SUPPORT
#include <gst/allocators/gsttizenmemory.h>
-#endif /* TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER */
+#endif /* TIZEN_FEATURE_V4L2_TBM_SUPPORT */
GST_DEBUG_CATEGORY_STATIC (v4l2bufferpool_debug);
GST_DEBUG_CATEGORY_STATIC (CAT_PERFORMANCE);
static void gst_v4l2_buffer_pool_release_buffer (GstBufferPool * bpool,
GstBuffer * buffer);
-#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
+#ifdef TIZEN_FEATURE_V4L2_TBM_SUPPORT
typedef struct _GstV4l2TizenBuffer GstV4l2TizenBuffer;
struct _GstV4l2TizenBuffer {
int index;
return tizen_buffer;
}
-#endif /* TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER */
+#endif /* TIZEN_FEATURE_V4L2_TBM_SUPPORT */
static gboolean
gst_v4l2_is_buffer_valid (GstBuffer * buffer, GstV4l2MemoryGroup ** out_group)
GstBufferPoolClass *pclass = GST_BUFFER_POOL_CLASS (parent_class);
GstV4l2Object *obj = pool->obj;
gint i;
-#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
+#ifdef TIZEN_FEATURE_V4L2_TBM_SUPPORT
gint64 end_time = 0;
-#endif /* TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER */
+#endif /* TIZEN_FEATURE_V4L2_TBM_SUPPORT */
if (!pool->streaming)
return;
-#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
+#ifdef TIZEN_FEATURE_V4L2_TBM_SUPPORT
if (obj->tbm_output && !V4L2_TYPE_IS_OUTPUT(pool->obj->type)) {
g_mutex_lock (&pool->buffer_lock);
g_mutex_unlock (&pool->buffer_lock);
}
-#endif /* TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER */
+#endif /* TIZEN_FEATURE_V4L2_TBM_SUPPORT */
switch (obj->mode) {
case GST_V4L2_IO_MMAP:
case GST_V4L2_IO_USERPTR:
GstVideoMeta *vmeta;
gsize size;
gint i;
-#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
+#ifdef TIZEN_FEATURE_V4L2_TBM_SUPPORT
GstV4l2TizenBuffer *tizen_buffer = NULL;
-#endif /* TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER */
+#endif /* TIZEN_FEATURE_V4L2_TBM_SUPPORT */
if ((res = gst_v4l2_buffer_pool_poll (pool, wait)) < GST_FLOW_OK)
goto poll_failed;
GST_BUFFER_OFFSET (outbuf) = group->buffer.sequence;
GST_BUFFER_OFFSET_END (outbuf) = group->buffer.sequence + 1;
-#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
+#ifdef TIZEN_FEATURE_V4L2_TBM_SUPPORT
if (group->surface) {
tizen_buffer = gst_v4l2_tizen_buffer_new (outbuf, group->buffer.index, pool);
if (!tizen_buffer) {
}
outbuf = tizen_buffer->gst_buffer;
}
-#endif /* TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER */
+#endif /* TIZEN_FEATURE_V4L2_TBM_SUPPORT */
done:
*buffer = outbuf;
gst_object_unref (pool->allocator);
pool->allocator = NULL;
-#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
+#ifdef TIZEN_FEATURE_V4L2_TBM_SUPPORT
g_cond_clear (&pool->buffer_cond);
g_mutex_clear (&pool->buffer_lock);
if (pool->tallocator)
gst_object_unref (pool->tallocator);
pool->tallocator = NULL;
-#endif /* TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER */
+#endif /* TIZEN_FEATURE_V4L2_TBM_SUPPORT */
if (pool->other_pool)
gst_object_unref (pool->other_pool);
pool->other_pool = NULL;
pool->obj = obj;
pool->can_poll_device = TRUE;
-#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
+#ifdef TIZEN_FEATURE_V4L2_TBM_SUPPORT
pool->tallocator = gst_tizen_allocator_new ();
if (pool->tallocator == NULL)
goto allocator_failed;
g_mutex_init (&pool->buffer_lock);
g_cond_init (&pool->buffer_cond);
-#endif /* TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER */
+#endif /* TIZEN_FEATURE_V4L2_TBM_SUPPORT */
pool->vallocator = gst_v4l2_allocator_new (GST_OBJECT (pool), obj);
if (pool->vallocator == NULL)
goto allocator_failed;
}
allocator_failed:
{
-#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
+#ifdef TIZEN_FEATURE_V4L2_TBM_SUPPORT
if (pool->tallocator) {
gst_object_unref (pool->tallocator);
pool->tallocator = NULL;
}
-#endif /* TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER */
+#endif /* TIZEN_FEATURE_V4L2_TBM_SUPPORT */
GST_ERROR_OBJECT (pool, "Failed to create V4L2 allocator");
gst_object_unref (pool);
return NULL;
if (GST_V4L2_IS_M2M (obj->device_caps))
goto eos;
}
-#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
+#ifdef TIZEN_FEATURE_V4L2_TBM_SUPPORT
if (pool->obj->tbm_output && pool->obj->mode == GST_V4L2_IO_DMABUF) {
gst_buffer_unref (*buf);
*buf = tmp;
} else {
-#endif /* TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER */
+#endif /* TIZEN_FEATURE_V4L2_TBM_SUPPORT */
ret = gst_v4l2_buffer_pool_copy_buffer (pool, *buf, tmp);
/* an queue the buffer again after the copy */
gst_v4l2_buffer_pool_release_buffer (bpool, tmp);
-#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
+#ifdef TIZEN_FEATURE_V4L2_TBM_SUPPORT
}
-#endif /* TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER */
+#endif /* TIZEN_FEATURE_V4L2_TBM_SUPPORT */
if (ret != GST_FLOW_OK)
goto copy_failed;
GstV4l2Allocator *vallocator;
GstAllocator *allocator;
-#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
+#ifdef TIZEN_FEATURE_V4L2_TBM_SUPPORT
GstAllocator *tallocator;
gint live_buffer_count;
GMutex buffer_lock;
GCond buffer_cond;
-#endif /* TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER */
+#endif /* TIZEN_FEATURE_V4L2_TBM_SUPPORT */
GstAllocationParams params;
GstBufferPool *other_pool;
guint size;
if (v4l2object->ioctl (v4l2object->video_fd, VIDIOC_G_CTRL, &control) == 0) {
GST_DEBUG_OBJECT (v4l2object->dbg_obj,
"driver requires a minimum of %d buffers", control.value);
-#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
+#ifdef TIZEN_FEATURE_V4L2_TBM_SUPPORT
#define DEFAULT_DECODER_OUTPUT_BUFFER_COUNT 5
if (v4l2object->tbm_output &&
!V4L2_TYPE_IS_OUTPUT (v4l2object->type) && control.value == 1) {
} else {
v4l2object->min_buffers = control.value;
}
-#else /* TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER */
+#else /* TIZEN_FEATURE_V4L2_TBM_SUPPORT */
v4l2object->min_buffers = control.value;
-#endif /* TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER */
+#endif /* TIZEN_FEATURE_V4L2_TBM_SUPPORT */
} else {
v4l2object->min_buffers = 0;
}
}
switch (gst_v4l2_formats[i].format) {
-#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
+#ifdef TIZEN_FEATURE_V4L2_TBM_SUPPORT
case V4L2_PIX_FMT_YUV420:
alt_s = gst_structure_copy (structure);
gst_structure_set (alt_s, "format", G_TYPE_STRING, "S420", NULL);
alt_s = gst_structure_copy (structure);
gst_structure_set (alt_s, "format", G_TYPE_STRING, "SN12", NULL);
break;
-#endif /* TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER */
+#endif /* TIZEN_FEATURE_V4L2_TBM_SUPPORT */
case V4L2_PIX_FMT_RGB32:
alt_s = gst_structure_copy (structure);
gst_structure_set (alt_s, "format", G_TYPE_STRING, "ARGB", NULL);
if (g_str_equal (mimetype, "video/x-raw")) {
switch (GST_VIDEO_INFO_FORMAT (info)) {
case GST_VIDEO_FORMAT_I420:
-#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
+#ifdef TIZEN_FEATURE_V4L2_TBM_SUPPORT
case GST_VIDEO_FORMAT_S420:
-#endif /* TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER */
+#endif /* TIZEN_FEATURE_V4L2_TBM_SUPPORT */
fourcc = V4L2_PIX_FMT_YUV420;
fourcc_nc = V4L2_PIX_FMT_YUV420M;
break;
fourcc = V4L2_PIX_FMT_YUV422P;
break;
case GST_VIDEO_FORMAT_NV12:
-#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
+#ifdef TIZEN_FEATURE_V4L2_TBM_SUPPORT
case GST_VIDEO_FORMAT_SN12:
-#endif /* TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER */
+#endif /* TIZEN_FEATURE_V4L2_TBM_SUPPORT */
fourcc = V4L2_PIX_FMT_NV12;
fourcc_nc = V4L2_PIX_FMT_NV12M;
break;
if (tmp)
gst_caps_append (ret, tmp);
-#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
+#ifdef TIZEN_FEATURE_V4L2_TBM_SUPPORT
if (format->pixelformat == V4L2_PIX_FMT_NV12 ||
format->pixelformat == V4L2_PIX_FMT_YUV420) {
GstStructure *alt_s = gst_structure_copy (template);
gst_structure_free (alt_s);
}
-#endif /* TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER */
+#endif /* TIZEN_FEATURE_V4L2_TBM_SUPPORT */
gst_structure_free (template);
}
GstAllocator *allocator = NULL;
GstAllocationParams params = { 0 };
-#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
+#ifdef TIZEN_FEATURE_V4L2_TBM_SUPPORT
GST_INFO_OBJECT (obj->dbg_obj, "decide allocation - %s",
V4L2_TYPE_IS_OUTPUT (obj->type) ? "output" : "capture");
-#else /* TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER */
+#else /* TIZEN_FEATURE_V4L2_TBM_SUPPORT */
GST_DEBUG_OBJECT (obj->dbg_obj, "decide allocation");
-#endif /* TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER */
+#endif /* TIZEN_FEATURE_V4L2_TBM_SUPPORT */
g_return_val_if_fail (obj->type == V4L2_BUF_TYPE_VIDEO_CAPTURE ||
obj->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, FALSE);
/* auto scan device */
gboolean auto_scan_device;
#endif /* TIZEN_FEATURE_V4L2SRC_AUTO_SCAN_DEVICE_NODE */
-#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
+#ifdef TIZEN_FEATURE_V4L2_TBM_SUPPORT
gboolean tbm_output;
-#endif /* TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER */
+#endif /* TIZEN_FEATURE_V4L2_TBM_SUPPORT */
/* the video-device's file descriptor */
gint video_fd;
{
PROP_0,
V4L2_STD_OBJECT_PROPS
-#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
+#ifdef TIZEN_FEATURE_V4L2_TBM_SUPPORT
, PROP_TBM_OUTPUT
-#endif /* TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER */
+#endif /* TIZEN_FEATURE_V4L2_TBM_SUPPORT */
};
#define gst_v4l2_video_dec_parent_class parent_class
static GstFlowReturn gst_v4l2_video_dec_finish (GstVideoDecoder * decoder);
-#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
+#ifdef TIZEN_FEATURE_V4L2_TBM_SUPPORT
static void gst_v4l2_video_dec_flush_buffer_event (GstVideoDecoder * decoder)
{
gboolean ret = FALSE;
GST_WARNING_OBJECT(decoder, "event push ret[%d] for flush-buffer", ret);
}
-#endif /* TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER */
+#endif /* TIZEN_FEATURE_V4L2_TBM_SUPPORT */
static void
gst_v4l2_video_dec_set_property (GObject * object,
guint prop_id, const GValue * value, GParamSpec * pspec)
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
break;
-#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
+#ifdef TIZEN_FEATURE_V4L2_TBM_SUPPORT
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 */
+#endif /* TIZEN_FEATURE_V4L2_TBM_SUPPORT */
/* By default, only set on output */
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
break;
-#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
+#ifdef TIZEN_FEATURE_V4L2_TBM_SUPPORT
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 */
+#endif /* TIZEN_FEATURE_V4L2_TBM_SUPPORT */
/* By default read from output */
default:
/* Should have been flushed already */
g_assert (g_atomic_int_get (&self->active) == FALSE);
-#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
+#ifdef TIZEN_FEATURE_V4L2_TBM_SUPPORT
gst_v4l2_video_dec_flush_buffer_event (decoder);
-#endif /* TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER */
+#endif /* TIZEN_FEATURE_V4L2_TBM_SUPPORT */
gst_v4l2_object_stop (self->v4l2output);
gst_v4l2_object_stop (self->v4l2capture);
if (self->v4l2output->pool)
gst_v4l2_buffer_pool_flush (self->v4l2output->pool);
-#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
+#ifdef TIZEN_FEATURE_V4L2_TBM_SUPPORT
gst_v4l2_video_dec_flush_buffer_event (decoder);
-#endif /* TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER */
+#endif /* TIZEN_FEATURE_V4L2_TBM_SUPPORT */
/* gst_v4l2_buffer_pool_flush() calls streamon the capture pool and must be
* called after gst_v4l2_object_unlock_stop() stopped flushing the buffer
* pool. */
gboolean processed = FALSE;
GstBuffer *tmp;
GstTaskState task_state;
-#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
+#ifdef TIZEN_FEATURE_V4L2_TBM_SUPPORT
GstStructure *structure = NULL;
const gchar *caps_format = NULL;
GstMessage *msg = NULL;
GstV4l2BufferPool *capture_pool = NULL;
-#endif /* TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER */
+#endif /* TIZEN_FEATURE_V4L2_TBM_SUPPORT */
GST_DEBUG_OBJECT (self, "Handling frame %d", frame->system_frame_number);
caps = gst_caps_fixate (caps);
GST_DEBUG_OBJECT (self, "Chosen decoded caps: %" GST_PTR_FORMAT, caps);
-#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
+#ifdef TIZEN_FEATURE_V4L2_TBM_SUPPORT
structure = gst_caps_get_structure (caps, 0);
caps_format = gst_structure_get_string (structure, "format");
gst_caps_set_simple (caps, "format", G_TYPE_STRING, "SN12", NULL);
}
GST_INFO_OBJECT (self, "Updated decoded caps: %" GST_PTR_FORMAT, caps);
-#endif /* TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER */
+#endif /* TIZEN_FEATURE_V4L2_TBM_SUPPORT */
/* Try to set negotiated format, on success replace acquired format */
if (gst_v4l2_object_set_format (self->v4l2capture, caps, &error))
if (!gst_buffer_pool_set_active (GST_BUFFER_POOL (self->v4l2capture->pool),
TRUE))
goto activate_failed;
-#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
+#ifdef TIZEN_FEATURE_V4L2_TBM_SUPPORT
capture_pool = GST_V4L2_BUFFER_POOL (self->v4l2capture->pool);
msg = gst_message_new_element (GST_OBJECT_CAST (decoder),
gst_element_post_message (GST_ELEMENT_CAST (decoder), msg);
GST_WARNING_OBJECT (self, "output buffer[%d]", capture_pool->num_allocated);
-#endif /* TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER */
+#endif /* TIZEN_FEATURE_V4L2_TBM_SUPPORT */
}
task_state = gst_pad_get_task_state (GST_VIDEO_DECODER_SRC_PAD (self));
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
+#ifdef TIZEN_FEATURE_V4L2_TBM_SUPPORT
self->v4l2capture->tbm_output = TRUE;
-#endif /* TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER */
+#endif /* TIZEN_FEATURE_V4L2_TBM_SUPPORT */
}
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
+#ifdef TIZEN_FEATURE_V4L2_TBM_SUPPORT
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 */
+#endif /* TIZEN_FEATURE_V4L2_TBM_SUPPORT */
}
static void