mediacontrol_structures.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * control_structures.h: global header for mediacontrol
00003  *****************************************************************************
00004  * Copyright (C) 2005 the VideoLAN team
00005  * $Id$
00006  *
00007  * Authors: Olivier Aubert <olivier.aubert@liris.univ-lyon1.fr>
00008  *
00009  * This program is free software; you can redistribute it and/or modify
00010  * it under the terms of the GNU General Public License as published by
00011  * the Free Software Foundation; either version 2 of the License, or
00012  * (at your option) any later version.
00013  *
00014  * This program is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  * GNU General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU General Public License
00020  * along with this program; if not, write to the Free Software
00021  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
00022  *****************************************************************************/
00023 /**
00024  * \defgroup mediacontrol_structures MediaControl Structures
00025  * Data structures used in the MediaControl API.
00026  *
00027  * @{
00028  */
00029 
00030 #ifndef VLC_CONTROL_STRUCTURES_H
00031 #define VLC_CONTROL_STRUCTURES_H 1
00032 
00033 # ifdef __cplusplus
00034 extern "C" {
00035 # endif
00036 
00037 #include <stdint.h>
00038 
00039 /**
00040  * A position may have different origins:
00041  *  - absolute counts from the movie start
00042  *  - relative counts from the current position
00043  *  - modulo counts from the current position and wraps at the end of the movie
00044  */
00045 typedef enum  {
00046     mediacontrol_AbsolutePosition,
00047     mediacontrol_RelativePosition,
00048     mediacontrol_ModuloPosition
00049 } mediacontrol_PositionOrigin;
00050 
00051 /**
00052  * Units available in mediacontrol Positions
00053  *  - ByteCount number of bytes
00054  *  - SampleCount number of frames
00055  *  - MediaTime time in milliseconds
00056  */
00057 typedef enum {
00058     mediacontrol_ByteCount,
00059     mediacontrol_SampleCount,
00060     mediacontrol_MediaTime
00061 } mediacontrol_PositionKey;
00062 
00063 /**
00064  * Possible player status
00065  * Note the order of these enums must match exactly the order of
00066  * libvlc_state_t and input_state_e enums.
00067  */
00068 typedef enum {
00069     mediacontrol_UndefinedStatus=0, mediacontrol_InitStatus,
00070     mediacontrol_BufferingStatus, mediacontrol_PlayingStatus,
00071     mediacontrol_PauseStatus,     mediacontrol_StopStatus,
00072     mediacontrol_ForwardStatus,   mediacontrol_BackwardStatus,
00073     mediacontrol_EndStatus,       mediacontrol_ErrorStatus,
00074 } mediacontrol_PlayerStatus;
00075 
00076 /**
00077  * MediaControl Position
00078  */
00079 typedef struct {
00080     mediacontrol_PositionOrigin origin;
00081     mediacontrol_PositionKey key;
00082     int64_t value;
00083 } mediacontrol_Position;
00084 
00085 /**
00086  * RGBPicture structure
00087  * This generic structure holds a picture in an encoding specified by type.
00088  */
00089 typedef struct {
00090     int  width;
00091     int  height;
00092     uint32_t type;
00093     int64_t date;
00094     int  size;
00095     char *data;
00096 } mediacontrol_RGBPicture;
00097 
00098 /**
00099  * Playlist sequence
00100  * A simple list of strings.
00101  */
00102 typedef struct {
00103     int size;
00104     char **data;
00105 } mediacontrol_PlaylistSeq;
00106 
00107 typedef struct {
00108     int code;
00109     char *message;
00110 } mediacontrol_Exception;
00111 
00112 /**
00113  * Exception codes
00114  */
00115 #define mediacontrol_PositionKeyNotSupported    1
00116 #define mediacontrol_PositionOriginNotSupported 2
00117 #define mediacontrol_InvalidPosition            3
00118 #define mediacontrol_PlaylistException          4
00119 #define mediacontrol_InternalException          5
00120 
00121 /**
00122  * Stream information
00123  * This structure allows to quickly get various informations about the stream.
00124  */
00125 typedef struct {
00126     mediacontrol_PlayerStatus streamstatus;
00127     char *url;         /* The URL of the current media stream */
00128     int64_t position;  /* actual location in the stream (in ms) */
00129     int64_t length;    /* total length of the stream (in ms) */
00130 } mediacontrol_StreamInformation;
00131 
00132 
00133 # ifdef __cplusplus
00134 }
00135 # endif
00136 
00137 #endif
00138 
00139 /** @} */

Generated on Wed Aug 13 08:02:37 2008 for VLC by  doxygen 1.5.1