Commit c9c4f8cf authored by Timothy B. Terriberry's avatar Timothy B. Terriberry Committed by 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: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent cbae8d3b
......@@ -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 )
......
......@@ -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
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment