Commit 0be26c12 authored by massiot's avatar massiot

* dvblast.c: Add support for /udp syntax in config file, patch by Marian Ďurkovič.


git-svn-id: svn://svn.videolan.org/dvblast/trunk@43 55d3f8b6-4a41-4d2d-a900-313d1436a5b8
parent 97c37e90
......@@ -7,6 +7,10 @@
# The fields are: name (N), email (E), web-address (W), CVS account login (C),
# PGP key ID and fingerprint (P), description (D), and snail-mail address (S).
N: Marian Ďurkovič
E: md AT bts DOT SK
D: numerous bug fixes
N: Andy Gatward
E: a DOT j DOT gatward AT reading DOT ac DOT uk
D: EIT pass-through mode and misc fixes
......
......@@ -43,6 +43,16 @@ regularly reset the CAM module if it fails to descramble the service,
assuming the module is dead. Every time it is reset a few TS packets
will be lost, that is why this feature is optional.
The optional "/udp" parameter can be used to force DVBlast to output
raw UDP stream. This functionality is provided for backwards compatibility
with IPTV set top boxes that don't support RTP and should only be used
if absolutely necessary. If you need both RTP and UDP streams of the same
program, specify them on separate lines like this:
239.255.0.1:1234 1 10750
239.255.0.2:1234/udp 1 10750
There are three ways of configuring the PIDs to stream :
1. SID-based
......
......@@ -87,18 +87,24 @@ static void ReadConfiguration( char *psz_file )
while ( fgets( psz_line, sizeof(psz_line), p_file ) != NULL )
{
output_t *p_output = NULL;
char *psz_parser, *psz_token, *psz_token2;
char *psz_parser, *psz_token, *psz_token2, *psz_token3;
struct in_addr maddr;
uint16_t i_port = DEFAULT_PORT;
uint16_t i_sid = 0;
uint16_t *pi_pids = NULL;
int i_nb_pids = 0;
int b_rawudp = 0;
int b_watch;
psz_token = strtok_r( psz_line, "\t\n ", &psz_parser );
if ( psz_token == NULL )
continue;
if ( (psz_token3 = strrchr( psz_token, '/' )) != NULL )
{
*psz_token3 = '\0';
b_rawudp = ( strncasecmp( psz_token3 + 1, "udp", 3 ) == 0 );
}
if ( (psz_token2 = strrchr( psz_token, ':' )) != NULL )
{
*psz_token2 = '\0';
......@@ -156,6 +162,7 @@ static void ReadConfiguration( char *psz_file )
if ( p_output != NULL )
{
demux_Change( p_output, i_sid, pi_pids, i_nb_pids );
p_output->b_rawudp = b_rawudp;
p_output->b_watch = (b_watch == 1);
p_output->b_still_present = 1;
}
......
......@@ -75,6 +75,7 @@ typedef struct output_t
uint16_t *pi_pids;
int i_nb_pids;
int b_watch;
int b_rawudp;
int b_still_present;
} output_t;
......
......@@ -139,7 +139,7 @@ static void output_Flush( output_t *p_output )
int i;
int i_outblocks = NB_BLOCKS;
if ( !b_output_udp )
if ( !b_output_udp && !p_output->b_rawudp )
{
p_iov[0].iov_base = p_rtp_hdr;
p_iov[0].iov_len = sizeof(p_rtp_hdr);
......
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