Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
1b441157
Commit
1b441157
authored
Jun 07, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove some dead code
parent
c26261bf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
71 deletions
+1
-71
modules/access/udp.c
modules/access/udp.c
+1
-71
No files found.
modules/access/udp.c
View file @
1b441157
...
...
@@ -88,7 +88,6 @@ vlc_module_end();
static
block_t
*
BlockUDP
(
access_t
*
);
static
block_t
*
BlockStartRTP
(
access_t
*
);
static
block_t
*
BlockRTP
(
access_t
*
);
static
block_t
*
BlockChoose
(
access_t
*
);
static
int
Control
(
access_t
*
,
int
,
va_list
);
struct
access_sys_t
...
...
@@ -140,7 +139,7 @@ static int Open( vlc_object_t *p_this )
}
if
(
strncmp
(
p_access
->
psz_access
,
"udp"
,
3
)
==
0
)
p_access
->
pf_block
=
Block
Choose
;
p_access
->
pf_block
=
Block
UDP
;
else
if
(
strcmp
(
p_access
->
psz_access
,
"rtptcp"
)
==
0
)
proto
=
IPPROTO_TCP
;
...
...
@@ -661,72 +660,3 @@ static block_t *BlockStartRTP( access_t *p_access )
p_access
->
pf_block
=
BlockRTP
;
return
BlockPrebufferRTP
(
p_access
,
BlockUDP
(
p_access
)
);
}
/*****************************************************************************
* BlockChoose: decide between RTP and UDP
*****************************************************************************/
static
block_t
*
BlockChoose
(
access_t
*
p_access
)
{
block_t
*
p_block
;
int
i_rtp_version
;
int
i_payload_type
;
if
(
(
p_block
=
BlockUDP
(
p_access
)
)
==
NULL
)
return
NULL
;
if
(
p_block
->
p_buffer
[
0
]
==
0x47
)
{
msg_Dbg
(
p_access
,
"detected TS over raw UDP"
);
p_access
->
pf_block
=
BlockUDP
;
p_access
->
info
.
b_prebuffered
=
true
;
return
p_block
;
}
if
(
p_block
->
i_buffer
<
RTP_HEADER_LEN
)
return
p_block
;
/* Parse the header and make some verifications.
* See RFC 3550. */
i_rtp_version
=
p_block
->
p_buffer
[
0
]
>>
6
;
i_payload_type
=
(
p_block
->
p_buffer
[
1
]
&
0x7F
);
if
(
i_rtp_version
!=
2
)
{
msg_Dbg
(
p_access
,
"no supported RTP header detected"
);
p_access
->
pf_block
=
BlockUDP
;
p_access
->
info
.
b_prebuffered
=
true
;
return
p_block
;
}
switch
(
i_payload_type
)
{
case
33
:
msg_Dbg
(
p_access
,
"detected MPEG2 TS over RTP"
);
free
(
p_access
->
psz_demux
);
p_access
->
psz_demux
=
strdup
(
"ts"
);
break
;
case
14
:
msg_Dbg
(
p_access
,
"detected MPEG Audio over RTP"
);
free
(
p_access
->
psz_demux
);
p_access
->
psz_demux
=
strdup
(
"mpga"
);
break
;
case
32
:
msg_Dbg
(
p_access
,
"detected MPEG Video over RTP"
);
free
(
p_access
->
psz_demux
);
p_access
->
psz_demux
=
strdup
(
"mpgv"
);
break
;
default:
msg_Dbg
(
p_access
,
"no RTP header detected"
);
p_access
->
pf_block
=
BlockUDP
;
p_access
->
info
.
b_prebuffered
=
true
;
return
p_block
;
}
p_access
->
pf_block
=
BlockRTP
;
return
BlockPrebufferRTP
(
p_access
,
p_block
);
}
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