Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
deadb40d
Commit
deadb40d
authored
Nov 26, 2012
by
Rémi Denis-Courmont
Browse files
playlist: move pl_Get()
parent
33af9b68
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/playlist/control.c
View file @
deadb40d
...
...
@@ -39,27 +39,6 @@ static int PlaylistVAControl( playlist_t * p_playlist, int i_query, va_list args
* Playlist control
*****************************************************************************/
static
vlc_mutex_t
global_lock
=
VLC_STATIC_MUTEX
;
#undef pl_Get
playlist_t
*
pl_Get
(
vlc_object_t
*
obj
)
{
playlist_t
*
pl
;
libvlc_int_t
*
p_libvlc
=
obj
->
p_libvlc
;
vlc_mutex_lock
(
&
global_lock
);
pl
=
libvlc_priv
(
p_libvlc
)
->
p_playlist
;
assert
(
pl
!=
NULL
);
if
(
!
libvlc_priv
(
p_libvlc
)
->
playlist_active
)
{
playlist_Activate
(
pl
);
libvlc_priv
(
p_libvlc
)
->
playlist_active
=
true
;
}
vlc_mutex_unlock
(
&
global_lock
);
return
pl
;
}
void
playlist_Lock
(
playlist_t
*
pl
)
{
vlc_mutex_lock
(
&
pl_priv
(
pl
)
->
lock
);
...
...
src/playlist/engine.c
View file @
deadb40d
...
...
@@ -357,6 +357,26 @@ void playlist_Destroy( playlist_t *p_playlist )
vlc_object_release
(
p_playlist
);
}
#undef pl_Get
playlist_t
*
pl_Get
(
vlc_object_t
*
obj
)
{
static
vlc_mutex_t
lock
=
VLC_STATIC_MUTEX
;
libvlc_int_t
*
p_libvlc
=
obj
->
p_libvlc
;
playlist_t
*
pl
;
vlc_mutex_lock
(
&
lock
);
pl
=
libvlc_priv
(
p_libvlc
)
->
p_playlist
;
assert
(
pl
!=
NULL
);
if
(
!
libvlc_priv
(
p_libvlc
)
->
playlist_active
)
{
playlist_Activate
(
pl
);
libvlc_priv
(
p_libvlc
)
->
playlist_active
=
true
;
}
vlc_mutex_unlock
(
&
lock
);
return
pl
;
}
/** Get current playing input.
*/
input_thread_t
*
playlist_CurrentInput
(
playlist_t
*
p_playlist
)
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment