mediacontrol_structures.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * mediacontrol_structures.h: global header for mediacontrol
00003  *****************************************************************************
00004  * Copyright (C) 2005-2008 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 /**
00025  * \file
00026  * This file defines libvlc mediacontrol_* data structures
00027  */
00028 
00029 /**
00030  * \defgroup mediacontrol_structures MediaControl Structures
00031  * Data structures used in the MediaControl API.
00032  *
00033  * @{
00034  */
00035 
00036 #ifndef VLC_CONTROL_STRUCTURES_H
00037 #define VLC_CONTROL_STRUCTURES_H 1
00038 
00039 # ifdef __cplusplus
00040 extern "C" {
00041 # endif
00042 
00043 #include <stdint.h>
00044 
00045 /**
00046  * A position may have different origins:
00047  *  - absolute counts from the movie start
00048  *  - relative counts from the current position
00049  *  - modulo counts from the current position and wraps at the end of the movie
00050  */
00051 typedef enum  {
00052     mediacontrol_AbsolutePosition,
00053     mediacontrol_RelativePosition,
00054     mediacontrol_ModuloPosition
00055 } mediacontrol_PositionOrigin;
00056 
00057 /**
00058  * Units available in mediacontrol Positions
00059  *  - ByteCount number of bytes
00060  *  - SampleCount number of frames
00061  *  - MediaTime time in milliseconds
00062  */
00063 typedef enum {
00064     mediacontrol_ByteCount,
00065     mediacontrol_SampleCount,
00066     mediacontrol_MediaTime
00067 } mediacontrol_PositionKey;
00068 
00069 /**
00070  * Possible player status
00071  * Note the order of these enums must match exactly the order of
00072  * libvlc_state_t and input_state_e enums.
00073  */
00074 typedef enum {
00075     mediacontrol_UndefinedStatus=0, mediacontrol_InitStatus,
00076     mediacontrol_BufferingStatus, mediacontrol_PlayingStatus,
00077     mediacontrol_PauseStatus,     mediacontrol_StopStatus,
00078     mediacontrol_EndStatus,       mediacontrol_ErrorStatus,
00079 } mediacontrol_PlayerStatus;
00080 
00081 /**
00082  * MediaControl Position
00083  */
00084 typedef struct {
00085     mediacontrol_PositionOrigin origin;
00086     mediacontrol_PositionKey key;
00087     int64_t value;
00088 } mediacontrol_Position;
00089 
00090 /**
00091  * RGBPicture structure
00092  * This generic structure holds a picture in an encoding specified by type.
00093  */
00094 typedef struct {
00095     int  width;
00096     int  height;
00097     uint32_t type;
00098     int64_t date;
00099     int  size;
00100     char *data;
00101 } mediacontrol_RGBPicture;
00102 
00103 /**
00104  * Playlist sequence
00105  * A simple list of strings.
00106  */
00107 typedef struct {
00108     int size;
00109     char **data;
00110 } mediacontrol_PlaylistSeq;
00111 
00112 typedef struct {
00113     int code;
00114     char *message;
00115 } mediacontrol_Exception;
00116 
00117 /**
00118  * Exception codes
00119  */
00120 #define mediacontrol_PositionKeyNotSupported    1
00121 #define mediacontrol_PositionOriginNotSupported 2
00122 #define mediacontrol_InvalidPosition            3
00123 #define mediacontrol_PlaylistException          4
00124 #define mediacontrol_InternalException          5
00125 
00126 /**
00127  * Stream information
00128  * This structure allows to quickly get various informations about the stream.
00129  */
00130 typedef struct {
00131     mediacontrol_PlayerStatus streamstatus;
00132     char *url;         /* The URL of the current media stream */
00133     int64_t position;  /* actual location in the stream (in ms) */
00134     int64_t length;    /* total length of the stream (in ms) */
00135 } mediacontrol_StreamInformation;
00136 
00137 
00138 # ifdef __cplusplus
00139 }
00140 # endif
00141 
00142 #endif
00143 
00144 /** @} */

Generated on Wed Mar 31 08:05:17 2010 for VLC by  doxygen 1.5.6