Run gst-indent through the files

This is required before we enabled an indent test in the CI.

https://gitlab.freedesktop.org/gstreamer/gstreamer-project/issues/33
This commit is contained in:
Jordan Petridis 2018-11-28 05:52:16 +02:00
parent 2e0a45d7df
commit 515ada7e22
No known key found for this signature in database
GPG key ID: 902CC06D159744F5
7 changed files with 36 additions and 34 deletions

View file

@ -2722,10 +2722,10 @@ gst_matroska_demux_handle_seek_event (GstMatroskaDemux * demux,
* would be determined again when parsing, but anyway ... */
seeksegment.duration = demux->common.segment.duration;
flush = !!(flags & GST_SEEK_FLAG_FLUSH);
keyunit = !!(flags & GST_SEEK_FLAG_KEY_UNIT);
after = !!(flags & GST_SEEK_FLAG_SNAP_AFTER);
before = !!(flags & GST_SEEK_FLAG_SNAP_BEFORE);
flush = ! !(flags & GST_SEEK_FLAG_FLUSH);
keyunit = ! !(flags & GST_SEEK_FLAG_KEY_UNIT);
after = ! !(flags & GST_SEEK_FLAG_SNAP_AFTER);
before = ! !(flags & GST_SEEK_FLAG_SNAP_BEFORE);
/* always do full update if flushing,
* otherwise problems might arise downstream with missing keyframes etc */

View file

@ -53,8 +53,7 @@ static GstStaticPadTemplate gst_rtp_g722_pay_src_template =
"media = (string) \"audio\", "
"encoding-name = (string) \"G722\", "
"payload = (int) " GST_RTP_PAYLOAD_DYNAMIC_STRING ", "
"encoding-params = (string) 1, "
"clock-rate = (int) 8000")
"encoding-params = (string) 1, " "clock-rate = (int) 8000")
);
static gboolean gst_rtp_g722_pay_setcaps (GstRTPBasePayload * basepayload,

View file

@ -625,7 +625,7 @@ gst_rtp_mux_setcaps (GstPad * pad, GstRTPMux * rtp_mux, GstCaps * caps)
rtp_mux->have_ssrc = TRUE;
}
if (gst_structure_get_uint (structure,
"timestamp-offset", &rtp_mux->ts_base)) {
"timestamp-offset", &rtp_mux->ts_base)) {
GST_INFO_OBJECT (pad, "Use downstream timestamp-offset: %u",
rtp_mux->ts_base);
}

View file

@ -1364,7 +1364,8 @@ gst_udpsrc_open (GstUDPSrc * src)
bind_saddr = g_inet_socket_address_new (bind_addr, src->port);
g_object_unref (bind_addr);
if (!g_socket_bind (src->used_socket, bind_saddr, src->reuse, &err)) {
GST_ERROR_OBJECT (src, "%s: error binding to %s:%d", err->message, src->address, src->port);
GST_ERROR_OBJECT (src, "%s: error binding to %s:%d", err->message,
src->address, src->port);
goto bind_error;
}

View file

