Commit bf67e3f5 authored by Jean-Paul Saman's avatar Jean-Paul Saman

Merge remote branch 'origin/master' into tuning

parents 93426307 5651c22e
# DVBlast Makefile # DVBlast Makefile
# Customise the path of your kernel # Customise the path of your kernel
VERSION = 1.2.0
TOPDIR = `basename ${PWD}`
CFLAGS += -Wall -O3 -fomit-frame-pointer CFLAGS += -Wall -O3 -fomit-frame-pointer
CFLAGS += -g CFLAGS += -g
CFLAGS += -I/usr/src/kernel/linux-2.6.29.1/include CFLAGS += -I/usr/src/kernel/linux-2.6.29.1/include
...@@ -34,3 +37,8 @@ install: all ...@@ -34,3 +37,8 @@ install: all
uninstall: uninstall:
@rm $(BIN)/dvblast $(BIN)/dvblastctl $(BIN)/dvblast_mmi.sh $(MAN)/dvblast.1 @rm $(BIN)/dvblast $(BIN)/dvblastctl $(BIN)/dvblast_mmi.sh $(MAN)/dvblast.1
dist:
( cd ../ && \
tar -cj --exclude-vcs --exclude $(TOPDIR)/*.tar.bz2 $(TOPDIR)/ > $(TOPDIR)/dvblast-$(VERSION).tar.bz2 )
$Id$ $Id$
Changes between 1.2 and 1.3:
----------------------------
* Syslog support with -l option
* Override FEC Inner with -F option
* Override Rolloff with -R option
Changes between 1.1 and 1.2: Changes between 1.1 and 1.2:
---------------------------- ----------------------------
* Support for IPv6 output and duplicate * Support for IPv6 output and duplicate
......
...@@ -476,7 +476,7 @@ static int FrontendDoDiseqc(void) ...@@ -476,7 +476,7 @@ static int FrontendDoDiseqc(void)
#if DVB_API_VERSION >= 5 #if DVB_API_VERSION >= 5
/***************************************************************************** /*****************************************************************************
* GetModulation : helper function for both APIs * GetModulation : helper functions for S2API
*****************************************************************************/ *****************************************************************************/
static fe_modulation_t GetModulation(void) static fe_modulation_t GetModulation(void)
{ {
...@@ -597,7 +597,9 @@ static void FrontendInfo( struct dvb_frontend_info info ) ...@@ -597,7 +597,9 @@ static void FrontendInfo( struct dvb_frontend_info info )
FRONTEND_INFO( info.caps, FE_CAN_8VSB, "8VSB" ) FRONTEND_INFO( info.caps, FE_CAN_8VSB, "8VSB" )
FRONTEND_INFO( info.caps, FE_CAN_16VSB,"16VSB" ) FRONTEND_INFO( info.caps, FE_CAN_16VSB,"16VSB" )
FRONTEND_INFO( info.caps, FE_HAS_EXTENDED_CAPS, "EXTENDED_CAPS" ) FRONTEND_INFO( info.caps, FE_HAS_EXTENDED_CAPS, "EXTENDED_CAPS" )
#if DVBAPI_VERSION >= 501
FRONTEND_INFO( info.caps, FE_CAN_2G_MODULATION, "2G_MODULATION" ) FRONTEND_INFO( info.caps, FE_CAN_2G_MODULATION, "2G_MODULATION" )
#endif
FRONTEND_INFO( info.caps, FE_NEEDS_BENDING, "NEEDS_BENDING" ) FRONTEND_INFO( info.caps, FE_NEEDS_BENDING, "NEEDS_BENDING" )
FRONTEND_INFO( info.caps, FE_CAN_RECOVER, "FE_CAN_RECOVER" ) FRONTEND_INFO( info.caps, FE_CAN_RECOVER, "FE_CAN_RECOVER" )
FRONTEND_INFO( info.caps, FE_CAN_MUTE_TS, "FE_CAN_MUTE_TS" ) FRONTEND_INFO( info.caps, FE_CAN_MUTE_TS, "FE_CAN_MUTE_TS" )
......
.TH DVBLAST "1" "January 2010" "DVBlast 1.1" "User Commands" .TH DVBLAST "1" "January 2010" "DVBlast 1.3" "User Commands"
.SH NAME .SH NAME
DVBlast \- Simple and powerful dvb streaming application DVBlast \- Simple and powerful dvb streaming application
.SH SYNOPSIS .SH SYNOPSIS
.B dvblast .B dvblast
[\fI-q\fR] \fI-c <config_file>\fR [\fI-r <remote_socket>\fR] [\fI-t <ttl>\fR] [\fI-o <SSRC_IP>\fR] [\fI-i <RT_priority>\fR] [\fI-a <adapter>\fR] [\fI-n <frontend number>\fR] [\fI-S <diseqc>\fR] \fI-f <frequency>\fR [\fI-F <fec inner>\fR] [\fI-R <rolloff>\fR] ] [\fI-s <symbol_rate>\fR] [\fI-v <0|13|18>\fR] [\fI-p\fR] [\fI-b <bandwidth>\fR] [\fI-m <modulation\fR] [\fI-u\fR] [\fI-W\fR] [\fI-U\fR] [\fI-d <dest_IP:port>\fR] [\fI-e\fR] [\fI-T\fR] [\fI-q\fR] \fI-c <config_file>\fR [\fI-r <remote_socket>\fR] [\fI-t <ttl>\fR] [\fI-o <SSRC_IP>\fR] [\fI-i <RT_priority>\fR] [\fI-a <adapter>\fR] [\fI-n <frontend number>\fR] [\fI-S <diseqc>\fR] \fI-f <frequency>\fR [\fI-F <fec inner>\fR] [\fI-R <rolloff>\fR] ] [\fI-s <symbol_rate>\fR] [\fI-v <0|13|18>\fR] [\fI-p\fR] [\fI-b <bandwidth>\fR] [\fI-m <modulation\fR] [\fI-u\fR] [\fI-W\fR] [\fI-U\fR] [\fI-d <dest_IP:port>\fR] [\fI-e\fR] [\fI-T\fR] [\fI-l\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.
...@@ -46,6 +46,9 @@ DVB-S2 0|12|23|34|35|56|78|89|910|999 (default auto: 999) ...@@ -46,6 +46,9 @@ DVB-S2 0|12|23|34|35|56|78|89|910|999 (default auto: 999)
\fB\-h\fR, \fB\-\-help\fR \fB\-h\fR, \fB\-\-help\fR
Print the help message Print the help message
.TP .TP
\fB\-l\fR, \fB\-\-logger\fR
Send messages to syslog instead of stderr
.TP
\fB\-i\fR, \fB\-\-priority\fR <RT priority> \fB\-i\fR, \fB\-\-priority\fR <RT priority>
Real time priority Real time priority
.TP .TP
......
...@@ -67,6 +67,7 @@ int b_enable_epg = 0; ...@@ -67,6 +67,7 @@ int b_enable_epg = 0;
int b_unique_tsid = 0; int b_unique_tsid = 0;
volatile int b_hup_received = 0; volatile int b_hup_received = 0;
int i_verbose = DEFAULT_VERBOSITY; int i_verbose = DEFAULT_VERBOSITY;
int i_syslog = 0;
uint16_t i_src_port = DEFAULT_PORT; uint16_t i_src_port = DEFAULT_PORT;
in_addr_t i_src_addr = { 0 }; in_addr_t i_src_addr = { 0 };
int b_src_rawudp = 0; int b_src_rawudp = 0;
...@@ -351,6 +352,7 @@ void usage() ...@@ -351,6 +352,7 @@ void usage()
msg_Raw( NULL, " -h --help display this full help" ); msg_Raw( NULL, " -h --help display this full help" );
msg_Raw( NULL, " -i --priority <RT pritority>" ); msg_Raw( NULL, " -i --priority <RT pritority>" );
msg_Raw( NULL, " -q be quiet (less verbosity, repeat or use number for even quieter)" ); msg_Raw( NULL, " -q be quiet (less verbosity, repeat or use number for even quieter)" );
msg_Raw( NULL, " -l --logger use syslog for logging messages instead of stderr" );
msg_Raw( NULL, " -r --remote-socket <remote socket>" ); msg_Raw( NULL, " -r --remote-socket <remote socket>" );
msg_Raw( NULL, " -V --version only display the version" ); msg_Raw( NULL, " -V --version only display the version" );
exit(1); exit(1);
...@@ -362,6 +364,8 @@ int main( int i_argc, char **pp_argv ) ...@@ -362,6 +364,8 @@ int main( int i_argc, char **pp_argv )
int i_error; int i_error;
int c; int c;
int b_enable_syslog = 0;
DisplayVersion(); DisplayVersion();
if ( i_argc == 1 ) if ( i_argc == 1 )
...@@ -393,12 +397,13 @@ int main( int i_argc, char **pp_argv ) ...@@ -393,12 +397,13 @@ int main( int i_argc, char **pp_argv )
{ "rtp-input", required_argument, NULL, 'D' }, { "rtp-input", required_argument, NULL, 'D' },
{ "asi-adapter", required_argument, NULL, 'A' }, { "asi-adapter", required_argument, NULL, 'A' },
{ "epg-passthrough", no_argument, NULL, 'e' }, { "epg-passthrough", no_argument, NULL, 'e' },
{ "logger", no_argument, NULL, 'l' },
{ "help", no_argument, NULL, 'h' }, { "help", no_argument, NULL, 'h' },
{ "version", no_argument, NULL, 'V' }, { "version", no_argument, NULL, 'V' },
{ 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:m:uWUTd:D:A:ehV", 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:m:uWUTd:D:A:lehV", long_options, NULL)) != -1 )
{ {
switch ( c ) switch ( c )
{ {
...@@ -660,6 +665,10 @@ int main( int i_argc, char **pp_argv ) ...@@ -660,6 +665,10 @@ int main( int i_argc, char **pp_argv )
b_enable_epg = 1; b_enable_epg = 1;
break; break;
case 'l':
b_enable_syslog = 1;
break;
case 'T': case 'T':
b_unique_tsid = 1; b_unique_tsid = 1;
break; break;
...@@ -676,6 +685,9 @@ int main( int i_argc, char **pp_argv ) ...@@ -676,6 +685,9 @@ int main( int i_argc, char **pp_argv )
if ( optind < i_argc || pf_Open == NULL ) if ( optind < i_argc || pf_Open == NULL )
usage(); usage();
if ( b_enable_syslog )
msg_Connect( pp_argv[0] );
msg_Warn( NULL, "restarting" ); msg_Warn( NULL, "restarting" );
if ( b_output_udp ) if ( b_output_udp )
...@@ -717,4 +729,7 @@ int main( int i_argc, char **pp_argv ) ...@@ -717,4 +729,7 @@ int main( int i_argc, char **pp_argv )
demux_Run(); demux_Run();
} }
if ( b_enable_syslog )
msg_Disconnect();
} }
...@@ -100,6 +100,7 @@ typedef struct output_t ...@@ -100,6 +100,7 @@ typedef struct output_t
uint8_t i_config; uint8_t i_config;
} output_t; } output_t;
extern int i_syslog;
extern int i_verbose; extern int i_verbose;
extern output_t **pp_outputs; extern output_t **pp_outputs;
extern int i_nb_outputs; extern int i_nb_outputs;
...@@ -139,11 +140,19 @@ extern void (*pf_UnsetFilter)( int i_fd, uint16_t i_pid ); ...@@ -139,11 +140,19 @@ extern void (*pf_UnsetFilter)( int i_fd, uint16_t i_pid );
/***************************************************************************** /*****************************************************************************
* Prototypes * Prototypes
*****************************************************************************/ *****************************************************************************/
/* Connect/Disconnect from syslogd */
void msg_Connect( const char *ident );
void msg_Disconnect( void );
/* */
void msg_Info( void *_unused, const char *psz_format, ... ); void msg_Info( void *_unused, const char *psz_format, ... );
void msg_Err( void *_unused, const char *psz_format, ... ); void msg_Err( void *_unused, const char *psz_format, ... );
void msg_Warn( void *_unused, const char *psz_format, ... ); void msg_Warn( void *_unused, const char *psz_format, ... );
void msg_Dbg( void *_unused, const char *psz_format, ... ); void msg_Dbg( void *_unused, const char *psz_format, ... );
void msg_Raw( void *_unused, const char *psz_format, ... ); void msg_Raw( void *_unused, const char *psz_format, ... );
/* */
mtime_t mdate( void ); mtime_t mdate( void );
void msleep( mtime_t delay ); void msleep( mtime_t delay );
void hexDump( uint8_t *p_data, uint32_t i_len ); void hexDump( uint8_t *p_data, uint32_t i_len );
......
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
#include "version.h" #include "version.h"
int i_verbose = 3; int i_verbose = 3;
int i_syslog = 0;
void usage() void usage()
{ {
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include <netinet/in.h> #include <netinet/in.h>
#include <arpa/inet.h> #include <arpa/inet.h>
#include <errno.h> #include <errno.h>
#include <syslog.h>
#include "dvblast.h" #include "dvblast.h"
...@@ -45,6 +46,24 @@ ...@@ -45,6 +46,24 @@
#define VERB_INFO 2 #define VERB_INFO 2
#define VERB_WARN 1 #define VERB_WARN 1
/*****************************************************************************
* msg_Connect
*****************************************************************************/
void msg_Connect( const char *ident )
{
i_syslog = 1;
openlog( ident, LOG_NDELAY | LOG_PID, LOG_USER );
}
/*****************************************************************************
* msg_Disconnect
*****************************************************************************/
void msg_Disconnect( void )
{
i_syslog = 0;
closelog();
}
/***************************************************************************** /*****************************************************************************
* msg_Info * msg_Info
*****************************************************************************/ *****************************************************************************/
...@@ -57,7 +76,10 @@ void msg_Info( void *_unused, const char *psz_format, ... ) ...@@ -57,7 +76,10 @@ void msg_Info( void *_unused, const char *psz_format, ... )
va_start( args, psz_format ); va_start( args, psz_format );
snprintf( psz_fmt, MAX_MSG, "info: %s\n", psz_format ); snprintf( psz_fmt, MAX_MSG, "info: %s\n", psz_format );
vfprintf( stderr, psz_fmt, args ); if ( i_syslog )
vsyslog( LOG_INFO, psz_fmt, args );
else
vfprintf( stderr, psz_fmt, args );
} }
} }
...@@ -71,7 +93,10 @@ void msg_Err( void *_unused, const char *psz_format, ... ) ...@@ -71,7 +93,10 @@ void msg_Err( void *_unused, const char *psz_format, ... )
va_start( args, psz_format ); va_start( args, psz_format );
snprintf( psz_fmt, MAX_MSG, "error: %s\n", psz_format ); snprintf( psz_fmt, MAX_MSG, "error: %s\n", psz_format );
vfprintf( stderr, psz_fmt, args ); if ( i_syslog )
vsyslog( LOG_ERR, psz_fmt, args );
else
vfprintf( stderr, psz_fmt, args );
} }
/***************************************************************************** /*****************************************************************************
...@@ -86,7 +111,10 @@ void msg_Warn( void *_unused, const char *psz_format, ... ) ...@@ -86,7 +111,10 @@ void msg_Warn( void *_unused, const char *psz_format, ... )
va_start( args, psz_format ); va_start( args, psz_format );
snprintf( psz_fmt, MAX_MSG, "warning: %s\n", psz_format ); snprintf( psz_fmt, MAX_MSG, "warning: %s\n", psz_format );
vfprintf( stderr, psz_fmt, args ); if ( i_syslog )
vsyslog( LOG_WARNING, psz_fmt, args );
else
vfprintf( stderr, psz_fmt, args );
} }
} }
...@@ -102,7 +130,10 @@ void msg_Dbg( void *_unused, const char *psz_format, ... ) ...@@ -102,7 +130,10 @@ void msg_Dbg( void *_unused, const char *psz_format, ... )
va_start( args, psz_format ); va_start( args, psz_format );
snprintf( psz_fmt, MAX_MSG, "debug: %s\n", psz_format ); snprintf( psz_fmt, MAX_MSG, "debug: %s\n", psz_format );
vfprintf( stderr, psz_fmt, args ); if ( i_syslog )
vsyslog( LOG_DEBUG, psz_fmt, args );
else
vfprintf( stderr, psz_fmt, args );
} }
} }
...@@ -116,7 +147,10 @@ void msg_Raw( void *_unused, const char *psz_format, ... ) ...@@ -116,7 +147,10 @@ void msg_Raw( void *_unused, const char *psz_format, ... )
va_start( args, psz_format ); va_start( args, psz_format );
snprintf( psz_fmt, MAX_MSG, "%s\n", psz_format ); snprintf( psz_fmt, MAX_MSG, "%s\n", psz_format );
vfprintf( stderr, psz_fmt, args ); if ( i_syslog )
vsyslog( LOG_NOTICE, psz_fmt, args );
else
vfprintf( stderr, psz_fmt, args );
} }
/***************************************************************************** /*****************************************************************************
......
...@@ -22,6 +22,6 @@ ...@@ -22,6 +22,6 @@
*****************************************************************************/ *****************************************************************************/
#define VERSION_MAJOR 1 #define VERSION_MAJOR 1
#define VERSION_MINOR 2 #define VERSION_MINOR 3
#define VERSION_REVISION 0 #define VERSION_REVISION 0
#define VERSION_EXTRA "" #define VERSION_EXTRA "-svn"
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