1 /*****************************************************************************
2 * control.h: global header for mediacontrol
3 *****************************************************************************
4 * Copyright (C) 2005 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., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
22 *****************************************************************************/
24 #ifndef _VLC_CONTROL_H
25 #define _VLC_CONTROL_H 1
32 #define WINDOWHANDLE HWND
34 #define WINDOWHANDLE int
37 #include <vlc/mediacontrol_structures.h>
39 /************************************************************************
40 * Position Object Manipulation
41 *************************************************************************/
50 } mediacontrol_RGBPicture;
55 } mediacontrol_PlaylistSeq;
60 } mediacontrol_Exception;
63 #define mediacontrol_PositionKeyNotSupported 1
64 #define mediacontrol_PositionOriginNotSupported 2
65 #define mediacontrol_InvalidPosition 3
66 #define mediacontrol_PlaylistException 4
67 #define mediacontrol_InternalException 5
69 typedef mediacontrol_Instance;
71 /* Cf stream_control.h */
72 enum mediacontrol_PlayerStatusList
74 mediacontrol_PlayingStatus, mediacontrol_PauseStatus,
75 mediacontrol_ForwardStatus, mediacontrol_BackwardStatus,
76 mediacontrol_InitStatus, mediacontrol_EndStatus,
77 mediacontrol_UndefinedStatus
79 typedef enum mediacontrol_PlayerStatusList mediacontrol_PlayerStatus;
82 mediacontrol_PlayerStatus streamstatus;
83 char *url; /* The URL of the current media stream */
84 vlc_int64_t position; /* actual location in the stream (in ms) */
85 vlc_int64_t length; /* total length of the stream (in ms) */
86 } mediacontrol_StreamInformation;
88 /**************************************************************************
90 ***************************************************************************/
92 mediacontrol_RGBPicture *mediacontrol_RGBPicture__alloc( int datasize );
94 void mediacontrol_RGBPicture__free( mediacontrol_RGBPicture *pic );
96 mediacontrol_RGBPicture *
97 _mediacontrol_createRGBPicture( int, int, long, vlc_int64_t l_date,
100 mediacontrol_PlaylistSeq *mediacontrol_PlaylistSeq__alloc( int size );
102 void mediacontrol_PlaylistSeq__free( mediacontrol_PlaylistSeq *ps );
104 mediacontrol_Exception *
105 mediacontrol_exception_init( mediacontrol_Exception *exception );
107 void mediacontrol_exception_free(mediacontrol_Exception *exception);
109 /*****************************************************************************
111 *****************************************************************************/
112 mediacontrol_Instance *
113 mediacontrol_new( char **args, mediacontrol_Exception *exception );
115 mediacontrol_Instance *
116 mediacontrol_new_from_object( int vlc_object_id,
117 mediacontrol_Exception *exception );
119 mediacontrol_Position * mediacontrol_get_media_position(
120 mediacontrol_Instance *self,
121 const mediacontrol_PositionOrigin an_origin,
122 const mediacontrol_PositionKey a_key,
123 mediacontrol_Exception *exception );
125 void mediacontrol_set_media_position( mediacontrol_Instance *self,
126 const mediacontrol_Position *a_position,
127 mediacontrol_Exception *exception );
129 void mediacontrol_start( mediacontrol_Instance *self,
130 const mediacontrol_Position *a_position,
131 mediacontrol_Exception *exception );
133 void mediacontrol_pause( mediacontrol_Instance *self,
134 const mediacontrol_Position *a_position,
135 mediacontrol_Exception *exception );
137 void mediacontrol_resume( mediacontrol_Instance *self,
138 const mediacontrol_Position *a_position,
139 mediacontrol_Exception *exception );
141 void mediacontrol_stop( mediacontrol_Instance *self,
142 const mediacontrol_Position *a_position,
143 mediacontrol_Exception *exception );
145 void mediacontrol_exit( mediacontrol_Instance *self );
147 void mediacontrol_playlist_add_item( mediacontrol_Instance *self,
148 const char* psz_file,
149 mediacontrol_Exception *exception );
150 void mediacontrol_playlist_clear( mediacontrol_Instance *self,
151 mediacontrol_Exception *exception );
152 mediacontrol_PlaylistSeq *
153 mediacontrol_playlist_get_list( mediacontrol_Instance *self,
154 mediacontrol_Exception *exception );
157 /*****************************************************************************
159 *****************************************************************************/
160 mediacontrol_RGBPicture *
161 mediacontrol_snapshot( mediacontrol_Instance *self,
162 const mediacontrol_Position *a_position,
163 mediacontrol_Exception *exception );
165 /* Return a NULL terminated list */
166 mediacontrol_RGBPicture **
167 mediacontrol_all_snapshots( mediacontrol_Instance *self,
168 mediacontrol_Exception *exception );
170 /* Displays the message string, between "begin" and "end" positions */
171 void mediacontrol_display_text( mediacontrol_Instance *self,
173 const mediacontrol_Position *begin,
174 const mediacontrol_Position *end,
175 mediacontrol_Exception *exception );
177 mediacontrol_StreamInformation *
178 mediacontrol_get_stream_information( mediacontrol_Instance *self,
179 mediacontrol_PositionKey a_key,
180 mediacontrol_Exception *exception );
183 mediacontrol_sound_get_volume( mediacontrol_Instance *self,
184 mediacontrol_Exception *exception );
185 void mediacontrol_sound_set_volume( mediacontrol_Instance *self,
186 const unsigned short volume,
187 mediacontrol_Exception *exception );
189 vlc_bool_t mediacontrol_set_visual( mediacontrol_Instance *self,
190 WINDOWHANDLE visual_id,
191 mediacontrol_Exception *exception );