]> git.sesse.net Git - vlc/commitdiff
* vlc-meta fixes
authorFelix Paul Kühne <fkuehne@videolan.org>
Sun, 14 May 2006 21:10:07 +0000 (21:10 +0000)
committerFelix Paul Kühne <fkuehne@videolan.org>
Sun, 14 May 2006 21:10:07 +0000 (21:10 +0000)
modules/demux/mpc.c
modules/demux/real.c

index ccedc8e4937fbfc4796e5dba6dd7fb925dd6d647..4a4caab9a755d5cef76f08dff79f4ca3b2852e86 100644 (file)
@@ -237,7 +237,9 @@ static int Open( vlc_object_t * p_this )
         p_sys->p_meta = vlc_meta_New();
 
     sprintf( psz_info, "Musepack v%d", p_sys->info.stream_version );
-    vlc_meta_Add( p_sys->p_meta, VLC_META_CODEC_NAME, psz_info );
+    //vlc_meta_SetCodecName( p_sys->p_meta, psz_info );
+    //   ^^ doesn't exist (yet?) to set VLC_META_CODEC_NAME, so...
+    fprintf( stderr, "***** WARNING: Unhandled child meta\n"); 
 
     return VLC_SUCCESS;
 }
@@ -298,16 +300,16 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
     demux_sys_t *p_sys = p_demux->p_sys;
     double   f, *pf;
     int64_t i64, *pi64;
-    vlc_meta_t **pp_meta;
+    vlc_meta_t *p_meta;
 
     switch( i_query )
     {
         case DEMUX_GET_META:
-            pp_meta = (vlc_meta_t **)va_arg( args, vlc_meta_t** );
+            p_meta = (vlc_meta_t *)va_arg( args, vlc_meta_t* );
             if( p_sys->p_meta )
-                *pp_meta = vlc_meta_Duplicate( p_sys->p_meta );
+                vlc_meta_Merge( p_meta, p_sys->p_meta ); 
             else
-                *pp_meta = NULL;
+                p_meta = NULL;
             return VLC_SUCCESS;
 
         case DEMUX_GET_LENGTH:
index d56706569c691608ba4b973e1f7f65dcdcb6898f..b641a182bc9b1d81d801cb40a219e78ef6d36d08 100644 (file)
@@ -761,7 +761,7 @@ static int HeaderRead( demux_t *p_demux )
 
                 msg_Dbg( p_demux, "    - title=`%s'", psz );
                 EnsureUTF8( psz );
-                vlc_meta_Add( p_sys->p_meta, VLC_META_TITLE, psz );
+                vlc_meta_SetTitle( p_sys->p_meta, psz );
                 free( psz );
                 i_skip -= i_len;
             }
@@ -776,7 +776,7 @@ static int HeaderRead( demux_t *p_demux )
 
                 msg_Dbg( p_demux, "    - author=`%s'", psz );
                 EnsureUTF8( psz );
-                vlc_meta_Add( p_sys->p_meta, VLC_META_ARTIST, psz );
+                vlc_meta_SetArtist( p_sys->p_meta, psz );
                 free( psz );
                 i_skip -= i_len;
             }
@@ -791,7 +791,7 @@ static int HeaderRead( demux_t *p_demux )
 
                 msg_Dbg( p_demux, "    - copyright=`%s'", psz );
                 EnsureUTF8( psz );
-                vlc_meta_Add( p_sys->p_meta, VLC_META_COPYRIGHT, psz );
+                vlc_meta_SetCopyright( p_sys->p_meta, psz );
                 free( psz );
                 i_skip -= i_len;
             }
@@ -806,7 +806,7 @@ static int HeaderRead( demux_t *p_demux )
 
                 msg_Dbg( p_demux, "    - comment=`%s'", psz );
                 EnsureUTF8( psz );
-                vlc_meta_Add( p_sys->p_meta, VLC_META_DESCRIPTION, psz );
+                vlc_meta_SetDescription( p_sys->p_meta, psz );
                 free( psz );
                 i_skip -= i_len;
             }