[vlc-commits] Add support for updating Opus metadata.

Timothy B. Terriberry git at videolan.org
Mon Sep 2 20:45:07 CEST 2013


vlc | branch: master | Timothy B. Terriberry <tterribe at xiph.org> | Mon Sep  2 07:53:37 2013 -0700| [a27cd70ce8a6b62b153dae2a185d088b0aff0967] | committer: Jean-Baptiste Kempf

Add support for updating Opus metadata.

This requires a taglib version with Opus support, but such a
version has not yet been released, even though support has been in
git almost a year. This version is scheduled as version 1.9

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/meta_engine/taglib.cpp |   12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/modules/meta_engine/taglib.cpp b/modules/meta_engine/taglib.cpp
index 62c30dd..1be894c 100644
--- a/modules/meta_engine/taglib.cpp
+++ b/modules/meta_engine/taglib.cpp
@@ -69,6 +69,10 @@
 # endif
 #endif
 
+#if TAGLIB_VERSION >= VERSION_INT(1,9,0)
+# include <opusfile.h>
+#endif
+
 #include <apetag.h>
 #include <flacfile.h>
 #include <mpcfile.h>
@@ -643,6 +647,10 @@ static int ReadMeta( vlc_object_t* p_this)
             ReadMetaFromXiph( ogg_speex->tag(), p_demux_meta, p_meta );
         else if( Ogg::Vorbis::File* ogg_vorbis = dynamic_cast<Ogg::Vorbis::File*>(f.file()) )
             ReadMetaFromXiph( ogg_vorbis->tag(), p_demux_meta, p_meta );
+#if defined(TAGLIB_OPUSFILE_H)
+        else if( Ogg::Opus::File* ogg_opus = dynamic_cast<Ogg::Opus::File*>(f.file()) )
+            ReadMetaFromXiph( ogg_opus->tag(), p_demux_meta, p_meta );
+#endif
     }
     else if( dynamic_cast<RIFF::File*>(f.file()) )
     {
@@ -952,6 +960,10 @@ static int WriteMeta( vlc_object_t *p_this )
             WriteMetaToXiph( ogg_speex->tag(), p_item );
         else if( Ogg::Vorbis::File* ogg_vorbis = dynamic_cast<Ogg::Vorbis::File*>(f.file()) )
             WriteMetaToXiph( ogg_vorbis->tag(), p_item );
+#if defined(TAGLIB_OPUSFILE_H)
+        else if( Ogg::Opus::File* ogg_opus = dynamic_cast<Ogg::Opus::File*>(f.file()) )
+            WriteMetaToXiph( ogg_opus->tag(), p_item );
+#endif
     }
     else if( dynamic_cast<RIFF::File*>(f.file()) )
     {



More information about the vlc-commits mailing list