vlc_linux/vlc-3.0.16/modules/meta_engine/taglib.cpp
/**
 * Write meta information to APE tags
 * @param tag: the APE tag
 * @param p_item: the input item
 */
Write meta information to APE tags
@param tag: the APE tag
@param p_item: the input item
Write meta information to APE tags @param tag : the APE tag @param p_item : the input item
static void WriteMetaToAPE( APE::Tag* tag, input_item_t* p_item )
{
    char* psz_meta;
#define WRITE( metaName, keyName )                      \
    psz_meta = input_item_Get##metaName( p_item );      \
    if( psz_meta )                                      \
    {                                                   \
        String key( keyName, String::UTF8 );            \
        String value( psz_meta, String::UTF8 );         \
        tag->addValue( key, value, true );              \
    }                                                   \
    free( psz_meta );
    WRITE( Copyright, "COPYRIGHT" );
    WRITE( Language, "LANGUAGE" );
    WRITE( Publisher, "PUBLISHER" );
    WRITE( TrackID, "MUSICBRAINZ_TRACKID" );
#undef WRITE
}
static void WriteMetaToAPE ( APE :: Tag * tag , input_item_t * p_item ) { char * psz_meta ; #define WRITE ( metaName , keyName )                       \
    psz_meta = input_item_Get##metaName( p_item );      \
    if( psz_meta )                                      \
    {                                                   \
        String key( keyName, String::UTF8 );            \
        String value( psz_meta, String::UTF8 );         \
        tag->addValue( key, value, true );              \
    }                                                   \
    free( psz_meta ); WRITE ( Copyright , " " ) ; WRITE ( Language , " " ) ; WRITE ( Publisher , " " ) ; WRITE ( TrackID , " " ) ; #undef  WRITE }
Write meta information to APE tags
 @param tag: the APE tag
 @param p_item: the input item
Write meta information to APE tags @param tag : the APE tag @param p_item : the input item