Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
52157ae3
Commit
52157ae3
authored
Dec 23, 2008
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed preparsing/art fetching locking.
parent
8f0f6c74
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
30 additions
and
20 deletions
+30
-20
include/vlc_playlist.h
include/vlc_playlist.h
+2
-2
modules/gui/macosx/playlist.m
modules/gui/macosx/playlist.m
+2
-2
modules/gui/macosx/playlistinfo.m
modules/gui/macosx/playlistinfo.m
+2
-2
modules/gui/qt4/components/interface_widgets.cpp
modules/gui/qt4/components/interface_widgets.cpp
+11
-1
modules/gui/qt4/components/interface_widgets.hpp
modules/gui/qt4/components/interface_widgets.hpp
+2
-2
modules/gui/wxwidgets/dialogs/playlist.cpp
modules/gui/wxwidgets/dialogs/playlist.cpp
+1
-1
src/control/media.c
src/control/media.c
+2
-2
src/playlist/control.c
src/playlist/control.c
+6
-6
src/playlist/item.c
src/playlist/item.c
+1
-1
src/playlist/thread.c
src/playlist/thread.c
+1
-1
No files found.
include/vlc_playlist.h
View file @
52157ae3
...
@@ -264,10 +264,10 @@ VLC_EXPORT( input_thread_t *, playlist_CurrentInput, ( playlist_t *p_playlist )
...
@@ -264,10 +264,10 @@ VLC_EXPORT( input_thread_t *, playlist_CurrentInput, ( playlist_t *p_playlist )
VLC_EXPORT
(
void
,
playlist_Clear
,
(
playlist_t
*
,
bool
)
);
VLC_EXPORT
(
void
,
playlist_Clear
,
(
playlist_t
*
,
bool
)
);
/** Enqueue an input item for preparsing */
/** Enqueue an input item for preparsing */
VLC_EXPORT
(
int
,
playlist_PreparseEnqueue
,
(
playlist_t
*
,
input_item_t
*
)
);
VLC_EXPORT
(
int
,
playlist_PreparseEnqueue
,
(
playlist_t
*
,
input_item_t
*
,
bool
b_locked
)
);
/** Request the art for an input item to be fetched */
/** Request the art for an input item to be fetched */
VLC_EXPORT
(
int
,
playlist_AskForArtEnqueue
,
(
playlist_t
*
,
input_item_t
*
)
);
VLC_EXPORT
(
int
,
playlist_AskForArtEnqueue
,
(
playlist_t
*
,
input_item_t
*
,
bool
b_locked
)
);
/* Playlist sorting */
/* Playlist sorting */
VLC_EXPORT
(
int
,
playlist_TreeMove
,
(
playlist_t
*
,
playlist_item_t
*
,
playlist_item_t
*
,
int
)
);
VLC_EXPORT
(
int
,
playlist_TreeMove
,
(
playlist_t
*
,
playlist_item_t
*
,
playlist_item_t
*
,
int
)
);
...
...
modules/gui/macosx/playlist.m
View file @
52157ae3
...
@@ -836,7 +836,7 @@
...
@@ -836,7 +836,7 @@
{
{
if
(
p_item
->
i_children
==
-
1
)
if
(
p_item
->
i_children
==
-
1
)
{
{
playlist_PreparseEnqueue
(
p_playlist
,
p_item
->
p_input
);
playlist_PreparseEnqueue
(
p_playlist
,
p_item
->
p_input
,
pl_Unlocked
);
}
}
else
else
{
{
...
@@ -872,7 +872,7 @@
...
@@ -872,7 +872,7 @@
if
(
p_item
&&
p_item
->
i_children
==
-
1
)
if
(
p_item
&&
p_item
->
i_children
==
-
1
)
{
{
playlist_AskForArtEnqueue
(
p_playlist
,
p_item
->
p_input
);
playlist_AskForArtEnqueue
(
p_playlist
,
p_item
->
p_input
,
pl_Unlocked
);
}
}
}
}
vlc_object_release
(
p_playlist
);
vlc_object_release
(
p_playlist
);
...
...
modules/gui/macosx/playlistinfo.m
View file @
52157ae3
...
@@ -249,7 +249,7 @@ static VLCInfo *_o_sharedInstance = nil;
...
@@ -249,7 +249,7 @@ static VLCInfo *_o_sharedInstance = nil;
if
(
!
input_item_IsPreparsed
(
p_item
)
)
if
(
!
input_item_IsPreparsed
(
p_item
)
)
{
{
playlist_t
*
p_playlist
=
pl_Hold
(
VLCIntf
);
playlist_t
*
p_playlist
=
pl_Hold
(
VLCIntf
);
playlist_PreparseEnqueue
(
p_playlist
,
p_item
);
playlist_PreparseEnqueue
(
p_playlist
,
p_item
,
pl_Unlocked
);
pl_Release
(
VLCIntf
);
pl_Release
(
VLCIntf
);
}
}
...
@@ -428,7 +428,7 @@ error:
...
@@ -428,7 +428,7 @@ error:
-
(
IBAction
)
downloadCoverArt
:(
id
)
sender
-
(
IBAction
)
downloadCoverArt
:(
id
)
sender
{
{
playlist_t
*
p_playlist
=
pl_Hold
(
VLCIntf
);
playlist_t
*
p_playlist
=
pl_Hold
(
VLCIntf
);
if
(
p_item
)
playlist_AskForArtEnqueue
(
p_playlist
,
p_item
);
if
(
p_item
)
playlist_AskForArtEnqueue
(
p_playlist
,
p_item
,
pl_Unlocked
);
pl_Release
(
VLCIntf
);
pl_Release
(
VLCIntf
);
}
}
...
...
modules/gui/qt4/components/interface_widgets.cpp
View file @
52157ae3
...
@@ -447,12 +447,22 @@ CoverArtLabel::CoverArtLabel( QWidget *parent,
...
@@ -447,12 +447,22 @@ CoverArtLabel::CoverArtLabel( QWidget *parent,
doUpdate
();
doUpdate
();
}
}
CoverArtLabel
::~
CoverArtLabel
()
{
playlist_t
*
p_playlist
=
pl_Hold
(
p_this
);
var_DelCallback
(
p_playlist
,
"item-change"
,
downloadCoverCallback
,
this
);
pl_Release
(
p_this
);
if
(
p_input
)
vlc_gc_decref
(
p_input
);
};
void
CoverArtLabel
::
downloadCover
()
void
CoverArtLabel
::
downloadCover
()
{
{
if
(
p_input
)
if
(
p_input
)
{
{
playlist_t
*
p_playlist
=
pl_Hold
(
p_this
);
playlist_t
*
p_playlist
=
pl_Hold
(
p_this
);
playlist_AskForArtEnqueue
(
p_playlist
,
p_input
);
playlist_AskForArtEnqueue
(
p_playlist
,
p_input
,
pl_Unlocked
);
pl_Release
(
p_this
);
pl_Release
(
p_this
);
}
}
}
}
...
...
modules/gui/qt4/components/interface_widgets.hpp
View file @
52157ae3
...
@@ -196,8 +196,8 @@ public:
...
@@ -196,8 +196,8 @@ public:
CoverArtLabel
(
QWidget
*
parent
,
CoverArtLabel
(
QWidget
*
parent
,
vlc_object_t
*
p_this
,
vlc_object_t
*
p_this
,
input_item_t
*
p_input
=
NULL
);
input_item_t
*
p_input
=
NULL
);
virtual
~
CoverArtLabel
()
virtual
~
CoverArtLabel
()
;
{
if
(
p_input
)
vlc_gc_decref
(
p_input
);
}
private:
private:
input_item_t
*
p_input
;
input_item_t
*
p_input
;
vlc_object_t
*
p_this
;
vlc_object_t
*
p_this
;
...
...
modules/gui/wxwidgets/dialogs/playlist.cpp
View file @
52157ae3
...
@@ -1511,7 +1511,7 @@ void Playlist::Preparse()
...
@@ -1511,7 +1511,7 @@ void Playlist::Preparse()
{
{
if
(
p_popup_item
->
i_children
==
-
1
)
if
(
p_popup_item
->
i_children
==
-
1
)
{
{
playlist_PreparseEnqueue
(
p_playlist
,
p_popup_item
->
p_input
);
playlist_PreparseEnqueue
(
p_playlist
,
p_popup_item
->
p_input
,
pl_Unlocked
);
}
}
else
else
{
{
...
...
src/control/media.c
View file @
52157ae3
...
@@ -216,7 +216,7 @@ static void preparse_if_needed( libvlc_media_t *p_md )
...
@@ -216,7 +216,7 @@ static void preparse_if_needed( libvlc_media_t *p_md )
{
{
playlist_PreparseEnqueue
(
playlist_PreparseEnqueue
(
libvlc_priv
(
p_md
->
p_libvlc_instance
->
p_libvlc_int
)
->
p_playlist
,
libvlc_priv
(
p_md
->
p_libvlc_instance
->
p_libvlc_int
)
->
p_playlist
,
p_md
->
p_input_item
);
p_md
->
p_input_item
,
pl_Unlocked
);
p_md
->
b_preparsed
=
true
;
p_md
->
b_preparsed
=
true
;
}
}
}
}
...
@@ -436,7 +436,7 @@ char * libvlc_media_get_meta( libvlc_media_t *p_md,
...
@@ -436,7 +436,7 @@ char * libvlc_media_get_meta( libvlc_media_t *p_md,
{
{
playlist_AskForArtEnqueue
(
playlist_AskForArtEnqueue
(
libvlc_priv
(
p_md
->
p_libvlc_instance
->
p_libvlc_int
)
->
p_playlist
,
libvlc_priv
(
p_md
->
p_libvlc_instance
->
p_libvlc_int
)
->
p_playlist
,
p_md
->
p_input_item
);
p_md
->
p_input_item
,
pl_Unlocked
);
}
}
/* Should be integrated in core */
/* Should be integrated in core */
...
...
src/playlist/control.c
View file @
52157ae3
...
@@ -186,27 +186,27 @@ static int PlaylistVAControl( playlist_t * p_playlist, int i_query, va_list args
...
@@ -186,27 +186,27 @@ static int PlaylistVAControl( playlist_t * p_playlist, int i_query, va_list args
*****************************************************************************/
*****************************************************************************/
/** Enqueue an item for preparsing */
/** Enqueue an item for preparsing */
int
playlist_PreparseEnqueue
(
playlist_t
*
p_playlist
,
int
playlist_PreparseEnqueue
(
playlist_t
*
p_playlist
,
input_item_t
*
p_item
)
input_item_t
*
p_item
,
bool
b_locked
)
{
{
playlist_private_t
*
p_sys
=
pl_priv
(
p_playlist
);
playlist_private_t
*
p_sys
=
pl_priv
(
p_playlist
);
PL_LOCK
;
PL_LOCK
_IF
(
!
b_locked
)
;
if
(
p_sys
->
p_preparser
)
if
(
p_sys
->
p_preparser
)
playlist_preparser_Push
(
p_sys
->
p_preparser
,
p_item
);
playlist_preparser_Push
(
p_sys
->
p_preparser
,
p_item
);
PL_UNLOCK
;
PL_UNLOCK
_IF
(
!
b_locked
)
;
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
int
playlist_AskForArtEnqueue
(
playlist_t
*
p_playlist
,
int
playlist_AskForArtEnqueue
(
playlist_t
*
p_playlist
,
input_item_t
*
p_item
)
input_item_t
*
p_item
,
bool
b_locked
)
{
{
playlist_private_t
*
p_sys
=
pl_priv
(
p_playlist
);
playlist_private_t
*
p_sys
=
pl_priv
(
p_playlist
);
PL_LOCK
;
PL_LOCK
_IF
(
!
b_locked
)
;
if
(
p_sys
->
p_fetcher
)
if
(
p_sys
->
p_fetcher
)
playlist_fetcher_Push
(
p_sys
->
p_fetcher
,
p_item
);
playlist_fetcher_Push
(
p_sys
->
p_fetcher
,
p_item
);
PL_UNLOCK
;
PL_UNLOCK
_IF
(
!
b_locked
)
;
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
...
...
src/playlist/item.c
View file @
52157ae3
...
@@ -849,7 +849,7 @@ static void GoAndPreparse( playlist_t *p_playlist, int i_mode,
...
@@ -849,7 +849,7 @@ static void GoAndPreparse( playlist_t *p_playlist, int i_mode,
(
i_mode
&
PLAYLIST_SPREPARSE
&&
(
i_mode
&
PLAYLIST_SPREPARSE
&&
(
EMPTY_STR
(
psz_artist
)
||
(
EMPTY_STR
(
psz_album
)
)
)
(
EMPTY_STR
(
psz_artist
)
||
(
EMPTY_STR
(
psz_album
)
)
)
)
)
)
)
)
)
playlist_PreparseEnqueue
(
p_playlist
,
p_item_cat
->
p_input
);
playlist_PreparseEnqueue
(
p_playlist
,
p_item_cat
->
p_input
,
pl_Locked
);
/* If we already have it, signal it */
/* If we already have it, signal it */
else
if
(
!
EMPTY_STR
(
psz_artist
)
&&
!
EMPTY_STR
(
psz_album
)
)
else
if
(
!
EMPTY_STR
(
psz_artist
)
&&
!
EMPTY_STR
(
psz_album
)
)
input_item_SetPreparsed
(
p_item_cat
->
p_input
,
true
);
input_item_SetPreparsed
(
p_item_cat
->
p_input
,
true
);
...
...
src/playlist/thread.c
View file @
52157ae3
...
@@ -298,7 +298,7 @@ static int PlayItem( playlist_t *p_playlist, playlist_item_t *p_item )
...
@@ -298,7 +298,7 @@ static int PlayItem( playlist_t *p_playlist, playlist_item_t *p_item )
if
(
!
b_has_art
||
strncmp
(
psz_arturl
,
"attachment://"
,
13
)
)
if
(
!
b_has_art
||
strncmp
(
psz_arturl
,
"attachment://"
,
13
)
)
{
{
PL_DEBUG
(
"requesting art for %s"
,
psz_name
);
PL_DEBUG
(
"requesting art for %s"
,
psz_name
);
playlist_AskForArtEnqueue
(
p_playlist
,
p_input
);
playlist_AskForArtEnqueue
(
p_playlist
,
p_input
,
pl_Locked
);
}
}
free
(
psz_arturl
);
free
(
psz_arturl
);
free
(
psz_name
);
free
(
psz_name
);
...
...
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