Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
b54a35bb
Commit
b54a35bb
authored
May 17, 2011
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Converted misc/rtsp.c to vlc_clone().
parent
5e01d91c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
modules/misc/rtsp.c
modules/misc/rtsp.c
+7
-7
No files found.
modules/misc/rtsp.c
View file @
b54a35bb
...
@@ -187,6 +187,7 @@ struct vod_sys_t
...
@@ -187,6 +187,7 @@ struct vod_sys_t
vod_media_t
**
media
;
vod_media_t
**
media
;
/* */
/* */
vlc_thread_t
thread
;
block_fifo_t
*
p_fifo_cmd
;
block_fifo_t
*
p_fifo_cmd
;
};
};
...
@@ -224,7 +225,7 @@ static void MediaAskDel ( vod_t *, vod_media_t * );
...
@@ -224,7 +225,7 @@ static void MediaAskDel ( vod_t *, vod_media_t * );
static
int
MediaAddES
(
vod_t
*
,
vod_media_t
*
,
es_format_t
*
);
static
int
MediaAddES
(
vod_t
*
,
vod_media_t
*
,
es_format_t
*
);
static
void
MediaDelES
(
vod_t
*
,
vod_media_t
*
,
es_format_t
*
);
static
void
MediaDelES
(
vod_t
*
,
vod_media_t
*
,
es_format_t
*
);
static
void
*
CommandThread
(
v
lc_object_t
*
p_this
);
static
void
*
CommandThread
(
v
oid
*
);
static
void
CommandPush
(
vod_t
*
,
rtsp_cmd_type_t
,
vod_media_t
*
,
static
void
CommandPush
(
vod_t
*
,
rtsp_cmd_type_t
,
vod_media_t
*
,
const
char
*
psz_session
,
int64_t
i_arg
,
const
char
*
psz_session
,
int64_t
i_arg
,
double
f_arg
,
const
char
*
psz_arg
);
double
f_arg
,
const
char
*
psz_arg
);
...
@@ -301,7 +302,7 @@ static int Open( vlc_object_t *p_this )
...
@@ -301,7 +302,7 @@ static int Open( vlc_object_t *p_this )
p_vod
->
pf_media_del
=
MediaAskDel
;
p_vod
->
pf_media_del
=
MediaAskDel
;
p_sys
->
p_fifo_cmd
=
block_FifoNew
();
p_sys
->
p_fifo_cmd
=
block_FifoNew
();
if
(
vlc_
thread_create
(
p_vod
,
CommandThrea
d
,
VLC_THREAD_PRIORITY_LOW
)
)
if
(
vlc_
clone
(
&
p_sys
->
thread
,
CommandThread
,
p_vo
d
,
VLC_THREAD_PRIORITY_LOW
)
)
{
{
msg_Err
(
p_vod
,
"cannot spawn rtsp vod thread"
);
msg_Err
(
p_vod
,
"cannot spawn rtsp vod thread"
);
block_FifoRelease
(
p_sys
->
p_fifo_cmd
);
block_FifoRelease
(
p_sys
->
p_fifo_cmd
);
...
@@ -332,9 +333,8 @@ static void Close( vlc_object_t * p_this )
...
@@ -332,9 +333,8 @@ static void Close( vlc_object_t * p_this )
vod_sys_t
*
p_sys
=
p_vod
->
p_sys
;
vod_sys_t
*
p_sys
=
p_vod
->
p_sys
;
/* Stop command thread */
/* Stop command thread */
vlc_object_kill
(
p_vod
);
CommandPush
(
p_vod
,
RTSP_CMD_TYPE_NONE
,
NULL
,
NULL
,
0
,
0
.
0
,
NULL
);
CommandPush
(
p_vod
,
RTSP_CMD_TYPE_NONE
,
NULL
,
NULL
,
0
,
0
.
0
,
NULL
);
vlc_
thread_join
(
p_vod
);
vlc_
join
(
p_sys
->
thread
,
NULL
);
while
(
block_FifoCount
(
p_sys
->
p_fifo_cmd
)
>
0
)
while
(
block_FifoCount
(
p_sys
->
p_fifo_cmd
)
>
0
)
{
{
...
@@ -777,13 +777,13 @@ static void CommandPush( vod_t *p_vod, rtsp_cmd_type_t i_type, vod_media_t *p_me
...
@@ -777,13 +777,13 @@ static void CommandPush( vod_t *p_vod, rtsp_cmd_type_t i_type, vod_media_t *p_me
block_FifoPut
(
p_vod
->
p_sys
->
p_fifo_cmd
,
p_cmd
);
block_FifoPut
(
p_vod
->
p_sys
->
p_fifo_cmd
,
p_cmd
);
}
}
static
void
*
CommandThread
(
v
lc_object_t
*
p_this
)
static
void
*
CommandThread
(
v
oid
*
obj
)
{
{
vod_t
*
p_vod
=
(
vod_t
*
)
p_this
;
vod_t
*
p_vod
=
(
vod_t
*
)
obj
;
vod_sys_t
*
p_sys
=
p_vod
->
p_sys
;
vod_sys_t
*
p_sys
=
p_vod
->
p_sys
;
int
canc
=
vlc_savecancel
();
int
canc
=
vlc_savecancel
();
while
(
vlc_object_alive
(
p_vod
)
)
for
(
;;
)
{
{
block_t
*
p_block_cmd
=
block_FifoGet
(
p_sys
->
p_fifo_cmd
);
block_t
*
p_block_cmd
=
block_FifoGet
(
p_sys
->
p_fifo_cmd
);
rtsp_cmd_t
cmd
;
rtsp_cmd_t
cmd
;
...
...
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