summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2014-09-22 06:55:10 +0200
committerChristian Pointner <equinox@spreadspace.org>2014-09-22 06:55:10 +0200
commitb9860e34425691a848702289283c68af8f7bad99 (patch)
tree5ab86baff77a1c8b82ef79e39a8bd983d91a930b /src
parentfixed license header - email (diff)
changing udp port mapping
Diffstat (limited to 'src')
-rw-r--r--src/options.c2
-rw-r--r--src/sydra.c14
2 files changed, 6 insertions, 10 deletions
diff --git a/src/options.c b/src/options.c
index d6936e9..1227801 100644
--- a/src/options.c
+++ b/src/options.c
@@ -269,7 +269,7 @@ void options_default(options_t* opt)
opt->audio_payloader_ = strdup("rtpopuspay");
opt->rtp_host_ = strdup("127.0.0.1");
- opt->rtp_port_base_ = 5100;
+ opt->rtp_port_base_ = 5000;
opt->preview_videosink_ = NULL;
diff --git a/src/sydra.c b/src/sydra.c
index 928eaf2..3e494e1 100644
--- a/src/sydra.c
+++ b/src/sydra.c
@@ -304,15 +304,11 @@ static gboolean create_udp_elements(options_t* opt, GstElement* pipeline, GstEle
log_printf(DEBUG, "udp elements created successfully!");
- int rtp_port_v = opt->rtp_port_base_;
- int rtcp_port_v = opt->rtp_port_base_ + 100;
- int rtp_port_a = opt->rtp_port_base_ + 200;
- int rtcp_port_a = opt->rtp_port_base_ + 300;
-
- g_object_set(G_OBJECT(udp_rtp_video), "host", opt->rtp_host_, "port", rtp_port_v, NULL);
- g_object_set(G_OBJECT(udp_rtcp_video), "host", opt->rtp_host_, "port", rtcp_port_v, "sync", FALSE, "async", FALSE, NULL);
- g_object_set(G_OBJECT(udp_rtp_audio), "host", opt->rtp_host_, "port", rtp_port_a, NULL);
- g_object_set(G_OBJECT(udp_rtcp_audio), "host", opt->rtp_host_, "port", rtcp_port_a, "sync", FALSE, "async", FALSE, NULL);
+ int rtp_port = opt->rtp_port_base_;
+ g_object_set(G_OBJECT(udp_rtp_video), "host", opt->rtp_host_, "port", rtp_port++, NULL);
+ g_object_set(G_OBJECT(udp_rtcp_video), "host", opt->rtp_host_, "port", rtp_port++, "sync", FALSE, "async", FALSE, NULL);
+ g_object_set(G_OBJECT(udp_rtp_audio), "host", opt->rtp_host_, "port", rtp_port++, NULL);
+ g_object_set(G_OBJECT(udp_rtcp_audio), "host", opt->rtp_host_, "port", rtp_port++, "sync", FALSE, "async", FALSE, NULL);
gst_bin_add_many(GST_BIN (pipeline), udp_rtp_video, udp_rtcp_video, udp_rtp_audio, udp_rtcp_audio, NULL);