Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
873e5edb
Commit
873e5edb
authored
Mar 12, 2010
by
Jakob Leben
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adjustments to playlist API changes
parent
e4b20c82
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
18 additions
and
48 deletions
+18
-48
modules/gui/macosx/playlist.m
modules/gui/macosx/playlist.m
+1
-1
modules/gui/qt4/components/playlist/playlist_model.cpp
modules/gui/qt4/components/playlist/playlist_model.cpp
+6
-35
modules/gui/qt4/components/playlist/playlist_model.hpp
modules/gui/qt4/components/playlist/playlist_model.hpp
+1
-2
modules/gui/qt4/components/playlist/selector.cpp
modules/gui/qt4/components/playlist/selector.cpp
+3
-3
modules/services_discovery/upnp_cc.cpp
modules/services_discovery/upnp_cc.cpp
+2
-2
src/playlist/engine.c
src/playlist/engine.c
+3
-3
src/playlist/services_discovery.c
src/playlist/services_discovery.c
+2
-2
No files found.
modules/gui/macosx/playlist.m
View file @
873e5edb
...
...
@@ -1522,7 +1522,7 @@
PL_LOCK
;
playlist_NodeCreate
(
p_playlist
,
_
(
"Empty Folder"
),
p_playlist
->
p_local_category
,
0
,
NULL
);
p_playlist
->
p_local_category
,
PLAYLIST_END
,
0
,
NULL
);
PL_UNLOCK
;
[
self
playlistUpdated
];
...
...
modules/gui/qt4/components/playlist/playlist_model.cpp
View file @
873e5edb
...
...
@@ -197,14 +197,14 @@ bool PLModel::dropMimeData( const QMimeData *data, Qt::DropAction action,
if
(
plMimeData
)
{
if
(
copy
)
dropAppendCopy
(
plMimeData
,
getItem
(
parent
)
);
dropAppendCopy
(
plMimeData
,
getItem
(
parent
)
,
row
);
else
dropMove
(
plMimeData
,
getItem
(
parent
),
row
);
}
return
true
;
}
void
PLModel
::
dropAppendCopy
(
const
PlMimeData
*
plMimeData
,
PLItem
*
target
)
void
PLModel
::
dropAppendCopy
(
const
PlMimeData
*
plMimeData
,
PLItem
*
target
,
int
pos
)
{
PL_LOCK
;
...
...
@@ -212,49 +212,20 @@ void PLModel::dropAppendCopy( const PlMimeData *plMimeData, PLItem *target )
playlist_ItemGetByInput
(
p_playlist
,
target
->
p_input
);
if
(
!
p_parent
)
return
;
bool
b_flat
=
p_parent
==
p_playlist
->
p_playing
&&
!
var_InheritBool
(
p_intf
,
"playlist-tree"
);
if
(
pos
==
-
1
)
pos
=
PLAYLIST_END
;
QList
<
input_item_t
*>
inputItems
=
plMimeData
->
inputItems
();
foreach
(
input_item_t
*
p_input
,
inputItems
)
{
playlist_item_t
*
p_item
=
playlist_ItemGetByInput
(
p_playlist
,
p_input
);
if
(
!
p_item
)
continue
;
recursiveAppendCopy
(
p_playlist
,
p_item
,
p_parent
,
b_flat
);
pos
=
playlist_NodeAddCopy
(
p_playlist
,
p_item
,
p_parent
,
pos
);
}
PL_UNLOCK
;
}
/* Must be entered WITH playlist lock! */
void
PLModel
::
recursiveAppendCopy
(
playlist_t
*
p_playlist
,
playlist_item_t
*
source
,
playlist_item_t
*
target
,
bool
b_flat
)
{
input_item_t
*
srcInput
=
source
->
p_input
;
if
(
!
(
source
->
i_children
!=
-
1
&&
b_flat
)
)
{
vlc_mutex_lock
(
&
srcInput
->
lock
);
input_item_t
*
newInput
=
input_item_NewWithType
(
VLC_OBJECT
(
p_playlist
),
srcInput
->
psz_uri
,
srcInput
->
psz_name
,
srcInput
->
i_options
,
srcInput
->
ppsz_options
,
srcInput
->
optflagc
,
srcInput
->
i_duration
,
srcInput
->
i_type
);
vlc_mutex_unlock
(
&
srcInput
->
lock
);
if
(
source
->
i_children
!=
-
1
)
target
=
playlist_NodeCreate
(
p_playlist
,
newInput
->
psz_name
,
target
,
0
,
newInput
);
else
playlist_NodeAddInput
(
p_playlist
,
newInput
,
target
,
PLAYLIST_APPEND
|
PLAYLIST_SPREPARSE
,
PLAYLIST_END
,
pl_Locked
);
}
for
(
int
i
=
0
;
i
<
source
->
i_children
;
i
++
)
recursiveAppendCopy
(
p_playlist
,
source
->
pp_children
[
i
],
target
,
b_flat
);
}
void
PLModel
::
dropMove
(
const
PlMimeData
*
plMimeData
,
PLItem
*
target
,
int
row
)
{
QList
<
input_item_t
*>
inputItems
=
plMimeData
->
inputItems
();
...
...
@@ -1109,7 +1080,7 @@ void PLModel::popupAddNode()
i_popup_parent
);
if
(
p_item
)
{
playlist_NodeCreate
(
p_playlist
,
qtu
(
name
),
p_item
,
0
,
NULL
);
playlist_NodeCreate
(
p_playlist
,
qtu
(
name
),
p_item
,
PLAYLIST_END
,
0
,
NULL
);
}
PL_UNLOCK
;
}
...
...
modules/gui/qt4/components/playlist/playlist_model.hpp
View file @
873e5edb
...
...
@@ -142,8 +142,7 @@ private:
void
updateChildren
(
playlist_item_t
*
,
PLItem
*
);
/* Deep actions (affect core playlist) */
static
void
recursiveAppendCopy
(
playlist_t
*
,
playlist_item_t
*
,
playlist_item_t
*
,
bool
);
void
dropAppendCopy
(
const
PlMimeData
*
data
,
PLItem
*
target
);
void
dropAppendCopy
(
const
PlMimeData
*
data
,
PLItem
*
target
,
int
pos
);
void
dropMove
(
const
PlMimeData
*
data
,
PLItem
*
target
,
int
new_pos
);
/* Popup */
...
...
modules/gui/qt4/components/playlist/selector.cpp
View file @
873e5edb
...
...
@@ -362,9 +362,9 @@ bool PLSelector::dropMimeData ( QTreeWidgetItem * parent, int index,
playlist_item_t
*
p_item
=
playlist_ItemGetByInput
(
THEPL
,
p_input
);
if
(
!
p_item
)
continue
;
PLModel
::
recursiveAppen
dCopy
(
THEPL
,
p_item
,
to_pl
?
THEPL
->
p_playing
:
THEPL
->
p_media_library
,
to_pl
&&
!
var_InheritBool
(
p_intf
,
"playlist-tree"
)
);
playlist_NodeAd
dCopy
(
THEPL
,
p_item
,
to_pl
?
THEPL
->
p_playing
:
THEPL
->
p_media_library
,
PLAYLIST_END
);
}
playlist_Unlock
(
THEPL
);
...
...
modules/services_discovery/upnp_cc.cpp
View file @
873e5edb
...
...
@@ -170,7 +170,7 @@ playlist_item_t *UPnPHandler::AddDevice( Device *dev )
*/
char
*
str
=
strdup
(
dev
->
getFriendlyName
(
)
);
p_item
=
playlist_NodeCreate
(
p_playlist
,
str
,
p_sd
->
p_cat
,
0
,
NULL
);
p_item
=
playlist_NodeCreate
(
p_playlist
,
str
,
p_sd
->
p_cat
,
PLAYLIST_END
,
0
,
NULL
);
p_item
->
i_flags
&=
~
PLAYLIST_SKIP_FLAG
;
msg_Dbg
(
p_sd
,
"device %s added"
,
str
);
free
(
str
);
...
...
@@ -214,7 +214,7 @@ void UPnPHandler::AddContent( playlist_item_t *p_parent, ContentNode *node )
char
*
p_name
=
strdup
(
title
);
/* See other comment on strdup */
playlist_item_t
*
p_node
=
playlist_NodeCreate
(
p_playlist
,
p_name
,
p_parent
,
0
,
NULL
);
p_parent
,
PLAYLIST_END
,
0
,
NULL
);
free
(
p_name
);
unsigned
nContentNodes
=
conNode
->
getNContentNodes
();
...
...
src/playlist/engine.c
View file @
873e5edb
...
...
@@ -121,7 +121,7 @@ playlist_t * playlist_Create( vlc_object_t *p_parent )
/* Create the root node */
PL_LOCK
;
p_playlist
->
p_root
=
playlist_NodeCreate
(
p_playlist
,
NULL
,
NULL
,
0
,
NULL
);
PLAYLIST_END
,
0
,
NULL
);
PL_UNLOCK
;
if
(
!
p_playlist
->
p_root
)
return
NULL
;
...
...
@@ -129,7 +129,7 @@ playlist_t * playlist_Create( vlc_object_t *p_parent )
PL_LOCK
;
p_playlist
->
p_playing
=
playlist_NodeCreate
(
p_playlist
,
_
(
"Playlist"
),
p_playlist
->
p_root
,
PLAYLIST_RO_FLAG
,
NULL
);
PLAYLIST_
END
,
PLAYLIST_
RO_FLAG
,
NULL
);
PL_UNLOCK
;
...
...
@@ -142,7 +142,7 @@ playlist_t * playlist_Create( vlc_object_t *p_parent )
PL_LOCK
;
p_playlist
->
p_media_library
=
playlist_NodeCreate
(
p_playlist
,
_
(
"Media Library"
),
p_playlist
->
p_root
,
PLAYLIST_RO_FLAG
,
NULL
);
PLAYLIST_
END
,
PLAYLIST_
RO_FLAG
,
NULL
);
PL_UNLOCK
;
if
(
!
p_playlist
->
p_media_library
)
return
NULL
;
...
...
src/playlist/services_discovery.c
View file @
873e5edb
...
...
@@ -263,7 +263,7 @@ static void playlist_sd_item_added( const vlc_event_t * p_event, void * user_dat
if
(
!
p_cat
)
{
p_cat
=
playlist_NodeCreate
(
p_playlist
,
psz_cat
,
p_parent
,
0
,
NULL
);
p_parent
,
PLAYLIST_END
,
0
,
NULL
);
p_cat
->
i_flags
&=
~
PLAYLIST_SKIP_FLAG
;
}
p_parent
=
p_cat
;
...
...
@@ -339,7 +339,7 @@ int playlist_ServicesDiscoveryAdd( playlist_t *p_playlist,
PL_LOCK
;
p_node
=
playlist_NodeCreate
(
p_playlist
,
psz_longname
,
p_playlist
->
p_root
,
0
,
NULL
);
p_playlist
->
p_root
,
PLAYLIST_END
,
0
,
NULL
);
PL_UNLOCK
;
vlc_event_manager_t
*
em
=
services_discovery_EventManager
(
p_sd
);
...
...
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