[vlc-commits] Merge Kate metadata into vorbis.h

Jean-Baptiste Kempf git at videolan.org
Sun May 5 20:28:57 CEST 2013


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun May  5 20:10:47 2013 +0200| [178644a587bfb6992d37f1da62224dd2c51b8dae] | committer: Jean-Baptiste Kempf

Merge Kate metadata into vorbis.h

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=178644a587bfb6992d37f1da62224dd2c51b8dae
---

 modules/demux/Modules.am        |    3 +-
 modules/demux/kate_categories.c |   76 ---------------------------------------
 modules/demux/kate_categories.h |   30 ----------------
 modules/demux/ogg.c             |    1 -
 modules/demux/vorbis.h          |   39 ++++++++++++++++++++
 5 files changed, 40 insertions(+), 109 deletions(-)

diff --git a/modules/demux/Modules.am b/modules/demux/Modules.am
index 4347197..b52c988 100644
--- a/modules/demux/Modules.am
+++ b/modules/demux/Modules.am
@@ -1,6 +1,5 @@
 SOURCES_flacsys = flac.c
-SOURCES_ogg = ogg.c ogg.h oggseek.c oggseek.h vorbis.h kate_categories.c \
-	kate_categories.h xiph.h
+SOURCES_ogg = ogg.c ogg.h oggseek.c oggseek.h vorbis.h xiph.h
 SOURCES_demuxdump = demuxdump.c
 SOURCES_rawdv = rawdv.c rawdv.h
 SOURCES_rawvid = rawvid.c
diff --git a/modules/demux/kate_categories.c b/modules/demux/kate_categories.c
deleted file mode 100644
index ad71f8a..0000000
--- a/modules/demux/kate_categories.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/*****************************************************************************
- * kate_categories.c : maps well known category tags to translated strings.
- *****************************************************************************
- * Copyright (C) 2009 ogg.k.ogg.k at googlemail.com
- * $Id$
- *
- * Authors: ogg.k.ogg.k at googlemail.com
- *
- * 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.
- *****************************************************************************/
-
-/*****************************************************************************
- * Preamble
- *****************************************************************************/
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <stddef.h>
-#include <string.h>
-#include "kate_categories.h"
-
-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 )
-{
-    size_t i;
-
-    for( i = 0; i < sizeof(Katei18nCategories)/sizeof(Katei18nCategories[0]); i++ )
-    {
-        if( !strcmp( psz_tag, Katei18nCategories[i].psz_tag ) )
-            return Katei18nCategories[i].psz_i18n;
-    }
-    return N_("Unknown category");
-}
-
-
diff --git a/modules/demux/kate_categories.h b/modules/demux/kate_categories.h
deleted file mode 100644
index faddf42..0000000
--- a/modules/demux/kate_categories.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/*****************************************************************************
- * kate_categories.h : maps well known category tags to translated strings.
- *****************************************************************************
- * Copyright (C) 2009 ogg.k.ogg.k at googlemail.com
- * $Id$
- *
- * Authors: ogg.k.ogg.k at googlemail.com
- *
- * 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.
- *****************************************************************************/
-
-#ifndef KATE_CATEGORIES_H_
-#define KATE_CATEGORIES_H_ 1
-
-const char *FindKateCategoryName( const char *psz_tag );
-
-#endif
-
diff --git a/modules/demux/ogg.c b/modules/demux/ogg.c
index 8afaeb6..40f7161 100644
--- a/modules/demux/ogg.c
+++ b/modules/demux/ogg.c
@@ -41,7 +41,6 @@
 #include <vlc_bits.h>
 #include "xiph.h"
 #include "vorbis.h"
-#include "kate_categories.h"
 #include "ogg.h"
 #include "oggseek.h"
 
diff --git a/modules/demux/vorbis.h b/modules/demux/vorbis.h
index cc2d157..379bd95 100644
--- a/modules/demux/vorbis.h
+++ b/modules/demux/vorbis.h
@@ -266,3 +266,42 @@ static inline void vorbis_ParseComment( vlc_meta_t **pp_meta,
 #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 )
+{
+    for( size_t i = 0; i < sizeof(Katei18nCategories)/sizeof(Katei18nCategories[0]); i++ )
+    {
+        if( !strcmp( psz_tag, Katei18nCategories[i].psz_tag ) )
+            return Katei18nCategories[i].psz_i18n;
+    }
+    return N_("Unknown category");
+}
+



More information about the vlc-commits mailing list