Commit 515ada7e authored by Jordan Petridis's avatar Jordan Petridis 🌱

Run gst-indent through the files

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

gstreamer/gstreamer-project#33
parent 2e0a45d7
...@@ -2722,10 +2722,10 @@ gst_matroska_demux_handle_seek_event (GstMatroskaDemux * demux, ...@@ -2722,10 +2722,10 @@ gst_matroska_demux_handle_seek_event (GstMatroskaDemux * demux,
* would be determined again when parsing, but anyway ... */ * would be determined again when parsing, but anyway ... */
seeksegment.duration = demux->common.segment.duration; seeksegment.duration = demux->common.segment.duration;
flush = !!(flags & GST_SEEK_FLAG_FLUSH); flush = ! !(flags & GST_SEEK_FLAG_FLUSH);
keyunit = !!(flags & GST_SEEK_FLAG_KEY_UNIT); keyunit = ! !(flags & GST_SEEK_FLAG_KEY_UNIT);
after = !!(flags & GST_SEEK_FLAG_SNAP_AFTER); after = ! !(flags & GST_SEEK_FLAG_SNAP_AFTER);
before = !!(flags & GST_SEEK_FLAG_SNAP_BEFORE); before = ! !(flags & GST_SEEK_FLAG_SNAP_BEFORE);
/* always do full update if flushing, /* always do full update if flushing,
* otherwise problems might arise downstream with missing keyframes etc */ * otherwise problems might arise downstream with missing keyframes etc */
......
...@@ -53,8 +53,7 @@ static GstStaticPadTemplate gst_rtp_g722_pay_src_template = ...@@ -53,8 +53,7 @@ static GstStaticPadTemplate gst_rtp_g722_pay_src_template =
"media = (string) \"audio\", " "media = (string) \"audio\", "
"encoding-name = (string) \"G722\", " "encoding-name = (string) \"G722\", "
"payload = (int) " GST_RTP_PAYLOAD_DYNAMIC_STRING ", " "payload = (int) " GST_RTP_PAYLOAD_DYNAMIC_STRING ", "
"encoding-params = (string) 1, " "encoding-params = (string) 1, " "clock-rate = (int) 8000")
"clock-rate = (int) 8000")
); );
static gboolean gst_rtp_g722_pay_setcaps (GstRTPBasePayload * basepayload, static gboolean gst_rtp_g722_pay_setcaps (GstRTPBasePayload * basepayload,
......
...@@ -625,7 +625,7 @@ gst_rtp_mux_setcaps (GstPad * pad, GstRTPMux * rtp_mux, GstCaps * caps) ...@@ -625,7 +625,7 @@ gst_rtp_mux_setcaps (GstPad * pad, GstRTPMux * rtp_mux, GstCaps * caps)
rtp_mux->have_ssrc = TRUE; rtp_mux->have_ssrc = TRUE;
} }
if (gst_structure_get_uint (structure, 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", GST_INFO_OBJECT (pad, "Use downstream timestamp-offset: %u",
rtp_mux->ts_base); rtp_mux->ts_base);
} }
......
...@@ -1364,7 +1364,8 @@ gst_udpsrc_open (GstUDPSrc * src) ...@@ -1364,7 +1364,8 @@ gst_udpsrc_open (GstUDPSrc * src)
bind_saddr = g_inet_socket_address_new (bind_addr, src->port); bind_saddr = g_inet_socket_address_new (bind_addr, src->port);
g_object_unref (bind_addr); g_object_unref (bind_addr);
if (!g_socket_bind (src->used_socket, bind_saddr, src->reuse, &err)) { 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; goto bind_error;
} }
......
...@@ -40,8 +40,7 @@ ...@@ -40,8 +40,7 @@
GST_DEBUG_CATEGORY_STATIC (gst_v4l2_jpeg_enc_debug); GST_DEBUG_CATEGORY_STATIC (gst_v4l2_jpeg_enc_debug);
#define GST_CAT_DEFAULT gst_v4l2_jpeg_enc_debug #define GST_CAT_DEFAULT gst_v4l2_jpeg_enc_debug
static GstStaticCaps src_template_caps = static GstStaticCaps src_template_caps = GST_STATIC_CAPS ("image/jpeg");
GST_STATIC_CAPS ("image/jpeg");
enum enum
{ {
......
...@@ -473,13 +473,11 @@ GST_END_TEST; ...@@ -473,13 +473,11 @@ GST_END_TEST;
GST_START_TEST (test_rtpmux_ssrc_property_overrules_downstream) GST_START_TEST (test_rtpmux_ssrc_property_overrules_downstream)
{ {
GstHarness * h = gst_harness_new_with_padnames ("rtpmux", NULL, "src"); GstHarness *h = gst_harness_new_with_padnames ("rtpmux", NULL, "src");
GstHarness * h0 = gst_harness_new_with_element ( GstHarness *h0 = gst_harness_new_with_element (h->element, "sink_0", NULL);
h->element, "sink_0", NULL); GstHarness *h1 = gst_harness_new_with_element (h->element, "sink_1", NULL);
GstHarness * h1 = gst_harness_new_with_element ( GstBuffer *buf0;
h->element, "sink_1", NULL); GstBuffer *buf1;
GstBuffer * buf0;
GstBuffer * buf1;
/* downstream is specifying 444444 as ssrc */ /* downstream is specifying 444444 as ssrc */
gst_harness_set_sink_caps_str (h, "application/x-rtp, ssrc=(uint)444444"); 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) ...@@ -520,17 +518,16 @@ GST_START_TEST (test_rtpmux_ssrc_property_overrules_downstream)
gst_harness_teardown (h1); gst_harness_teardown (h1);
gst_harness_teardown (h); gst_harness_teardown (h);
} }
GST_END_TEST; GST_END_TEST;
GST_START_TEST (test_rtpmux_ssrc_property_survive_statechange) GST_START_TEST (test_rtpmux_ssrc_property_survive_statechange)
{ {
GstHarness * h = gst_harness_new_with_padnames ("rtpmux", NULL, "src"); GstHarness *h = gst_harness_new_with_padnames ("rtpmux", NULL, "src");
GstHarness * h0 = gst_harness_new_with_element ( GstHarness *h0 = gst_harness_new_with_element (h->element, "sink_0", NULL);
h->element, "sink_0", NULL); GstHarness *h1 = gst_harness_new_with_element (h->element, "sink_1", NULL);
GstHarness * h1 = gst_harness_new_with_element ( GstBuffer *buf0;
h->element, "sink_1", NULL); GstBuffer *buf1;
GstBuffer * buf0;
GstBuffer * buf1;
gst_element_set_state (h->element, GST_STATE_NULL); gst_element_set_state (h->element, GST_STATE_NULL);
/* rtpmux ssrc is set to 111111 */ /* rtpmux ssrc is set to 111111 */
...@@ -545,7 +542,7 @@ GST_START_TEST (test_rtpmux_ssrc_property_survive_statechange) ...@@ -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, ssrc=(uint)444444");
gst_harness_set_sink_caps_str (h, "application/x-rtp"); gst_harness_set_sink_caps_str (h, "application/x-rtp");
/* push*/ /* push */
fail_unless_equals_int (GST_FLOW_OK, fail_unless_equals_int (GST_FLOW_OK,
gst_harness_push (h0, generate_test_buffer (0, 222222))); gst_harness_push (h0, generate_test_buffer (0, 222222)));
fail_unless_equals_int (GST_FLOW_OK, fail_unless_equals_int (GST_FLOW_OK,
...@@ -565,6 +562,7 @@ GST_START_TEST (test_rtpmux_ssrc_property_survive_statechange) ...@@ -565,6 +562,7 @@ GST_START_TEST (test_rtpmux_ssrc_property_survive_statechange)
gst_harness_teardown (h1); gst_harness_teardown (h1);
gst_harness_teardown (h); gst_harness_teardown (h);
} }
GST_END_TEST; GST_END_TEST;
GST_START_TEST (test_rtpmux_ssrc_downstream_dynamic) 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) ...@@ -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 */ /* downstream is specifying 100 as ts-offset and 111 as ssrc */
gst_harness_set_sink_caps_str (h, "application/x-rtp, " 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); caps = gst_pad_peer_query_caps (h->srcpad, NULL);
s = gst_caps_get_structure (caps, 0); s = gst_caps_get_structure (caps, 0);
...@@ -661,11 +659,14 @@ GST_START_TEST (test_rtpmux_ts_offset_downstream_overrules_upstream) ...@@ -661,11 +659,14 @@ GST_START_TEST (test_rtpmux_ts_offset_downstream_overrules_upstream)
GstBuffer *buf1; GstBuffer *buf1;
/* downstream is specifying 1234567 as ts-offset */ /* 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) */ /* 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 (h0,
gst_harness_set_src_caps_str (h1, "application/x-rtp, timestamp-offset=(uint)16000"); "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) */ /* push a buffer starting with rtp-timestamp: 1600 (10 * 160) */
fail_unless_equals_int (GST_FLOW_OK, fail_unless_equals_int (GST_FLOW_OK,
...@@ -709,8 +710,10 @@ rtpmux_suite (void) ...@@ -709,8 +710,10 @@ rtpmux_suite (void)
tcase_add_test (tc_chain, test_rtpmux_ssrc_downstream_dynamic); 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,
tcase_add_test (tc_chain, test_rtpmux_ts_offset_downstream_overrules_upstream); 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"); tc_chain = tcase_create ("rtpdtmfmux_basic");
tcase_add_test (tc_chain, test_rtpdtmfmux_basic); tcase_add_test (tc_chain, test_rtpdtmfmux_basic);
......
...@@ -1299,8 +1299,8 @@ GST_START_TEST (test_change_sent_sdes) ...@@ -1299,8 +1299,8 @@ GST_START_TEST (test_change_sent_sdes)
fail_unless_equals_int (0, gst_harness_buffers_in_queue (h->rtcp_h)); fail_unless_equals_int (0, gst_harness_buffers_in_queue (h->rtcp_h));
s = gst_structure_new ("application/x-rtp-source-sdes", s = gst_structure_new ("application/x-rtp-source-sdes",
"other", G_TYPE_STRING, "first", NULL); "other", G_TYPE_STRING, "first", NULL);
g_object_set (h->internal_session, "sdes", s , NULL); g_object_set (h->internal_session, "sdes", s, NULL);
gst_structure_free (s); gst_structure_free (s);
/* then ask explicitly to send RTCP */ /* then ask explicitly to send RTCP */
...@@ -1318,7 +1318,7 @@ GST_START_TEST (test_change_sent_sdes) ...@@ -1318,7 +1318,7 @@ GST_START_TEST (test_change_sent_sdes)
/* Change the SDES */ /* Change the SDES */
s = gst_structure_new ("application/x-rtp-source-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); g_object_set (h->internal_session, "sdes", s, NULL);
gst_structure_free (s); gst_structure_free (s);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment