v4l2object: Rename setup_format() method into acquire_format()

The setup_format() was confusing since it does not set anything, in fact
it reads the setup from the driver and save it.
This commit is contained in:
Nicolas Dufresne 2014-03-13 19:24:51 +01:00
parent 8cf1c330d5
commit 70e7868f18
3 changed files with 10 additions and 8 deletions

View File

@ -2657,7 +2657,7 @@ pool_failed:
} }
/** /**
* gst_v4l2_object_setup_format: * gst_v4l2_object_acquire_format:
* @v4l2object the object * @v4l2object the object
* @info a GstVideoInfo to be filled * @info a GstVideoInfo to be filled
* @align a GstVideoAlignment 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 * 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 * decoder or encoder elements where the output format is dictated by the
* input. * 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. * Returns: %TRUE on success, %FALSE on failure.
*/ */
gboolean gboolean
gst_v4l2_object_setup_format (GstV4l2Object * v4l2object, gst_v4l2_object_acquire_format (GstV4l2Object * v4l2object, GstVideoInfo * info,
GstVideoInfo * info, GstVideoAlignment * align) GstVideoAlignment * align)
{ {
struct v4l2_fmtdesc *fmtdesc; struct v4l2_fmtdesc *fmtdesc;
struct v4l2_format fmt; struct v4l2_format fmt;

View File

@ -253,7 +253,7 @@ gboolean gst_v4l2_object_copy (GstV4l2Object * v4l2object,
GstCaps * gst_v4l2_object_get_caps (GstV4l2Object * v4l2object, GstCaps * gst_v4l2_object_get_caps (GstV4l2Object * v4l2object,
GstCaps * filter); GstCaps * filter);
gboolean gst_v4l2_object_setup_format (GstV4l2Object * v4l2object, gboolean gst_v4l2_object_acquire_format (GstV4l2Object * v4l2object,
GstVideoInfo * info, GstVideoInfo * info,
GstVideoAlignment * align); GstVideoAlignment * align);

View File

@ -475,7 +475,7 @@ gst_v4l2_video_dec_handle_frame (GstVideoDecoder * decoder,
gst_buffer_unref (codec_data); 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; goto not_negotiated;
output_state = gst_video_decoder_set_output_state (decoder, output_state = gst_video_decoder_set_output_state (decoder,