Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dvblast
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
dvblast
Commits
43b27d60
Commit
43b27d60
authored
Jun 03, 2009
by
Andy Gatward
Committed by
Christophe Massiot
Jun 03, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* output.c: Support for MPEG-TS over raw UDP with the -U switch.
parent
450e39a2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
11 deletions
+40
-11
README
README
+7
-1
dvblast.c
dvblast.c
+10
-2
dvblast.h
dvblast.h
+1
-0
output.c
output.c
+22
-8
No files found.
README
View file @
43b27d60
...
...
@@ -5,7 +5,12 @@ 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 supports the new S2API of linux-dvb (compile option).
The configuration file for RTP outputs can be reloaded without losing
Output to UDP rather than RTP is also supported so those IPTV set top
boxes that don't do RTP over multicast can also use the streams.
This functionality is not recommended and should only be used if
absolutely necessary.
The configuration file for outputs can be reloaded without losing
a single packet. MMI operation and monitoring are provided with an
external control program using a Unix domain socket.
...
...
@@ -16,3 +21,4 @@ features only one thread of execution. It has very few dependencies
--
Meuuh 2009-05-11
gatty 2009-05-24
dvblast.c
View file @
43b27d60
...
...
@@ -54,6 +54,7 @@ int b_tone = 0;
int
i_bandwidth
=
8
;
char
*
psz_modulation
=
NULL
;
int
b_budget_mode
=
0
;
int
b_output_udp
=
0
;
volatile
int
b_hup_received
=
0
;
/*****************************************************************************
...
...
@@ -181,13 +182,14 @@ static void SigHandler( int i_signal )
*****************************************************************************/
void
usage
()
{
msg_Err
(
NULL
,
"Usage: dvblast -c <config file> [-r <remote socket>] [-t <ttl>] [-o <SSRC IP>] [-i <RT priority>] [-a <adapter>][-n <frontend_num>] -f <frequency> [-s <symbol rate>] [-v <0|13|18>] [-p] [-b <bandwidth>] [-m <modulation] [-u] [-d <dest IP:port>]"
);
msg_Err
(
NULL
,
"Usage: dvblast -c <config file> [-r <remote socket>] [-t <ttl>] [-o <SSRC IP>] [-i <RT priority>] [-a <adapter>][-n <frontend_num>] -f <frequency> [-s <symbol rate>] [-v <0|13|18>] [-p] [-b <bandwidth>] [-m <modulation] [-u] [-
U] [-
d <dest IP:port>]"
);
msg_Err
(
NULL
,
"-v: voltage to apply to the LNB (QPSK)"
);
msg_Err
(
NULL
,
"-p: force 22kHz pulses for high-band selection (DVB-S)"
);
msg_Err
(
NULL
,
"-m: DVB-C qpsk|qam_16|qam_32|qam_64|qam_128|qam_256 (default qam_auto)"
);
msg_Err
(
NULL
,
" DVB-T qam_16|qam_32|qam_64|qam_128|qam_256 (default qam_auto)"
);
msg_Err
(
NULL
,
" DVB-S2 qpsk|psk_8 (default legacy DVB-S)"
);
msg_Err
(
NULL
,
"-u: turn on budget mode (no hardware PID filtering)"
);
msg_Err
(
NULL
,
"-U: use raw UDP rather than RTP (required by some IPTV set top boxes)"
);
msg_Err
(
NULL
,
"-d: duplicate all received packets to a given port"
);
exit
(
1
);
}
...
...
@@ -206,7 +208,7 @@ int main( int i_argc, char **pp_argv )
{
char
c
;
if
(
(
c
=
getopt
(
i_argc
,
pp_argv
,
"c:r:t:o:i:a:n:f:s:v:pb:m:ud:h"
))
==
-
1
)
if
(
(
c
=
getopt
(
i_argc
,
pp_argv
,
"c:r:t:o:i:a:n:f:s:v:pb:m:u
U
d:h"
))
==
-
1
)
break
;
switch
(
c
)
...
...
@@ -272,6 +274,12 @@ int main( int i_argc, char **pp_argv )
b_budget_mode
=
1
;
break
;
case
'U'
:
b_output_udp
=
1
;
msg_Warn
(
NULL
,
"raw UDP output is deprecated. Please consider using RTP."
);
msg_Warn
(
NULL
,
"for DVB-IP compliance you should use RTP."
);
break
;
case
'd'
:
{
char
*
psz_token
;
...
...
dvblast.h
View file @
43b27d60
...
...
@@ -88,6 +88,7 @@ extern int b_tone;
extern
int
i_bandwidth
;
extern
char
*
psz_modulation
;
extern
int
b_budget_mode
;
extern
int
b_output_udp
;
extern
volatile
int
b_hup_received
;
extern
mtime_t
i_ca_timeout
;
extern
int
i_comm_fd
;
...
...
output.c
View file @
43b27d60
...
...
@@ -132,22 +132,36 @@ static void output_Flush( output_t *p_output )
struct
iovec
p_iov
[
NB_BLOCKS
+
1
];
uint8_t
p_rtp_hdr
[
RTP_SIZE
];
int
i
;
int
i_outblocks
=
NB_BLOCKS
;
p_iov
[
0
].
iov_base
=
p_rtp_hdr
;
p_iov
[
0
].
iov_len
=
sizeof
(
p_rtp_hdr
);
rtp_SetHdr
(
p_output
,
p_rtp_hdr
);
if
(
!
b_output_udp
)
{
p_iov
[
0
].
iov_base
=
p_rtp_hdr
;
p_iov
[
0
].
iov_len
=
sizeof
(
p_rtp_hdr
);
rtp_SetHdr
(
p_output
,
p_rtp_hdr
);
for
(
i
=
1
;
i
<
NB_BLOCKS
+
1
;
i
++
)
{
p_iov
[
i
].
iov_base
=
p_output
->
pp_blocks
[
i
-
1
]
->
p_ts
;
p_iov
[
i
].
iov_len
=
TS_SIZE
;
}
for
(
i
=
1
;
i
<
NB_BLOCKS
+
1
;
i
++
)
i_outblocks
+=
1
;
}
else
{
p_iov
[
i
].
iov_base
=
p_output
->
pp_blocks
[
i
-
1
]
->
p_ts
;
p_iov
[
i
].
iov_len
=
TS_SIZE
;
for
(
i
=
0
;
i
<
NB_BLOCKS
;
i
++
)
{
p_iov
[
i
].
iov_base
=
p_output
->
pp_blocks
[
i
]
->
p_ts
;
p_iov
[
i
].
iov_len
=
TS_SIZE
;
}
}
if
(
writev
(
p_output
->
i_handle
,
p_iov
,
NB_BLOCKS
+
1
)
<
0
)
if
(
writev
(
p_output
->
i_handle
,
p_iov
,
i_outblocks
)
<
0
)
{
struct
in_addr
s
;
s
.
s_addr
=
p_output
->
i_maddr
;
msg_Err
(
NULL
,
"cou
n
dn't writev to %s:%u (%s)"
,
inet_ntoa
(
s
),
msg_Err
(
NULL
,
"cou
l
dn't writev to %s:%u (%s)"
,
inet_ntoa
(
s
),
p_output
->
i_port
,
strerror
(
errno
)
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment