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
57333f59
Commit
57333f59
authored
Jun 04, 2011
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
taglib: read wma covert arts.
parent
932aae73
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
67 additions
and
3 deletions
+67
-3
modules/meta_engine/taglib.cpp
modules/meta_engine/taglib.cpp
+67
-3
No files found.
modules/meta_engine/taglib.cpp
View file @
57333f59
...
@@ -63,6 +63,13 @@
...
@@ -63,6 +63,13 @@
# define TAGLIB_HAVE_APEFILE_H
# define TAGLIB_HAVE_APEFILE_H
# include <apefile.h>
# include <apefile.h>
#endif
#endif
#ifdef TAGLIB_WITH_ASF
# include <asffile.h>
# include <asftag.h>
# include <asfattribute.h>
#endif
#include <flacfile.h>
#include <flacfile.h>
#include <mpcfile.h>
#include <mpcfile.h>
#include <mpegfile.h>
#include <mpegfile.h>
...
@@ -70,7 +77,7 @@
...
@@ -70,7 +77,7 @@
#include <oggflacfile.h>
#include <oggflacfile.h>
#if TAGLIB_VERSION >= VERSION_INT(1,6,0)
#if TAGLIB_VERSION >= VERSION_INT(1,6,0)
# define TAGLIB_HAVE_
R
IFF_WAV_H
# define TAGLIB_HAVE_
A
IFF_WAV_H
# include <aifffile.h>
# include <aifffile.h>
# include <wavfile.h>
# include <wavfile.h>
#endif
#endif
...
@@ -127,6 +134,55 @@ static void ReadMetaFromAPE( APE::Tag* tag, demux_meta_t*, vlc_meta_t* p_meta )
...
@@ -127,6 +134,55 @@ static void ReadMetaFromAPE( APE::Tag* tag, demux_meta_t*, vlc_meta_t* p_meta )
}
}
#ifdef TAGLIB_WITH_ASF
/**
* Read meta information from APE tags
* @param tag: the APE tag
* @param p_demux_meta: the demuxer meta
* @param p_meta: the meta
*/
static
void
ReadMetaFromASF
(
ASF
::
Tag
*
tag
,
demux_meta_t
*
p_demux_meta
,
vlc_meta_t
*
p_meta
)
{
// List the pictures
ASF
::
AttributeList
list
=
tag
->
attributeListMap
()[
"WM/Picture"
];
ASF
::
AttributeList
::
Iterator
iter
;
for
(
iter
=
list
.
begin
();
iter
!=
list
.
end
();
iter
++
)
{
const
ASF
::
Picture
asfPicture
=
(
*
iter
).
toPicture
();
const
ByteVector
picture
=
asfPicture
.
picture
();
const
char
*
psz_mime
=
asfPicture
.
mimeType
().
toCString
();
const
char
*
p_data
=
picture
.
data
();
const
unsigned
i_data
=
picture
.
size
();
char
*
psz_name
;
input_attachment_t
*
p_attachment
;
if
(
asfPicture
.
description
().
size
()
>
0
)
psz_name
=
strdup
(
asfPicture
.
description
().
toCString
(
true
)
);
else
{
if
(
asprintf
(
&
psz_name
,
"%i"
,
asfPicture
.
type
()
)
==
-
1
)
continue
;
}
p_attachment
=
vlc_input_attachment_New
(
psz_name
,
psz_mime
,
psz_name
,
p_data
,
i_data
);
if
(
p_attachment
)
TAB_APPEND_CAST
(
(
input_attachment_t
**
),
p_demux_meta
->
i_attachments
,
p_demux_meta
->
attachments
,
p_attachment
);
free
(
psz_name
);
char
*
psz_url
;
if
(
asprintf
(
&
psz_url
,
"attachment://%s"
,
p_attachment
->
psz_name
)
==
-
1
)
continue
;
vlc_meta_SetArtURL
(
p_meta
,
psz_url
);
free
(
psz_url
);
}
}
#endif
/**
/**
* Read meta information from id3v2 tags
* Read meta information from id3v2 tags
* @param tag: the id3v2 tag
* @param tag: the id3v2 tag
...
@@ -459,6 +515,14 @@ static int ReadMeta( vlc_object_t* p_this)
...
@@ -459,6 +515,14 @@ static int ReadMeta( vlc_object_t* p_this)
ReadMetaFromAPE
(
ape
->
APETag
(),
p_demux_meta
,
p_meta
);
ReadMetaFromAPE
(
ape
->
APETag
(),
p_demux_meta
,
p_meta
);
}
}
else
else
#endif
#ifdef TAGLIB_WITH_ASF
if
(
ASF
::
File
*
asf
=
dynamic_cast
<
ASF
::
File
*>
(
f
.
file
())
)
{
if
(
asf
->
tag
()
)
ReadMetaFromASF
(
asf
->
tag
(),
p_demux_meta
,
p_meta
);
}
else
#endif
#endif
if
(
FLAC
::
File
*
flac
=
dynamic_cast
<
FLAC
::
File
*>
(
f
.
file
())
)
if
(
FLAC
::
File
*
flac
=
dynamic_cast
<
FLAC
::
File
*>
(
f
.
file
())
)
{
{
...
@@ -495,7 +559,7 @@ static int ReadMeta( vlc_object_t* p_this)
...
@@ -495,7 +559,7 @@ static int ReadMeta( vlc_object_t* p_this)
else
if
(
Ogg
::
Vorbis
::
File
*
ogg_vorbis
=
dynamic_cast
<
Ogg
::
Vorbis
::
File
*>
(
f
.
file
())
)
else
if
(
Ogg
::
Vorbis
::
File
*
ogg_vorbis
=
dynamic_cast
<
Ogg
::
Vorbis
::
File
*>
(
f
.
file
())
)
ReadMetaFromXiph
(
ogg_vorbis
->
tag
(),
p_demux_meta
,
p_meta
);
ReadMetaFromXiph
(
ogg_vorbis
->
tag
(),
p_demux_meta
,
p_meta
);
}
}
#ifdef TAGLIB_HAVE_
R
IFF_WAV_H
#ifdef TAGLIB_HAVE_
A
IFF_WAV_H
else
if
(
dynamic_cast
<
RIFF
::
File
*>
(
f
.
file
())
)
else
if
(
dynamic_cast
<
RIFF
::
File
*>
(
f
.
file
())
)
{
{
if
(
RIFF
::
AIFF
::
File
*
riff_aiff
=
dynamic_cast
<
RIFF
::
AIFF
::
File
*>
(
f
.
file
())
)
if
(
RIFF
::
AIFF
::
File
*
riff_aiff
=
dynamic_cast
<
RIFF
::
AIFF
::
File
*>
(
f
.
file
())
)
...
@@ -710,7 +774,7 @@ static int WriteMeta( vlc_object_t *p_this )
...
@@ -710,7 +774,7 @@ static int WriteMeta( vlc_object_t *p_this )
else
if
(
Ogg
::
Vorbis
::
File
*
ogg_vorbis
=
dynamic_cast
<
Ogg
::
Vorbis
::
File
*>
(
f
.
file
())
)
else
if
(
Ogg
::
Vorbis
::
File
*
ogg_vorbis
=
dynamic_cast
<
Ogg
::
Vorbis
::
File
*>
(
f
.
file
())
)
WriteMetaToXiph
(
ogg_vorbis
->
tag
(),
p_item
);
WriteMetaToXiph
(
ogg_vorbis
->
tag
(),
p_item
);
}
}
#ifdef TAGLIB_HAVE_
R
IFF_WAV_H
#ifdef TAGLIB_HAVE_
A
IFF_WAV_H
else
if
(
dynamic_cast
<
RIFF
::
File
*>
(
f
.
file
())
)
else
if
(
dynamic_cast
<
RIFF
::
File
*>
(
f
.
file
())
)
{
{
if
(
RIFF
::
AIFF
::
File
*
riff_aiff
=
dynamic_cast
<
RIFF
::
AIFF
::
File
*>
(
f
.
file
())
)
if
(
RIFF
::
AIFF
::
File
*
riff_aiff
=
dynamic_cast
<
RIFF
::
AIFF
::
File
*>
(
f
.
file
())
)
...
...
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