Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
0ba90548
Commit
0ba90548
authored
May 05, 2013
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move xiph metadata parsing to a .c|.h files couple
parent
178644a5
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
90 additions
and
38 deletions
+90
-38
modules/demux/Modules.am
modules/demux/Modules.am
+2
-2
modules/demux/flac.c
modules/demux/flac.c
+1
-1
modules/demux/ogg.c
modules/demux/ogg.c
+1
-1
modules/demux/xiph_metadata.c
modules/demux/xiph_metadata.c
+9
-32
modules/demux/xiph_metadata.h
modules/demux/xiph_metadata.h
+75
-0
modules/meta_engine/Modules.am
modules/meta_engine/Modules.am
+1
-1
modules/meta_engine/taglib.cpp
modules/meta_engine/taglib.cpp
+1
-1
No files found.
modules/demux/Modules.am
View file @
0ba90548
SOURCES_flacsys = flac.c
SOURCES_flacsys = flac.c
xiph_metadata.h xiph_metadata.c
SOURCES_ogg = ogg.c ogg.h oggseek.c oggseek.h
vorbis.h xiph.h
SOURCES_ogg = ogg.c ogg.h oggseek.c oggseek.h
xiph_metadata.h xiph.h xiph_metadata.c
SOURCES_demuxdump = demuxdump.c
SOURCES_demuxdump = demuxdump.c
SOURCES_rawdv = rawdv.c rawdv.h
SOURCES_rawdv = rawdv.c rawdv.h
SOURCES_rawvid = rawvid.c
SOURCES_rawvid = rawvid.c
...
...
modules/demux/flac.c
View file @
0ba90548
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
#include <vlc_charset.h>
/* EnsureUTF8 */
#include <vlc_charset.h>
/* EnsureUTF8 */
#include <assert.h>
#include <assert.h>
#include "
vorbis.h"
/* vorbis comments */
#include "
xiph_metadata.h"
/* vorbis comments */
/*****************************************************************************
/*****************************************************************************
* Module descriptor
* Module descriptor
...
...
modules/demux/ogg.c
View file @
0ba90548
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
#include <vlc_codecs.h>
#include <vlc_codecs.h>
#include <vlc_bits.h>
#include <vlc_bits.h>
#include "xiph.h"
#include "xiph.h"
#include "
vorbis
.h"
#include "
xiph_metadata
.h"
#include "ogg.h"
#include "ogg.h"
#include "oggseek.h"
#include "oggseek.h"
...
...
modules/demux/
vorbis.h
→
modules/demux/
xiph_metadata.c
View file @
0ba90548
/*****************************************************************************
/*****************************************************************************
*
vorbis
.h: Vorbis Comment parser
*
xiph_metadata
.h: Vorbis Comment parser
*****************************************************************************
*****************************************************************************
* Copyright © 2008-2013 VLC authors and VideoLAN
* Copyright © 2008-2013 VLC authors and VideoLAN
* $Id$
* $Id$
...
@@ -22,11 +22,17 @@
...
@@ -22,11 +22,17 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
*****************************************************************************/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <vlc_common.h>
#include <vlc_charset.h>
#include <vlc_charset.h>
#include <vlc_strings.h>
#include <vlc_strings.h>
#include <vlc_input.h>
#include <vlc_input.h>
#include "xiph_metadata.h"
static
input_attachment_t
*
ParseFlacPicture
(
const
uint8_t
*
p_data
,
int
i_data
,
input_attachment_t
*
ParseFlacPicture
(
const
uint8_t
*
p_data
,
int
i_data
,
int
i_attachments
,
int
*
i_cover_score
,
int
*
i_cover_idx
)
int
i_attachments
,
int
*
i_cover_score
,
int
*
i_cover_idx
)
{
{
/* TODO: Merge with ID3v2 copy in modules/meta_engine/taglib.cpp. */
/* TODO: Merge with ID3v2 copy in modules/meta_engine/taglib.cpp. */
...
@@ -106,7 +112,7 @@ error:
...
@@ -106,7 +112,7 @@ error:
return
p_attachment
;
return
p_attachment
;
}
}
static
inline
void
vorbis_ParseComment
(
vlc_meta_t
**
pp_meta
,
void
vorbis_ParseComment
(
vlc_meta_t
**
pp_meta
,
const
uint8_t
*
p_data
,
int
i_data
,
const
uint8_t
*
p_data
,
int
i_data
,
int
*
i_attachments
,
input_attachment_t
***
attachments
,
int
*
i_attachments
,
input_attachment_t
***
attachments
,
int
*
i_cover_score
,
int
*
i_cover_idx
,
int
*
i_cover_score
,
int
*
i_cover_idx
,
...
@@ -266,35 +272,6 @@ static inline void vorbis_ParseComment( vlc_meta_t **pp_meta,
...
@@ -266,35 +272,6 @@ static inline void vorbis_ParseComment( vlc_meta_t **pp_meta,
#undef RM
#undef RM
}
}
static
const
struct
{
const
char
*
psz_tag
;
const
char
*
psz_i18n
;
}
Katei18nCategories
[]
=
{
/* From Silvia's Mozilla list */
{
"CC"
,
N_
(
"Closed captions"
)
},
{
"SUB"
,
N_
(
"Subtitles"
)
},
{
"TAD"
,
N_
(
"Textual audio descriptions"
)
},
{
"KTV"
,
N_
(
"Karaoke"
)
},
{
"TIK"
,
N_
(
"Ticker text"
)
},
{
"AR"
,
N_
(
"Active regions"
)
},
{
"NB"
,
N_
(
"Semantic annotations"
)
},
{
"META"
,
N_
(
"Metadata"
)
},
{
"TRX"
,
N_
(
"Transcript"
)
},
{
"LRC"
,
N_
(
"Lyrics"
)
},
{
"LIN"
,
N_
(
"Linguistic markup"
)
},
{
"CUE"
,
N_
(
"Cue points"
)
},
/* Grandfathered */
{
"subtitles"
,
N_
(
"Subtitles"
)
},
{
"spu-subtitles"
,
N_
(
"Subtitles (images)"
)
},
{
"lyrics"
,
N_
(
"Lyrics"
)
},
/* Kate specific */
{
"K-SPU"
,
N_
(
"Subtitles (images)"
)
},
{
"K-SLD-T"
,
N_
(
"Slides (text)"
)
},
{
"K-SLD-I"
,
N_
(
"Slides (images)"
)
},
};
const
char
*
FindKateCategoryName
(
const
char
*
psz_tag
)
const
char
*
FindKateCategoryName
(
const
char
*
psz_tag
)
{
{
for
(
size_t
i
=
0
;
i
<
sizeof
(
Katei18nCategories
)
/
sizeof
(
Katei18nCategories
[
0
]);
i
++
)
for
(
size_t
i
=
0
;
i
<
sizeof
(
Katei18nCategories
)
/
sizeof
(
Katei18nCategories
[
0
]);
i
++
)
...
...
modules/demux/xiph_metadata.h
0 → 100644
View file @
0ba90548
/*****************************************************************************
* xiph_metadata.h: Vorbis Comment parser
*****************************************************************************
* Copyright © 2008-2013 VLC authors and VideoLAN
* $Id$
*
* Authors: Laurent Aimar <fenrir _AT_ videolan _DOT_ org>
* Jean-Baptiste Kempf <jb@videolan.org>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#include <vlc_charset.h>
#include <vlc_strings.h>
# ifdef __cplusplus
extern
"C"
{
# endif
input_attachment_t
*
ParseFlacPicture
(
const
uint8_t
*
p_data
,
int
i_data
,
int
i_attachments
,
int
*
i_cover_score
,
int
*
i_cover_idx
);
void
vorbis_ParseComment
(
vlc_meta_t
**
pp_meta
,
const
uint8_t
*
p_data
,
int
i_data
,
int
*
i_attachments
,
input_attachment_t
***
attachments
,
int
*
i_cover_score
,
int
*
i_cover_idx
,
int
*
i_seekpoint
,
seekpoint_t
***
ppp_seekpoint
);
static
const
struct
{
const
char
*
psz_tag
;
const
char
*
psz_i18n
;
}
Katei18nCategories
[]
=
{
/* From Silvia's Mozilla list */
{
"CC"
,
N_
(
"Closed captions"
)
},
{
"SUB"
,
N_
(
"Subtitles"
)
},
{
"TAD"
,
N_
(
"Textual audio descriptions"
)
},
{
"KTV"
,
N_
(
"Karaoke"
)
},
{
"TIK"
,
N_
(
"Ticker text"
)
},
{
"AR"
,
N_
(
"Active regions"
)
},
{
"NB"
,
N_
(
"Semantic annotations"
)
},
{
"META"
,
N_
(
"Metadata"
)
},
{
"TRX"
,
N_
(
"Transcript"
)
},
{
"LRC"
,
N_
(
"Lyrics"
)
},
{
"LIN"
,
N_
(
"Linguistic markup"
)
},
{
"CUE"
,
N_
(
"Cue points"
)
},
/* Grandfathered */
{
"subtitles"
,
N_
(
"Subtitles"
)
},
{
"spu-subtitles"
,
N_
(
"Subtitles (images)"
)
},
{
"lyrics"
,
N_
(
"Lyrics"
)
},
/* Kate specific */
{
"K-SPU"
,
N_
(
"Subtitles (images)"
)
},
{
"K-SLD-T"
,
N_
(
"Slides (text)"
)
},
{
"K-SLD-I"
,
N_
(
"Slides (images)"
)
},
};
const
char
*
FindKateCategoryName
(
const
char
*
psz_tag
);
# ifdef __cplusplus
}
# endif
modules/meta_engine/Modules.am
View file @
0ba90548
SOURCES_folder = folder.c
SOURCES_folder = folder.c
SOURCES_taglib = taglib.cpp
SOURCES_taglib = taglib.cpp
../demux/xiph_metadata.h ../demux/xiph_metadata.c
libvlc_LTLIBRARIES += \
libvlc_LTLIBRARIES += \
libfolder_plugin.la
libfolder_plugin.la
modules/meta_engine/taglib.cpp
View file @
0ba90548
...
@@ -75,7 +75,7 @@
...
@@ -75,7 +75,7 @@
#include <mpegfile.h>
#include <mpegfile.h>
#include <oggfile.h>
#include <oggfile.h>
#include <oggflacfile.h>
#include <oggflacfile.h>
#include "../demux/
vorbis
.h"
#include "../demux/
xiph_metadata
.h"
#include <aifffile.h>
#include <aifffile.h>
#include <wavfile.h>
#include <wavfile.h>
...
...
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