summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2014-09-23 23:43:18 +0200
committerChristian Pointner <equinox@spreadspace.org>2014-09-23 23:43:18 +0200
commit57fe18a89cbe7fd053b4faf798adc3b40f2bbdac (patch)
treeb5dc46818b87d96a89aee8216e85a554e709a119 /src
parentlistening for incoming data from udp sink worsk now (diff)
also listening for packets on IPv6 sockets
Diffstat (limited to 'src')
-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;