s/informations/information/
[vlc/asuraparaju-public.git] / bindings / mediacontrol / mediacontrol_structures.h
blob810ce3cdc5bf62639053c32853bb34194b63d0f9
1 /*****************************************************************************
2 * mediacontrol_structures.h: global header for mediacontrol
3 *****************************************************************************
4 * Copyright (C) 2005-2008 the VideoLAN team
5 * $Id$
7 * Authors: Olivier Aubert <olivier.aubert@liris.univ-lyon1.fr>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22 *****************************************************************************/
24 /**
25 * \file
26 * This file defines libvlc mediacontrol_* data structures
29 /**
30 * \defgroup mediacontrol_structures MediaControl Structures
31 * Data structures used in the MediaControl API.
33 * @{
36 #ifndef VLC_CONTROL_STRUCTURES_H
37 #define VLC_CONTROL_STRUCTURES_H 1
39 # ifdef __cplusplus
40 extern "C" {
41 # endif
43 #include <stdint.h>
45 /**
46 * A position may have different origins:
47 * - absolute counts from the movie start
48 * - relative counts from the current position
49 * - modulo counts from the current position and wraps at the end of the movie
51 typedef enum {
52 mediacontrol_AbsolutePosition,
53 mediacontrol_RelativePosition,
54 mediacontrol_ModuloPosition
55 } mediacontrol_PositionOrigin;
57 /**
58 * Units available in mediacontrol Positions
59 * - ByteCount number of bytes
60 * - SampleCount number of frames
61 * - MediaTime time in milliseconds
63 typedef enum {
64 mediacontrol_ByteCount,
65 mediacontrol_SampleCount,
66 mediacontrol_MediaTime
67 } mediacontrol_PositionKey;
69 /**
70 * Possible player status
71 * Note the order of these enums must match exactly the order of
72 * libvlc_state_t and input_state_e enums.
74 typedef enum {
75 mediacontrol_UndefinedStatus=0, mediacontrol_InitStatus,
76 mediacontrol_BufferingStatus, mediacontrol_PlayingStatus,
77 mediacontrol_PauseStatus, mediacontrol_StopStatus,
78 mediacontrol_EndStatus, mediacontrol_ErrorStatus,
79 } mediacontrol_PlayerStatus;
81 /**
82 * MediaControl Position
84 typedef struct {
85 mediacontrol_PositionOrigin origin;
86 mediacontrol_PositionKey key;
87 int64_t value;
88 } mediacontrol_Position;
90 /**
91 * RGBPicture structure
92 * This generic structure holds a picture in an encoding specified by type.
94 typedef struct {
95 int width;
96 int height;
97 uint32_t type;
98 int64_t date;
99 int size;
100 char *data;
101 } mediacontrol_RGBPicture;
104 * Playlist sequence
105 * A simple list of strings.
107 typedef struct {
108 int size;
109 char **data;
110 } mediacontrol_PlaylistSeq;
112 typedef struct {
113 int code;
114 char *message;
115 } mediacontrol_Exception;
118 * Exception codes
120 #define mediacontrol_PositionKeyNotSupported 1
121 #define mediacontrol_PositionOriginNotSupported 2
122 #define mediacontrol_InvalidPosition 3
123 #define mediacontrol_PlaylistException 4
124 #define mediacontrol_InternalException 5
127 * Stream information
128 * This structure allows to quickly get various information about the stream.
130 typedef struct {
131 mediacontrol_PlayerStatus streamstatus;
132 char *url; /* The URL of the current media stream */
133 int64_t position; /* actual location in the stream (in ms) */
134 int64_t length; /* total length of the stream (in ms) */
135 } mediacontrol_StreamInformation;
138 # ifdef __cplusplus
140 # endif
142 #endif
144 /** @} */