Commit eb83fc63 authored by Edward Hervey's avatar Edward Hervey 🤘

rtsp-server: Run gst-indent

Since it wasn't using the upstream common previously, there was no
indentation check before commiting.
parent b95165fc
......@@ -49,7 +49,7 @@ static void gst_rtsp_client_finalize (GObject * obj);
static void client_session_finalized (GstRTSPClient * client,
GstRTSPSession * session);
static void unlink_session_streams (GstRTSPClient * client,
GstRTSPSession *session, GstRTSPSessionMedia * media);
GstRTSPSession * session, GstRTSPSessionMedia * media);
G_DEFINE_TYPE (GstRTSPClient, gst_rtsp_client, G_TYPE_OBJECT);
......@@ -89,18 +89,19 @@ gst_rtsp_client_init (GstRTSPClient * client)
}
static void
client_unlink_session (GstRTSPClient *client, GstRTSPSession *session)
client_unlink_session (GstRTSPClient * client, GstRTSPSession * session)
{
GList *medias;
/* unlink all media managed in this session */
for (medias = session->medias; medias; medias = g_list_next (medias)) {
unlink_session_streams (client, session, (GstRTSPSessionMedia *) medias->data);
unlink_session_streams (client, session,
(GstRTSPSessionMedia *) medias->data);
}
}
static void
client_cleanup_sessions (GstRTSPClient *client)
client_cleanup_sessions (GstRTSPClient * client)
{
GList *sessions;
......@@ -350,7 +351,8 @@ do_send_data (GstBuffer * buffer, guint8 channel, GstRTSPClient * client)
}
static void
link_stream (GstRTSPClient * client, GstRTSPSession *session, GstRTSPSessionStream * stream)
link_stream (GstRTSPClient * client, GstRTSPSession * session,
GstRTSPSessionStream * stream)
{
GST_DEBUG ("client %p: linking stream %p", client, stream);
gst_rtsp_session_stream_set_callbacks (stream, (GstRTSPSendFunc) do_send_data,
......@@ -361,7 +363,8 @@ link_stream (GstRTSPClient * client, GstRTSPSession *session, GstRTSPSessionStre
}
static void
unlink_stream (GstRTSPClient * client, GstRTSPSession *session, GstRTSPSessionStream * stream)
unlink_stream (GstRTSPClient * client, GstRTSPSession * session,
GstRTSPSessionStream * stream)
{
GST_DEBUG ("client %p: unlinking stream %p", client, stream);
gst_rtsp_session_stream_set_callbacks (stream, NULL, NULL, NULL, NULL);
......@@ -371,7 +374,8 @@ unlink_stream (GstRTSPClient * client, GstRTSPSession *session, GstRTSPSessionSt
}
static void
unlink_session_streams (GstRTSPClient * client, GstRTSPSession *session, GstRTSPSessionMedia * media)
unlink_session_streams (GstRTSPClient * client, GstRTSPSession * session,
GstRTSPSessionMedia * media)
{
guint n_streams, i;
......@@ -396,7 +400,7 @@ unlink_session_streams (GstRTSPClient * client, GstRTSPSession *session, GstRTSP
static void
close_connection (GstRTSPClient * client)
{
const gchar * tunnelid;
const gchar *tunnelid;
GST_DEBUG ("client %p: closing connection", client);
......@@ -1163,7 +1167,8 @@ client_session_finalized (GstRTSPClient * client, GstRTSPSession * session)
/* remove the session */
if (!(client->sessions = g_list_remove (client->sessions, session))) {
GST_INFO ("client %p: all sessions finalized, close the connection", client);
GST_INFO ("client %p: all sessions finalized, close the connection",
client);
close_connection (client);
}
}
......@@ -1550,7 +1555,8 @@ no_tunnelid:
tunnel_existed:
{
g_mutex_unlock (tunnels_lock);
GST_ERROR ("client %p: tunnel session %s already existed", client, tunnelid);
GST_ERROR ("client %p: tunnel session %s already existed", client,
tunnelid);
return FALSE;
}
}
......@@ -1562,7 +1568,8 @@ tunnel_start (GstRTSPWatch * watch, gpointer user_data)
client = GST_RTSP_CLIENT (user_data);
GST_INFO ("client %p: tunnel start (connection %p)", client, client->connection);
GST_INFO ("client %p: tunnel start (connection %p)", client,
client->connection);
if (!remember_tunnel (client))
goto tunnel_error;
......@@ -1584,7 +1591,8 @@ tunnel_lost (GstRTSPWatch * watch, gpointer user_data)
client = GST_RTSP_CLIENT (user_data);
GST_INFO ("client %p: tunnel lost (connection %p)", client, client->connection);
GST_INFO ("client %p: tunnel lost (connection %p)", client,
client->connection);
/* ignore error, it'll only be a problem when the client does a POST again */
remember_tunnel (client);
......
This diff is collapsed.
......@@ -26,7 +26,8 @@ GST_DEBUG_CATEGORY_EXTERN (rtsp_media_debug);
static void gst_rtsp_media_mapping_finalize (GObject * obj);
static GstRTSPMediaFactory * find_media (GstRTSPMediaMapping *mapping, const GstRTSPUrl *url);
static GstRTSPMediaFactory *find_media (GstRTSPMediaMapping * mapping,
const GstRTSPUrl * url);
static void
gst_rtsp_media_mapping_class_init (GstRTSPMediaMappingClass * klass)
......@@ -44,7 +45,7 @@ static void
gst_rtsp_media_mapping_init (GstRTSPMediaMapping * mapping)
{
mapping->mappings = g_hash_table_new_full (g_str_hash, g_str_equal,
g_free, g_object_unref);
g_free, g_object_unref);
}
static void
......@@ -68,7 +69,7 @@ gst_rtsp_media_mapping_new (void)
}
static GstRTSPMediaFactory *
find_media (GstRTSPMediaMapping *mapping, const GstRTSPUrl *url)
find_media (GstRTSPMediaMapping * mapping, const GstRTSPUrl * url)
{
GstRTSPMediaFactory *result;
......@@ -76,7 +77,7 @@ find_media (GstRTSPMediaMapping *mapping, const GstRTSPUrl *url)
* path of the uri to find a mapping. If the mapping depends on other
* properties found in the url, this method should be overridden. */
result = g_hash_table_lookup (mapping->mappings, url->abspath);
if (result)
if (result)
g_object_ref (result);
GST_INFO ("found media %p for url abspath %s", result, url->abspath);
......@@ -95,7 +96,8 @@ find_media (GstRTSPMediaMapping *mapping, const GstRTSPUrl *url)
* Returns: the #GstRTSPMediaFactory for @url. g_object_unref() after usage.
*/
GstRTSPMediaFactory *
gst_rtsp_media_mapping_find_factory (GstRTSPMediaMapping *mapping, const GstRTSPUrl *url)
gst_rtsp_media_mapping_find_factory (GstRTSPMediaMapping * mapping,
const GstRTSPUrl * url)
{
GstRTSPMediaFactory *result;
GstRTSPMediaMappingClass *klass;
......@@ -124,8 +126,8 @@ gst_rtsp_media_mapping_find_factory (GstRTSPMediaMapping *mapping, const GstRTSP
* used after calling this function.
*/
void
gst_rtsp_media_mapping_add_factory (GstRTSPMediaMapping *mapping, const gchar *path,
GstRTSPMediaFactory *factory)
gst_rtsp_media_mapping_add_factory (GstRTSPMediaMapping * mapping,
const gchar * path, GstRTSPMediaFactory * factory)
{
g_return_if_fail (GST_IS_RTSP_MEDIA_MAPPING (mapping));
g_return_if_fail (GST_IS_RTSP_MEDIA_FACTORY (factory));
......@@ -142,11 +144,11 @@ gst_rtsp_media_mapping_add_factory (GstRTSPMediaMapping *mapping, const gchar *p
* Remove the #GstRTSPMediaFactory associated with @path in @mapping.
*/
void
gst_rtsp_media_mapping_remove_factory (GstRTSPMediaMapping *mapping, const gchar *path)
gst_rtsp_media_mapping_remove_factory (GstRTSPMediaMapping * mapping,
const gchar * path)
{
g_return_if_fail (GST_IS_RTSP_MEDIA_MAPPING (mapping));
g_return_if_fail (path != NULL);
g_hash_table_remove (mapping->mappings, path);
}
......@@ -135,7 +135,8 @@ gst_rtsp_media_init (GstRTSPMedia * media)
}
/* FIXME. this should be done in multiudpsink */
typedef struct {
typedef struct
{
gint count;
gchar *dest;
gint min, max;
......@@ -144,14 +145,15 @@ typedef struct {
static gint
dest_compare (RTSPDestination * a, RTSPDestination * b)
{
if ((a->min == b->min) && (a->max == b->max) && (strcmp (a->dest, b->dest) == 0))
if ((a->min == b->min) && (a->max == b->max)
&& (strcmp (a->dest, b->dest) == 0))
return 0;
return 1;
}
static RTSPDestination *
create_destination (const gchar *dest, gint min, gint max)
create_destination (const gchar * dest, gint min, gint max)
{
RTSPDestination *res;
......@@ -165,14 +167,14 @@ create_destination (const gchar *dest, gint min, gint max)
}
static void
free_destination (RTSPDestination *dest)
free_destination (RTSPDestination * dest)
{
g_free (dest->dest);
g_slice_free (RTSPDestination, dest);
}
void
gst_rtsp_media_trans_cleanup (GstRTSPMediaTrans *trans)
gst_rtsp_media_trans_cleanup (GstRTSPMediaTrans * trans)
{
if (trans->transport) {
gst_rtsp_transport_free (trans->transport);
......@@ -466,7 +468,8 @@ gst_rtsp_media_set_protocols (GstRTSPMedia * media, GstRTSPLowerTrans protocols)
GstRTSPLowerTrans
gst_rtsp_media_get_protocols (GstRTSPMedia * media)
{
g_return_val_if_fail (GST_IS_RTSP_MEDIA (media), GST_RTSP_LOWER_TRANS_UNKNOWN);
g_return_val_if_fail (GST_IS_RTSP_MEDIA (media),
GST_RTSP_LOWER_TRANS_UNKNOWN);
return media->protocols;
}
......@@ -480,7 +483,7 @@ gst_rtsp_media_get_protocols (GstRTSPMedia * media)
* it is unprepared.
*/
void
gst_rtsp_media_set_eos_shutdown (GstRTSPMedia *media, gboolean eos_shutdown)
gst_rtsp_media_set_eos_shutdown (GstRTSPMedia * media, gboolean eos_shutdown)
{
g_return_if_fail (GST_IS_RTSP_MEDIA (media));
......@@ -497,7 +500,7 @@ gst_rtsp_media_set_eos_shutdown (GstRTSPMedia *media, gboolean eos_shutdown)
* Returns: %TRUE if the media will send EOS before unpreparing.
*/
gboolean
gst_rtsp_media_is_eos_shutdown (GstRTSPMedia *media)
gst_rtsp_media_is_eos_shutdown (GstRTSPMedia * media)
{
g_return_val_if_fail (GST_IS_RTSP_MEDIA (media), FALSE);
......@@ -797,12 +800,12 @@ again:
if (!udpsink1)
goto no_udp_protocol;
if (g_object_class_find_property (G_OBJECT_GET_CLASS (udpsink0), "send-duplicates")) {
if (g_object_class_find_property (G_OBJECT_GET_CLASS (udpsink0),
"send-duplicates")) {
g_object_set (G_OBJECT (udpsink0), "send-duplicates", FALSE, NULL);
g_object_set (G_OBJECT (udpsink1), "send-duplicates", FALSE, NULL);
stream->filter_duplicates = FALSE;
}
else {
} else {
GST_WARNING ("multiudpsink version found without send-duplicates property");
stream->filter_duplicates = TRUE;
}
......@@ -1269,7 +1272,7 @@ unlock_streams (GstRTSPMedia * media)
}
static void
gst_rtsp_media_set_status (GstRTSPMedia *media, GstRTSPMediaStatus status)
gst_rtsp_media_set_status (GstRTSPMedia * media, GstRTSPMediaStatus status)
{
g_mutex_lock (media->lock);
/* never overwrite the error status */
......@@ -1281,7 +1284,7 @@ gst_rtsp_media_set_status (GstRTSPMedia *media, GstRTSPMediaStatus status)
}
static GstRTSPMediaStatus
gst_rtsp_media_get_status (GstRTSPMedia *media)
gst_rtsp_media_get_status (GstRTSPMedia * media)
{
GstRTSPMediaStatus result;
GTimeVal timeout;
......@@ -1648,7 +1651,7 @@ default_unprepare (GstRTSPMedia * media)
/* ref so that we don't disappear */
g_object_ref (media);
media->eos_pending = TRUE;
gst_element_send_event (media->pipeline, gst_event_new_eos());
gst_element_send_event (media->pipeline, gst_event_new_eos ());
/* we need to go to playing again for the EOS to propagate, normally in this
* state, nothing is receiving data from us anymore so this is ok. */
gst_element_set_state (media->pipeline, GST_STATE_PLAYING);
......@@ -1660,8 +1663,8 @@ default_unprepare (GstRTSPMedia * media)
}
static void
add_udp_destination (GstRTSPMedia *media, GstRTSPMediaStream *stream,
gchar *dest, gint min, gint max)
add_udp_destination (GstRTSPMedia * media, GstRTSPMediaStream * stream,
gchar * dest, gint min, gint max)
{
gboolean do_add = TRUE;
RTSPDestination *ndest;
......@@ -1675,11 +1678,14 @@ add_udp_destination (GstRTSPMedia *media, GstRTSPMediaStream *stream,
fdest.max = max;
/* first see if we already added this destination */
find = g_list_find_custom (stream->destinations, &fdest, (GCompareFunc) dest_compare);
find =
g_list_find_custom (stream->destinations, &fdest,
(GCompareFunc) dest_compare);
if (find) {
ndest = (RTSPDestination *) find->data;
GST_INFO ("already streaming to %s:%d-%d with %d clients", dest, min, max, ndest->count);
GST_INFO ("already streaming to %s:%d-%d with %d clients", dest, min, max,
ndest->count);
ndest->count++;
do_add = FALSE;
}
......@@ -1698,8 +1704,8 @@ add_udp_destination (GstRTSPMedia *media, GstRTSPMediaStream *stream,
}
static void
remove_udp_destination (GstRTSPMedia *media, GstRTSPMediaStream *stream,
gchar *dest, gint min, gint max)
remove_udp_destination (GstRTSPMedia * media, GstRTSPMediaStream * stream,
gchar * dest, gint min, gint max)
{
gboolean do_remove = TRUE;
RTSPDestination *ndest = NULL;
......@@ -1713,14 +1719,17 @@ remove_udp_destination (GstRTSPMedia *media, GstRTSPMediaStream *stream,
fdest.max = max;
/* first see if we already added this destination */
find = g_list_find_custom (stream->destinations, &fdest, (GCompareFunc) dest_compare);
find =
g_list_find_custom (stream->destinations, &fdest,
(GCompareFunc) dest_compare);
if (!find)
return;
ndest = (RTSPDestination *) find->data;
if (--ndest->count > 0) {
do_remove = FALSE;
GST_INFO ("still streaming to %s:%d-%d with %d clients", dest, min, max, ndest->count);
GST_INFO ("still streaming to %s:%d-%d with %d clients", dest, min, max,
ndest->count);
}
}
......
......@@ -32,7 +32,7 @@ gst_rtsp_params_set (GstRTSPClient * client, GstRTSPUrl * uri,
code = GST_RTSP_STS_PARAMETER_NOT_UNDERSTOOD;
gst_rtsp_message_init_response (response, code,
gst_rtsp_status_as_text (code), request);
gst_rtsp_status_as_text (code), request);
return GST_RTSP_OK;
}
......@@ -49,7 +49,7 @@ gst_rtsp_params_get (GstRTSPClient * client, GstRTSPUrl * uri,
code = GST_RTSP_STS_PARAMETER_NOT_UNDERSTOOD;
gst_rtsp_message_init_response (response, code,
gst_rtsp_status_as_text (code), request);
gst_rtsp_status_as_text (code), request);
return GST_RTSP_OK;
}
......@@ -32,7 +32,8 @@
* Returns: TRUE on success.
*/
gboolean
gst_rtsp_sdp_from_media (GstSDPMessage *sdp, GstSDPInfo *info, GstRTSPMedia * media)
gst_rtsp_sdp_from_media (GstSDPMessage * sdp, GstSDPInfo * info,
GstRTSPMedia * media)
{
guint i, n_streams;
gchar *rangestr;
......@@ -85,7 +86,8 @@ gst_rtsp_sdp_from_media (GstSDPMessage *sdp, GstSDPInfo *info, GstRTSPMedia * me
gst_sdp_media_set_proto (smedia, "RTP/AVP");
/* for the c= line */
gst_sdp_media_add_connection (smedia, "IN", info->server_proto, info->server_ip, 16, 0);
gst_sdp_media_add_connection (smedia, "IN", info->server_proto,
info->server_ip, 16, 0);
/* get clock-rate, media type and params for the rtpmap attribute */
gst_structure_get_int (s, "clock-rate", &caps_rate);
......
This diff is collapsed.
......@@ -33,13 +33,13 @@ enum
GST_DEBUG_CATEGORY (rtsp_session_debug);
#define GST_CAT_DEFAULT rtsp_session_debug
static void gst_rtsp_session_pool_get_property (GObject *object, guint propid,
GValue *value, GParamSpec *pspec);
static void gst_rtsp_session_pool_set_property (GObject *object, guint propid,
const GValue *value, GParamSpec *pspec);
static void gst_rtsp_session_pool_get_property (GObject * object, guint propid,
GValue * value, GParamSpec * pspec);
static void gst_rtsp_session_pool_set_property (GObject * object, guint propid,
const GValue * value, GParamSpec * pspec);
static void gst_rtsp_session_pool_finalize (GObject * object);
static gchar * create_session_id (GstRTSPSessionPool *pool);
static gchar *create_session_id (GstRTSPSessionPool * pool);
G_DEFINE_TYPE (GstRTSPSessionPool, gst_rtsp_session_pool, G_TYPE_OBJECT);
......@@ -62,7 +62,8 @@ gst_rtsp_session_pool_class_init (GstRTSPSessionPoolClass * klass)
klass->create_session_id = create_session_id;
GST_DEBUG_CATEGORY_INIT (rtsp_session_debug, "rtspsession", 0, "GstRTSPSession");
GST_DEBUG_CATEGORY_INIT (rtsp_session_debug, "rtspsession", 0,
"GstRTSPSession");
}
static void
......@@ -70,24 +71,24 @@ gst_rtsp_session_pool_init (GstRTSPSessionPool * pool)
{
pool->lock = g_mutex_new ();
pool->sessions = g_hash_table_new_full (g_str_hash, g_str_equal,
NULL, g_object_unref);
NULL, g_object_unref);
pool->max_sessions = DEFAULT_MAX_SESSIONS;
}
static void
gst_rtsp_session_pool_finalize (GObject * object)
{
GstRTSPSessionPool * pool = GST_RTSP_SESSION_POOL (object);
GstRTSPSessionPool *pool = GST_RTSP_SESSION_POOL (object);
g_mutex_free (pool->lock);
g_hash_table_unref (pool->sessions);
G_OBJECT_CLASS (gst_rtsp_session_pool_parent_class)->finalize (object);
}
static void
gst_rtsp_session_pool_get_property (GObject *object, guint propid,
GValue *value, GParamSpec *pspec)
gst_rtsp_session_pool_get_property (GObject * object, guint propid,
GValue * value, GParamSpec * pspec)
{
GstRTSPSessionPool *pool = GST_RTSP_SESSION_POOL (object);
......@@ -102,8 +103,8 @@ gst_rtsp_session_pool_get_property (GObject *object, guint propid,
}
static void
gst_rtsp_session_pool_set_property (GObject *object, guint propid,
const GValue *value, GParamSpec *pspec)
gst_rtsp_session_pool_set_property (GObject * object, guint propid,
const GValue * value, GParamSpec * pspec)
{
GstRTSPSessionPool *pool = GST_RTSP_SESSION_POOL (object);
......@@ -143,7 +144,7 @@ gst_rtsp_session_pool_new (void)
* A value of 0 means an unlimited amount of sessions.
*/
void
gst_rtsp_session_pool_set_max_sessions (GstRTSPSessionPool *pool, guint max)
gst_rtsp_session_pool_set_max_sessions (GstRTSPSessionPool * pool, guint max)
{
g_return_if_fail (GST_IS_RTSP_SESSION_POOL (pool));
......@@ -162,7 +163,7 @@ gst_rtsp_session_pool_set_max_sessions (GstRTSPSessionPool *pool, guint max)
* Returns: the maximum allowed number of sessions.
*/
guint
gst_rtsp_session_pool_get_max_sessions (GstRTSPSessionPool *pool)
gst_rtsp_session_pool_get_max_sessions (GstRTSPSessionPool * pool)
{
guint result;
......@@ -184,7 +185,7 @@ gst_rtsp_session_pool_get_max_sessions (GstRTSPSessionPool *pool)
* Returns: the amount of active sessions in @pool.
*/
guint
gst_rtsp_session_pool_get_n_sessions (GstRTSPSessionPool *pool)
gst_rtsp_session_pool_get_n_sessions (GstRTSPSessionPool * pool)
{
guint result;
......@@ -209,7 +210,7 @@ gst_rtsp_session_pool_get_n_sessions (GstRTSPSessionPool *pool)
* not exist. g_object_unref() after usage.
*/
GstRTSPSession *
gst_rtsp_session_pool_find (GstRTSPSessionPool *pool, const gchar *sessionid)
gst_rtsp_session_pool_find (GstRTSPSessionPool * pool, const gchar * sessionid)
{
GstRTSPSession *result;
......@@ -228,7 +229,7 @@ gst_rtsp_session_pool_find (GstRTSPSessionPool *pool, const gchar *sessionid)
}
static gchar *
create_session_id (GstRTSPSessionPool *pool)
create_session_id (GstRTSPSessionPool * pool)
{
gchar id[16];
gint i;
......@@ -249,7 +250,7 @@ create_session_id (GstRTSPSessionPool *pool)
* Returns: a new #GstRTSPSession.
*/
GstRTSPSession *
gst_rtsp_session_pool_create (GstRTSPSessionPool *pool)
gst_rtsp_session_pool_create (GstRTSPSessionPool * pool)
{
GstRTSPSession *result = NULL;
GstRTSPSessionPoolClass *klass;
......@@ -276,7 +277,7 @@ gst_rtsp_session_pool_create (GstRTSPSessionPool *pool)
/* check session limit */
if (pool->max_sessions > 0) {
if (g_hash_table_size (pool->sessions) >= pool->max_sessions)
goto too_many_sessions;
goto too_many_sessions;
}
/* check if the sessionid existed */
result = g_hash_table_lookup (pool->sessions, id);
......@@ -285,11 +286,10 @@ gst_rtsp_session_pool_create (GstRTSPSessionPool *pool)
result = NULL;
retry++;
if (retry > 100)
goto collision;
}
else {
goto collision;
} else {
/* not found, create session and insert it in the pool */
result = gst_rtsp_session_new (id);
result = gst_rtsp_session_new (id);
/* take additional ref for the pool */
g_object_ref (result);
g_hash_table_insert (pool->sessions, result->sessionid, result);
......@@ -338,7 +338,7 @@ too_many_sessions:
* Returns: %TRUE if the session was found and removed.
*/
gboolean
gst_rtsp_session_pool_remove (GstRTSPSessionPool *pool, GstRTSPSession *sess)
gst_rtsp_session_pool_remove (GstRTSPSessionPool * pool, GstRTSPSession * sess)
{
gboolean found;
......@@ -353,7 +353,7 @@ gst_rtsp_session_pool_remove (GstRTSPSessionPool *pool, GstRTSPSession *sess)
}
static gboolean
cleanup_func (gchar *sessionid, GstRTSPSession *sess, GTimeVal *now)
cleanup_func (gchar * sessionid, GstRTSPSession * sess, GTimeVal * now)
{
return gst_rtsp_session_is_expired (sess, now);
}
......@@ -368,7 +368,7 @@ cleanup_func (gchar *sessionid, GstRTSPSession *sess, GTimeVal *now)
* Returns: the amount of sessions that got removed.
*/
guint
gst_rtsp_session_pool_cleanup (GstRTSPSessionPool *pool)
gst_rtsp_session_pool_cleanup (GstRTSPSessionPool * pool)
{
guint result;
GTimeVal now;
......@@ -378,7 +378,9 @@ gst_rtsp_session_pool_cleanup (GstRTSPSessionPool *pool)
g_get_current_time (&now);
g_mutex_lock (pool->lock);
result = g_hash_table_foreach_remove (pool->sessions, (GHRFunc) cleanup_func, &now);
result =
g_hash_table_foreach_remove (pool->sessions, (GHRFunc) cleanup_func,
&now);
g_mutex_unlock (pool->lock);
return result;
......@@ -393,7 +395,7 @@ typedef struct
} FilterData;
static gboolean
filter_func (gchar *sessionid, GstRTSPSession *sess, FilterData *data)
filter_func (gchar * sessionid, GstRTSPSession * sess, FilterData * data)
{
switch (data->func (data->pool, sess, data->user_data)) {
case GST_RTSP_FILTER_REMOVE:
......@@ -432,7 +434,7 @@ filter_func (gchar *sessionid, GstRTSPSession *sess, FilterData *data)
* before the list is freed.
*/
GList *
gst_rtsp_session_pool_filter (GstRTSPSessionPool *pool,
gst_rtsp_session_pool_filter (GstRTSPSessionPool * pool,
GstRTSPSessionFilterFunc func, gpointer user_data)
{
FilterData data;
......@@ -460,12 +462,12 @@ typedef struct
} GstPoolSource;
static void
collect_timeout (gchar *sessionid, GstRTSPSession *sess, GstPoolSource *psrc)
collect_timeout (gchar * sessionid, GstRTSPSession * sess, GstPoolSource * psrc)
{
gint timeout;
GTimeVal now;
g_source_get_current_time ((GSource*)psrc, &now);
g_source_get_current_time ((GSource *) psrc, &now);
timeout = gst_rtsp_session_next_timeout (sess, &now);
GST_INFO ("%p: next timeout: %d", sess, timeout);
......@@ -547,7 +549,7 @@ static GSourceFuncs gst_pool_source_funcs = {
* A GSource that will be dispatched when the session should be cleaned up.
*/
GSource *
gst_rtsp_session_pool_create_watch (GstRTSPSessionPool *pool)
gst_rtsp_session_pool_create_watch (GstRTSPSessionPool * pool)
{
GstPoolSource *source;
......@@ -559,4 +561,3 @@ gst_rtsp_session_pool_create_watch (GstRTSPSessionPool *pool)
return (GSource *) source;
}
......@@ -421,7 +421,7 @@ gst_rtsp_session_touch (GstRTSPSession * session)
}
void
gst_rtsp_session_prevent_expire (GstRTSPSession *session)
gst_rtsp_session_prevent_expire (GstRTSPSession * session)
{
g_return_if_fail (GST_IS_RTSP_SESSION (session));
......@@ -429,7 +429,7 @@ gst_rtsp_session_prevent_expire (GstRTSPSession *session)
}
void
gst_rtsp_session_allow_expire (GstRTSPSession *session)
gst_rtsp_session_allow_expire (GstRTSPSession * session)
{
g_atomic_int_add (&session->expire_count, -1);
}
......
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