]> git.sesse.net Git - vlc/commitdiff
Merge author/artist
authorClément Stenac <zorglub@videolan.org>
Sat, 30 Sep 2006 16:15:40 +0000 (16:15 +0000)
committerClément Stenac <zorglub@videolan.org>
Sat, 30 Sep 2006 16:15:40 +0000 (16:15 +0000)
WX compilation unchecked

include/vlc_meta.h
include/vlc_symbols.h
modules/codec/ffmpeg/demux.c
modules/demux/asf/asf.c
modules/demux/asf/libasf.c
modules/demux/asf/libasf.h
modules/demux/mp4/mp4.c
modules/demux/playlist/asx.c
modules/gui/wxwidgets/dialogs/playlist.cpp
modules/gui/wxwidgets/playlist_manager.cpp
modules/misc/playlist/xspf.c

index 05739d911cedbc1a157b48b4ccf750ce35cb48dd..372992110dd9a7e4edeb94ba2469394353eef112 100644 (file)
@@ -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
index 513026f9c61d5888caf7a068ebca4f3a2305bf27..4b425a2846ac6857db2cda6e4cd0e123c5758540 100644 (file)
@@ -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; \
index 0b87c2f2435dfa9e3ff0fd0edb39f5ce78651ca5..9be3f0340a99e9d1f3cd7a380eaf7506b4f4574c 100644 (file)
@@ -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] )
index afe8dc5f4b9f3da8ccbe1dc11ee0c1c4ade0f4be..622df5d069ab1a8a6c13d2354f4d847f91ff3ff6 100644 (file)
@@ -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 )
         {
index 7665e76656c9c3153d27e4b3564a1dfe6455f747..428b233f35d43784f6abc7acea8513de8557fca8 100644 (file)
@@ -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 );
index 63ca23009e5729e97b44eb7fbd5adc37f6b4bd5c..32b9f1beaaaa7cf3fd4e7e16b58069ee89d27abb 100644 (file)
@@ -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;
index d3af967172288a4d86a7963f65427ed449fae475..ef2f10ff79f2ff4c496e4054506d7236e1b1343f 100644 (file)
@@ -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 );
index f1b02b2697fb0b3f241ac22a20061d5ed5fc0dbf..7e94b1c13e16d28e86545788607ba21313dda637 100644 (file)
@@ -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, "</Author>" ) ) )
                 {
-                    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 );
index be17e11f46261409f316072c9a96c3c3b8777506..81565fa3ef2bc36ef4123507636092cb50b33344 100644 (file)
@@ -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 );
 
index 6c1191ca0b53f5028720f30f1d9b906f56d564ef..d9e4c28f4a9cbc41f19d9fd848d1cc08f7983cae 100644 (file)
@@ -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 );
 
index 7af7c6de164dbb54fa8c2f2fae30f4a7b54056d0..73e6675601c7f7e06db4e7c2486cf0c84b84fbb1 100644 (file)
@@ -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 );