Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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
vlc-gpu
Commits
7636acea
Commit
7636acea
authored
Jun 04, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RTP: add UDP-Lite support
parent
f10ba0d3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
3 deletions
+19
-3
modules/demux/rtp.c
modules/demux/rtp.c
+19
-3
No files found.
modules/demux/rtp.c
View file @
7636acea
...
...
@@ -89,6 +89,7 @@ vlc_module_begin ();
change_integer_range
(
0
,
32767
);
add_shortcut
(
"rtp"
);
add_shortcut
(
"udplite"
);
vlc_module_end
();
/*
...
...
@@ -99,6 +100,15 @@ vlc_module_end ();
* - support for access_filter in case of stream_Demux (MPEG-TS)
*/
#ifndef IPPROTO_DCCP
# define IPPROTO_DCCP 33
/* IANA */
#endif
#ifndef IPPROTO_UDPLITE
# define IPPROTO_UDPLITE 136
/* from IANA */
#endif
/*
* Local prototypes
*/
...
...
@@ -112,8 +122,14 @@ static int extract_port (char **phost);
static
int
Open
(
vlc_object_t
*
obj
)
{
demux_t
*
demux
=
(
demux_t
*
)
obj
;
int
tp
;
/* transport protocol */
if
(
strcmp
(
demux
->
psz_access
,
"rtp"
))
if
(
!
strcmp
(
demux
->
psz_access
,
"rtp"
))
tp
=
IPPROTO_UDP
;
else
if
(
!
strcmp
(
demux
->
psz_access
,
"udplite"
))
tp
=
IPPROTO_UDPLITE
;
else
return
VLC_EGENERIC
;
char
*
tmp
=
strdup
(
demux
->
psz_path
);
...
...
@@ -134,11 +150,11 @@ static int Open (vlc_object_t *obj)
dport
=
5004
;
/* avt-profile-1 port */
/* Try to connect */
int
fd
=
net_OpenDgram
(
obj
,
dhost
,
dport
,
shost
,
sport
,
AF_UNSPEC
,
IPPROTO_UDP
);
int
fd
=
net_OpenDgram
(
obj
,
dhost
,
dport
,
shost
,
sport
,
AF_UNSPEC
,
tp
);
free
(
tmp
);
if
(
fd
==
-
1
)
return
VLC_EGENERIC
;
net_SetCSCov
(
fd
,
-
1
,
12
);
/* Initializes demux */
demux_sys_t
*
p_sys
=
malloc
(
sizeof
(
*
p_sys
));
...
...
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