mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +00:00
Fix indentation
This commit is contained in:
parent
e0f31b4ca4
commit
e82ba1e52f
4 changed files with 45 additions and 30 deletions
|
@ -572,7 +572,7 @@ gst_rtsp_auth_add_digest (GstRTSPAuth * auth, const gchar * user,
|
|||
|
||||
/* With auth lock taken */
|
||||
static gboolean
|
||||
update_digest_cb (gchar *key, GstRTSPDigestEntry *entry, GHashTable *digest)
|
||||
update_digest_cb (gchar * key, GstRTSPDigestEntry * entry, GHashTable * digest)
|
||||
{
|
||||
g_hash_table_replace (digest, key, entry);
|
||||
|
||||
|
@ -596,8 +596,8 @@ update_digest_cb (gchar *key, GstRTSPDigestEntry *entry, GHashTable *digest)
|
|||
* Since: 1.16
|
||||
*/
|
||||
gboolean
|
||||
gst_rtsp_auth_parse_htdigest (GstRTSPAuth *auth, const gchar *path,
|
||||
GstRTSPToken *token)
|
||||
gst_rtsp_auth_parse_htdigest (GstRTSPAuth * auth, const gchar * path,
|
||||
GstRTSPToken * token)
|
||||
{
|
||||
GstRTSPAuthPrivate *priv;
|
||||
gboolean ret = FALSE;
|
||||
|
@ -605,7 +605,8 @@ gst_rtsp_auth_parse_htdigest (GstRTSPAuth *auth, const gchar *path,
|
|||
gchar *eol = NULL;
|
||||
gchar *contents = NULL;
|
||||
GError *error = NULL;
|
||||
GHashTable *new_entries = g_hash_table_new_full(g_str_hash, g_str_equal, g_free,
|
||||
GHashTable *new_entries =
|
||||
g_hash_table_new_full (g_str_hash, g_str_equal, g_free,
|
||||
(GDestroyNotify) gst_rtsp_digest_entry_free);
|
||||
|
||||
|
||||
|
@ -615,7 +616,7 @@ gst_rtsp_auth_parse_htdigest (GstRTSPAuth *auth, const gchar *path,
|
|||
|
||||
priv = auth->priv;
|
||||
if (!g_file_get_contents (path, &contents, NULL, &error)) {
|
||||
GST_ERROR_OBJECT(auth, "Could not parse htdigest: %s", error->message);
|
||||
GST_ERROR_OBJECT (auth, "Could not parse htdigest: %s", error->message);
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
@ -636,7 +637,8 @@ gst_rtsp_auth_parse_htdigest (GstRTSPAuth *auth, const gchar *path,
|
|||
}
|
||||
|
||||
if (strlen (strv[2]) != 32) {
|
||||
GST_ERROR_OBJECT (auth, "Invalid htdigest format, hash is expected to be 32 characters long");
|
||||
GST_ERROR_OBJECT (auth,
|
||||
"Invalid htdigest format, hash is expected to be 32 characters long");
|
||||
g_strfreev (strv);
|
||||
goto done;
|
||||
}
|
||||
|
@ -652,13 +654,14 @@ gst_rtsp_auth_parse_htdigest (GstRTSPAuth *auth, const gchar *path,
|
|||
|
||||
/* We only update digest if the file was entirely valid */
|
||||
g_mutex_lock (&priv->lock);
|
||||
g_hash_table_foreach_steal (new_entries, (GHRFunc) update_digest_cb, priv->digest);
|
||||
g_hash_table_foreach_steal (new_entries, (GHRFunc) update_digest_cb,
|
||||
priv->digest);
|
||||
g_mutex_unlock (&priv->lock);
|
||||
|
||||
done:
|
||||
if (error)
|
||||
g_clear_error (&error);
|
||||
g_free(contents);
|
||||
g_free (contents);
|
||||
g_hash_table_unref (new_entries);
|
||||
return ret;
|
||||
}
|
||||
|
@ -899,7 +902,8 @@ static void
|
|||
default_generate_authenticate_header (GstRTSPAuth * auth, GstRTSPContext * ctx)
|
||||
{
|
||||
if (auth->priv->auth_methods & GST_RTSP_AUTH_BASIC) {
|
||||
gchar *auth_header = g_strdup_printf("Basic realm=\"%s\"", auth->priv->realm);
|
||||
gchar *auth_header =
|
||||
g_strdup_printf ("Basic realm=\"%s\"", auth->priv->realm);
|
||||
gst_rtsp_message_add_header (ctx->response, GST_RTSP_HDR_WWW_AUTHENTICATE,
|
||||
auth_header);
|
||||
g_free (auth_header);
|
||||
|
@ -1233,7 +1237,7 @@ gst_rtsp_auth_make_basic (const gchar * user, const gchar * pass)
|
|||
* Since: 1.16
|
||||
*/
|
||||
void
|
||||
gst_rtsp_auth_set_realm (GstRTSPAuth *auth, const gchar *realm)
|
||||
gst_rtsp_auth_set_realm (GstRTSPAuth * auth, const gchar * realm)
|
||||
{
|
||||
g_return_if_fail (GST_IS_RTSP_AUTH (auth));
|
||||
g_return_if_fail (realm != NULL);
|
||||
|
@ -1252,9 +1256,9 @@ gst_rtsp_auth_set_realm (GstRTSPAuth *auth, const gchar *realm)
|
|||
* Since: 1.16
|
||||
*/
|
||||
gchar *
|
||||
gst_rtsp_auth_get_realm (GstRTSPAuth *auth)
|
||||
gst_rtsp_auth_get_realm (GstRTSPAuth * auth)
|
||||
{
|
||||
g_return_val_if_fail (GST_IS_RTSP_AUTH (auth), NULL);
|
||||
|
||||
return g_strdup(auth->priv->realm);
|
||||
return g_strdup (auth->priv->realm);
|
||||
}
|
||||
|
|
|
@ -1539,7 +1539,8 @@ gst_rtsp_media_set_latency (GstRTSPMedia * media, guint latency)
|
|||
g_signal_emit_by_name (G_OBJECT (media->priv->rtpbin), "get-storage",
|
||||
i, &storage);
|
||||
if (storage)
|
||||
g_object_set (storage, "size-time", (media->priv->latency + 50) * GST_MSECOND, NULL);
|
||||
g_object_set (storage, "size-time",
|
||||
(media->priv->latency + 50) * GST_MSECOND, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3150,9 +3151,11 @@ request_fec_decoder (GstElement * rtpbin, guint sessid, GstRTSPMedia * media)
|
|||
}
|
||||
|
||||
static void
|
||||
new_storage_cb (GstElement * rtpbin, GObject * storage, guint sessid, GstRTSPMedia * media)
|
||||
new_storage_cb (GstElement * rtpbin, GObject * storage, guint sessid,
|
||||
GstRTSPMedia * media)
|
||||
{
|
||||
g_object_set (storage, "size-time", (media->priv->latency + 50) * GST_MSECOND, NULL);
|
||||
g_object_set (storage, "size-time", (media->priv->latency + 50) * GST_MSECOND,
|
||||
NULL);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
@ -3166,8 +3169,10 @@ start_prepare (GstRTSPMedia * media)
|
|||
if (priv->status != GST_RTSP_MEDIA_STATUS_PREPARING)
|
||||
goto no_longer_preparing;
|
||||
|
||||
g_signal_connect (priv->rtpbin, "new-storage", G_CALLBACK (new_storage_cb), media);
|
||||
g_signal_connect (priv->rtpbin, "request-fec-decoder", G_CALLBACK (request_fec_decoder), media);
|
||||
g_signal_connect (priv->rtpbin, "new-storage", G_CALLBACK (new_storage_cb),
|
||||
media);
|
||||
g_signal_connect (priv->rtpbin, "request-fec-decoder",
|
||||
G_CALLBACK (request_fec_decoder), media);
|
||||
|
||||
/* link streams we already have, other streams might appear when we have
|
||||
* dynamic elements */
|
||||
|
|
|
@ -438,8 +438,7 @@ gst_rtsp_sdp_make_media (GstSDPMessage * sdp, GstSDPInfo * info,
|
|||
gst_sdp_media_add_attribute (smedia, "rtpmap", tmp);
|
||||
g_free (tmp);
|
||||
|
||||
tmp =
|
||||
g_strdup_printf ("%d apt=%d", ulpfec_pt, caps_pt);
|
||||
tmp = g_strdup_printf ("%d apt=%d", ulpfec_pt, caps_pt);
|
||||
gst_sdp_media_add_attribute (smedia, "fmtp", tmp);
|
||||
g_free (tmp);
|
||||
}
|
||||
|
|
|
@ -2374,7 +2374,7 @@ done:
|
|||
}
|
||||
|
||||
static void
|
||||
retrieve_ulpfec_pt (gpointer key, GstCaps *caps, GstElement *ulpfec_decoder)
|
||||
retrieve_ulpfec_pt (gpointer key, GstCaps * caps, GstElement * ulpfec_decoder)
|
||||
{
|
||||
guint pt = GPOINTER_TO_INT (key);
|
||||
const GstStructure *s = gst_caps_get_structure (caps, 0);
|
||||
|
@ -2389,7 +2389,8 @@ update_ulpfec_decoder_pt (GstRTSPStream * stream)
|
|||
if (!stream->priv->ulpfec_decoder)
|
||||
goto done;
|
||||
|
||||
g_hash_table_foreach (stream->priv->ptmap, (GHFunc) retrieve_ulpfec_pt, stream->priv->ulpfec_decoder);
|
||||
g_hash_table_foreach (stream->priv->ptmap, (GHFunc) retrieve_ulpfec_pt,
|
||||
stream->priv->ulpfec_decoder);
|
||||
|
||||
done:
|
||||
return;
|
||||
|
@ -5028,7 +5029,7 @@ gst_rtsp_stream_handle_keymgmt (GstRTSPStream * stream, const gchar * keymgmt)
|
|||
* Since: 1.16
|
||||
*/
|
||||
guint
|
||||
gst_rtsp_stream_get_ulpfec_pt (GstRTSPStream *stream)
|
||||
gst_rtsp_stream_get_ulpfec_pt (GstRTSPStream * stream)
|
||||
{
|
||||
guint res;
|
||||
|
||||
|
@ -5069,15 +5070,19 @@ gst_rtsp_stream_set_ulpfec_pt (GstRTSPStream * stream, guint pt)
|
|||
* Since: 1.16
|
||||
*/
|
||||
GstElement *
|
||||
gst_rtsp_stream_request_ulpfec_decoder (GstRTSPStream * stream, GstElement *rtpbin, guint sessid)
|
||||
gst_rtsp_stream_request_ulpfec_decoder (GstRTSPStream * stream,
|
||||
GstElement * rtpbin, guint sessid)
|
||||
{
|
||||
GObject *internal_storage = NULL;
|
||||
|
||||
g_return_val_if_fail (GST_IS_RTSP_STREAM (stream), NULL);
|
||||
stream->priv->ulpfec_decoder = gst_object_ref (gst_element_factory_make ("rtpulpfecdec", NULL));
|
||||
stream->priv->ulpfec_decoder =
|
||||
gst_object_ref (gst_element_factory_make ("rtpulpfecdec", NULL));
|
||||
|
||||
g_signal_emit_by_name (G_OBJECT (rtpbin), "get-internal-storage", sessid, &internal_storage);
|
||||
g_object_set (stream->priv->ulpfec_decoder, "storage", internal_storage, NULL);
|
||||
g_signal_emit_by_name (G_OBJECT (rtpbin), "get-internal-storage", sessid,
|
||||
&internal_storage);
|
||||
g_object_set (stream->priv->ulpfec_decoder, "storage", internal_storage,
|
||||
NULL);
|
||||
g_object_unref (internal_storage);
|
||||
update_ulpfec_decoder_pt (stream);
|
||||
|
||||
|
@ -5101,9 +5106,11 @@ gst_rtsp_stream_request_ulpfec_encoder (GstRTSPStream * stream, guint sessid)
|
|||
if (!stream->priv->ulpfec_percentage)
|
||||
return NULL;
|
||||
|
||||
stream->priv->ulpfec_encoder = gst_object_ref (gst_element_factory_make ("rtpulpfecenc", NULL));
|
||||
stream->priv->ulpfec_encoder =
|
||||
gst_object_ref (gst_element_factory_make ("rtpulpfecenc", NULL));
|
||||
|
||||
g_object_set (stream->priv->ulpfec_encoder, "pt", stream->priv->ulpfec_pt, "percentage", stream->priv->ulpfec_percentage, NULL);
|
||||
g_object_set (stream->priv->ulpfec_encoder, "pt", stream->priv->ulpfec_pt,
|
||||
"percentage", stream->priv->ulpfec_percentage, NULL);
|
||||
|
||||
return stream->priv->ulpfec_encoder;
|
||||
}
|
||||
|
@ -5117,7 +5124,7 @@ gst_rtsp_stream_request_ulpfec_encoder (GstRTSPStream * stream, guint sessid)
|
|||
* Since: 1.16
|
||||
*/
|
||||
void
|
||||
gst_rtsp_stream_set_ulpfec_percentage (GstRTSPStream *stream, guint percentage)
|
||||
gst_rtsp_stream_set_ulpfec_percentage (GstRTSPStream * stream, guint percentage)
|
||||
{
|
||||
g_return_if_fail (GST_IS_RTSP_STREAM (stream));
|
||||
|
||||
|
@ -5138,7 +5145,7 @@ gst_rtsp_stream_set_ulpfec_percentage (GstRTSPStream *stream, guint percentage)
|
|||
* Since: 1.16
|
||||
*/
|
||||
guint
|
||||
gst_rtsp_stream_get_ulpfec_percentage (GstRTSPStream *stream)
|
||||
gst_rtsp_stream_get_ulpfec_percentage (GstRTSPStream * stream)
|
||||
{
|
||||
guint res;
|
||||
|
||||
|
|
Loading…
Reference in a new issue