Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
13
Issues
13
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
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
GSoC
GSoC2018
macOS
vlc
Commits
705dc653
Commit
705dc653
authored
Nov 16, 2016
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
playlist: pass playlist item as "playlist-item-deleted" value
This makes deletion and appending somewhat more consistent.
parent
9bd12356
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
10 additions
and
10 deletions
+10
-10
include/vlc_playlist.h
include/vlc_playlist.h
+2
-2
modules/gui/macosx/VLCPLModel.m
modules/gui/macosx/VLCPLModel.m
+2
-1
modules/gui/qt/input_manager.cpp
modules/gui/qt/input_manager.cpp
+2
-1
modules/gui/skins2/src/vlcproc.cpp
modules/gui/skins2/src/vlcproc.cpp
+2
-2
src/playlist/engine.c
src/playlist/engine.c
+1
-3
src/playlist/tree.c
src/playlist/tree.c
+1
-1
No files found.
include/vlc_playlist.h
View file @
705dc653
...
@@ -106,8 +106,8 @@ struct intf_thread_t;
...
@@ -106,8 +106,8 @@ struct intf_thread_t;
* item being played.
* item being played.
*
*
* - "playlist-item-append": It will contain a pointer to a playlist_item_t.
* - "playlist-item-append": It will contain a pointer to a playlist_item_t.
* - "playlist-item-deleted": It will contain
the playlist_item_t->i_id of a
* - "playlist-item-deleted": It will contain
a pointer to the playlist_item_t
*
deleted playlist_item_t
.
*
about to be deleted
.
*
*
* - "leaf-to-parent": It will contain the playlist_item_t->i_id of an item that is transformed
* - "leaf-to-parent": It will contain the playlist_item_t->i_id of an item that is transformed
* into a node.
* into a node.
...
...
modules/gui/macosx/VLCPLModel.m
View file @
705dc653
...
@@ -71,7 +71,8 @@ static int VLCPLItemRemoved(vlc_object_t *p_this, const char *psz_var,
...
@@ -71,7 +71,8 @@ static int VLCPLItemRemoved(vlc_object_t *p_this, const char *psz_var,
vlc_value_t
oldval
,
vlc_value_t
new_val
,
void
*
param
)
vlc_value_t
oldval
,
vlc_value_t
new_val
,
void
*
param
)
{
{
@autoreleasepool
{
@autoreleasepool
{
NSNumber
*
o_val
=
[
NSNumber
numberWithInt
:
new_val
.
i_int
];
playlist_item_t
*
p_item
=
new_val
.
p_address
;
NSNumber
*
o_val
=
[
NSNumber
numberWithInt
:
p_item
->
i_id
];
VLCPLModel
*
model
=
(
__bridge
VLCPLModel
*
)
param
;
VLCPLModel
*
model
=
(
__bridge
VLCPLModel
*
)
param
;
[
model
performSelectorOnMainThread
:
@selector
(
VLCPLItemRemoved
:)
withObject
:
o_val
waitUntilDone
:
NO
];
[
model
performSelectorOnMainThread
:
@selector
(
VLCPLItemRemoved
:)
withObject
:
o_val
waitUntilDone
:
NO
];
...
...
modules/gui/qt/input_manager.cpp
View file @
705dc653
...
@@ -1248,8 +1248,9 @@ int MainInputManager::PLItemRemoved( vlc_object_t *obj, const char *,
...
@@ -1248,8 +1248,9 @@ int MainInputManager::PLItemRemoved( vlc_object_t *obj, const char *,
{
{
playlist_t
*
pl
=
(
playlist_t
*
)
obj
;
playlist_t
*
pl
=
(
playlist_t
*
)
obj
;
MainInputManager
*
mim
=
static_cast
<
MainInputManager
*>
(
data
);
MainInputManager
*
mim
=
static_cast
<
MainInputManager
*>
(
data
);
playlist_item_t
*
item
=
static_cast
<
playlist_item_t
*>
(
cur
.
p_address
);
PLEvent
*
event
=
new
PLEvent
(
PLEvent
::
PLItemRemoved
,
cur
.
i_int
,
0
);
PLEvent
*
event
=
new
PLEvent
(
PLEvent
::
PLItemRemoved
,
item
->
i_id
,
0
);
QApplication
::
postEvent
(
mim
,
event
);
QApplication
::
postEvent
(
mim
,
event
);
// can't use playlist_IsEmpty( ) as it isn't true yet
// can't use playlist_IsEmpty( ) as it isn't true yet
if
(
pl
->
items
.
i_size
==
1
)
// lock is held
if
(
pl
->
items
.
i_size
==
1
)
// lock is held
...
...
modules/gui/skins2/src/vlcproc.cpp
View file @
705dc653
...
@@ -282,9 +282,9 @@ int VlcProc::onItemDelete( vlc_object_t *pObj, const char *pVariable,
...
@@ -282,9 +282,9 @@ int VlcProc::onItemDelete( vlc_object_t *pObj, const char *pVariable,
(
void
)
pObj
;
(
void
)
pVariable
;
(
void
)
oldVal
;
(
void
)
pObj
;
(
void
)
pVariable
;
(
void
)
oldVal
;
VlcProc
*
pThis
=
(
VlcProc
*
)
pParam
;
VlcProc
*
pThis
=
(
VlcProc
*
)
pParam
;
int
i_id
=
newVal
.
i_int
;
playlist_item_t
*
item
=
static_cast
<
playlist_item_t
*>
(
newVal
.
p_address
)
;
CmdPlaytreeDelete
*
pCmdTree
=
CmdPlaytreeDelete
*
pCmdTree
=
new
CmdPlaytreeDelete
(
pThis
->
getIntf
(),
i_id
);
new
CmdPlaytreeDelete
(
pThis
->
getIntf
(),
i
tem
->
i
_id
);
// Push the command in the asynchronous command queue
// Push the command in the asynchronous command queue
AsyncQueue
*
pQueue
=
AsyncQueue
::
instance
(
pThis
->
getIntf
()
);
AsyncQueue
*
pQueue
=
AsyncQueue
::
instance
(
pThis
->
getIntf
()
);
...
...
src/playlist/engine.c
View file @
705dc653
...
@@ -420,10 +420,8 @@ static void VariablesInit( playlist_t *p_playlist )
...
@@ -420,10 +420,8 @@ static void VariablesInit( playlist_t *p_playlist )
var_Create
(
p_playlist
,
"item-change"
,
VLC_VAR_ADDRESS
);
var_Create
(
p_playlist
,
"item-change"
,
VLC_VAR_ADDRESS
);
var_Create
(
p_playlist
,
"leaf-to-parent"
,
VLC_VAR_INTEGER
);
var_Create
(
p_playlist
,
"leaf-to-parent"
,
VLC_VAR_INTEGER
);
var_Create
(
p_playlist
,
"playlist-item-deleted"
,
VLC_VAR_INTEGER
);
var_SetInteger
(
p_playlist
,
"playlist-item-deleted"
,
-
1
);
var_Create
(
p_playlist
,
"playlist-item-append"
,
VLC_VAR_ADDRESS
);
var_Create
(
p_playlist
,
"playlist-item-append"
,
VLC_VAR_ADDRESS
);
var_Create
(
p_playlist
,
"playlist-item-deleted"
,
VLC_VAR_ADDRESS
);
var_Create
(
p_playlist
,
"input-current"
,
VLC_VAR_ADDRESS
);
var_Create
(
p_playlist
,
"input-current"
,
VLC_VAR_ADDRESS
);
...
...
src/playlist/tree.c
View file @
705dc653
...
@@ -148,7 +148,7 @@ void playlist_NodeDelete( playlist_t *p_playlist, playlist_item_t *p_root,
...
@@ -148,7 +148,7 @@ void playlist_NodeDelete( playlist_t *p_playlist, playlist_item_t *p_root,
pl_priv
(
p_playlist
)
->
b_reset_currently_playing
=
true
;
pl_priv
(
p_playlist
)
->
b_reset_currently_playing
=
true
;
int
i
;
int
i
;
var_Set
Integer
(
p_playlist
,
"playlist-item-deleted"
,
p_root
->
i_id
);
var_Set
Address
(
p_playlist
,
"playlist-item-deleted"
,
p_root
);
ARRAY_BSEARCH
(
pl_priv
(
p_playlist
)
->
all_items
,
->
i_id
,
int
,
p_root
->
i_id
,
i
);
ARRAY_BSEARCH
(
pl_priv
(
p_playlist
)
->
all_items
,
->
i_id
,
int
,
p_root
->
i_id
,
i
);
if
(
i
!=
-
1
)
if
(
i
!=
-
1
)
ARRAY_REMOVE
(
pl_priv
(
p_playlist
)
->
all_items
,
i
);
ARRAY_REMOVE
(
pl_priv
(
p_playlist
)
->
all_items
,
i
);
...
...
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