[v4l2] Change feature name
[platform/upstream/gst-plugins-good.git] / sys / v4l2 / gstv4l2videodec.c
index f1c32e8..0fbd7f6 100644 (file)
@@ -51,9 +51,9 @@ enum
 {
   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
@@ -62,7 +62,7 @@ G_DEFINE_ABSTRACT_TYPE (GstV4l2VideoDec, gst_v4l2_video_dec,
 
 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;
@@ -78,7 +78,7 @@ static void gst_v4l2_video_dec_flush_buffer_event (GstVideoDecoder * decoder)
 
   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)
@@ -92,12 +92,12 @@ gst_v4l2_video_dec_set_property (GObject * object,
         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 */
@@ -123,12 +123,12 @@ gst_v4l2_video_dec_get_property (GObject * object,
         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:
@@ -231,9 +231,9 @@ gst_v4l2_video_dec_stop (GstVideoDecoder * decoder)
 
   /* 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);
@@ -347,9 +347,9 @@ gst_v4l2_video_dec_flush (GstVideoDecoder * decoder)
   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. */
@@ -609,12 +609,12 @@ gst_v4l2_video_dec_handle_frame (GstVideoDecoder * decoder,
   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);
 
@@ -714,7 +714,7 @@ gst_v4l2_video_dec_handle_frame (GstVideoDecoder * decoder,
     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");
 
@@ -726,7 +726,7 @@ gst_v4l2_video_dec_handle_frame (GstVideoDecoder * decoder,
       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))
@@ -753,7 +753,7 @@ gst_v4l2_video_dec_handle_frame (GstVideoDecoder * decoder,
     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),
@@ -764,7 +764,7 @@ gst_v4l2_video_dec_handle_frame (GstVideoDecoder * 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));
@@ -1035,9 +1035,9 @@ gst_v4l2_video_dec_subinstance_init (GTypeInstance * instance, gpointer g_class)
       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
@@ -1090,12 +1090,12 @@ gst_v4l2_video_dec_class_init (GstV4l2VideoDecClass * klass)
       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