Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
e836b1b0
Commit
e836b1b0
authored
Jan 24, 2011
by
Martin Storsjo
Committed by
Janne Grunau
Jan 24, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rtspdec: Move rtsp_read_pause up, next to rtsp_read_play
Signed-off-by:
Janne Grunau
<
janne-ffmpeg@jannau.net
>
parent
aeb2de1c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
rtspdec.c
libavformat/rtspdec.c
+18
-18
No files found.
libavformat/rtspdec.c
View file @
e836b1b0
...
...
@@ -86,6 +86,24 @@ static int rtsp_read_play(AVFormatContext *s)
return
0
;
}
/* pause the stream */
static
int
rtsp_read_pause
(
AVFormatContext
*
s
)
{
RTSPState
*
rt
=
s
->
priv_data
;
RTSPMessageHeader
reply1
,
*
reply
=
&
reply1
;
if
(
rt
->
state
!=
RTSP_STATE_STREAMING
)
return
0
;
else
if
(
!
(
rt
->
server_type
==
RTSP_SERVER_REAL
&&
rt
->
need_subscription
))
{
ff_rtsp_send_cmd
(
s
,
"PAUSE"
,
rt
->
control_uri
,
NULL
,
reply
,
NULL
);
if
(
reply
->
status_code
!=
RTSP_STATUS_OK
)
{
return
-
1
;
}
}
rt
->
state
=
RTSP_STATE_PAUSED
;
return
0
;
}
int
ff_rtsp_setup_input_streams
(
AVFormatContext
*
s
,
RTSPMessageHeader
*
reply
)
{
RTSPState
*
rt
=
s
->
priv_data
;
...
...
@@ -292,24 +310,6 @@ static int rtsp_read_packet(AVFormatContext *s, AVPacket *pkt)
return
0
;
}
/* pause the stream */
static
int
rtsp_read_pause
(
AVFormatContext
*
s
)
{
RTSPState
*
rt
=
s
->
priv_data
;
RTSPMessageHeader
reply1
,
*
reply
=
&
reply1
;
if
(
rt
->
state
!=
RTSP_STATE_STREAMING
)
return
0
;
else
if
(
!
(
rt
->
server_type
==
RTSP_SERVER_REAL
&&
rt
->
need_subscription
))
{
ff_rtsp_send_cmd
(
s
,
"PAUSE"
,
rt
->
control_uri
,
NULL
,
reply
,
NULL
);
if
(
reply
->
status_code
!=
RTSP_STATUS_OK
)
{
return
-
1
;
}
}
rt
->
state
=
RTSP_STATE_PAUSED
;
return
0
;
}
static
int
rtsp_read_seek
(
AVFormatContext
*
s
,
int
stream_index
,
int64_t
timestamp
,
int
flags
)
{
...
...
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