Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
e836b1b0
Commit
e836b1b0
authored
14 years ago
by
Martin Storsjo
Committed by
Janne Grunau
14 years ago
Browse files
Options
Downloads
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
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libavformat/rtspdec.c
+18
-18
18 additions, 18 deletions
libavformat/rtspdec.c
with
18 additions
and
18 deletions
libavformat/rtspdec.c
+
18
−
18
View file @
e836b1b0
...
@@ -86,6 +86,24 @@ static int rtsp_read_play(AVFormatContext *s)
...
@@ -86,6 +86,24 @@ static int rtsp_read_play(AVFormatContext *s)
return
0
;
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
)
int
ff_rtsp_setup_input_streams
(
AVFormatContext
*
s
,
RTSPMessageHeader
*
reply
)
{
{
RTSPState
*
rt
=
s
->
priv_data
;
RTSPState
*
rt
=
s
->
priv_data
;
...
@@ -292,24 +310,6 @@ static int rtsp_read_packet(AVFormatContext *s, AVPacket *pkt)
...
@@ -292,24 +310,6 @@ static int rtsp_read_packet(AVFormatContext *s, AVPacket *pkt)
return
0
;
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
,
static
int
rtsp_read_seek
(
AVFormatContext
*
s
,
int
stream_index
,
int64_t
timestamp
,
int
flags
)
int64_t
timestamp
,
int
flags
)
{
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment