summaryrefslogtreecommitdiff
path: root/src/sydra.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sydra.c')
-rw-r--r--src/sydra.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/sydra.c b/src/sydra.c
index 41716de..69d3026 100644
--- a/src/sydra.c
+++ b/src/sydra.c
@@ -513,10 +513,10 @@ static gboolean on_udp_desc_ready(gint fd, GIOCondition cond, gpointer user_data
return TRUE;
}
-static gboolean attach_udp_descriptor(GstElement* udp, const char* name)
+static gboolean attach_udp_descriptor(GstElement* udp, const char* name, const char* prop)
{
GSocket *sock;
- g_object_get(G_OBJECT(udp), "used-socket", &sock, NULL);
+ g_object_get(G_OBJECT(udp), prop, &sock, NULL);
int fd = g_socket_get_fd(sock);
guint id = g_unix_fd_add(fd, G_IO_IN, on_udp_desc_ready, udp);
@@ -531,10 +531,14 @@ static gboolean attach_udp_descriptor(GstElement* udp, const char* name)
static gboolean attach_udp_descriptors(struct udp_elements *udp)
{
- if(!attach_udp_descriptor(udp->rtp_video_, "RTP(video)") ||
- !attach_udp_descriptor(udp->rtcp_video_, "RTCP(video)") ||
- !attach_udp_descriptor(udp->rtp_audio_, "RTP(audio)") ||
- !attach_udp_descriptor(udp->rtcp_audio_, "RTCP(audio)")) {
+ if(!attach_udp_descriptor(udp->rtp_video_, "RTP(video)", "used-socket") ||
+ !attach_udp_descriptor(udp->rtp_video_, "RTP(video)", "used-socket-v6") ||
+ !attach_udp_descriptor(udp->rtcp_video_, "RTCP(video)", "used-socket") ||
+ !attach_udp_descriptor(udp->rtcp_video_, "RTCP(video)", "used-socket-v6") ||
+ !attach_udp_descriptor(udp->rtp_audio_, "RTP(audio)", "used-socket") ||
+ !attach_udp_descriptor(udp->rtp_audio_, "RTP(audio)", "used-socket-v6") ||
+ !attach_udp_descriptor(udp->rtcp_audio_, "RTCP(audio)", "used-socket") ||
+ !attach_udp_descriptor(udp->rtcp_audio_, "RTCP(audio)", "used-socket-v6")) {
return FALSE;
}
return TRUE;