mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 00:01:23 +00:00
rtsp-stream: Remove unused _locked() variant of a function
It was added during refactoring.
This commit is contained in:
parent
e882fe9e06
commit
74c8a9f4cf
1 changed files with 23 additions and 31 deletions
|
@ -913,9 +913,21 @@ gst_rtsp_stream_get_multicast_iface (GstRTSPStream * stream)
|
|||
return result;
|
||||
}
|
||||
|
||||
|
||||
static GstRTSPAddress *
|
||||
gst_rtsp_stream_get_multicast_address_locked (GstRTSPStream * stream,
|
||||
/**
|
||||
* gst_rtsp_stream_get_multicast_address:
|
||||
* @stream: a #GstRTSPStream
|
||||
* @family: the #GSocketFamily
|
||||
*
|
||||
* Get the multicast address of @stream for @family. The original
|
||||
* #GstRTSPAddress is cached and copy is returned, so freeing the return value
|
||||
* won't release the address from the pool.
|
||||
*
|
||||
* Returns: (transfer full) (nullable): the #GstRTSPAddress of @stream
|
||||
* or %NULL when no address could be allocated. gst_rtsp_address_free()
|
||||
* after usage.
|
||||
*/
|
||||
GstRTSPAddress *
|
||||
gst_rtsp_stream_get_multicast_address (GstRTSPStream * stream,
|
||||
GSocketFamily family)
|
||||
{
|
||||
GstRTSPStreamPrivate *priv;
|
||||
|
@ -923,8 +935,12 @@ gst_rtsp_stream_get_multicast_address_locked (GstRTSPStream * stream,
|
|||
GstRTSPAddress **addrp;
|
||||
GstRTSPAddressFlags flags;
|
||||
|
||||
g_return_val_if_fail (GST_IS_RTSP_STREAM (stream), NULL);
|
||||
|
||||
priv = stream->priv;
|
||||
|
||||
g_mutex_lock (&stream->priv->lock);
|
||||
|
||||
if (family == G_SOCKET_FAMILY_IPV6) {
|
||||
flags = GST_RTSP_ADDRESS_FLAG_IPV6;
|
||||
addrp = &priv->mcast_addr_v6;
|
||||
|
@ -951,49 +967,25 @@ gst_rtsp_stream_get_multicast_address_locked (GstRTSPStream * stream,
|
|||
}
|
||||
result = gst_rtsp_address_copy (*addrp);
|
||||
|
||||
g_mutex_unlock (&stream->priv->lock);
|
||||
|
||||
return result;
|
||||
|
||||
/* ERRORS */
|
||||
no_pool:
|
||||
{
|
||||
GST_ERROR_OBJECT (stream, "no address pool specified");
|
||||
g_mutex_unlock (&stream->priv->lock);
|
||||
return NULL;
|
||||
}
|
||||
no_address:
|
||||
{
|
||||
GST_ERROR_OBJECT (stream, "failed to acquire address from pool");
|
||||
g_mutex_unlock (&stream->priv->lock);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_rtsp_stream_get_multicast_address:
|
||||
* @stream: a #GstRTSPStream
|
||||
* @family: the #GSocketFamily
|
||||
*
|
||||
* Get the multicast address of @stream for @family. The original
|
||||
* #GstRTSPAddress is cached and copy is returned, so freeing the return value
|
||||
* won't release the address from the pool.
|
||||
*
|
||||
* Returns: (transfer full) (nullable): the #GstRTSPAddress of @stream
|
||||
* or %NULL when no address could be allocated. gst_rtsp_address_free()
|
||||
* after usage.
|
||||
*/
|
||||
GstRTSPAddress *
|
||||
gst_rtsp_stream_get_multicast_address (GstRTSPStream * stream,
|
||||
GSocketFamily family)
|
||||
{
|
||||
GstRTSPAddress *result;
|
||||
|
||||
g_return_val_if_fail (GST_IS_RTSP_STREAM (stream), NULL);
|
||||
|
||||
g_mutex_lock (&stream->priv->lock);
|
||||
result = gst_rtsp_stream_get_multicast_address_locked (stream, family);
|
||||
g_mutex_unlock (&stream->priv->lock);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_rtsp_stream_reserve_address:
|
||||
* @stream: a #GstRTSPStream
|
||||
|
|
Loading…
Reference in a new issue