mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-06 07:28:53 +00:00
srt: Remove unused sa_family tracking
Now that SRT no longer needs the family when creating the socket, this code has become useless. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1659>
This commit is contained in:
parent
13c8bda531
commit
92dc2f4192
1 changed files with 8 additions and 14 deletions
|
@ -825,15 +825,13 @@ thread_func (gpointer data)
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_srt_object_wait_connect (GstSRTObject * srtobject,
|
gst_srt_object_wait_connect (GstSRTObject * srtobject,
|
||||||
GCancellable * cancellable, GSocketFamily sa_family, gpointer sa,
|
GCancellable * cancellable, gpointer sa, size_t sa_len, GError ** error)
|
||||||
size_t sa_len, GError ** error)
|
|
||||||
{
|
{
|
||||||
SRTSOCKET sock = SRT_INVALID_SOCK;
|
SRTSOCKET sock = SRT_INVALID_SOCK;
|
||||||
const gchar *local_address = NULL;
|
const gchar *local_address = NULL;
|
||||||
guint local_port = 0;
|
guint local_port = 0;
|
||||||
gint sock_flags = SRT_EPOLL_ERR | SRT_EPOLL_IN;
|
gint sock_flags = SRT_EPOLL_ERR | SRT_EPOLL_IN;
|
||||||
|
|
||||||
GSocketFamily bind_sa_family;
|
|
||||||
gpointer bind_sa;
|
gpointer bind_sa;
|
||||||
gsize bind_sa_len;
|
gsize bind_sa_len;
|
||||||
GSocketAddress *bind_addr = NULL;
|
GSocketAddress *bind_addr = NULL;
|
||||||
|
@ -858,7 +856,6 @@ gst_srt_object_wait_connect (GstSRTObject * srtobject,
|
||||||
|
|
||||||
bind_sa_len = g_socket_address_get_native_size (bind_addr);
|
bind_sa_len = g_socket_address_get_native_size (bind_addr);
|
||||||
bind_sa = g_alloca (bind_sa_len);
|
bind_sa = g_alloca (bind_sa_len);
|
||||||
bind_sa_family = g_socket_address_get_family (bind_addr);
|
|
||||||
|
|
||||||
if (!g_socket_address_to_native (bind_addr, bind_sa, bind_sa_len, error)) {
|
if (!g_socket_address_to_native (bind_addr, bind_sa, bind_sa_len, error)) {
|
||||||
goto failed;
|
goto failed;
|
||||||
|
@ -933,8 +930,8 @@ failed:
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_srt_object_connect (GstSRTObject * srtobject, GCancellable * cancellable,
|
gst_srt_object_connect (GstSRTObject * srtobject, GCancellable * cancellable,
|
||||||
GstSRTConnectionMode connection_mode, GSocketFamily sa_family, gpointer sa,
|
GstSRTConnectionMode connection_mode, gpointer sa, size_t sa_len,
|
||||||
size_t sa_len, GError ** error)
|
GError ** error)
|
||||||
{
|
{
|
||||||
SRTSOCKET sock;
|
SRTSOCKET sock;
|
||||||
gint sock_flags = SRT_EPOLL_ERR;
|
gint sock_flags = SRT_EPOLL_ERR;
|
||||||
|
@ -1057,18 +1054,17 @@ failed:
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_srt_object_open_connection (GstSRTObject * srtobject,
|
gst_srt_object_open_connection (GstSRTObject * srtobject,
|
||||||
GCancellable * cancellable, GstSRTConnectionMode connection_mode,
|
GCancellable * cancellable, GstSRTConnectionMode connection_mode,
|
||||||
GSocketFamily sa_family, gpointer sa, size_t sa_len, GError ** error)
|
gpointer sa, size_t sa_len, GError ** error)
|
||||||
{
|
{
|
||||||
gboolean ret = FALSE;
|
gboolean ret = FALSE;
|
||||||
|
|
||||||
if (connection_mode == GST_SRT_CONNECTION_MODE_LISTENER) {
|
if (connection_mode == GST_SRT_CONNECTION_MODE_LISTENER) {
|
||||||
ret =
|
ret =
|
||||||
gst_srt_object_wait_connect (srtobject, cancellable, sa_family, sa,
|
gst_srt_object_wait_connect (srtobject, cancellable, sa, sa_len, error);
|
||||||
sa_len, error);
|
|
||||||
} else {
|
} else {
|
||||||
ret =
|
ret =
|
||||||
gst_srt_object_connect (srtobject, cancellable, connection_mode,
|
gst_srt_object_connect (srtobject, cancellable, connection_mode, sa,
|
||||||
sa_family, sa, sa_len, error);
|
sa_len, error);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -1081,7 +1077,6 @@ gst_srt_object_open_internal (GstSRTObject * srtobject,
|
||||||
GSocketAddress *socket_address = NULL;
|
GSocketAddress *socket_address = NULL;
|
||||||
GstSRTConnectionMode connection_mode;
|
GstSRTConnectionMode connection_mode;
|
||||||
|
|
||||||
GSocketFamily sa_family;
|
|
||||||
gpointer sa;
|
gpointer sa;
|
||||||
size_t sa_len;
|
size_t sa_len;
|
||||||
const gchar *addr_str;
|
const gchar *addr_str;
|
||||||
|
@ -1122,7 +1117,6 @@ gst_srt_object_open_internal (GstSRTObject * srtobject,
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
sa_family = g_socket_address_get_family (socket_address);
|
|
||||||
sa_len = g_socket_address_get_native_size (socket_address);
|
sa_len = g_socket_address_get_native_size (socket_address);
|
||||||
sa = g_alloca (sa_len);
|
sa = g_alloca (sa_len);
|
||||||
|
|
||||||
|
@ -1134,7 +1128,7 @@ gst_srt_object_open_internal (GstSRTObject * srtobject,
|
||||||
|
|
||||||
ret =
|
ret =
|
||||||
gst_srt_object_open_connection
|
gst_srt_object_open_connection
|
||||||
(srtobject, cancellable, connection_mode, sa_family, sa, sa_len, error);
|
(srtobject, cancellable, connection_mode, sa, sa_len, error);
|
||||||
|
|
||||||
GST_OBJECT_LOCK (srtobject->element);
|
GST_OBJECT_LOCK (srtobject->element);
|
||||||
srtobject->opened = ret;
|
srtobject->opened = ret;
|
||||||
|
|
Loading…
Reference in a new issue