]> git.sesse.net Git - vlc/blobdiff - include/vlc/libvlc_structures.h
Minor memory layout optimization
[vlc] / include / vlc / libvlc_structures.h
index f8c676864c8fb98f9bfaaddb8e3c9bbcfab7bbd3..49ddbbbb1924dc15a371c96ae8ab453b37bf6685 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * libvlc.h:  libvlc_* new external API structures
  *****************************************************************************
- * Copyright (C) 1998-2007 the VideoLAN team
+ * Copyright (C) 1998-2008 the VideoLAN team
  * $Id $
  *
  * Authors: Filippo Carone <littlejohn@videolan.org>
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
-#ifndef _LIBVLC_STRUCTURES_H
-#define _LIBVLC_STRUCTURES_H 1
+#ifndef LIBVLC_STRUCTURES_H
+#define LIBVLC_STRUCTURES_H 1
+
+/**
+ * \file
+ * This file defines libvlc_* new external API structures
+ */
+
+#include <stdint.h>
 
 # ifdef __cplusplus
 extern "C" {
@@ -36,7 +43,7 @@ typedef struct libvlc_instance_t libvlc_instance_t;
  *****************************************************************************/
 
 /** \defgroup libvlc_exception libvlc_exception
- * \ingroup libvlc
+ * \ingroup libvlc_core
  * LibVLC Exceptions handling
  * @{
  */
@@ -54,12 +61,12 @@ typedef struct libvlc_exception_t
  * Time
  *****************************************************************************/
 /** \defgroup libvlc_time libvlc_time
- * \ingroup libvlc
+ * \ingroup libvlc_core
  * LibVLC Time support in libvlc
  * @{
  */
 
-typedef vlc_int64_t libvlc_time_t;
+typedef int64_t libvlc_time_t;
 
 /**@} */
 
@@ -96,7 +103,8 @@ typedef enum libvlc_meta_t {
     libvlc_meta_Publisher,
     libvlc_meta_EncodedBy,
     libvlc_meta_ArtworkURL,
-    libvlc_meta_TrackID
+    libvlc_meta_TrackID,
+    /* Add new meta types HERE */
 } libvlc_meta_t;
 
 /**@} */
@@ -117,16 +125,24 @@ typedef struct libvlc_media_t libvlc_media_t;
 
 typedef struct libvlc_media_player_t libvlc_media_player_t;
 
+/**
+ * Note the order of libvlc_state_t enum must match exactly the order of
+ * @see mediacontrol_PlayerStatus and @see input_state_e enums.
+ *
+ * Expected states by web plugins are:
+ * IDLE/CLOSE=0, OPENING=1, BUFFERING=2, PLAYING=3, PAUSED=4,
+ * STOPPING=5, ENDED=6, ERROR=7
+ */
 typedef enum libvlc_state_t
 {
-    libvlc_NothingSpecial,
-    libvlc_Stopped,
+    libvlc_NothingSpecial=0,
     libvlc_Opening,
     libvlc_Buffering,
-    libvlc_Ended,
-    libvlc_Error,
     libvlc_Playing,
-    libvlc_Paused
+    libvlc_Paused,
+    libvlc_Stopped,
+    libvlc_Ended,
+    libvlc_Error
 } libvlc_state_t;
 
 /**@} */
@@ -192,6 +208,53 @@ typedef struct libvlc_playlist_item_t
 
 /**@} */
 
+/*****************************************************************************
+ * Media Player
+ *****************************************************************************/
+/** \defgroup libvlc_media_player libvlc_media_player
+ * \ingroup libvlc
+ * LibVLC Media Player, object that let you play a media
+ * in a libvlc_drawable_t
+ * @{
+ */
+
+/**
+ * Description for video, audio tracks and subtitles. It contains
+ * id, name (description string) and pointer to next record.
+ */
+typedef struct libvlc_track_description_t
+{
+    int   i_id;
+    char *psz_name;
+    struct libvlc_track_description_t *p_next;
+
+} libvlc_track_description_t;
+
+/**@} */
+
+/*****************************************************************************
+ * Audio
+ *****************************************************************************/
+/** \defgroup libvlc_audio libvlc_audio
+ * \ingroup libvlc_media_player
+ * LibVLC Audio handling
+ * @{
+ */
+
+/**
+ * Description for audio output. It contains
+ * name, description and pointer to next record.
+ */
+typedef struct libvlc_audio_output_t
+{
+    char *psz_name;
+    char *psz_description;
+    struct libvlc_audio_output_t *p_next;
+
+} libvlc_audio_output_t;
+
+/**@} */
+
 
 /*****************************************************************************
  * Video
@@ -201,7 +264,7 @@ typedef struct libvlc_playlist_item_t
  * LibVLC Video handling
  * @{
  */
+
 /**
 * Downcast to this general type as placeholder for a platform specific one, such as:
 *  Drawable on X11,
@@ -241,7 +304,7 @@ typedef struct libvlc_media_discoverer_t libvlc_media_discoverer_t;
  *****************************************************************************/
 
 /** \defgroup libvlc_log libvlc_log
- * \ingroup libvlc
+ * \ingroup libvlc_core
  * LibVLC Message Logging
  * @{
  */