v4l2object: Rename setup_format() method into acquire_format()
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Thu, 13 Mar 2014 18:24:51 +0000 (19:24 +0100)
committerNicolas Dufresne <nicolas.dufresne@collabora.com>
Thu, 8 May 2014 19:56:35 +0000 (15:56 -0400)
The setup_format() was confusing since it does not set anything, in fact
it reads the setup from the driver and save it.

sys/v4l2/gstv4l2object.c
sys/v4l2/gstv4l2object.h
sys/v4l2/gstv4l2videodec.c

index 65dd8eb..4399563 100644 (file)
@@ -2657,7 +2657,7 @@ pool_failed:
 }
 
 /**
- * gst_v4l2_object_setup_format:
+ * gst_v4l2_object_acquire_format:
  * @v4l2object the object
  * @info a GstVideoInfo to be filled
  * @align a GstVideoAlignment to be filled
@@ -2665,12 +2665,14 @@ pool_failed:
  * Setup the format base on the currently configured format. This is useful in
  * decoder or encoder elements where the output format is dictated by the
  * input.
+ * Acquire the driver choosen format. This is useful in decoder or encoder elements where
+ * the output format is choosen by the HW.
  *
  * Returns: %TRUE on success, %FALSE on failure.
  */
 gboolean
-gst_v4l2_object_setup_format (GstV4l2Object * v4l2object,
-    GstVideoInfo * info, GstVideoAlignment * align)
+gst_v4l2_object_acquire_format (GstV4l2Object * v4l2object, GstVideoInfo * info,
+    GstVideoAlignment * align)
 {
   struct v4l2_fmtdesc *fmtdesc;
   struct v4l2_format fmt;
index c205b2e..d61a274 100644 (file)
@@ -253,10 +253,10 @@ gboolean      gst_v4l2_object_copy        (GstV4l2Object * v4l2object,
 GstCaps *     gst_v4l2_object_get_caps    (GstV4l2Object * v4l2object,
                                            GstCaps * filter);
 
-gboolean      gst_v4l2_object_setup_format (GstV4l2Object * v4l2object,
-                                            GstVideoInfo * info,
-                                            GstVideoAlignment * align);
-
+gboolean      gst_v4l2_object_acquire_format (GstV4l2Object * v4l2object,
+                                              GstVideoInfo * info,
+                                              GstVideoAlignment * align);
 gboolean      gst_v4l2_object_decide_allocation (GstV4l2Object * v4l2object,
                                                  GstQuery * query);
 
index bb75744..ece5440 100644 (file)
@@ -475,7 +475,7 @@ gst_v4l2_video_dec_handle_frame (GstVideoDecoder * decoder,
 
     gst_buffer_unref (codec_data);
 
-    if (!gst_v4l2_object_setup_format (self->v4l2capture, &info, &self->align))
+    if (!gst_v4l2_object_acquire_format (self->v4l2capture, &info))
       goto not_negotiated;
 
     output_state = gst_video_decoder_set_output_state (decoder,