mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 04:26:14 +00:00
v4l2src: fix indentation
This commit is contained in:
parent
7787f439fc
commit
30a3551163
2 changed files with 10 additions and 8 deletions
|
@ -811,7 +811,8 @@ retry:
|
||||||
|
|
||||||
/* use generated offset values only if there are not already valid ones
|
/* use generated offset values only if there are not already valid ones
|
||||||
* set by the v4l2 device */
|
* set by the v4l2 device */
|
||||||
if (!GST_BUFFER_OFFSET_IS_VALID (*buf) || !GST_BUFFER_OFFSET_END_IS_VALID (*buf)) {
|
if (!GST_BUFFER_OFFSET_IS_VALID (*buf)
|
||||||
|
|| !GST_BUFFER_OFFSET_END_IS_VALID (*buf)) {
|
||||||
GST_BUFFER_OFFSET (*buf) = v4l2src->offset++;
|
GST_BUFFER_OFFSET (*buf) = v4l2src->offset++;
|
||||||
GST_BUFFER_OFFSET_END (*buf) = v4l2src->offset;
|
GST_BUFFER_OFFSET_END (*buf) = v4l2src->offset;
|
||||||
} else {
|
} else {
|
||||||
|
@ -820,15 +821,17 @@ retry:
|
||||||
GST_BUFFER_OFFSET (*buf) += v4l2src->renegotiation_adjust;
|
GST_BUFFER_OFFSET (*buf) += v4l2src->renegotiation_adjust;
|
||||||
GST_BUFFER_OFFSET_END (*buf) += v4l2src->renegotiation_adjust;
|
GST_BUFFER_OFFSET_END (*buf) += v4l2src->renegotiation_adjust;
|
||||||
/* check for frame loss with given (from v4l2 device) buffer offset */
|
/* check for frame loss with given (from v4l2 device) buffer offset */
|
||||||
if ((v4l2src->offset != 0) && (GST_BUFFER_OFFSET (*buf) != (v4l2src->offset + 1))) {
|
if ((v4l2src->offset != 0)
|
||||||
|
&& (GST_BUFFER_OFFSET (*buf) != (v4l2src->offset + 1))) {
|
||||||
guint64 lost_frame_count = GST_BUFFER_OFFSET (*buf) - v4l2src->offset - 1;
|
guint64 lost_frame_count = GST_BUFFER_OFFSET (*buf) - v4l2src->offset - 1;
|
||||||
GST_WARNING_OBJECT (v4l2src,
|
GST_WARNING_OBJECT (v4l2src,
|
||||||
"lost frames detected: count = %" G_GUINT64_FORMAT " - ts: %" GST_TIME_FORMAT,
|
"lost frames detected: count = %" G_GUINT64_FORMAT " - ts: %"
|
||||||
lost_frame_count, GST_TIME_ARGS (timestamp));
|
GST_TIME_FORMAT, lost_frame_count, GST_TIME_ARGS (timestamp));
|
||||||
|
|
||||||
qos_msg = gst_message_new_qos (GST_OBJECT_CAST (v4l2src), TRUE,
|
qos_msg = gst_message_new_qos (GST_OBJECT_CAST (v4l2src), TRUE,
|
||||||
GST_CLOCK_TIME_NONE, GST_CLOCK_TIME_NONE, timestamp,
|
GST_CLOCK_TIME_NONE, GST_CLOCK_TIME_NONE, timestamp,
|
||||||
GST_CLOCK_TIME_IS_VALID (duration) ? lost_frame_count * duration : GST_CLOCK_TIME_NONE);
|
GST_CLOCK_TIME_IS_VALID (duration) ? lost_frame_count *
|
||||||
|
duration : GST_CLOCK_TIME_NONE);
|
||||||
gst_element_post_message (GST_ELEMENT_CAST (v4l2src), qos_msg);
|
gst_element_post_message (GST_ELEMENT_CAST (v4l2src), qos_msg);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -519,15 +519,14 @@ gst_v4l2_video_dec_handle_frame (GstVideoDecoder * decoder,
|
||||||
caps = gst_pad_peer_query_caps (decoder->srcpad, filter);
|
caps = gst_pad_peer_query_caps (decoder->srcpad, filter);
|
||||||
gst_caps_unref (filter);
|
gst_caps_unref (filter);
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (self, "Possible decoded caps: %" GST_PTR_FORMAT,
|
GST_DEBUG_OBJECT (self, "Possible decoded caps: %" GST_PTR_FORMAT, caps);
|
||||||
caps);
|
|
||||||
if (gst_caps_is_empty (caps)) {
|
if (gst_caps_is_empty (caps)) {
|
||||||
gst_caps_unref (caps);
|
gst_caps_unref (caps);
|
||||||
goto not_negotiated;
|
goto not_negotiated;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Fixate pixel format */
|
/* Fixate pixel format */
|
||||||
caps = gst_caps_fixate(caps);
|
caps = gst_caps_fixate (caps);
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (self, "Chosen decoded caps: %" GST_PTR_FORMAT, caps);
|
GST_DEBUG_OBJECT (self, "Chosen decoded caps: %" GST_PTR_FORMAT, caps);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue