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
f17e985a
Commit
f17e985a
authored
Sep 24, 2006
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Skeleton for taglib art downloader and tags writer
parent
937b6249
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
1 deletion
+42
-1
include/vlc_common.h
include/vlc_common.h
+1
-0
include/vlc_meta.h
include/vlc_meta.h
+6
-0
modules/meta_engine/taglib.cpp
modules/meta_engine/taglib.cpp
+35
-1
No files found.
include/vlc_common.h
View file @
f17e985a
...
...
@@ -431,6 +431,7 @@ typedef struct vlm_schedule_t vlm_schedule_t;
/* divers */
typedef
struct
vlc_meta_t
vlc_meta_t
;
typedef
struct
meta_export_t
meta_export_t
;
/* Stats */
typedef
struct
counter_t
counter_t
;
...
...
include/vlc_meta.h
View file @
f17e985a
...
...
@@ -185,4 +185,10 @@ enum {
ALBUM_ART_WHEN_PLAYED
,
ALBUM_ART_ALL
};
struct
meta_export_t
{
input_item_t
*
p_item
;
const
char
*
psz_file
;
};
#endif
modules/meta_engine/taglib.cpp
View file @
f17e985a
...
...
@@ -30,11 +30,19 @@
#include <mpegfile.h>
#include <flacfile.h>
static
int
ReadMeta
(
vlc_object_t
*
);
static
int
ReadMeta
(
vlc_object_t
*
);
static
int
DownloadArt
(
vlc_object_t
*
);
static
int
WriteMeta
(
vlc_object_t
*
);
vlc_module_begin
();
set_capability
(
"meta reader"
,
1000
);
set_callbacks
(
ReadMeta
,
NULL
);
add_submodule
();
set_capability
(
"art downloader"
,
50
);
set_callbacks
(
DownloadArt
,
NULL
);
add_submodule
();
set_capability
(
"meta writer"
,
50
);
set_callbacks
(
WriteMeta
,
NULL
);
vlc_module_end
();
static
bool
checkID3Image
(
const
TagLib
::
ID3v2
::
Tag
*
tag
)
...
...
@@ -101,3 +109,29 @@ static int ReadMeta( vlc_object_t *p_this )
}
return
VLC_EGENERIC
;
}
static
int
WriteMeta
(
vlc_object_t
*
p_this
)
{
playlist_t
*
p_playlist
=
(
playlist_t
*
)
p_this
;
meta_export_t
*
p_export
=
(
meta_export_t
*
)
p_playlist
->
p_private
;
input_item_t
*
p_item
=
p_export
->
p_item
;
TagLib
::
FileRef
f
(
p_export
->
psz_file
);
if
(
!
f
.
isNull
()
&&
f
.
tag
()
)
{
TagLib
::
Tag
*
tag
=
f
.
tag
();
tag
->
setArtist
(
p_item
->
p_meta
->
psz_artist
);
f
.
save
();
return
VLC_SUCCESS
;
}
return
VLC_EGENERIC
;
}
static
int
DownloadArt
(
vlc_object_t
*
p_this
)
{
/* We need to be passed the file name
* Fetch the thing from the file, save it to the cache folder
*/
return
VLC_EGENERIC
;
}
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