Commit 18b06744 authored by Georgi Chorbadzhiyski's avatar Georgi Chorbadzhiyski

Allow service provider to be set globally by --provider-name (-B) option.

Globally set service provider can be changed for each
output by using /srvprovider= output option.
Signed-off-by: default avatarGeorgi Chorbadzhiyski <gf@unixsol.org>
parent 5967be13
...@@ -11,8 +11,8 @@ DVBlast \- Simple and powerful dvb streaming application ...@@ -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-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-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-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-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-J <DVB_charset>\fR] [\fI-B <provider_name>\fR] [\fI-Q <quit_timeout>\fR] [\fI-x <text|xml>\fR]
.SH DESCRIPTION .SH DESCRIPTION
DVBlast is a simple and powerful streaming application based on the linux-dvb API. 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. 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) ...@@ -32,6 +32,11 @@ Read packets from an ASI adapter (0-n)
\fB\-b\fR, \fB\-\-bandwidth\fR <bandwidth> \fB\-b\fR, \fB\-\-bandwidth\fR <bandwidth>
Frontend bandwidth Frontend bandwidth
.TP .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> \fB\-c\fR, \fB\-\-config\-file\fR <config file>
Use the given configuration file Use the given configuration file
.TP .TP
......
...@@ -92,6 +92,7 @@ char *psz_udp_src = NULL; ...@@ -92,6 +92,7 @@ char *psz_udp_src = NULL;
int i_asi_adapter = 0; int i_asi_adapter = 0;
const char *psz_native_charset = "UTF-8"; const char *psz_native_charset = "UTF-8";
const char *psz_dvb_charset = "ISO_8859-1"; const char *psz_dvb_charset = "ISO_8859-1";
const char *psz_provider_name = NULL;
print_type_t i_print_type = -1; print_type_t i_print_type = -1;
volatile sig_atomic_t b_conf_reload = 0; volatile sig_atomic_t b_conf_reload = 0;
...@@ -270,6 +271,9 @@ bool config_ParseHost( output_config_t *p_config, char *psz_string ) ...@@ -270,6 +271,9 @@ bool config_ParseHost( output_config_t *p_config, char *psz_string )
#undef ARG_OPTION #undef ARG_OPTION
} }
if ( !p_config->psz_service_provider && psz_provider_name )
p_config->psz_service_provider = strdup( psz_provider_name );
end: end:
i_mtu = p_config->i_family == AF_INET6 ? DEFAULT_IPV6_MTU : i_mtu = p_config->i_family == AF_INET6 ? DEFAULT_IPV6_MTU :
DEFAULT_IPV4_MTU; DEFAULT_IPV4_MTU;
...@@ -497,6 +501,7 @@ void usage() ...@@ -497,6 +501,7 @@ void usage()
msg_Raw( NULL, " -L --latency maximum latency allowed between input and output (default: 100 ms)" ); 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, " -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, " -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, " -o --rtp-output <SSRC IP>" );
msg_Raw( NULL, " -t --ttl <ttl> TTL of the output stream" ); 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" ); 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 ) ...@@ -538,7 +543,7 @@ int main( int i_argc, char **pp_argv )
usage(); usage();
/* /*
* The only short options left are: Bky0123456789 * The only short options left are: ky0123456789
* Use them wisely. * Use them wisely.
*/ */
static const struct option long_options[] = static const struct option long_options[] =
...@@ -584,6 +589,7 @@ int main( int i_argc, char **pp_argv ) ...@@ -584,6 +589,7 @@ int main( int i_argc, char **pp_argv )
{ "network-id", no_argument, NULL, 'N' }, { "network-id", no_argument, NULL, 'N' },
{ "system-charset", required_argument, NULL, 'j' }, { "system-charset", required_argument, NULL, 'j' },
{ "dvb-charset", required_argument, NULL, 'J' }, { "dvb-charset", required_argument, NULL, 'J' },
{ "provider-name", required_argument, NULL, 'B' },
{ "logger", no_argument, NULL, 'l' }, { "logger", no_argument, NULL, 'l' },
{ "logger-ident", required_argument, NULL, 'g' }, { "logger-ident", required_argument, NULL, 'g' },
{ "print", required_argument, NULL, 'x' }, { "print", required_argument, NULL, 'x' },
...@@ -595,7 +601,7 @@ int main( int i_argc, char **pp_argv ) ...@@ -595,7 +601,7 @@ int main( int i_argc, char **pp_argv )
{ 0, 0, 0, 0 } { 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 ) switch ( c )
{ {
...@@ -827,6 +833,10 @@ int main( int i_argc, char **pp_argv ) ...@@ -827,6 +833,10 @@ int main( int i_argc, char **pp_argv )
psz_dvb_charset = optarg; psz_dvb_charset = optarg;
break; break;
case 'B':
psz_provider_name = optarg;
break;
case 'l': case 'l':
b_enable_syslog = 1; b_enable_syslog = 1;
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment