comparison libvo/vo_winvidix.c @ 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 0651bf280391
children 7f34acc96aa4
comparison
equal deleted inserted replaced
16170:7c5d6c82e5ed 16171:fd51fd1ff231
179 } 179 }
180 return DefWindowProc(hwnd, message, wParam, lParam); 180 return DefWindowProc(hwnd, message, wParam, lParam);
181 } 181 }
182 182
183 183
184 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){ 184 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){
185 title = "MPlayer VIDIX WIN32 Overlay"; 185 title = "MPlayer VIDIX WIN32 Overlay";
186 186
187 panscan_init(); 187 panscan_init();
188 188
189 image_height = height; 189 image_height = height;
279 static void flip_page(void){ 279 static void flip_page(void){
280 mp_msg(MSGT_VO, MSGL_FATAL, "[winvidix] error: didn't use vidix flip_page!\n"); 280 mp_msg(MSGT_VO, MSGL_FATAL, "[winvidix] error: didn't use vidix flip_page!\n");
281 return; 281 return;
282 } 282 }
283 283
284 static uint32_t draw_slice(uint8_t *src[], int stride[],int w, int h, int x, int y){ 284 static int draw_slice(uint8_t *src[], int stride[],int w, int h, int x, int y){
285 UNUSED(src); 285 UNUSED(src);
286 UNUSED(stride); 286 UNUSED(stride);
287 UNUSED(w); 287 UNUSED(w);
288 UNUSED(h); 288 UNUSED(h);
289 UNUSED(x); 289 UNUSED(x);
290 UNUSED(y); 290 UNUSED(y);
291 mp_msg(MSGT_VO, MSGL_FATAL, "[winvidix] error: didn't use vidix draw_slice!\n"); 291 mp_msg(MSGT_VO, MSGL_FATAL, "[winvidix] error: didn't use vidix draw_slice!\n");
292 return(-1); 292 return(-1);
293 } 293 }
294 294
295 static uint32_t draw_frame(uint8_t *src[]){ 295 static int draw_frame(uint8_t *src[]){
296 UNUSED(src); 296 UNUSED(src);
297 mp_msg(MSGT_VO, MSGL_FATAL, "[winvidix] error: didn't use vidix draw_frame!\n"); 297 mp_msg(MSGT_VO, MSGL_FATAL, "[winvidix] error: didn't use vidix draw_frame!\n");
298 return(-1); 298 return(-1);
299 } 299 }
300 300
301 static uint32_t query_format(uint32_t format){ 301 static int query_format(uint32_t format){
302 return(vidix_query_fourcc(format)); 302 return(vidix_query_fourcc(format));
303 } 303 }
304 304
305 static void uninit(void){ 305 static void uninit(void){
306 DestroyWindow(hWndFS); 306 DestroyWindow(hWndFS);
313 vidix_name = NULL; 313 vidix_name = NULL;
314 } 314 }
315 // 315 //
316 } 316 }
317 317
318 static uint32_t preinit(const char *arg){ 318 static int preinit(const char *arg){
319 if (arg) 319 if (arg)
320 vidix_name = strdup(arg); 320 vidix_name = strdup(arg);
321 else 321 else
322 { 322 {
323 mp_msg(MSGT_VO, MSGL_INFO, "No vidix driver name provided, probing available ones (-v option for details)!\n"); 323 mp_msg(MSGT_VO, MSGL_INFO, "No vidix driver name provided, probing available ones (-v option for details)!\n");
328 return(1); 328 return(1);
329 329
330 return(0); 330 return(0);
331 } 331 }
332 332
333 static uint32_t control(uint32_t request, void *data, ...){ 333 static int control(uint32_t request, void *data, ...){
334 switch (request) { 334 switch (request) {
335 case VOCTRL_FULLSCREEN: 335 case VOCTRL_FULLSCREEN:
336 if(!vo_fs){vo_fs=1;ShowWindow(hWndFS,SW_SHOW);SetForegroundWindow(hWndFS);} 336 if(!vo_fs){vo_fs=1;ShowWindow(hWndFS,SW_SHOW);SetForegroundWindow(hWndFS);}
337 else {vo_fs=0; ShowWindow(hWndFS,SW_HIDE);} 337 else {vo_fs=0; ShowWindow(hWndFS,SW_HIDE);}
338 break; 338 break;