From bee9b9481acf2b5c1d6fadde3d9282b42cba600b Mon Sep 17 00:00:00 2001 From: "Ing. Jaroslav Safka" Date: Wed, 4 Jul 2018 13:12:48 +0200 Subject: [PATCH] rtp-send: add configurable RTP stream name Add configuration option 'stream_name' for stream/session name so user will see it on receiver side as RTP Strean ($stream_name) ex: load-module module-rtp-send source=rtp.monitor stream_name=MyServerMedia --- src/modules/rtp/module-rtp-send.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/modules/rtp/module-rtp-send.c b/src/modules/rtp/module-rtp-send.c index 61900c014..fbaf64490 100644 --- a/src/modules/rtp/module-rtp-send.c +++ b/src/modules/rtp/module-rtp-send.c @@ -66,6 +66,7 @@ PA_MODULE_USAGE( "loop= " "ttl= " "inhibit_auto_suspend=" + "stream_name=" ); #define DEFAULT_PORT 46000 @@ -90,6 +91,7 @@ static const char* const valid_modargs[] = { "loop", "ttl", "inhibit_auto_suspend", + "stream_name", NULL }; @@ -469,7 +471,9 @@ int pa__init(pa_module*m) { k = sizeof(sa_dst); pa_assert_se((r = getsockname(fd, (struct sockaddr*) &sa_dst, &k)) >= 0); - n = pa_sprintf_malloc("PulseAudio RTP Stream on %s", pa_get_fqdn(hn, sizeof(hn))); + n = pa_xstrdup(pa_modargs_get_value(ma, "stream_name", NULL)); + if (n == NULL) + n = pa_sprintf_malloc("PulseAudio RTP Stream on %s", pa_get_fqdn(hn, sizeof(hn))); if (af == AF_INET) { p = pa_sdp_build(af,