1 /*****************************************************************************
2 * mediacontrol_structures.h: global header for mediacontrol
3 *****************************************************************************
4 * Copyright (C) 2005-2008 the VideoLAN team
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 *****************************************************************************/
26 * This file defines libvlc mediacontrol_* data structures
30 * \defgroup mediacontrol_structures MediaControl Structures
31 * Data structures used in the MediaControl API.
36 #ifndef VLC_CONTROL_STRUCTURES_H
37 #define VLC_CONTROL_STRUCTURES_H 1
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
52 mediacontrol_AbsolutePosition
,
53 mediacontrol_RelativePosition
,
54 mediacontrol_ModuloPosition
55 } mediacontrol_PositionOrigin
;
58 * Units available in mediacontrol Positions
59 * - ByteCount number of bytes
60 * - SampleCount number of frames
61 * - MediaTime time in milliseconds
64 mediacontrol_ByteCount
,
65 mediacontrol_SampleCount
,
66 mediacontrol_MediaTime
67 } mediacontrol_PositionKey
;
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.
75 mediacontrol_UndefinedStatus
=0, mediacontrol_InitStatus
,
76 mediacontrol_BufferingStatus
, mediacontrol_PlayingStatus
,
77 mediacontrol_PauseStatus
, mediacontrol_StopStatus
,
78 mediacontrol_EndStatus
, mediacontrol_ErrorStatus
,
79 } mediacontrol_PlayerStatus
;
82 * MediaControl Position
85 mediacontrol_PositionOrigin origin
;
86 mediacontrol_PositionKey key
;
88 } mediacontrol_Position
;
91 * RGBPicture structure
92 * This generic structure holds a picture in an encoding specified by type.
101 } mediacontrol_RGBPicture
;
105 * A simple list of strings.
110 } mediacontrol_PlaylistSeq
;
115 } mediacontrol_Exception
;
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
128 * This structure allows to quickly get various information about the stream.
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
;