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
d745c19b
Commit
d745c19b
authored
Aug 24, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
VLM: cleanup VLM threading
parent
d007a98f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
13 deletions
+7
-13
src/input/vlm.c
src/input/vlm.c
+5
-12
src/input/vlm_internal.h
src/input/vlm_internal.h
+2
-1
No files found.
src/input/vlm.c
View file @
d745c19b
...
...
@@ -62,7 +62,7 @@
*****************************************************************************/
static
void
vlm_Destructor
(
vlm_t
*
p_vlm
);
static
void
*
Manage
(
v
lc_object_t
*
);
static
void
*
Manage
(
v
oid
*
);
static
int
vlm_MediaVodControl
(
void
*
,
vod_media_t
*
,
const
char
*
,
int
,
va_list
);
/*****************************************************************************
...
...
@@ -108,8 +108,7 @@ vlm_t *__vlm_New ( vlc_object_t *p_this )
p_vlm
->
p_vod
=
NULL
;
vlc_object_attach
(
p_vlm
,
p_this
->
p_libvlc
);
if
(
vlc_thread_create
(
p_vlm
,
"vlm thread"
,
Manage
,
VLC_THREAD_PRIORITY_LOW
,
false
)
)
if
(
vlc_clone
(
&
p_vlm
->
thread
,
Manage
,
p_vlm
,
VLC_THREAD_PRIORITY_LOW
)
)
{
vlc_mutex_destroy
(
&
p_vlm
->
lock
);
vlc_object_release
(
p_vlm
);
...
...
@@ -155,11 +154,6 @@ void vlm_Delete( vlm_t *p_vlm )
* is serialized against setting libvlc_priv->p_vlm from vlm_New(). */
var_Get
(
p_vlm
->
p_libvlc
,
"vlm_mutex"
,
&
lockval
);
vlc_mutex_lock
(
lockval
.
p_address
);
/* Parental advisory: terrific humongous horrible follows...
* This is so that vlc_object_destroy() (from vlc_object_release()) will
* NOT join our thread. See also vlm_Destructor().
* -- Courmisch, 24/08/2008 */
vlc_internals
(
p_vlm
)
->
b_thread
=
false
;
vlc_object_release
(
p_vlm
);
vlc_mutex_unlock
(
lockval
.
p_address
);
}
...
...
@@ -178,9 +172,8 @@ static void vlm_Destructor( vlm_t *p_vlm )
TAB_CLEAN
(
p_vlm
->
schedule
,
p_vlm
->
schedule
);
vlc_object_kill
(
p_vlm
);
/* Continuation of the vlm_Delete() hack. -- Courmisch */
vlc_internals
(
p_vlm
)
->
b_thread
=
true
;
vlc_thread_join
(
p_vlm
);
/*vlc_cancel( p_vlm->thread ); */
vlc_join
(
p_vlm
->
thread
,
NULL
);
vlc_mutex_destroy
(
&
p_vlm
->
lock
);
}
...
...
@@ -309,7 +302,7 @@ static int vlm_MediaVodControl( void *p_private, vod_media_t *p_vod_media,
/*****************************************************************************
* Manage:
*****************************************************************************/
static
void
*
Manage
(
v
lc_object_t
*
p_object
)
static
void
*
Manage
(
v
oid
*
p_object
)
{
vlm_t
*
vlm
=
(
vlm_t
*
)
p_object
;
int
i
,
j
;
...
...
src/input/vlm_internal.h
View file @
d745c19b
...
...
@@ -87,7 +87,8 @@ struct vlm_t
{
VLC_COMMON_MEMBERS
vlc_mutex_t
lock
;
vlc_mutex_t
lock
;
vlc_thread_t
thread
;
/* */
int64_t
i_id
;
...
...
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