[vlc-commits] Add support for writing more Ogg tags.
Timothy B. Terriberry
git at videolan.org
Tue Sep 3 11:29:21 CEST 2013
vlc | branch: master | Timothy B. Terriberry <tterribe at xiph.org> | Mon Sep 2 08:50:52 2013 -0700| [c9c4f8cfc96525917e04fe7664033dfc3877baa8] | committer: Jean-Baptiste Kempf
Add support for writing more Ogg tags.
This propagates more of the data between a vlc_meta_t object and
the taglib object used to write out new metadata. This should
support everything except Setting, URL, NowPlaying, ArtworkURL, and
TrackID.
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c9c4f8cfc96525917e04fe7664033dfc3877baa8
---
include/vlc_meta.h | 1 +
modules/meta_engine/taglib.cpp | 13 +++++++++++++
2 files changed, 14 insertions(+)
diff --git a/include/vlc_meta.h b/include/vlc_meta.h
index db9f58a..388a322 100644
--- a/include/vlc_meta.h
+++ b/include/vlc_meta.h
@@ -125,6 +125,7 @@ VLC_API int input_item_WriteMeta(vlc_object_t *, input_item_t *);
#define vlc_meta_SetEncodedBy( meta, b ) vlc_meta_Set( meta, vlc_meta_EncodedBy, b )
#define vlc_meta_SetArtURL( meta, b ) vlc_meta_Set( meta, vlc_meta_ArtworkURL, b )
#define vlc_meta_SetTrackID( meta, b ) vlc_meta_Set( meta, vlc_meta_TrackID, b )
+#define vlc_meta_SetTrackTotal( meta, b ) vlc_meta_Set( meta, vlc_meta_TrackTotal, b )
#define VLC_META_TITLE vlc_meta_TypeToLocalizedString( vlc_meta_Title )
#define VLC_META_ARTIST vlc_meta_TypeToLocalizedString( vlc_meta_Artist )
diff --git a/modules/meta_engine/taglib.cpp b/modules/meta_engine/taglib.cpp
index 1be894c..577c96f 100644
--- a/modules/meta_engine/taglib.cpp
+++ b/modules/meta_engine/taglib.cpp
@@ -434,7 +434,13 @@ static void ReadMetaFromXiph( Ogg::XiphComment* tag, demux_meta_t* p_demux_meta,
if( !list.isEmpty() ) \
vlc_meta_Set##metaName( p_meta, (*list.begin()).toCString( true ) );
+ SET( "TRACKTOTAL", TrackTotal );
SET( "COPYRIGHT", Copyright );
+ SET( "ORGANIZATION", Publisher );
+ SET( "DATE", Date );
+ SET( "ENCODER", EncodedBy );
+ SET( "RATING", Rating );
+ SET( "LANGUAGE", Language );
#undef SET
// Try now to get embedded art
@@ -846,7 +852,14 @@ static void WriteMetaToXiph( Ogg::XiphComment* tag, input_item_t* p_item )
} \
free( psz_meta );
+ WRITE( TrackNum, "TRACKNUMBER" );
+ WRITE( TrackTotal, "TRACKTOTAL" );
WRITE( Copyright, "COPYRIGHT" );
+ WRITE( Publisher, "ORGANIZATION" );
+ WRITE( Date, "DATE" );
+ WRITE( EncodedBy, "ENCODER" );
+ WRITE( Rating, "RATING" );
+ WRITE( Language, "LANGUAGE" );
#undef WRITE
}
More information about the vlc-commits
mailing list