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
ab0e40f0
Commit
ab0e40f0
authored
Dec 22, 2008
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not access internal fetcher data from playlist and preparser.
parent
3842395a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
6 deletions
+9
-6
src/playlist/control.c
src/playlist/control.c
+2
-2
src/playlist/preparser.c
src/playlist/preparser.c
+5
-2
src/playlist/preparser.h
src/playlist/preparser.h
+2
-2
No files found.
src/playlist/control.c
View file @
ab0e40f0
...
@@ -480,8 +480,8 @@ int playlist_PlayItem( playlist_t *p_playlist, playlist_item_t *p_item )
...
@@ -480,8 +480,8 @@ int playlist_PlayItem( playlist_t *p_playlist, playlist_item_t *p_item )
}
}
free
(
psz_uri
);
free
(
psz_uri
);
/*
FIXME remove access to fetcher
private data */
/*
TODO store art policy in playlist
private data */
if
(
pl_priv
(
p_playlist
)
->
p_fetcher
->
i_art_policy
==
ALBUM_ART_WHEN_PLAYED
)
if
(
var_GetInteger
(
p_playlist
,
"album-art"
)
==
ALBUM_ART_WHEN_PLAYED
)
{
{
bool
b_has_art
;
bool
b_has_art
;
...
...
src/playlist/preparser.c
View file @
ab0e40f0
...
@@ -47,6 +47,8 @@ struct playlist_preparser_t
...
@@ -47,6 +47,8 @@ struct playlist_preparser_t
vlc_cond_t
wait
;
vlc_cond_t
wait
;
input_item_t
**
pp_waiting
;
input_item_t
**
pp_waiting
;
int
i_waiting
;
int
i_waiting
;
int
i_art_policy
;
};
};
static
void
*
Thread
(
void
*
);
static
void
*
Thread
(
void
*
);
...
@@ -64,6 +66,7 @@ playlist_preparser_t *playlist_preparser_New( playlist_t *p_playlist, playlist_f
...
@@ -64,6 +66,7 @@ playlist_preparser_t *playlist_preparser_New( playlist_t *p_playlist, playlist_f
p_preparser
->
p_fetcher
=
p_fetcher
;
p_preparser
->
p_fetcher
=
p_fetcher
;
vlc_mutex_init
(
&
p_preparser
->
lock
);
vlc_mutex_init
(
&
p_preparser
->
lock
);
vlc_cond_init
(
&
p_preparser
->
wait
);
vlc_cond_init
(
&
p_preparser
->
wait
);
p_preparser
->
i_art_policy
=
var_GetInteger
(
p_playlist
,
"album-art"
);
p_preparser
->
i_waiting
=
0
;
p_preparser
->
i_waiting
=
0
;
p_preparser
->
pp_waiting
=
NULL
;
p_preparser
->
pp_waiting
=
NULL
;
...
@@ -154,7 +157,7 @@ static void Art( playlist_preparser_t *p_preparser, input_item_t *p_item )
...
@@ -154,7 +157,7 @@ static void Art( playlist_preparser_t *p_preparser, input_item_t *p_item )
const
char
*
psz_arturl
=
vlc_meta_Get
(
p_item
->
p_meta
,
vlc_meta_ArtworkURL
);
const
char
*
psz_arturl
=
vlc_meta_Get
(
p_item
->
p_meta
,
vlc_meta_ArtworkURL
);
const
char
*
psz_name
=
vlc_meta_Get
(
p_item
->
p_meta
,
vlc_meta_Title
);
const
char
*
psz_name
=
vlc_meta_Get
(
p_item
->
p_meta
,
vlc_meta_Title
);
if
(
p_
fetcher
&&
p_fetch
er
->
i_art_policy
==
ALBUM_ART_ALL
&&
if
(
p_
prepars
er
->
i_art_policy
==
ALBUM_ART_ALL
&&
(
!
psz_arturl
||
strncmp
(
psz_arturl
,
"file://"
,
7
)
)
)
(
!
psz_arturl
||
strncmp
(
psz_arturl
,
"file://"
,
7
)
)
)
{
{
msg_Dbg
(
p_playlist
,
"meta ok for %s, need to fetch art"
,
psz_name
);
msg_Dbg
(
p_playlist
,
"meta ok for %s, need to fetch art"
,
psz_name
);
...
@@ -168,7 +171,7 @@ static void Art( playlist_preparser_t *p_preparser, input_item_t *p_item )
...
@@ -168,7 +171,7 @@ static void Art( playlist_preparser_t *p_preparser, input_item_t *p_item )
}
}
vlc_mutex_unlock
(
&
p_item
->
lock
);
vlc_mutex_unlock
(
&
p_item
->
lock
);
if
(
b_fetch
)
if
(
b_fetch
&&
p_fetcher
)
playlist_fetcher_Push
(
p_fetcher
,
p_item
);
playlist_fetcher_Push
(
p_fetcher
,
p_item
);
}
}
...
...
src/playlist/preparser.h
View file @
ab0e40f0
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
* Preparser opaque structure.
* Preparser opaque structure.
*
*
* The preparser object will retreive the meta data of any given input item in
* The preparser object will retreive the meta data of any given input item in
* an asynchron
i
ous way.
* an asynchronous way.
* It will also issue art fetching requests.
* It will also issue art fetching requests.
*/
*/
typedef
struct
playlist_preparser_t
playlist_preparser_t
;
typedef
struct
playlist_preparser_t
playlist_preparser_t
;
...
@@ -48,7 +48,7 @@ playlist_preparser_t *playlist_preparser_New( playlist_t *, playlist_fetcher_t *
...
@@ -48,7 +48,7 @@ playlist_preparser_t *playlist_preparser_New( playlist_t *, playlist_fetcher_t *
void
playlist_preparser_Push
(
playlist_preparser_t
*
,
input_item_t
*
);
void
playlist_preparser_Push
(
playlist_preparser_t
*
,
input_item_t
*
);
/**
/**
* This function destroy the preparser object and thread.
* This function destroy
s
the preparser object and thread.
*
*
* All pending input items will be released.
* All pending input items will be released.
*/
*/
...
...
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