Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
c9c1e00f
Commit
c9c1e00f
authored
Jun 17, 2014
by
Luca Barbato
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rtsp: Factor out fmtp parsing
parent
49a24268
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
9 deletions
+18
-9
rtsp.c
libavformat/rtsp.c
+18
-9
No files found.
libavformat/rtsp.c
View file @
c9c1e00f
...
@@ -309,6 +309,22 @@ static void copy_default_source_addrs(struct RTSPSource **addrs, int count,
...
@@ -309,6 +309,22 @@ static void copy_default_source_addrs(struct RTSPSource **addrs, int count,
}
}
}
}
static
void
parse_fmtp
(
AVFormatContext
*
s
,
RTSPState
*
rt
,
int
payload_type
,
const
char
*
line
)
{
int
i
;
for
(
i
=
0
;
i
<
rt
->
nb_rtsp_streams
;
i
++
)
{
RTSPStream
*
rtsp_st
=
rt
->
rtsp_streams
[
i
];
if
(
rtsp_st
->
sdp_payload_type
==
payload_type
&&
rtsp_st
->
dynamic_handler
&&
rtsp_st
->
dynamic_handler
->
parse_sdp_a_line
)
{
rtsp_st
->
dynamic_handler
->
parse_sdp_a_line
(
s
,
i
,
rtsp_st
->
dynamic_protocol_context
,
line
);
}
}
}
static
void
sdp_parse_line
(
AVFormatContext
*
s
,
SDPParseState
*
s1
,
static
void
sdp_parse_line
(
AVFormatContext
*
s
,
SDPParseState
*
s1
,
int
letter
,
const
char
*
buf
)
int
letter
,
const
char
*
buf
)
{
{
...
@@ -316,7 +332,7 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1,
...
@@ -316,7 +332,7 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1,
char
buf1
[
64
],
st_type
[
64
];
char
buf1
[
64
],
st_type
[
64
];
const
char
*
p
;
const
char
*
p
;
enum
AVMediaType
codec_type
;
enum
AVMediaType
codec_type
;
int
payload_type
,
i
;
int
payload_type
;
AVStream
*
st
;
AVStream
*
st
;
RTSPStream
*
rtsp_st
;
RTSPStream
*
rtsp_st
;
RTSPSource
*
rtsp_src
;
RTSPSource
*
rtsp_src
;
...
@@ -494,14 +510,7 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1,
...
@@ -494,14 +510,7 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1,
// let dynamic protocol handlers have a stab at the line.
// let dynamic protocol handlers have a stab at the line.
get_word
(
buf1
,
sizeof
(
buf1
),
&
p
);
get_word
(
buf1
,
sizeof
(
buf1
),
&
p
);
payload_type
=
atoi
(
buf1
);
payload_type
=
atoi
(
buf1
);
for
(
i
=
0
;
i
<
rt
->
nb_rtsp_streams
;
i
++
)
{
parse_fmtp
(
s
,
rt
,
payload_type
,
buf
);
rtsp_st
=
rt
->
rtsp_streams
[
i
];
if
(
rtsp_st
->
sdp_payload_type
==
payload_type
&&
rtsp_st
->
dynamic_handler
&&
rtsp_st
->
dynamic_handler
->
parse_sdp_a_line
)
rtsp_st
->
dynamic_handler
->
parse_sdp_a_line
(
s
,
i
,
rtsp_st
->
dynamic_protocol_context
,
buf
);
}
}
else
if
(
av_strstart
(
p
,
"range:"
,
&
p
))
{
}
else
if
(
av_strstart
(
p
,
"range:"
,
&
p
))
{
int64_t
start
,
end
;
int64_t
start
,
end
;
...
...
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