@ -40,8 +40,7 @@
GST_DEBUG_CATEGORY_STATIC (gst_v4l2_jpeg_enc_debug);
#define GST_CAT_DEFAULT gst_v4l2_jpeg_enc_debug
static GstStaticCaps src_template_caps =
GST_STATIC_CAPS ("image/jpeg");
static GstStaticCaps src_template_caps = GST_STATIC_CAPS ("image/jpeg");
enum
{

View file

@ -473,13 +473,11 @@ GST_END_TEST;
GST_START_TEST (test_rtpmux_ssrc_property_overrules_downstream)
{
GstHarness * h = gst_harness_new_with_padnames ("rtpmux", NULL, "src");
GstHarness * h0 = gst_harness_new_with_element (
h->element, "sink_0", NULL);
GstHarness * h1 = gst_harness_new_with_element (
h->element, "sink_1", NULL);
GstBuffer * buf0;
GstBuffer * buf1;
GstHarness *h = gst_harness_new_with_padnames ("rtpmux", NULL, "src");
GstHarness *h0 = gst_harness_new_with_element (h->element, "sink_0", NULL);
GstHarness *h1 = gst_harness_new_with_element (h->element, "sink_1", NULL);
GstBuffer *buf0;
GstBuffer *buf1;
/* downstream is specifying 444444 as ssrc */
gst_harness_set_sink_caps_str (h, "application/x-rtp, ssrc=(uint)444444");
@ -520,17 +518,16 @@ GST_START_TEST (test_rtpmux_ssrc_property_overrules_downstream)
gst_harness_teardown (h1);
gst_harness_teardown (h);
}
GST_END_TEST;
GST_START_TEST (test_rtpmux_ssrc_property_survive_statechange)
{
GstHarness * h = gst_harness_new_with_padnames ("rtpmux", NULL, "src");
GstHarness * h0 = gst_harness_new_with_element (
h->element, "sink_0", NULL);
GstHarness * h1 = gst_harness_new_with_element (
h->element, "sink_1", NULL);
GstBuffer * buf0;
GstBuffer * buf1;
GstHarness *h = gst_harness_new_with_padnames ("rtpmux", NULL, "src");
GstHarness *h0 = gst_harness_new_with_element (h->element, "sink_0", NULL);
GstHarness *h1 = gst_harness_new_with_element (h->element, "sink_1", NULL);
GstBuffer *buf0;
GstBuffer *buf1;
gst_element_set_state (h->element, GST_STATE_NULL);
/* rtpmux ssrc is set to 111111 */
@ -545,7 +542,7 @@ GST_START_TEST (test_rtpmux_ssrc_property_survive_statechange)
gst_harness_set_sink_caps_str (h, "application/x-rtp, ssrc=(uint)444444");
gst_harness_set_sink_caps_str (h, "application/x-rtp");
/* push*/
/* push */
fail_unless_equals_int (GST_FLOW_OK,
gst_harness_push (h0, generate_test_buffer (0, 222222)));
fail_unless_equals_int (GST_FLOW_OK,
@ -565,6 +562,7 @@ GST_START_TEST (test_rtpmux_ssrc_property_survive_statechange)
gst_harness_teardown (h1);
gst_harness_teardown (h);
}
GST_END_TEST;
GST_START_TEST (test_rtpmux_ssrc_downstream_dynamic)
@ -637,7 +635,7 @@ GST_START_TEST (test_rtpmux_caps_query_with_downsteam_ts_offset_and_ssrc)
/* downstream is specifying 100 as ts-offset and 111 as ssrc */
gst_harness_set_sink_caps_str (h, "application/x-rtp, "
"timstamp-offset=(uint)100, ssrc=(uint)111");
"timstamp-offset=(uint)100, ssrc=(uint)111");
caps = gst_pad_peer_query_caps (h->srcpad, NULL);
s = gst_caps_get_structure (caps, 0);
@ -661,11 +659,14 @@ GST_START_TEST (test_rtpmux_ts_offset_downstream_overrules_upstream)
GstBuffer *buf1;
/* downstream is specifying 1234567 as ts-offset */
gst_harness_set_sink_caps_str (h, "application/x-rtp, timestamp-offset=(uint)1234567");
gst_harness_set_sink_caps_str (h,
"application/x-rtp, timestamp-offset=(uint)1234567");
/* while upstream ts-offset is 1600 (10 * 160) and 16000 (100 * 160) */
gst_harness_set_src_caps_str (h0, "application/x-rtp, timestamp-offset=(uint)1600");
gst_harness_set_src_caps_str (h1, "application/x-rtp, timestamp-offset=(uint)16000");
gst_harness_set_src_caps_str (h0,
"application/x-rtp, timestamp-offset=(uint)1600");
gst_harness_set_src_caps_str (h1,
"application/x-rtp, timestamp-offset=(uint)16000");
/* push a buffer starting with rtp-timestamp: 1600 (10 * 160) */
fail_unless_equals_int (GST_FLOW_OK,
@ -709,8 +710,10 @@ rtpmux_suite (void)
tcase_add_test (tc_chain, test_rtpmux_ssrc_downstream_dynamic);
tcase_add_test (tc_chain, test_rtpmux_caps_query_with_downsteam_ts_offset_and_ssrc);
tcase_add_test (tc_chain, test_rtpmux_ts_offset_downstream_overrules_upstream);
tcase_add_test (tc_chain,
test_rtpmux_caps_query_with_downsteam_ts_offset_and_ssrc);
tcase_add_test (tc_chain,
test_rtpmux_ts_offset_downstream_overrules_upstream);
tc_chain = tcase_create ("rtpdtmfmux_basic");
tcase_add_test (tc_chain, test_rtpdtmfmux_basic);

View file

@ -1299,8 +1299,8 @@ GST_START_TEST (test_change_sent_sdes)
fail_unless_equals_int (0, gst_harness_buffers_in_queue (h->rtcp_h));
s = gst_structure_new ("application/x-rtp-source-sdes",
"other", G_TYPE_STRING, "first", NULL);
g_object_set (h->internal_session, "sdes", s , NULL);
"other", G_TYPE_STRING, "first", NULL);
g_object_set (h->internal_session, "sdes", s, NULL);
gst_structure_free (s);
/* then ask explicitly to send RTCP */
@ -1318,7 +1318,7 @@ GST_START_TEST (test_change_sent_sdes)
/* Change the SDES */
s = gst_structure_new ("application/x-rtp-source-sdes",
"other", G_TYPE_STRING, "second", NULL);
"other", G_TYPE_STRING, "second", NULL);
g_object_set (h->internal_session, "sdes", s, NULL);
gst_structure_free (s);