From 7f779f6a64eadd10b2e2b98bcf85fdd38c0cdfa5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Cl=C3=A9ment=20Stenac?= Date: Sat, 30 Sep 2006 16:15:40 +0000 Subject: [PATCH] Merge author/artist WX compilation unchecked --- include/vlc_meta.h | 7 ------- include/vlc_symbols.h | 3 +++ modules/codec/ffmpeg/demux.c | 2 +- modules/demux/asf/asf.c | 4 ++-- modules/demux/asf/libasf.c | 12 ++++++------ modules/demux/asf/libasf.h | 2 +- modules/demux/mp4/mp4.c | 2 +- modules/demux/playlist/asx.c | 14 +++++++------- modules/gui/wxwidgets/dialogs/playlist.cpp | 12 ++++++------ modules/gui/wxwidgets/playlist_manager.cpp | 10 +++++----- modules/misc/playlist/xspf.c | 4 ++-- 11 files changed, 34 insertions(+), 38 deletions(-) diff --git a/include/vlc_meta.h b/include/vlc_meta.h index 05739d911c..372992110d 100644 --- a/include/vlc_meta.h +++ b/include/vlc_meta.h @@ -27,7 +27,6 @@ /* VLC meta name */ #define VLC_META_INFO_CAT N_("Meta-information") #define VLC_META_TITLE N_("Title") -#define VLC_META_AUTHOR N_("Author") #define VLC_META_ARTIST N_("Artist") #define VLC_META_GENRE N_("Genre") #define VLC_META_COPYRIGHT N_("Copyright") @@ -56,7 +55,6 @@ struct vlc_meta_t { char *psz_title; - char *psz_author; char *psz_artist; char *psz_genre; char *psz_copyright; @@ -87,7 +85,6 @@ struct vlc_meta_t #define vlc_meta_SetTitle( meta, b ) vlc_meta_Set( meta, title, b ); #define vlc_meta_SetArtist( meta, b ) vlc_meta_Set( meta, artist, b ); -#define vlc_meta_SetAuthor( meta, b ) vlc_meta_Set( meta, author, b ); #define vlc_meta_SetGenre( meta, b ) vlc_meta_Set( meta, genre, b ); #define vlc_meta_SetCopyright( meta, b ) vlc_meta_Set( meta, copyright, b ); #define vlc_meta_SetAlbum( meta, b ) vlc_meta_Set( meta, album, b ); @@ -108,7 +105,6 @@ static inline vlc_meta_t *vlc_meta_New( void ) vlc_meta_t *m = (vlc_meta_t*)malloc( sizeof( vlc_meta_t ) ); if( !m ) return NULL; m->psz_title = NULL; - m->psz_author = NULL; m->psz_artist = NULL; m->psz_genre = NULL; m->psz_copyright = NULL; @@ -131,7 +127,6 @@ static inline vlc_meta_t *vlc_meta_New( void ) static inline void vlc_meta_Delete( vlc_meta_t *m ) { free( m->psz_title ); - free( m->psz_author ); free( m->psz_artist ); free( m->psz_genre ); free( m->psz_copyright ); @@ -160,7 +155,6 @@ static inline void vlc_meta_Merge( vlc_meta_t *dst, vlc_meta_t *src ) dst->psz_##a = strdup( src->psz_##a ); \ } COPY_FIELD( title ); - COPY_FIELD( author ); COPY_FIELD( artist ); COPY_FIELD( genre ); COPY_FIELD( copyright ); @@ -192,7 +186,6 @@ struct meta_export_t }; #define VLC_META_ENGINE_TITLE 0x00000001 -#define VLC_META_ENGINE_AUTHOR 0x00000002 #define VLC_META_ENGINE_ARTIST 0x00000004 #define VLC_META_ENGINE_GENRE 0x00000008 #define VLC_META_ENGINE_COPYRIGHT 0x00000010 diff --git a/include/vlc_symbols.h b/include/vlc_symbols.h index 513026f9c6..4b425a2846 100644 --- a/include/vlc_symbols.h +++ b/include/vlc_symbols.h @@ -549,6 +549,7 @@ struct module_symbols_t void *__input_ArtFetch_deprecated; void *input_AskForArt_deprecated; int (*playlist_AskForArtEnqueue_inner) (playlist_t *, input_item_t *); + uint32_t (*input_CurrentMetaFlags_inner) (vlc_meta_t *p_meta); }; # if defined (__PLUGIN__) # define aout_FiltersCreatePipeline (p_symbols)->aout_FiltersCreatePipeline_inner @@ -1023,6 +1024,7 @@ struct module_symbols_t # define input_ItemAddInfo (p_symbols)->input_ItemAddInfo_inner # define input_ItemAddOptionNoDup (p_symbols)->input_ItemAddOptionNoDup_inner # define playlist_AskForArtEnqueue (p_symbols)->playlist_AskForArtEnqueue_inner +# define input_CurrentMetaFlags (p_symbols)->input_CurrentMetaFlags_inner # elif defined (HAVE_DYNAMIC_PLUGINS) && !defined (__BUILTIN__) /****************************************************************** * STORE_SYMBOLS: store VLC APIs into p_symbols for plugin access. @@ -1500,6 +1502,7 @@ struct module_symbols_t ((p_symbols)->input_ItemAddInfo_inner) = input_ItemAddInfo; \ ((p_symbols)->input_ItemAddOptionNoDup_inner) = input_ItemAddOptionNoDup; \ ((p_symbols)->playlist_AskForArtEnqueue_inner) = playlist_AskForArtEnqueue; \ + ((p_symbols)->input_CurrentMetaFlags_inner) = input_CurrentMetaFlags; \ (p_symbols)->net_ConvertIPv4_deprecated = NULL; \ (p_symbols)->vlc_input_item_GetInfo_deprecated = NULL; \ (p_symbols)->vlc_input_item_AddInfo_deprecated = NULL; \ diff --git a/modules/codec/ffmpeg/demux.c b/modules/codec/ffmpeg/demux.c index 0b87c2f243..9be3f0340a 100644 --- a/modules/codec/ffmpeg/demux.c +++ b/modules/codec/ffmpeg/demux.c @@ -413,7 +413,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args ) if( p_sys->ic->title[0] ) vlc_meta_SetTitle( p_meta, p_sys->ic->title ); if( p_sys->ic->author[0] ) - vlc_meta_SetAuthor( p_meta, p_sys->ic->author ); + vlc_meta_SetArtist( p_meta, p_sys->ic->author ); if( p_sys->ic->copyright[0] ) vlc_meta_SetCopyright( p_meta, p_sys->ic->copyright ); if( p_sys->ic->comment[0] ) diff --git a/modules/demux/asf/asf.c b/modules/demux/asf/asf.c index afe8dc5f4b..622df5d069 100644 --- a/modules/demux/asf/asf.c +++ b/modules/demux/asf/asf.c @@ -817,9 +817,9 @@ static int DemuxInit( demux_t *p_demux ) { vlc_meta_SetTitle( p_sys->meta, p_cd->psz_title ); } - if( p_cd->psz_author && *p_cd->psz_author ) + if( p_cd->psz_artist && *p_cd->psz_artist ) { - vlc_meta_SetAuthor( p_sys->meta, p_cd->psz_author ); + vlc_meta_SetArtist( p_sys->meta, p_cd->psz_artist ); } if( p_cd->psz_copyright && *p_cd->psz_copyright ) { diff --git a/modules/demux/asf/libasf.c b/modules/demux/asf/libasf.c index 7665e76656..428b233f35 100644 --- a/modules/demux/asf/libasf.c +++ b/modules/demux/asf/libasf.c @@ -672,7 +672,7 @@ static int ASF_ReadObject_content_description(stream_t *s, asf_object_t *p_obj) asf_object_content_description_t *p_cd = (asf_object_content_description_t *)p_obj; uint8_t *p_peek, *p_data; - int i_peek, i_title, i_author, i_copyright, i_description, i_rating; + int i_peek, i_title, i_artist, i_copyright, i_description, i_rating; vlc_iconv_t cd = (vlc_iconv_t)-1; const char *ib = NULL; char *ob = NULL; @@ -701,13 +701,13 @@ static int ASF_ReadObject_content_description(stream_t *s, asf_object_t *p_obj) p_data = p_peek + 24; i_title = GetWLE( p_data ); p_data += 2; - i_author= GetWLE( p_data ); p_data += 2; + i_artist= GetWLE( p_data ); p_data += 2; i_copyright = GetWLE( p_data ); p_data += 2; i_description = GetWLE( p_data ); p_data += 2; i_rating = GetWLE( p_data ); p_data += 2; GETSTRINGW( p_cd->psz_title, i_title ); - GETSTRINGW( p_cd->psz_author, i_author ); + GETSTRINGW( p_cd->psz_artist, i_artist ); GETSTRINGW( p_cd->psz_copyright, i_copyright ); GETSTRINGW( p_cd->psz_description, i_description ); GETSTRINGW( p_cd->psz_rating, i_rating ); @@ -716,9 +716,9 @@ static int ASF_ReadObject_content_description(stream_t *s, asf_object_t *p_obj) #ifdef ASF_DEBUG msg_Dbg( s, - "read \"content description object\" title:\"%s\" author:\"%s\" copyright:\"%s\" description:\"%s\" rating:\"%s\"", + "read \"content description object\" title:\"%s\" artist:\"%s\" copyright:\"%s\" description:\"%s\" rating:\"%s\"", p_cd->psz_title, - p_cd->psz_author, + p_cd->psz_artist, p_cd->psz_copyright, p_cd->psz_description, p_cd->psz_rating ); @@ -734,7 +734,7 @@ static void ASF_FreeObject_content_description( asf_object_t *p_obj) (asf_object_content_description_t *)p_obj; FREENULL( p_cd->psz_title ); - FREENULL( p_cd->psz_author ); + FREENULL( p_cd->psz_artist ); FREENULL( p_cd->psz_copyright ); FREENULL( p_cd->psz_description ); FREENULL( p_cd->psz_rating ); diff --git a/modules/demux/asf/libasf.h b/modules/demux/asf/libasf.h index 63ca23009e..32b9f1beaa 100644 --- a/modules/demux/asf/libasf.h +++ b/modules/demux/asf/libasf.h @@ -264,7 +264,7 @@ typedef struct ASF_OBJECT_COMMON char *psz_title; - char *psz_author; + char *psz_artist; char *psz_copyright; char *psz_description; char *psz_rating; diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c index d3af967172..ef2f10ff79 100644 --- a/modules/demux/mp4/mp4.c +++ b/modules/demux/mp4/mp4.c @@ -805,7 +805,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args ) vlc_meta_SetArtist( p_meta, psz_utf ); break; case FOURCC_0xa9aut: - vlc_meta_SetAuthor( p_meta, psz_utf ); + vlc_meta_SetArtist( p_meta, psz_utf ); break; case FOURCC_0xa9ART: vlc_meta_SetArtist( p_meta, psz_utf ); diff --git a/modules/demux/playlist/asx.c b/modules/demux/playlist/asx.c index f1b02b2697..7e94b1c13e 100644 --- a/modules/demux/playlist/asx.c +++ b/modules/demux/playlist/asx.c @@ -166,14 +166,14 @@ static int Demux( demux_t *p_demux ) char *psz_base_asx = NULL; char *psz_title_asx = NULL; - char *psz_author_asx = NULL; + char *psz_artist_asx = NULL; char *psz_copyright_asx = NULL; char *psz_moreinfo_asx = NULL; char *psz_abstract_asx = NULL; char *psz_base_entry = NULL; char *psz_title_entry = NULL; - char *psz_author_entry = NULL; + char *psz_artist_entry = NULL; char *psz_copyright_entry = NULL; char *psz_moreinfo_entry = NULL; char *psz_abstract_entry = NULL; @@ -292,7 +292,7 @@ static int Demux( demux_t *p_demux ) psz_backup = psz_parse+=8; if( ( psz_parse = strcasestr( psz_parse, "" ) ) ) { - StoreString( p_demux, (b_entry ? &psz_author_entry : &psz_author_asx), psz_backup, psz_parse ); + StoreString( p_demux, (b_entry ? &psz_artist_entry : &psz_artist_asx), psz_backup, psz_parse ); psz_parse += 9; } else continue; @@ -379,7 +379,7 @@ static int Demux( demux_t *p_demux ) /* cleanup entry */ FREENULL( psz_title_entry ) FREENULL( psz_base_entry ) - FREENULL( psz_author_entry ) + FREENULL( psz_artist_entry ) FREENULL( psz_copyright_entry ) FREENULL( psz_moreinfo_entry ) FREENULL( psz_abstract_entry ) @@ -429,7 +429,7 @@ static int Demux( demux_t *p_demux ) input_ItemCopyOptions( p_current->p_input, p_entry ); p_entry->p_meta = vlc_meta_New(); if( psz_title_entry ) vlc_meta_SetTitle( p_entry->p_meta, psz_title_entry ); - if( psz_author_entry ) vlc_meta_SetAuthor( p_entry->p_meta, psz_author_entry ); + if( psz_artist_entry ) vlc_meta_SetArtist( p_entry->p_meta, psz_artist_entry ); if( psz_copyright_entry ) vlc_meta_SetCopyright( p_entry->p_meta, psz_copyright_entry ); if( psz_moreinfo_entry ) vlc_meta_SetURL( p_entry->p_meta, psz_moreinfo_entry ); if( psz_abstract_entry ) vlc_meta_SetDescription( p_entry->p_meta, psz_abstract_entry ); @@ -452,14 +452,14 @@ static int Demux( demux_t *p_demux ) vlc_mutex_lock( &p_current->p_input->lock ); if( !p_current->p_input->p_meta ) p_current->p_input->p_meta = vlc_meta_New(); if( psz_title_asx ) vlc_meta_SetTitle( p_current->p_input->p_meta, psz_title_asx ); - if( psz_author_asx ) vlc_meta_SetAuthor( p_current->p_input->p_meta, psz_author_asx ); + if( psz_artist_asx ) vlc_meta_SetArtist( p_current->p_input->p_meta, psz_artist_asx ); if( psz_copyright_asx ) vlc_meta_SetCopyright( p_current->p_input->p_meta, psz_copyright_asx ); if( psz_moreinfo_asx ) vlc_meta_SetURL( p_current->p_input->p_meta, psz_moreinfo_asx ); if( psz_abstract_asx ) vlc_meta_SetDescription( p_current->p_input->p_meta, psz_abstract_asx ); vlc_mutex_unlock( &p_current->p_input->lock ); FREENULL( psz_base_asx ); FREENULL( psz_title_asx ); - FREENULL( psz_author_asx ); + FREENULL( psz_artist_asx ); FREENULL( psz_copyright_asx ); FREENULL( psz_moreinfo_asx ); FREENULL( psz_abstract_asx ); diff --git a/modules/gui/wxwidgets/dialogs/playlist.cpp b/modules/gui/wxwidgets/dialogs/playlist.cpp index be17e11f46..81565fa3ef 100644 --- a/modules/gui/wxwidgets/dialogs/playlist.cpp +++ b/modules/gui/wxwidgets/dialogs/playlist.cpp @@ -515,15 +515,15 @@ void Playlist::UpdateTreeItem( wxTreeItemId item ) wxString msg; wxString duration = wxU( "" ); - char *psz_author; + char *psz_artist; if( p_item->p_input->p_meta ) { - psz_author= p_item->p_input->p_meta->psz_artist ? + psz_artist= p_item->p_input->p_meta->psz_artist ? strdup( p_item->p_input->p_meta->psz_artist ) : strdup(""); } else - psz_author = strdup( "" ); + psz_artist = strdup( "" ); char psz_duration[MSTRTIME_MAX_SIZE]; mtime_t dur = p_item->p_input->i_duration; @@ -535,16 +535,16 @@ void Playlist::UpdateTreeItem( wxTreeItemId item ) wxU( " )" ) ); } - if( !strcmp( psz_author, "" ) || p_item->p_input->b_fixed_name == VLC_TRUE ) + if( !strcmp( psz_artist, "" ) || p_item->p_input->b_fixed_name == VLC_TRUE ) { msg = wxString( wxU( p_item->p_input->psz_name ) ) + duration; } else { - msg = wxString(wxU( psz_author )) + wxT(" - ") + + msg = wxString(wxU( psz_artist )) + wxT(" - ") + wxString(wxU(p_item->p_input->psz_name)) + duration; } - free( psz_author ); + free( psz_artist ); treectrl->SetItemText( item , msg ); treectrl->SetItemImage( item, p_item->p_input->i_type ); diff --git a/modules/gui/wxwidgets/playlist_manager.cpp b/modules/gui/wxwidgets/playlist_manager.cpp index 6c1191ca0b..d9e4c28f4a 100644 --- a/modules/gui/wxwidgets/playlist_manager.cpp +++ b/modules/gui/wxwidgets/playlist_manager.cpp @@ -290,10 +290,10 @@ void PlaylistManager::UpdateTreeItem( wxTreeItemId item ) wxString msg; wxString duration = wxU( "" ); - char *psz_author = p_item->p_input->p_meta->psz_artist ? + char *psz_artist = p_item->p_input->p_meta->psz_artist ? strdup( p_item->p_input->p_meta->psz_artist ) : strdup( "" ); - if( !psz_author ) + if( !psz_artist ) { UnlockPlaylist( p_intf->p_sys, p_playlist ); return; @@ -309,16 +309,16 @@ void PlaylistManager::UpdateTreeItem( wxTreeItemId item ) wxU( " )" ) ); } - if( !strcmp( psz_author, "" ) || p_item->p_input->b_fixed_name == VLC_TRUE ) + if( !strcmp( psz_artist, "" ) || p_item->p_input->b_fixed_name == VLC_TRUE ) { msg = wxString( wxU( p_item->p_input->psz_name ) ) + duration; } else { - msg = wxString(wxU( psz_author )) + wxT(" - ") + + msg = wxString(wxU( psz_artist )) + wxT(" - ") + wxString(wxU(p_item->p_input->psz_name)) + duration; } - free( psz_author ); + free( psz_artist ); treectrl->SetItemText( item , msg ); treectrl->SetItemImage( item, p_item->p_input->i_type ); diff --git a/modules/misc/playlist/xspf.c b/modules/misc/playlist/xspf.c index 7af7c6de16..73e6675601 100644 --- a/modules/misc/playlist/xspf.c +++ b/modules/misc/playlist/xspf.c @@ -172,8 +172,8 @@ static void xspf_export_item( playlist_item_t *p_item, FILE *p_file, } if( !psz ) { - psz = p_item->p_input->p_meta->psz_author ? - strdup( p_item->p_input->p_meta->psz_author ): + psz = p_item->p_input->p_meta->psz_artist ? + strdup( p_item->p_input->p_meta->psz_artist ): strdup( "" ); } psz_temp = convert_xml_special_chars( psz ); -- 2.39.2