[dvblast-devel] [PATCH 2/2] Allow service provider to be set globally by --provider-name (-B) option.
Georgi Chorbadzhiyski
gf at unixsol.org
Sun Sep 11 14:24:28 CEST 2011
Globally set service provider can be changed for each
output by using /srvprovider= output option.
Signed-off-by: Georgi Chorbadzhiyski <gf at unixsol.org>
---
dvblast.1 | 9 +++++++--
dvblast.c | 14 ++++++++++++--
2 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/dvblast.1 b/dvblast.1
index 59f7cb7..52a2647 100644
--- a/dvblast.1
+++ b/dvblast.1
@@ -11,8 +11,8 @@ DVBlast \- Simple and powerful dvb streaming application
[\fI-G <guard_interval>\fR] [\fI-H <hierarchy>\fR] [\fI-X <transmission>\fR] [\fI-O <lock_timeout>\fR]
[\fI-u\fR] [\fI-w\fR] [\fI-U\fR] [\fI-L <latency>\fR] [\fI-E <retention>\fR] [\fI-d <dest_IP>[<:port>][/<opts>]\fR]
[\fI-z\fR] [\fI-C\fR] [\fI-e\fR] [\fI-M <network_name\fR] [\fI-N <network_ID>\fR] [\fI-T\fR] [\fI-j <system_charset>\fR]
-[\fI-W\fR] [\fI-Y\fR] [\fI-l\fR] [\fI-g <logger ident>\fR] [\fI-Z <mrtg_file>\fR] [\fI-V\fR] [\fI-h\fR]
-[\fI-J <DVB_charset>\fR] [\fI-Q <quit_timeout>\fR] [\fI-x <text|xml>\fR]
+ [\fI-W\fR] [\fI-Y\fR] [\fI-l\fR] [\fI-g <logger ident>\fR] [\fI-Z <mrtg_file>\fR] [\fI-V\fR] [\fI-h\fR]
+[\fI-J <DVB_charset>\fR] [\fI-B <provider_name>\fR] [\fI-Q <quit_timeout>\fR] [\fI-x <text|xml>\fR]
.SH DESCRIPTION
DVBlast is a simple and powerful streaming application based on the linux-dvb API.
It opens a DVB device, tunes it, places PID filters, configures a CAM module, and demultiplexes the packets to several RTP outputs.
@@ -32,6 +32,11 @@ Read packets from an ASI adapter (0-n)
\fB\-b\fR, \fB\-\-bandwidth\fR <bandwidth>
Frontend bandwidth
.TP
+\fB\-B\fR, \fB\-\-provider-name\fR <name>
+Service provider name to declare in the SDT. If you want to change
+provider name per output use /srvprovider= output option in the config
+file.
+.TP
\fB\-c\fR, \fB\-\-config\-file\fR <config file>
Use the given configuration file
.TP
diff --git a/dvblast.c b/dvblast.c
index 85c6ad8..ba74d4f 100644
--- a/dvblast.c
+++ b/dvblast.c
@@ -92,6 +92,7 @@ char *psz_udp_src = NULL;
int i_asi_adapter = 0;
const char *psz_native_charset = "UTF-8";
const char *psz_dvb_charset = "ISO_8859-1";
+const char *psz_provider_name = NULL;
print_type_t i_print_type = -1;
volatile sig_atomic_t b_conf_reload = 0;
@@ -270,6 +271,9 @@ bool config_ParseHost( output_config_t *p_config, char *psz_string )
#undef ARG_OPTION
}
+ if ( !p_config->psz_service_provider && psz_provider_name )
+ p_config->psz_service_provider = strdup( psz_provider_name );
+
end:
i_mtu = p_config->i_family == AF_INET6 ? DEFAULT_IPV6_MTU :
DEFAULT_IPV4_MTU;
@@ -497,6 +501,7 @@ void usage()
msg_Raw( NULL, " -L --latency maximum latency allowed between input and output (default: 100 ms)" );
msg_Raw( NULL, " -M --network-name DVB network name to declare in the NIT" );
msg_Raw( NULL, " -N --network-id DVB network ID to declare in the NIT" );
+ msg_Raw( NULL, " -B --provider-name Service provider name to declare in the SDT" );
msg_Raw( NULL, " -o --rtp-output <SSRC IP>" );
msg_Raw( NULL, " -t --ttl <ttl> TTL of the output stream" );
msg_Raw( NULL, " -T --unique-ts-id generate random unique TS ID for each output" );
@@ -538,7 +543,7 @@ int main( int i_argc, char **pp_argv )
usage();
/*
- * The only short options left are: Bky0123456789
+ * The only short options left are: ky0123456789
* Use them wisely.
*/
static const struct option long_options[] =
@@ -584,6 +589,7 @@ int main( int i_argc, char **pp_argv )
{ "network-id", no_argument, NULL, 'N' },
{ "system-charset", required_argument, NULL, 'j' },
{ "dvb-charset", required_argument, NULL, 'J' },
+ { "provider-name", required_argument, NULL, 'B' },
{ "logger", no_argument, NULL, 'l' },
{ "logger-ident", required_argument, NULL, 'g' },
{ "print", required_argument, NULL, 'x' },
@@ -595,7 +601,7 @@ int main( int i_argc, char **pp_argv )
{ 0, 0, 0, 0 }
};
- while ( (c = getopt_long(i_argc, pp_argv, "q::c:r:t:o:i:a:n:f:F:R:s:S:v:pb:I:m:P:K:G:H:X:O:uwUTL:E:d:D:A:lg:zCWYeM:N:j:J:x:Q:hVZ:", long_options, NULL)) != -1 )
+ while ( (c = getopt_long(i_argc, pp_argv, "q::c:r:t:o:i:a:n:f:F:R:s:S:v:pb:I:m:P:K:G:H:X:O:uwUTL:E:d:D:A:lg:zCWYeM:N:j:J:B:x:Q:hVZ:", long_options, NULL)) != -1 )
{
switch ( c )
{
@@ -827,6 +833,10 @@ int main( int i_argc, char **pp_argv )
psz_dvb_charset = optarg;
break;
+ case 'B':
+ psz_provider_name = optarg;
+ break;
+
case 'l':
b_enable_syslog = 1;
break;
--
1.7.5.1
More information about the dvblast-devel
mailing list