]> git.sesse.net Git - vlc/blobdiff - include/vlc_meta.h
VLM class almost done
[vlc] / include / vlc_meta.h
index 4fcf9a8f49684be6bff66e77893147e8274d7d59..843266e62040cd4f60f4658039ba0ccaf6d2d43f 100644 (file)
@@ -73,7 +73,7 @@ struct vlc_meta_t
 };
 
 /* Setters for meta.
- * Warning: Make sure to use the input_item meta setters (defined in vlc_input.h) 
+ * Warning: Make sure to use the input_item meta setters (defined in vlc_input.h)
  * instead of those one. */
 #define vlc_meta_SetTitle( meta, b )       vlc_meta_Set( meta, vlc_meta_Title, b )
 #define vlc_meta_SetArtist( meta, b )      vlc_meta_Set( meta, vlc_meta_Artist, b )
@@ -95,7 +95,7 @@ struct vlc_meta_t
 
 static inline void vlc_meta_Set( vlc_meta_t * p_meta, vlc_meta_type_t meta_type, const char * psz_val )
 {
-    if( p_meta->ppsz_meta[meta_type] ) free( p_meta->ppsz_meta[meta_type] );
+    free( p_meta->ppsz_meta[meta_type] );
     p_meta->ppsz_meta[meta_type] = psz_val ? strdup( psz_val ) : NULL;
 }
 
@@ -145,7 +145,7 @@ static inline void vlc_meta_Merge( vlc_meta_t *dst, const vlc_meta_t *src )
     {
         if( src->ppsz_meta[i] )
         {
-            if( dst->ppsz_meta[i] ) free( dst->ppsz_meta[i] );
+            free( dst->ppsz_meta[i] );
             dst->ppsz_meta[i] = strdup( src->ppsz_meta[i] );
         }
     }
@@ -166,6 +166,7 @@ static inline void vlc_meta_Merge( vlc_meta_t *dst, const vlc_meta_t *src )
 /* Shortcuts for the AddInfo */
 #define VLC_META_INFO_CAT           N_("Meta-information")
 #define VLC_META_TITLE              input_MetaTypeToLocalizedString( vlc_meta_Title )
+#define VLC_META_DURATION           N_( "Duration" )
 #define VLC_META_ARTIST             input_MetaTypeToLocalizedString( vlc_meta_Artist )
 #define VLC_META_GENRE              input_MetaTypeToLocalizedString( vlc_meta_Genre )
 #define VLC_META_COPYRIGHT          input_MetaTypeToLocalizedString( vlc_meta_Copyright )
@@ -181,8 +182,7 @@ static inline void vlc_meta_Merge( vlc_meta_t *dst, const vlc_meta_t *src )
 #define VLC_META_PUBLISHER          input_MetaTypeToLocalizedString( vlc_meta_Publisher )
 #define VLC_META_ENCODED_BY         input_MetaTypeToLocalizedString( vlc_meta_EncodedBy )
 #define VLC_META_ART_URL            input_MetaTypeToLocalizedString( vlc_meta_ArtworkURL )
-#define VLC_META_CODEC_NAME         N_("Codec Name")
-#define VLC_META_CODEC_DESCRIPTION  N_("Codec Description")
+#define VLC_META_TRACKID            input_MetaTypeToLocalizedString( vlc_meta_TrackID )
 
 enum {
     ALBUM_ART_WHEN_ASKED,
@@ -196,19 +196,21 @@ struct meta_export_t
     const char *psz_file;
 };
 
-#define VLC_META_ENGINE_TITLE           0x00000001
-#define VLC_META_ENGINE_ARTIST          0x00000004
-#define VLC_META_ENGINE_GENRE           0x00000008
-#define VLC_META_ENGINE_COPYRIGHT       0x00000010
-#define VLC_META_ENGINE_COLLECTION      0x00000020
-#define VLC_META_ENGINE_SEQ_NUM         0x00000040
-#define VLC_META_ENGINE_DESCRIPTION     0x00000080
-#define VLC_META_ENGINE_RATING          0x00000100
-#define VLC_META_ENGINE_DATE            0x00000200
-#define VLC_META_ENGINE_URL             0x00000400
-#define VLC_META_ENGINE_LANGUAGE        0x00000800
-
-#define VLC_META_ENGINE_ART_URL         0x00001000
+#define VLC_META_ENGINE_TRACKID         0x00000001
+#define VLC_META_ENGINE_TITLE           0x00000002
+#define VLC_META_ENGINE_DURATION        0x00000004
+#define VLC_META_ENGINE_ARTIST          0x00000008
+#define VLC_META_ENGINE_GENRE           0x00000010
+#define VLC_META_ENGINE_COPYRIGHT       0x00000020
+#define VLC_META_ENGINE_COLLECTION      0x00000040
+#define VLC_META_ENGINE_SEQ_NUM         0x00000080
+#define VLC_META_ENGINE_DESCRIPTION     0x00000100
+#define VLC_META_ENGINE_RATING          0x00000200
+#define VLC_META_ENGINE_DATE            0x00000400
+#define VLC_META_ENGINE_URL             0x00000800
+#define VLC_META_ENGINE_LANGUAGE        0x00001000
+
+#define VLC_META_ENGINE_ART_URL         0x00002000
 
 #if 0 /* unused (yet?) */
 #define VLC_META_ENGINE_MB_ARTIST_ID    0x00002000
@@ -231,6 +233,6 @@ struct meta_engine_t
     input_item_t *p_item;
 };
 
-VLC_EXPORT(uint32_t, input_CurrentMetaFlags,( vlc_meta_t *p_meta ) );
+VLC_EXPORT(uint32_t, input_CurrentMetaFlags,( const vlc_meta_t *p_meta ) );
 
 #endif