Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
4ca1e354
Commit
4ca1e354
authored
Jan 17, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
playlist: add real functions for locking
parent
4d802e18
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
41 additions
and
19 deletions
+41
-19
include/vlc_playlist.h
include/vlc_playlist.h
+7
-3
modules/control/http/mvar.c
modules/control/http/mvar.c
+2
-2
modules/control/http/rpn.c
modules/control/http/rpn.c
+2
-2
modules/gui/qt4/qt4.hpp
modules/gui/qt4/qt4.hpp
+2
-2
modules/gui/skins2/commands/cmd_input.cpp
modules/gui/skins2/commands/cmd_input.cpp
+2
-2
modules/gui/skins2/vars/playtree.cpp
modules/gui/skins2/vars/playtree.cpp
+6
-6
modules/gui/wxwidgets/wxwidgets.hpp
modules/gui/wxwidgets/wxwidgets.hpp
+2
-2
src/libvlccore.sym
src/libvlccore.sym
+3
-0
src/playlist/control.c
src/playlist/control.c
+15
-0
No files found.
include/vlc_playlist.h
View file @
4ca1e354
...
...
@@ -221,9 +221,9 @@ enum pl_locked_state
*****************************************************************************/
/* Helpers */
#define PL_LOCK
vlc_object_l
ock( p_playlist )
#define PL_UNLOCK
vlc_object_u
nlock( p_playlist )
#define PL_ASSERT_LOCKED
vlc_object_assert_l
ocked( p_playlist )
#define PL_LOCK
playlist_L
ock( p_playlist )
#define PL_UNLOCK
playlist_U
nlock( p_playlist )
#define PL_ASSERT_LOCKED
playlist_AssertL
ocked( p_playlist )
VLC_EXPORT
(
playlist_t
*
,
__pl_Hold
,
(
vlc_object_t
*
)
);
#define pl_Hold( a ) __pl_Hold( VLC_OBJECT(a) )
...
...
@@ -239,6 +239,10 @@ VLC_EXPORT( void, __pl_Release, ( vlc_object_t * ) );
#define playlist_Prev(p) playlist_Control(p,PLAYLIST_SKIP, pl_Unlocked, -1)
#define playlist_Skip(p,i) playlist_Control(p,PLAYLIST_SKIP, pl_Unlocked, (i) )
VLC_EXPORT
(
void
,
playlist_Lock
,
(
playlist_t
*
)
);
VLC_EXPORT
(
void
,
playlist_Unlock
,
(
playlist_t
*
)
);
VLC_EXPORT
(
void
,
playlist_AssertLocked
,
(
playlist_t
*
)
);
/**
* Do a playlist action.
* If there is something in the playlist then you can do playlist actions.
...
...
modules/control/http/mvar.c
View file @
4ca1e354
...
...
@@ -287,9 +287,9 @@ mvar_t *mvar_PlaylistSetNew( intf_thread_t *p_intf, char *name,
playlist_t
*
p_pl
)
{
mvar_t
*
s
=
mvar_New
(
name
,
"set"
);
vlc_object_l
ock
(
p_pl
);
playlist_L
ock
(
p_pl
);
PlaylistListNode
(
p_intf
,
p_pl
,
p_pl
->
p_root_category
,
name
,
s
,
0
);
vlc_object_u
nlock
(
p_pl
);
playlist_U
nlock
(
p_pl
);
return
s
;
}
...
...
modules/control/http/rpn.c
View file @
4ca1e354
...
...
@@ -494,12 +494,12 @@ void EvaluateRPN( intf_thread_t *p_intf, mvar_t *vars,
int
i_id
=
SSPopN
(
st
,
vars
);
int
i_ret
;
vlc_object_l
ock
(
p_sys
->
p_playlist
);
playlist_L
ock
(
p_sys
->
p_playlist
);
i_ret
=
playlist_Control
(
p_sys
->
p_playlist
,
PLAYLIST_VIEWPLAY
,
pl_Locked
,
NULL
,
playlist_ItemGetById
(
p_sys
->
p_playlist
,
i_id
,
pl_Locked
)
);
vlc_object_u
nlock
(
p_sys
->
p_playlist
);
playlist_U
nlock
(
p_sys
->
p_playlist
);
msg_Dbg
(
p_intf
,
"requested playlist item: %i"
,
i_id
);
SSPushN
(
st
,
i_ret
);
}
...
...
modules/gui/qt4/qt4.hpp
View file @
4ca1e354
...
...
@@ -76,8 +76,8 @@ struct intf_sys_t
};
#define THEPL p_intf->p_sys->p_playlist
#define QPL_LOCK
vlc_object_l
ock( THEPL );
#define QPL_UNLOCK
vlc_object_u
nlock( THEPL );
#define QPL_LOCK
playlist_L
ock( THEPL );
#define QPL_UNLOCK
playlist_U
nlock( THEPL );
#define THEDP DialogsProvider::getInstance()
#define THEMIM MainInputManager::getInstance( p_intf )
...
...
modules/gui/skins2/commands/cmd_input.cpp
View file @
4ca1e354
...
...
@@ -36,9 +36,9 @@ void CmdPlay::execute()
return
;
}
vlc_object_l
ock
(
pPlaylist
);
playlist_L
ock
(
pPlaylist
);
const
bool
b_empty
=
playlist_IsEmpty
(
pPlaylist
);
vlc_object_u
nlock
(
pPlaylist
);
playlist_U
nlock
(
pPlaylist
);
if
(
!
b_empty
)
{
...
...
modules/gui/skins2/vars/playtree.cpp
View file @
4ca1e354
...
...
@@ -52,7 +52,7 @@ Playtree::~Playtree()
void
Playtree
::
delSelected
()
{
Iterator
it
=
begin
();
vlc_object_l
ock
(
getIntf
()
->
p_sys
->
p_playlist
);
playlist_L
ock
(
getIntf
()
->
p_sys
->
p_playlist
);
for
(
it
=
begin
();
it
!=
end
();
it
=
getNextVisibleItem
(
it
)
)
{
if
(
(
*
it
).
m_selected
&&
!
(
*
it
).
isReadonly
()
)
...
...
@@ -93,12 +93,12 @@ void Playtree::delSelected()
it
=
getNextVisibleItem
(
it
);
}
}
vlc_object_u
nlock
(
getIntf
()
->
p_sys
->
p_playlist
);
playlist_U
nlock
(
getIntf
()
->
p_sys
->
p_playlist
);
}
void
Playtree
::
action
(
VarTree
*
pItem
)
{
vlc_object_l
ock
(
m_pPlaylist
);
playlist_L
ock
(
m_pPlaylist
);
VarTree
::
Iterator
it
;
playlist_item_t
*
p_item
=
(
playlist_item_t
*
)
pItem
->
m_pData
;
...
...
@@ -114,7 +114,7 @@ void Playtree::action( VarTree *pItem )
{
playlist_Control
(
m_pPlaylist
,
PLAYLIST_VIEWPLAY
,
pl_Locked
,
p_parent
,
p_item
);
}
vlc_object_u
nlock
(
m_pPlaylist
);
playlist_U
nlock
(
m_pPlaylist
);
}
void
Playtree
::
onChange
()
...
...
@@ -213,7 +213,7 @@ void Playtree::buildNode( playlist_item_t *pNode, VarTree &rTree )
void
Playtree
::
buildTree
()
{
clear
();
vlc_object_l
ock
(
m_pPlaylist
);
playlist_L
ock
(
m_pPlaylist
);
i_items_to_append
=
0
;
...
...
@@ -228,7 +228,7 @@ void Playtree::buildTree()
buildNode
(
m_pPlaylist
->
p_root_category
,
*
this
);
vlc_object_u
nlock
(
m_pPlaylist
);
playlist_U
nlock
(
m_pPlaylist
);
// What is it ?
// checkParents( NULL );
}
...
...
modules/gui/wxwidgets/wxwidgets.hpp
View file @
4ca1e354
...
...
@@ -225,13 +225,13 @@ wxWindow *CreateDialogsProvider( intf_thread_t *p_intf, wxWindow *p_parent );
inline
void
LockPlaylist
(
intf_sys_t
*
p_sys
,
playlist_t
*
p_pl
)
{
if
(
p_sys
->
i_playlist_usage
++
==
0
)
vlc_objec
t_lock
(
p_pl
);
playlis
t_lock
(
p_pl
);
}
inline
void
UnlockPlaylist
(
intf_sys_t
*
p_sys
,
playlist_t
*
p_pl
)
{
if
(
--
p_sys
->
i_playlist_usage
==
0
)
vlc_object_u
nlock
(
p_pl
);
playlist_U
nlock
(
p_pl
);
}
#endif
src/libvlccore.sym
View file @
4ca1e354
...
...
@@ -275,6 +275,7 @@ playlist_Add
playlist_AddExt
playlist_AddInput
playlist_AskForArtEnqueue
playlist_AssertLocked
playlist_BothAddInput
playlist_ChildSearchName
playlist_Clear
...
...
@@ -297,6 +298,7 @@ playlist_ItemGetByInputId
playlist_ItemNewWithType
playlist_ItemToNode
playlist_LiveSearchUpdate
playlist_Lock
playlist_NodeAppend
playlist_NodeChildrenCount
playlist_NodeCreate
...
...
@@ -311,6 +313,7 @@ playlist_ServicesDiscoveryAdd
playlist_ServicesDiscoveryRemove
playlist_Status
playlist_TreeMove
playlist_Unlock
__pl_Hold
__pl_Release
resolve_xml_special_chars
...
...
src/playlist/control.c
View file @
4ca1e354
...
...
@@ -66,6 +66,21 @@ void __pl_Release( vlc_object_t *p_this )
vlc_object_release
(
pl
);
}
void
playlist_Lock
(
playlist_t
*
pl
)
{
vlc_object_lock
(
pl
);
}
void
playlist_Unlock
(
playlist_t
*
pl
)
{
vlc_object_unlock
(
pl
);
}
void
playlist_AssertLocked
(
playlist_t
*
pl
)
{
vlc_object_assert_locked
(
pl
);
}
int
playlist_Control
(
playlist_t
*
p_playlist
,
int
i_query
,
bool
b_locked
,
...
)
{
...
...
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