Run gst-indent

This commit is contained in:
Edward Hervey 2017-11-21 09:53:08 +01:00
parent 6371f2fc29
commit 4d98bc5e55
3 changed files with 44 additions and 42 deletions

View file

@ -431,6 +431,7 @@ gst_rtsp_session_media_get_transports (GstRTSPSessionMedia * media)
return result; return result;
} }
/** /**
* gst_rtsp_session_media_alloc_channels: * gst_rtsp_session_media_alloc_channels:
* @media: a #GstRTSPSessionMedia * @media: a #GstRTSPSessionMedia

View file

@ -1124,8 +1124,7 @@ set_multicast_socket_for_udpsink (GstElement * udpsink, GSocket * socket,
set_socket_for_udpsink (udpsink, socket, family); set_socket_for_udpsink (udpsink, socket, family);
if (multicast_iface) { if (multicast_iface) {
g_object_set (G_OBJECT (udpsink), "multicast-iface", g_object_set (G_OBJECT (udpsink), "multicast-iface", multicast_iface, NULL);
multicast_iface, NULL);
} }
g_signal_emit_by_name (udpsink, "add", addr_str, port, NULL); g_signal_emit_by_name (udpsink, "add", addr_str, port, NULL);
@ -1165,7 +1164,8 @@ get_port_from_socket (GSocket * socket)
static gboolean static gboolean
create_and_configure_udpsink (GstRTSPStream * stream, GstElement ** udpsink, create_and_configure_udpsink (GstRTSPStream * stream, GstElement ** udpsink,
GSocket *socket_v4, GSocket *socket_v6, gboolean multicast, gboolean is_rtp) GSocket * socket_v4, GSocket * socket_v6, gboolean multicast,
gboolean is_rtp)
{ {
GstRTSPStreamPrivate *priv = stream->priv; GstRTSPStreamPrivate *priv = stream->priv;
@ -1204,17 +1204,13 @@ create_and_configure_udpsink (GstRTSPStream * stream, GstElement ** udpsink,
update_dscp_qos (stream, udpsink); update_dscp_qos (stream, udpsink);
if (priv->server_addr_v4) { if (priv->server_addr_v4) {
GST_DEBUG_OBJECT (stream, GST_DEBUG_OBJECT (stream, "udp IPv4, configure udpsinks");
"udp IPv4, configure udpsinks"); set_unicast_socket_for_udpsink (*udpsink, socket_v4, G_SOCKET_FAMILY_IPV4);
set_unicast_socket_for_udpsink (*udpsink, socket_v4,
G_SOCKET_FAMILY_IPV4);
} }
if (priv->server_addr_v6) { if (priv->server_addr_v6) {
GST_DEBUG_OBJECT (stream, GST_DEBUG_OBJECT (stream, "udp IPv6, configure udpsinks");
"udp IPv6, configure udpsinks"); set_unicast_socket_for_udpsink (*udpsink, socket_v6, G_SOCKET_FAMILY_IPV6);
set_unicast_socket_for_udpsink (*udpsink, socket_v6,
G_SOCKET_FAMILY_IPV6);
} }
if (multicast) { if (multicast) {
@ -1225,7 +1221,8 @@ create_and_configure_udpsink (GstRTSPStream * stream, GstElement ** udpsink,
if (!port) if (!port)
goto get_port_failed; goto get_port_failed;
set_multicast_socket_for_udpsink (*udpsink, socket_v4, set_multicast_socket_for_udpsink (*udpsink, socket_v4,
G_SOCKET_FAMILY_IPV4, priv->multicast_iface, priv->mcast_addr_v4->address, port); G_SOCKET_FAMILY_IPV4, priv->multicast_iface,
priv->mcast_addr_v4->address, port);
} }
if (priv->mcast_addr_v6) { if (priv->mcast_addr_v6) {
@ -1234,7 +1231,8 @@ create_and_configure_udpsink (GstRTSPStream * stream, GstElement ** udpsink,
if (!port) if (!port)
goto get_port_failed; goto get_port_failed;
set_multicast_socket_for_udpsink (*udpsink, socket_v6, set_multicast_socket_for_udpsink (*udpsink, socket_v6,
G_SOCKET_FAMILY_IPV6, priv->multicast_iface, priv->mcast_addr_v6->address, port); G_SOCKET_FAMILY_IPV6, priv->multicast_iface,
priv->mcast_addr_v6->address, port);
} }
} }
@ -1256,8 +1254,7 @@ get_port_failed:
/* must be called with lock */ /* must be called with lock */
static gboolean static gboolean
create_and_configure_udpsource (GstElement ** udpsrc, create_and_configure_udpsource (GstElement ** udpsrc, GSocket * socket)
GSocket * socket)
{ {
GstStateChangeReturn ret; GstStateChangeReturn ret;
@ -1431,7 +1428,8 @@ again:
socket_out[1] = rtcp_socket; socket_out[1] = rtcp_socket;
*server_addr_out = addr; *server_addr_out = addr;
GST_DEBUG_OBJECT (stream, "allocated address: %s and ports: %d, %d", addr->address, tmp_rtp, tmp_rtcp); GST_DEBUG_OBJECT (stream, "allocated address: %s and ports: %d, %d",
addr->address, tmp_rtp, tmp_rtcp);
g_list_free_full (rejected_addresses, (GDestroyNotify) gst_rtsp_address_free); g_list_free_full (rejected_addresses, (GDestroyNotify) gst_rtsp_address_free);
@ -1445,7 +1443,8 @@ no_udp_protocol:
} }
no_pool: no_pool:
{ {
GST_ERROR_OBJECT (stream, "failed to allocate UDP ports: no address pool specified"); GST_ERROR_OBJECT (stream,
"failed to allocate UDP ports: no address pool specified");
goto cleanup; goto cleanup;
} }
no_address: no_address:
@ -2494,8 +2493,8 @@ free_cb_data (gpointer user_data)
static void static void
create_and_plug_queue_to_unlinked_stream (GstRTSPStream * stream, GstElement *tee, create_and_plug_queue_to_unlinked_stream (GstRTSPStream * stream,
GstElement *sink, GstElement ** queue) GstElement * tee, GstElement * sink, GstElement ** queue)
{ {
GstRTSPStreamPrivate *priv = stream->priv; GstRTSPStreamPrivate *priv = stream->priv;
GstPad *tee_pad; GstPad *tee_pad;
@ -2597,8 +2596,8 @@ create_and_plug_queue_to_linked_stream_probe_cb (GstPad * inpad,
} }
static void static void
create_and_plug_queue_to_linked_stream (GstRTSPStream * stream, GstElement * sink1, create_and_plug_queue_to_linked_stream (GstRTSPStream * stream,
GstElement * sink2, guint index, GstElement ** queue1, GstElement * sink1, GstElement * sink2, guint index, GstElement ** queue1,
GstElement ** queue2) GstElement ** queue2)
{ {
ProbeData *data; ProbeData *data;
@ -2661,8 +2660,8 @@ plug_udp_sink (GstRTSPStream * stream, GstElement * sink_to_plug,
queue = &priv->mcast_udpqueue[index]; queue = &priv->mcast_udpqueue[index];
} }
create_and_plug_queue_to_linked_stream (stream, element, sink_to_plug, index, create_and_plug_queue_to_linked_stream (stream, element, sink_to_plug,
queue, queue_to_plug); index, queue, queue_to_plug);
} else { } else {
GstPad *tee_pad; GstPad *tee_pad;
@ -2712,8 +2711,8 @@ plug_tcp_sink (GstRTSPStream * stream, guint index)
queue = &priv->udpqueue[index]; queue = &priv->udpqueue[index];
} }
create_and_plug_queue_to_linked_stream (stream, element, priv->appsink[index], index, create_and_plug_queue_to_linked_stream (stream, element,
queue, &priv->appqueue[index]); priv->appsink[index], index, queue, &priv->appqueue[index]);
} else { } else {
GstPad *tee_pad; GstPad *tee_pad;
@ -2828,8 +2827,8 @@ create_sender_part (GstRTSPStream * stream, const GstRTSPTransport * transport)
if (is_udp && !priv->udpsink[i]) { if (is_udp && !priv->udpsink[i]) {
/* we create only one pair of udpsinks for IPv4 and IPv6 */ /* we create only one pair of udpsinks for IPv4 and IPv6 */
create_and_configure_udpsink (stream, &priv->udpsink[i], priv->socket_v4[i], create_and_configure_udpsink (stream, &priv->udpsink[i],
priv->socket_v6[i], FALSE, (i == 0)); priv->socket_v4[i], priv->socket_v6[i], FALSE, (i == 0));
plug_sink (stream, transport, i); plug_sink (stream, transport, i);
} else if (is_mcast && !priv->mcast_udpsink[i]) { } else if (is_mcast && !priv->mcast_udpsink[i]) {
/* we create only one pair of mcast-udpsinks for IPv4 and IPv6 */ /* we create only one pair of mcast-udpsinks for IPv4 and IPv6 */
@ -2844,8 +2843,7 @@ create_sender_part (GstRTSPStream * stream, const GstRTSPTransport * transport)
/* we need to set sync and preroll to FALSE for the sink to avoid /* we need to set sync and preroll to FALSE for the sink to avoid
* deadlock. This is only needed for sink sending RTCP data. */ * deadlock. This is only needed for sink sending RTCP data. */
if (i == 1) if (i == 1)
g_object_set (priv->appsink[i], "async", FALSE, "sync", FALSE, g_object_set (priv->appsink[i], "async", FALSE, "sync", FALSE, NULL);
NULL);
gst_app_sink_set_callbacks (GST_APP_SINK_CAST (priv->appsink[i]), gst_app_sink_set_callbacks (GST_APP_SINK_CAST (priv->appsink[i]),
&sink_cb, stream, NULL); &sink_cb, stream, NULL);
@ -3954,7 +3952,8 @@ gst_rtsp_stream_get_rtcp_socket (GstRTSPStream * stream, GSocketFamily family)
* socket could be allocated for @family. Unref after usage * socket could be allocated for @family. Unref after usage
*/ */
GSocket * GSocket *
gst_rtsp_stream_get_rtp_multicast_socket (GstRTSPStream * stream, GSocketFamily family) gst_rtsp_stream_get_rtp_multicast_socket (GstRTSPStream * stream,
GSocketFamily family)
{ {
GstRTSPStreamPrivate *priv = GST_RTSP_STREAM_GET_PRIVATE (stream); GstRTSPStreamPrivate *priv = GST_RTSP_STREAM_GET_PRIVATE (stream);
GSocket *socket; GSocket *socket;
@ -3986,7 +3985,8 @@ gst_rtsp_stream_get_rtp_multicast_socket (GstRTSPStream * stream, GSocketFamily
* socket could be allocated for @family. Unref after usage * socket could be allocated for @family. Unref after usage
*/ */
GSocket * GSocket *
gst_rtsp_stream_get_rtcp_multicast_socket (GstRTSPStream * stream, GSocketFamily family) gst_rtsp_stream_get_rtcp_multicast_socket (GstRTSPStream * stream,
GSocketFamily family)
{ {
GstRTSPStreamPrivate *priv = GST_RTSP_STREAM_GET_PRIVATE (stream); GstRTSPStreamPrivate *priv = GST_RTSP_STREAM_GET_PRIVATE (stream);
GSocket *socket; GSocket *socket;
@ -4328,7 +4328,8 @@ gst_rtsp_stream_query_position (GstRTSPStream * stream, gint64 * position)
if (sink) { if (sink) {
if (!gst_element_query_position (sink, GST_FORMAT_TIME, position)) { if (!gst_element_query_position (sink, GST_FORMAT_TIME, position)) {
GST_WARNING_OBJECT (stream, "Couldn't obtain postion: position query failed"); GST_WARNING_OBJECT (stream,
"Couldn't obtain postion: position query failed");
gst_object_unref (sink); gst_object_unref (sink);
return FALSE; return FALSE;
} }