mirror of
https://github.com/videolan/vlc.git
synced 2024-11-23 09:53:43 +08:00
meta: vlc_meta_AddExtra() rename to vlc_meta_SetExtra()
This commit is contained in:
parent
622e9d913c
commit
c10af532f2
@ -76,7 +76,15 @@ VLC_API void vlc_meta_Delete( vlc_meta_t *m );
|
||||
VLC_API void vlc_meta_Set( vlc_meta_t *p_meta, vlc_meta_type_t meta_type, const char *psz_val );
|
||||
VLC_API const char * vlc_meta_Get( const vlc_meta_t *p_meta, vlc_meta_type_t meta_type );
|
||||
|
||||
VLC_API void vlc_meta_AddExtra( vlc_meta_t *m, const char *psz_name, const char *psz_value );
|
||||
/**
|
||||
* set the meta extra
|
||||
*
|
||||
* \param m vlc_meta_t
|
||||
* \param psz_name meta extra name (nonnullable)
|
||||
* \param psz_value meta extra value (nullable)
|
||||
* Removed from meta extra if set to NULL
|
||||
*/
|
||||
VLC_API void vlc_meta_SetExtra( vlc_meta_t *m, const char *psz_name, const char *psz_value );
|
||||
VLC_API const char * vlc_meta_GetExtra( const vlc_meta_t *m, const char *psz_name );
|
||||
VLC_API unsigned vlc_meta_GetExtraCount( const vlc_meta_t *m );
|
||||
|
||||
|
@ -2573,12 +2573,12 @@ static int blurayControl(demux_t *p_demux, int query, va_list args)
|
||||
|
||||
if (!EMPTY_STR(meta->di_name)) vlc_meta_SetTitle(p_meta, meta->di_name);
|
||||
|
||||
if (!EMPTY_STR(meta->language_code)) vlc_meta_AddExtra(p_meta, "Language", meta->language_code);
|
||||
if (!EMPTY_STR(meta->filename)) vlc_meta_AddExtra(p_meta, "Filename", meta->filename);
|
||||
if (!EMPTY_STR(meta->di_alternative)) vlc_meta_AddExtra(p_meta, "Alternative", meta->di_alternative);
|
||||
if (!EMPTY_STR(meta->language_code)) vlc_meta_SetExtra(p_meta, "Language", meta->language_code);
|
||||
if (!EMPTY_STR(meta->filename)) vlc_meta_SetExtra(p_meta, "Filename", meta->filename);
|
||||
if (!EMPTY_STR(meta->di_alternative)) vlc_meta_SetExtra(p_meta, "Alternative", meta->di_alternative);
|
||||
|
||||
// if (meta->di_set_number > 0) vlc_meta_SetTrackNum(p_meta, meta->di_set_number);
|
||||
// if (meta->di_num_sets > 0) vlc_meta_AddExtra(p_meta, "Discs numbers in Set", meta->di_num_sets);
|
||||
// if (meta->di_num_sets > 0) vlc_meta_SetExtra(p_meta, "Discs numbers in Set", meta->di_num_sets);
|
||||
|
||||
if (p_sys->i_cover_idx >= 0 && p_sys->i_cover_idx < p_sys->i_attachments) {
|
||||
char psz_url[128];
|
||||
|
@ -851,13 +851,13 @@ static int ReadDir(stream_t *access, input_item_node_t *node)
|
||||
input_item_SetAlbum(item, album);
|
||||
|
||||
if (NONEMPTY(author))
|
||||
vlc_meta_AddExtra(item->p_meta, "AUTHOR", author);
|
||||
vlc_meta_SetExtra(item->p_meta, "AUTHOR", author);
|
||||
if (NONEMPTY(composer))
|
||||
vlc_meta_AddExtra(item->p_meta, "COMPOSER", composer);
|
||||
vlc_meta_SetExtra(item->p_meta, "COMPOSER", composer);
|
||||
if (NONEMPTY(arranger))
|
||||
vlc_meta_AddExtra(item->p_meta, "ARRANGER", arranger);
|
||||
vlc_meta_SetExtra(item->p_meta, "ARRANGER", arranger);
|
||||
if (NONEMPTY(isrc))
|
||||
vlc_meta_AddExtra(item->p_meta, "ISRC", isrc);
|
||||
vlc_meta_SetExtra(item->p_meta, "ISRC", isrc);
|
||||
|
||||
if (year != 0)
|
||||
{
|
||||
|
@ -1520,24 +1520,24 @@ static int CdTextParse( vlc_meta_t ***ppp_tracks, int *pi_tracks,
|
||||
break;
|
||||
case cd_text_songwriter:
|
||||
// lyrics
|
||||
vlc_meta_AddExtra( p_track, "AUTHOR",
|
||||
vlc_meta_SetExtra( p_track, "AUTHOR",
|
||||
psz_value ? psz_value : psz_default );
|
||||
break;
|
||||
case cd_text_composer:
|
||||
// music
|
||||
vlc_meta_AddExtra( p_track, "COMPOSER",
|
||||
vlc_meta_SetExtra( p_track, "COMPOSER",
|
||||
psz_value ? psz_value : psz_default );
|
||||
break;
|
||||
case cd_text_arrangers:
|
||||
vlc_meta_AddExtra( p_track, "ARRANGER",
|
||||
vlc_meta_SetExtra( p_track, "ARRANGER",
|
||||
psz_value ? psz_value : psz_default );
|
||||
break;
|
||||
case cd_text_ean_isrc:
|
||||
{
|
||||
if ( i == 0 )
|
||||
vlc_meta_AddExtra( p_track, "EAN/UPN", psz_default );
|
||||
vlc_meta_SetExtra( p_track, "EAN/UPN", psz_default );
|
||||
else if ( psz_value )
|
||||
vlc_meta_AddExtra( p_track, "ISRC", psz_value );
|
||||
vlc_meta_SetExtra( p_track, "ISRC", psz_value );
|
||||
}
|
||||
/* FIXME unsupported:
|
||||
* cd_text_discid */
|
||||
|
@ -673,9 +673,9 @@ static void ImportMeta( stream_t *p_access )
|
||||
if( psz_name )
|
||||
{
|
||||
*psz_name = '\0';
|
||||
vlc_meta_AddExtra( p_meta, "Channel", psz_name + 1 );
|
||||
vlc_meta_SetExtra( p_meta, "Channel", psz_name + 1 );
|
||||
}
|
||||
vlc_meta_AddExtra( p_meta, "Transponder", text );
|
||||
vlc_meta_SetExtra( p_meta, "Transponder", text );
|
||||
}
|
||||
|
||||
else if( tag == 'E' )
|
||||
@ -690,14 +690,14 @@ static void ImportMeta( stream_t *p_access )
|
||||
|
||||
/* TODO: locale */
|
||||
strftime( str, sizeof(str), "%Y-%m-%d %H:%M", &tm );
|
||||
vlc_meta_AddExtra( p_meta, "Date", str );
|
||||
vlc_meta_SetExtra( p_meta, "Date", str );
|
||||
free( psz_date );
|
||||
psz_date = strdup( str );
|
||||
|
||||
/* display in minutes */
|
||||
i_length = ( i_length + 59 ) / 60;
|
||||
snprintf( str, sizeof(str), "%u:%02u", i_length / 60, i_length % 60 );
|
||||
vlc_meta_AddExtra( p_meta, "Duration", str );
|
||||
vlc_meta_SetExtra( p_meta, "Duration", str );
|
||||
}
|
||||
}
|
||||
|
||||
@ -705,14 +705,14 @@ static void ImportMeta( stream_t *p_access )
|
||||
{
|
||||
free( psz_title );
|
||||
psz_title = strdup( text );
|
||||
vlc_meta_AddExtra( p_meta, "Title", text );
|
||||
vlc_meta_SetExtra( p_meta, "Title", text );
|
||||
}
|
||||
|
||||
else if( tag == 'S' )
|
||||
{
|
||||
free( psz_smalltext );
|
||||
psz_smalltext = strdup( text );
|
||||
vlc_meta_AddExtra( p_meta, "Info", text );
|
||||
vlc_meta_SetExtra( p_meta, "Info", text );
|
||||
}
|
||||
|
||||
else if( tag == 'D' )
|
||||
@ -731,17 +731,17 @@ static void ImportMeta( stream_t *p_access )
|
||||
float fps = atof( text );
|
||||
if( fps >= 1 )
|
||||
p_sys->fps = fps;
|
||||
vlc_meta_AddExtra( p_meta, "Frame Rate", text );
|
||||
vlc_meta_SetExtra( p_meta, "Frame Rate", text );
|
||||
}
|
||||
|
||||
else if( tag == 'P' )
|
||||
{
|
||||
vlc_meta_AddExtra( p_meta, "Priority", text );
|
||||
vlc_meta_SetExtra( p_meta, "Priority", text );
|
||||
}
|
||||
|
||||
else if( tag == 'L' )
|
||||
{
|
||||
vlc_meta_AddExtra( p_meta, "Lifetime", text );
|
||||
vlc_meta_SetExtra( p_meta, "Lifetime", text );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -535,7 +535,7 @@ static void ParseDaalaComments( decoder_t *p_dec )
|
||||
/* TODO: Since psz_value can contain NULLs see if there is an
|
||||
* instance where we need to preserve the full length of this string */
|
||||
if( p_dec->p_description )
|
||||
vlc_meta_AddExtra( p_dec->p_description, psz_name, psz_value );
|
||||
vlc_meta_SetExtra( p_dec->p_description, psz_name, psz_value );
|
||||
}
|
||||
free( psz_comment );
|
||||
}
|
||||
|
@ -447,7 +447,7 @@ static int DecodeBlock( decoder_t *p_dec, block_t *p_block )
|
||||
if( !p_dec->p_description )
|
||||
p_dec->p_description = vlc_meta_New();
|
||||
if( p_dec->p_description )
|
||||
vlc_meta_AddExtra( p_dec->p_description, _("AAC extension"), psz_ext );
|
||||
vlc_meta_SetExtra( p_dec->p_description, _("AAC extension"), psz_ext );
|
||||
|
||||
p_sys->b_sbr = b_sbr;
|
||||
p_sys->b_ps = frame.ps;
|
||||
|
@ -1224,7 +1224,7 @@ static void ParseKateComments( decoder_t *p_dec )
|
||||
if( !p_dec->p_description )
|
||||
p_dec->p_description = vlc_meta_New();
|
||||
if( p_dec->p_description )
|
||||
vlc_meta_AddExtra( p_dec->p_description, psz_name, psz_value );
|
||||
vlc_meta_SetExtra( p_dec->p_description, psz_name, psz_value );
|
||||
}
|
||||
free( psz_comment );
|
||||
i++;
|
||||
|
@ -895,7 +895,7 @@ static void ParseSpeexComments( decoder_t *p_dec, ogg_packet *p_oggpacket )
|
||||
char *psz_mode;
|
||||
if( asprintf( &psz_mode, "%s%s", p_mode->modeName, p_sys->p_header->vbr ? " VBR" : "" ) >= 0 )
|
||||
{
|
||||
vlc_meta_AddExtra( p_dec->p_description, _("Mode"), psz_mode );
|
||||
vlc_meta_SetExtra( p_dec->p_description, _("Mode"), psz_mode );
|
||||
free( psz_mode );
|
||||
}
|
||||
|
||||
|
@ -583,7 +583,7 @@ static void ParseTheoraComments( decoder_t *p_dec )
|
||||
/* TODO: Since psz_value can contain NULLs see if there is an
|
||||
* instance where we need to preserve the full length of this string */
|
||||
if( p_dec->p_description )
|
||||
vlc_meta_AddExtra( p_dec->p_description, psz_name, psz_value );
|
||||
vlc_meta_SetExtra( p_dec->p_description, psz_name, psz_value );
|
||||
}
|
||||
free( psz_comment );
|
||||
i++;
|
||||
|
@ -658,7 +658,7 @@ static void ParseVorbisComments( decoder_t *p_dec )
|
||||
if( !p_dec->p_description )
|
||||
p_dec->p_description = vlc_meta_New();
|
||||
if( p_dec->p_description )
|
||||
vlc_meta_AddExtra( p_dec->p_description, psz_name, psz_value );
|
||||
vlc_meta_SetExtra( p_dec->p_description, psz_name, psz_value );
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1322,7 +1322,7 @@ static int DemuxInit( demux_t *p_demux )
|
||||
*p_ecd->ppsz_value[i] != '\0' && /* no empty value */
|
||||
*p_ecd->ppsz_value[i] != '{' && /* no guid value */
|
||||
*p_ecd->ppsz_name[i] != '{' ) /* no guid name */
|
||||
vlc_meta_AddExtra( p_sys->meta, p_ecd->ppsz_name[i], p_ecd->ppsz_value[i] );
|
||||
vlc_meta_SetExtra( p_sys->meta, p_ecd->ppsz_name[i], p_ecd->ppsz_value[i] );
|
||||
/* TODO map WM/Composer, WM/Provider, WM/PartOfSet, PeakValue, AverageLevel */
|
||||
#undef set_meta
|
||||
}
|
||||
|
@ -2952,7 +2952,7 @@ static void AVI_MetaLoad( demux_t *p_demux,
|
||||
continue;
|
||||
|
||||
if( *psz_value )
|
||||
vlc_meta_AddExtra( p_meta, p_strz->p_type, psz_value );
|
||||
vlc_meta_SetExtra( p_meta, p_strz->p_type, psz_value );
|
||||
free( psz_value );
|
||||
}
|
||||
}
|
||||
|
@ -332,7 +332,7 @@ bool matroska_segment_c::ParseSimpleTags( SimpleTag* pout_simple, KaxTagSimple *
|
||||
}
|
||||
}
|
||||
msg_Dbg( &sys.demuxer, "| | + Meta %s: %s", pout_simple->tag_name.c_str (), pout_simple->value.c_str ());
|
||||
vlc_meta_AddExtra( sys.meta, pout_simple->tag_name.c_str (), pout_simple->value.c_str ());
|
||||
vlc_meta_SetExtra( sys.meta, pout_simple->tag_name.c_str (), pout_simple->value.c_str ());
|
||||
done:
|
||||
return true;
|
||||
}
|
||||
|
@ -380,7 +380,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
|
||||
i_num_channels, i_num_patterns, i_num_samples,
|
||||
( i_num_instruments ? psz_instrument_info : "" ) ) >= 0 )
|
||||
{
|
||||
vlc_meta_AddExtra( p_meta, "Module Information",
|
||||
vlc_meta_SetExtra( p_meta, "Module Information",
|
||||
psz_module_info );
|
||||
free( psz_module_info );
|
||||
}
|
||||
@ -400,7 +400,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
|
||||
i_temp_index += snprintf( &psz_temp[i_temp_index], sizeof(psz_temp) - i_temp_index, "%s\n", lBuffer );
|
||||
}
|
||||
|
||||
vlc_meta_AddExtra( p_meta, "Instruments", psz_temp );
|
||||
vlc_meta_SetExtra( p_meta, "Instruments", psz_temp );
|
||||
}
|
||||
|
||||
/* Make list of samples */
|
||||
@ -412,7 +412,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
|
||||
i_temp_index += snprintf( &psz_temp[i_temp_index], sizeof(psz_temp) - i_temp_index, "%s\n", psz_buffer );
|
||||
}
|
||||
|
||||
vlc_meta_AddExtra( p_meta, "Samples", psz_temp );
|
||||
vlc_meta_SetExtra( p_meta, "Samples", psz_temp );
|
||||
|
||||
return VLC_SUCCESS;
|
||||
}
|
||||
|
@ -243,7 +243,7 @@ static bool SetMeta( vlc_meta_t* p_meta, int i_type, char const* name, const MP4
|
||||
if( psz_utf )
|
||||
{
|
||||
if( type ) vlc_meta_Set( p_meta, *type, psz_utf );
|
||||
else vlc_meta_AddExtra( p_meta, key, psz_utf );
|
||||
else vlc_meta_SetExtra( p_meta, key, psz_utf );
|
||||
|
||||
free( psz_utf );
|
||||
}
|
||||
@ -313,7 +313,7 @@ static int ExtractIntlStrings( vlc_meta_t *p_meta, const MP4_Box_t *p_box )
|
||||
char* key;
|
||||
if( asprintf( &key, "%s (%s)", meta_key, charset+11 ) != -1 )
|
||||
{
|
||||
vlc_meta_AddExtra( p_meta_intl, key, data );
|
||||
vlc_meta_SetExtra( p_meta_intl, key, data );
|
||||
free( key );
|
||||
}
|
||||
}
|
||||
@ -350,7 +350,7 @@ static void ExtractItunesInfoTriplets( vlc_meta_t *p_meta, const MP4_Box_t *p_bo
|
||||
p_name->data.p_binary->i_blob - 4 );
|
||||
char *psz_value = ExtractString( p_data );
|
||||
if( psz_name && psz_value )
|
||||
vlc_meta_AddExtra( p_meta, psz_name, psz_value );
|
||||
vlc_meta_SetExtra( p_meta, psz_name, psz_value );
|
||||
free( psz_name );
|
||||
free( psz_value );
|
||||
}
|
||||
@ -380,7 +380,7 @@ static void SetupmdirMeta( vlc_meta_t *p_meta, const MP4_Box_t *p_box )
|
||||
char psz_utf[11];
|
||||
snprintf( psz_utf, sizeof( psz_utf ), "%"PRId32,
|
||||
GetDWBE(BOXDATA(p_data)->p_blob) );
|
||||
vlc_meta_AddExtra( p_meta, "iTunes Account ID", psz_utf );
|
||||
vlc_meta_SetExtra( p_meta, "iTunes Account ID", psz_utf );
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -392,7 +392,7 @@ static void SetupmdirMeta( vlc_meta_t *p_meta, const MP4_Box_t *p_box )
|
||||
char psz_utf[11];
|
||||
snprintf( psz_utf, sizeof( psz_utf ), "%"PRId32,
|
||||
GetDWBE(BOXDATA(p_data)->p_blob) );
|
||||
vlc_meta_AddExtra( p_meta, "iTunes Catalog ID", psz_utf );
|
||||
vlc_meta_SetExtra( p_meta, "iTunes Catalog ID", psz_utf );
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -438,7 +438,7 @@ static void SetupmdirMeta( vlc_meta_t *p_meta, const MP4_Box_t *p_box )
|
||||
psz_rating = N_("None");
|
||||
break;
|
||||
}
|
||||
vlc_meta_AddExtra( p_meta, N_("Rating"), psz_rating );
|
||||
vlc_meta_SetExtra( p_meta, N_("Rating"), psz_rating );
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -648,7 +648,7 @@ static void ATSC_VCT_Callback( void *p_cb_basepid, dvbpsi_atsc_vct_t* p_vct )
|
||||
|
||||
const char *psz_service_type = ATSC_A53_get_service_type( p_channel->i_service_type );
|
||||
if( psz_service_type )
|
||||
vlc_meta_AddExtra( p_meta, "Type", psz_service_type );
|
||||
vlc_meta_SetExtra( p_meta, "Type", psz_service_type );
|
||||
|
||||
es_out_Control( p_demux->out, ES_OUT_SET_GROUP_META,
|
||||
p_channel->i_program_number, p_meta );
|
||||
|
@ -301,7 +301,7 @@ static void SDTCallBack( demux_t *p_demux, dvbpsi_sdt_t *p_sdt )
|
||||
TS_ARIB_LOGO_TYPE_HD_LARGE ) > -1 )
|
||||
{
|
||||
vlc_meta_SetArtURL( p_meta, psz_name );
|
||||
vlc_meta_AddExtra( p_meta, "ARTURL", psz_name );
|
||||
vlc_meta_SetExtra( p_meta, "ARTURL", psz_name );
|
||||
free( psz_name );
|
||||
}
|
||||
}
|
||||
@ -324,9 +324,9 @@ static void SDTCallBack( demux_t *p_demux, dvbpsi_sdt_t *p_sdt )
|
||||
}
|
||||
|
||||
if( psz_type )
|
||||
vlc_meta_AddExtra( p_meta, "Type", psz_type );
|
||||
vlc_meta_SetExtra( p_meta, "Type", psz_type );
|
||||
if( psz_status )
|
||||
vlc_meta_AddExtra( p_meta, "Status", psz_status );
|
||||
vlc_meta_SetExtra( p_meta, "Status", psz_status );
|
||||
|
||||
es_out_Control( p_demux->out, ES_OUT_SET_GROUP_META,
|
||||
p_srv->i_service_id, p_meta );
|
||||
|
@ -1420,7 +1420,7 @@ static void DemuxDecodeXds( demux_t *p_demux, uint8_t d1, uint8_t d2 )
|
||||
if( m->psz_channel_call_letter )
|
||||
vlc_meta_SetTitle( p_meta, m->psz_channel_call_letter );
|
||||
if( m->psz_channel_number )
|
||||
vlc_meta_AddExtra( p_meta, "Channel number", m->psz_channel_number );
|
||||
vlc_meta_SetExtra( p_meta, "Channel number", m->psz_channel_number );
|
||||
es_out_Control( p_demux->out, ES_OUT_SET_GROUP_META, TY_ES_GROUP, p_meta );
|
||||
vlc_meta_Delete( p_meta );
|
||||
|
||||
|
@ -559,7 +559,7 @@ void vorbis_ParseComment( es_format_t *p_fmt, vlc_meta_t **pp_meta,
|
||||
if( psz_comment[i] >= 'a' && psz_comment[i] <= 'z' )
|
||||
psz_comment[i] -= 'a' - 'A';
|
||||
|
||||
vlc_meta_AddExtra( p_meta, psz_comment, p );
|
||||
vlc_meta_SetExtra( p_meta, psz_comment, p );
|
||||
}
|
||||
#undef IF_EXTRACT
|
||||
next_comment:
|
||||
|
@ -812,7 +812,7 @@ static int vlclua_input_item_set_meta( lua_State *L )
|
||||
}
|
||||
}
|
||||
|
||||
vlc_meta_AddExtra( p_item->p_meta, psz_name, psz_value );
|
||||
vlc_meta_SetExtra( p_item->p_meta, psz_name, psz_value );
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -311,7 +311,7 @@ void vlclua_read_custom_meta_data( vlc_object_t *p_this, lua_State *L,
|
||||
const char *psz_key = lua_tostring( L, -2 );
|
||||
const char *psz_value = lua_tostring( L, -1 );
|
||||
|
||||
vlc_meta_AddExtra( p_input->p_meta, psz_key, psz_value );
|
||||
vlc_meta_SetExtra( p_input->p_meta, psz_key, psz_value );
|
||||
|
||||
lua_pop( L, 1 ); /* pop "value" */
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ static bool ID3TextTagHandler( const uint8_t *p_buf, size_t i_buf,
|
||||
if( pb_updated )
|
||||
*pb_updated = true;
|
||||
if( psz_extra )
|
||||
vlc_meta_AddExtra( p_meta, psz_extra, psz );
|
||||
vlc_meta_SetExtra( p_meta, psz_extra, psz );
|
||||
else
|
||||
vlc_meta_Set( p_meta, type, psz );
|
||||
}
|
||||
@ -121,7 +121,7 @@ static bool ID3HandleTag( const uint8_t *p_buf, size_t i_buf,
|
||||
p_buf[0], &psz_val_alloc );
|
||||
if( psz_val )
|
||||
{
|
||||
vlc_meta_AddExtra( p_meta, psz_key, psz_val );
|
||||
vlc_meta_SetExtra( p_meta, psz_key, psz_val );
|
||||
free( psz_val_alloc );
|
||||
}
|
||||
}
|
||||
|
@ -394,7 +394,7 @@ static void ReadMetaFromAPE( APE::Tag* tag, demux_meta_t* p_demux_meta, vlc_meta
|
||||
#define SET_EXTRA( keyName, metaName ) \
|
||||
iter = fields.find( keyName ); \
|
||||
if( iter != fields.end() && !iter->second.isEmpty() ) { \
|
||||
vlc_meta_AddExtra( p_meta, metaName, iter->second.toString().toCString( true ) ); \
|
||||
vlc_meta_SetExtra( p_meta, metaName, iter->second.toString().toCString( true ) ); \
|
||||
fields.erase(iter); \
|
||||
}
|
||||
|
||||
@ -431,7 +431,7 @@ static void ReadMetaFromAPE( APE::Tag* tag, demux_meta_t* p_demux_meta, vlc_meta
|
||||
if( iter->second.type() != APE::Item::Text )
|
||||
continue;
|
||||
|
||||
vlc_meta_AddExtra( p_meta,
|
||||
vlc_meta_SetExtra( p_meta,
|
||||
iter->first.toCString( true ),
|
||||
iter->second.toString().toCString( true ) );
|
||||
}
|
||||
@ -459,7 +459,7 @@ static void ReadMetaFromASF( ASF::Tag* tag, demux_meta_t* p_demux_meta, vlc_meta
|
||||
if( tag->attributeListMap().contains(keyName) ) \
|
||||
{ \
|
||||
list = tag->attributeListMap()[keyName]; \
|
||||
vlc_meta_AddExtra( p_meta, metaName, list.front().toString().toCString( true ) ); \
|
||||
vlc_meta_SetExtra( p_meta, metaName, list.front().toString().toCString( true ) ); \
|
||||
}
|
||||
|
||||
SET("MusicBrainz/Track Id", TrackID );
|
||||
@ -691,10 +691,10 @@ static void ReadMetaFromId3v2( ID3v2::Tag* tag, demux_meta_t* p_demux_meta, vlc_
|
||||
}
|
||||
if( !strcmp( p_txxx->description().toCString( true ), "MusicBrainz Album Id" ) )
|
||||
{
|
||||
vlc_meta_AddExtra( p_meta, VLC_META_EXTRA_MB_ALBUMID, p_txxx->fieldList().back().toCString( true ) );
|
||||
vlc_meta_SetExtra( p_meta, VLC_META_EXTRA_MB_ALBUMID, p_txxx->fieldList().back().toCString( true ) );
|
||||
continue;
|
||||
}
|
||||
vlc_meta_AddExtra( p_meta, p_txxx->description().toCString( true ),
|
||||
vlc_meta_SetExtra( p_meta, p_txxx->description().toCString( true ),
|
||||
p_txxx->fieldList().back().toCString( true ) );
|
||||
}
|
||||
|
||||
@ -708,7 +708,7 @@ static void ReadMetaFromId3v2( ID3v2::Tag* tag, demux_meta_t* p_demux_meta, vlc_
|
||||
#define SET_EXTRA( tagName, metaName )\
|
||||
list = tag->frameListMap()[tagName];\
|
||||
if( !list.isEmpty() )\
|
||||
vlc_meta_AddExtra( p_meta, metaName,\
|
||||
vlc_meta_SetExtra( p_meta, metaName,\
|
||||
(*list.begin())->toString().toCString( true ) );
|
||||
|
||||
|
||||
@ -764,7 +764,7 @@ static void ReadMetaFromXiph( Ogg::XiphComment* tag, demux_meta_t* p_demux_meta,
|
||||
{ \
|
||||
StringList tmp_list = tag->fieldListMap()[keyName]; \
|
||||
if( !tmp_list.isEmpty() ) \
|
||||
vlc_meta_AddExtra( p_meta, keyName, (*tmp_list.begin()).toCString( true ) ); \
|
||||
vlc_meta_SetExtra( p_meta, keyName, (*tmp_list.begin()).toCString( true ) ); \
|
||||
}
|
||||
|
||||
SET( "COPYRIGHT", Copyright );
|
||||
@ -879,7 +879,7 @@ static void ReadMetaFromMP4( MP4::Tag* tag, demux_meta_t *p_demux_meta, vlc_meta
|
||||
if( tag->contains(keyName) ) \
|
||||
{ \
|
||||
list = tag->item(keyName); \
|
||||
vlc_meta_AddExtra( p_meta, metaName, list.toStringList().front().toCString( true ) ); \
|
||||
vlc_meta_SetExtra( p_meta, metaName, list.toStringList().front().toCString( true ) ); \
|
||||
}
|
||||
|
||||
SET("----:com.apple.iTunes:MusicBrainz Track Id", TrackID );
|
||||
|
@ -332,7 +332,7 @@ static void fill_metas_with_results( fingerprint_request_t *p_r, acoustid_finger
|
||||
{
|
||||
vlc_meta_Set( p_meta, vlc_meta_Title, p_record->psz_title );
|
||||
vlc_meta_Set( p_meta, vlc_meta_Artist, p_record->psz_artist );
|
||||
vlc_meta_AddExtra( p_meta, "musicbrainz-id", p_record->s_musicbrainz_id );
|
||||
vlc_meta_SetExtra( p_meta, "musicbrainz-id", p_record->s_musicbrainz_id );
|
||||
if( vlc_array_append( & p_r->results.metas_array, p_meta ) )
|
||||
vlc_meta_Delete( p_meta );
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ vlc_meta_t *vlc_meta_New( void )
|
||||
return m;
|
||||
}
|
||||
|
||||
/* Free a dictionary key allocated by strdup() in vlc_meta_AddExtra() */
|
||||
/* Free a dictionary key allocated by strdup() in vlc_meta_SetExtra() */
|
||||
static void vlc_meta_FreeExtraKey( void *p_data, void *p_obj )
|
||||
{
|
||||
VLC_UNUSED( p_obj );
|
||||
@ -138,7 +138,7 @@ const char *vlc_meta_Get( const vlc_meta_t *p_meta, vlc_meta_type_t meta_type )
|
||||
return p_meta->ppsz_meta[meta_type];
|
||||
}
|
||||
|
||||
void vlc_meta_AddExtra( vlc_meta_t *m, const char *psz_name, const char *psz_value )
|
||||
void vlc_meta_SetExtra( vlc_meta_t *m, const char *psz_name, const char *psz_value )
|
||||
{
|
||||
assert( psz_name );
|
||||
char *psz_oldvalue = (char *)vlc_dictionary_value_for_key( &m->extra_tags, psz_name );
|
||||
|
@ -654,7 +654,7 @@ vlc_killed
|
||||
vlc_join
|
||||
vlc_thread_set_name
|
||||
vlc_list_children
|
||||
vlc_meta_AddExtra
|
||||
vlc_meta_SetExtra
|
||||
vlc_meta_CopyExtraNames
|
||||
vlc_meta_Delete
|
||||
vlc_meta_Get
|
||||
|
Loading…
Reference in New Issue
Block a user