comparison libvo/vo_macosx.m @ 16171:fd51fd1ff231

Fix the return types of all (six) libvo API functions. Used to be uint32_t, but return values can be negative (VO_ERROR, VO_NOTAVAIL and VO_NOTIMPL), so it's changed to int now.
author ivo
date Fri, 05 Aug 2005 01:24:37 +0000
parents b010355f31dc
children 35b310d35aa0
comparison
equal deleted inserted replaced
16170:7c5d6c82e5ed 16171:fd51fd1ff231
82 vo_draw_alpha_yuy2(w,h,src,srca,stride,image_data + (x0 + y0 * image_width) * 2,image_width*2); 82 vo_draw_alpha_yuy2(w,h,src,srca,stride,image_data + (x0 + y0 * image_width) * 2,image_width*2);
83 break; 83 break;
84 } 84 }
85 } 85 }
86 86
87 static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t flags, char *title, uint32_t format) 87 static int config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t flags, char *title, uint32_t format)
88 { 88 {
89 int i; 89 int i;
90 90
91 //init screen 91 //init screen
92 screen_array = [NSScreen screens]; 92 screen_array = [NSScreen screens];
152 static void flip_page(void) 152 static void flip_page(void)
153 { 153 {
154 [mpGLView render]; 154 [mpGLView render];
155 } 155 }
156 156
157 static uint32_t draw_slice(uint8_t *src[], int stride[], int w,int h,int x,int y) 157 static int draw_slice(uint8_t *src[], int stride[], int w,int h,int x,int y)
158 { 158 {
159 [mpGLView setCurrentTexture]; 159 [mpGLView setCurrentTexture];
160 return 0; 160 return 0;
161 } 161 }
162 162
163 163
164 static uint32_t draw_frame(uint8_t *src[]) 164 static int draw_frame(uint8_t *src[])
165 { 165 {
166 switch (image_format) 166 switch (image_format)
167 { 167 {
168 case IMGFMT_BGR32: 168 case IMGFMT_BGR32:
169 case IMGFMT_RGB32: 169 case IMGFMT_RGB32:
176 } 176 }
177 [mpGLView setCurrentTexture]; 177 [mpGLView setCurrentTexture];
178 return 0; 178 return 0;
179 } 179 }
180 180
181 static uint32_t query_format(uint32_t format) 181 static int query_format(uint32_t format)
182 { 182 {
183 image_format = format; 183 image_format = format;
184 184
185 switch(format) 185 switch(format)
186 { 186 {
202 ShowCursor(); 202 ShowCursor();
203 203
204 [autoreleasepool release]; 204 [autoreleasepool release];
205 } 205 }
206 206
207 static uint32_t preinit(const char *arg) 207 static int preinit(const char *arg)
208 { 208 {
209 int parse_err = 0; 209 int parse_err = 0;
210 210
211 #if !defined (MACOSX_FINDER_SUPPORT) || !defined (HAVE_SDL) 211 #if !defined (MACOSX_FINDER_SUPPORT) || !defined (HAVE_SDL)
212 //this chunk of code is heavily based off SDL_macosx.m from SDL 212 //this chunk of code is heavily based off SDL_macosx.m from SDL
258 [mpGLView preinit]; 258 [mpGLView preinit];
259 259
260 return 0; 260 return 0;
261 } 261 }
262 262
263 static uint32_t control(uint32_t request, void *data, ...) 263 static int control(uint32_t request, void *data, ...)
264 { 264 {
265 switch (request) 265 switch (request)
266 { 266 {
267 case VOCTRL_PAUSE: return (int_pause=1); 267 case VOCTRL_PAUSE: return (int_pause=1);
268 case VOCTRL_RESUME: return (int_pause=0); 268 case VOCTRL_RESUME: return (int_pause=0);