]> git.sesse.net Git - vlc/blobdiff - include/vlc_meta.h
avcodec/video.c: correct error message when vlc_va_Get() fails.
[vlc] / include / vlc_meta.h
index c900314c7317fa19a23986a3b88934e584a71f37..db9f58af4b68976c9fd31aaa431b9ec52cd41717 100644 (file)
@@ -1,24 +1,24 @@
 /*****************************************************************************
  * vlc_meta.h: Stream meta-data
  *****************************************************************************
- * Copyright (C) 2004 the VideoLAN team
+ * Copyright (C) 2004 VLC authors and VideoLAN
  * $Id$
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
  * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef VLC_META_H
@@ -48,47 +48,46 @@ typedef enum vlc_meta_type_t
     vlc_meta_Publisher,
     vlc_meta_EncodedBy,
     vlc_meta_ArtworkURL,
-    vlc_meta_TrackID
+    vlc_meta_TrackID,
+    vlc_meta_TrackTotal
 } vlc_meta_type_t;
 
-#define VLC_META_TYPE_COUNT 17
+#define VLC_META_TYPE_COUNT 18
 
-typedef enum vlc_meta_status_e {
-    ITEM_PREPARSED      = 1,
-    ITEM_ARTURL_FETCHED = 2,
-    ITEM_ART_FETCHED    = 4,
-    ITEM_ART_NOTFOUND   = 8
-} vlc_meta_status_e;
+#define ITEM_PREPARSED       1
+#define ITEM_ARTURL_FETCHED  2
+#define ITEM_ART_FETCHED     4
+#define ITEM_ART_NOTFOUND    8
 
 /**
  * Basic function to deal with meta
  */
 struct vlc_meta_t;
 
-VLC_EXPORT(vlc_meta_t *, vlc_meta_New, ( void ));
-VLC_EXPORT(void,         vlc_meta_Delete, ( vlc_meta_t *m ));
-VLC_EXPORT(void,         vlc_meta_Set, ( vlc_meta_t *p_meta, vlc_meta_type_t meta_type, const char *psz_val ));
-VLC_EXPORT(const char *, vlc_meta_Get, ( const vlc_meta_t *p_meta, vlc_meta_type_t meta_type ));
+VLC_API vlc_meta_t * vlc_meta_New( void ) VLC_USED;
+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_EXPORT(void,         vlc_meta_AddExtra, ( vlc_meta_t *m, const char *psz_name, const char *psz_value ));
-VLC_EXPORT(const char *, vlc_meta_GetExtra, ( const vlc_meta_t *m, const char *psz_name ));
-VLC_EXPORT(unsigned,     vlc_meta_GetExtraCount, ( const vlc_meta_t *m ));
+VLC_API void vlc_meta_AddExtra( 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 );
 
 /**
  * Allocate a copy of all extra meta names and a table with it.
  * Be sure to free both the returned pointers and its name.
  */
-VLC_EXPORT(char **,      vlc_meta_CopyExtraNames, ( const vlc_meta_t *m ));
+VLC_API char ** vlc_meta_CopyExtraNames( const vlc_meta_t *m ) VLC_USED;
 
-VLC_EXPORT(void,         vlc_meta_Merge, ( vlc_meta_t *dst, const vlc_meta_t *src ));
+VLC_API void vlc_meta_Merge( vlc_meta_t *dst, const vlc_meta_t *src );
 
-VLC_EXPORT(vlc_meta_status_e, vlc_meta_GetStatus, ( vlc_meta_t *m ));
-VLC_EXPORT(void,              vlc_meta_SetStatus, ( vlc_meta_t *m, vlc_meta_status_e status ));
+VLC_API int vlc_meta_GetStatus( vlc_meta_t *m );
+VLC_API void vlc_meta_SetStatus( vlc_meta_t *m, int status );
 
 /**
  * Returns a localizes string describing the meta
  */
-VLC_EXPORT(const char *, vlc_meta_TypeToLocalizedString, ( vlc_meta_type_t meta_type ) );
+VLC_API const char * vlc_meta_TypeToLocalizedString( vlc_meta_type_t meta_type );
 
 enum {
     ALBUM_ART_WHEN_ASKED,
@@ -104,10 +103,10 @@ typedef struct meta_export_t
     const char *psz_file;
 } meta_export_t;
 
-VLC_EXPORT( int, input_item_WriteMeta, (vlc_object_t *, input_item_t *) );
+VLC_API int input_item_WriteMeta(vlc_object_t *, input_item_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_item.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 )