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
deadb40d
Commit
deadb40d
authored
Nov 26, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
playlist: move pl_Get()
parent
33af9b68
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
21 deletions
+20
-21
src/playlist/control.c
src/playlist/control.c
+0
-21
src/playlist/engine.c
src/playlist/engine.c
+20
-0
No files found.
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
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