4 * Copyright (C) Nick Kurshev <nickols_k@mail.ru> - 2002
5 * Copyright (C) Alex Beregszaszi
7 * You can redistribute this file under terms and conditions
8 * of GNU General Public licence v2.
10 * This file contains vidix interface to any mplayer's VO plugin.
11 * (Partly based on vesa_lvo.c from mplayer's package)
18 #include <sys/ioctl.h>
30 #include "vidix/vidixlib.h"
31 #include "fastmemcpy.h"
33 #include "video_out.h"
35 #include "vosub_vidix.h"
37 #include "libmpcodecs/vfcap.h"
38 #include "libmpcodecs/mp_image.h"
40 #define NUM_FRAMES VID_PLAY_MAXFRAMES /* Temporary: driver will overwrite it */
42 static VDL_HANDLE vidix_handler
= NULL
;
43 static uint8_t *vidix_mem
= NULL
;
44 static uint8_t next_frame
;
45 static unsigned image_Bpp
,image_height
,image_width
,src_format
,forced_fourcc
=0;
46 static int video_on
=0;
48 static vidix_capability_t vidix_cap
;
49 static vidix_playback_t vidix_play
;
50 static vidix_fourcc_t vidix_fourcc
;
51 static vo_functions_t
* vo_server
;
52 static vidix_yuv_t dstrides
;
53 /*static uint32_t (*server_control)(uint32_t request, void *data, ...);*/
58 if((err
=vdlPlaybackOn(vidix_handler
))!=0)
60 mp_msg(MSGT_VO
,MSGL_ERR
, MSGTR_LIBVO_SUB_VIDIX_CantStartPlayback
,strerror(err
));
70 if((err
=vdlPlaybackOff(vidix_handler
))!=0)
72 mp_msg(MSGT_VO
,MSGL_ERR
, MSGTR_LIBVO_SUB_VIDIX_CantStopPlayback
,strerror(err
));
79 void vidix_term( void )
81 if( mp_msg_test(MSGT_VO
,MSGL_DBG2
) ) {
82 mp_msg(MSGT_VO
,MSGL_DBG2
, "vosub_vidix: vidix_term() was called\n"); }
84 vdlClose(vidix_handler
);
85 // vo_server->control=server_control;
88 static uint32_t vidix_draw_slice_420(uint8_t *image
[], int stride
[], int w
,int h
,int x
,int y
)
95 dest
= vidix_mem
+ vidix_play
.offsets
[next_frame
] + vidix_play
.offset
.y
;
96 dest
+= dstrides
.y
*y
+ x
;
104 if (vidix_play
.flags
& VID_PLAY_INTERLEAVED_UV
)
108 dest
= vidix_mem
+ vidix_play
.offsets
[next_frame
] + vidix_play
.offset
.v
;
109 dest
+= dstrides
.y
*y
/2 + x
; // <- is this correct ?
114 for(hi
= 0; hi
< h
; hi
++)
116 for(wi
= 0; wi
< w
; wi
++)
118 dest
[2*wi
+0] = src
[wi
];
119 dest
[2*wi
+1] = src2
[wi
];
129 dest
= vidix_mem
+ vidix_play
.offsets
[next_frame
] + vidix_play
.offset
.v
;
130 dest
+= dstrides
.v
*y
/4 + x
;
133 memcpy(dest
,src
,w
/2);
139 dest
= vidix_mem
+ vidix_play
.offsets
[next_frame
] + vidix_play
.offset
.u
;
140 dest
+= dstrides
.u
*y
/4 + x
;
143 memcpy(dest
,src
,w
/2);
145 dest
+= dstrides
.u
/2;
152 static uint32_t vidix_draw_slice_410(uint8_t *image
[], int stride
[], int w
,int h
,int x
,int y
)
159 dest
= vidix_mem
+ vidix_play
.offsets
[next_frame
] + vidix_play
.offset
.y
;
160 dest
+= dstrides
.y
*y
+ x
;
168 if (vidix_play
.flags
& VID_PLAY_INTERLEAVED_UV
)
170 mp_msg(MSGT_VO
,MSGL_WARN
, MSGTR_LIBVO_SUB_VIDIX_InterleavedUvForYuv410pNotSupported
);
175 dest
= vidix_mem
+ vidix_play
.offsets
[next_frame
] + vidix_play
.offset
.v
;
176 dest
+= dstrides
.v
*y
/8 + x
;
179 memcpy(dest
,src
,w
/4);
185 dest
= vidix_mem
+ vidix_play
.offsets
[next_frame
] + vidix_play
.offset
.u
;
186 dest
+= dstrides
.u
*y
/8 + x
;
189 memcpy(dest
,src
,w
/4);
191 dest
+= dstrides
.u
/4;
198 static uint32_t vidix_draw_slice_packed(uint8_t *image
[], int stride
[], int w
,int h
,int x
,int y
)
204 dest
= vidix_mem
+ vidix_play
.offsets
[next_frame
] + vidix_play
.offset
.y
;
205 dest
+= dstrides
.y
*y
+ x
;
208 memcpy(dest
,src
,w
*image_Bpp
);
215 uint32_t vidix_draw_slice(uint8_t *image
[], int stride
[], int w
,int h
,int x
,int y
)
217 mp_msg(MSGT_VO
,MSGL_WARN
, MSGTR_LIBVO_SUB_VIDIX_DummyVidixdrawsliceWasCalled
);
221 static uint32_t vidix_draw_image(mp_image_t
*mpi
){
222 if( mp_msg_test(MSGT_VO
,MSGL_DBG2
) ) {
223 mp_msg(MSGT_VO
,MSGL_DBG2
, "vosub_vidix: vidix_draw_image() was called\n"); }
225 // if -dr or -slices then do nothing:
226 if(mpi
->flags
&(MP_IMGFLAG_DIRECT
|MP_IMGFLAG_DRAW_CALLBACK
)) return VO_TRUE
;
228 vo_server
->draw_slice(mpi
->planes
,mpi
->stride
,
229 vidix_play
.src
.w
,vidix_play
.src
.h
,vidix_play
.src
.x
,vidix_play
.src
.y
);
233 uint32_t vidix_draw_frame(uint8_t *image
[])
235 mp_msg(MSGT_VO
,MSGL_WARN
, MSGTR_LIBVO_SUB_VIDIX_DummyVidixdrawframeWasCalled
);
239 void vidix_flip_page(void)
241 if( mp_msg_test(MSGT_VO
,MSGL_DBG2
) ) {
242 mp_msg(MSGT_VO
,MSGL_DBG2
, "vosub_vidix: vidix_flip_page() was called\n"); }
243 if(vo_doublebuffering
)
245 vdlPlaybackFrameSelect(vidix_handler
,next_frame
);
246 next_frame
=(next_frame
+1)%vidix_play
.num_frames
;
250 static void draw_alpha(int x0
,int y0
, int w
,int h
, unsigned char* src
, unsigned char *srca
, int stride
)
252 uint32_t apitch
,bespitch
;
254 lvo_mem
= vidix_mem
+ vidix_play
.offsets
[next_frame
] + vidix_play
.offset
.y
;
255 apitch
= vidix_play
.dest
.pitch
.y
-1;
256 switch(vidix_play
.fourcc
){
264 bespitch
= (vidix_play
.src
.w
+ apitch
) & (~apitch
);
265 vo_draw_alpha_yv12(w
,h
,src
,srca
,stride
,lvo_mem
+bespitch
*y0
+x0
,bespitch
);
268 bespitch
= (vidix_play
.src
.w
*2 + apitch
) & (~apitch
);
269 vo_draw_alpha_yuy2(w
,h
,src
,srca
,stride
,lvo_mem
+bespitch
*y0
+2*x0
,bespitch
);
272 bespitch
= (vidix_play
.src
.w
*2 + apitch
) & (~apitch
);
273 vo_draw_alpha_yuy2(w
,h
,src
,srca
,stride
,lvo_mem
+bespitch
*y0
+2*x0
+1,bespitch
);
277 bespitch
= (vidix_play
.src
.w
*4 + apitch
) & (~apitch
);
278 vo_draw_alpha_rgb32(w
,h
,src
,srca
,stride
,lvo_mem
+y0
*bespitch
+4*x0
,bespitch
);
282 bespitch
= (vidix_play
.src
.w
*3 + apitch
) & (~apitch
);
283 vo_draw_alpha_rgb24(w
,h
,src
,srca
,stride
,lvo_mem
+y0
*bespitch
+3*x0
,bespitch
);
287 bespitch
= (vidix_play
.src
.w
*2 + apitch
) & (~apitch
);
288 vo_draw_alpha_rgb16(w
,h
,src
,srca
,stride
,lvo_mem
+y0
*bespitch
+2*x0
,bespitch
);
292 bespitch
= (vidix_play
.src
.w
*2 + apitch
) & (~apitch
);
293 vo_draw_alpha_rgb15(w
,h
,src
,srca
,stride
,lvo_mem
+y0
*bespitch
+2*x0
,bespitch
);
300 void vidix_draw_osd(void)
302 if( mp_msg_test(MSGT_VO
,MSGL_DBG2
) ) {
303 mp_msg(MSGT_VO
,MSGL_DBG2
, "vosub_vidix: vidix_draw_osd() was called\n"); }
304 /* TODO: hw support */
305 vo_draw_text(vidix_play
.src
.w
,vidix_play
.src
.h
,draw_alpha
);
308 uint32_t vidix_query_fourcc(uint32_t format
)
310 if( mp_msg_test(MSGT_VO
,MSGL_DBG2
) ) {
311 mp_msg(MSGT_VO
,MSGL_DBG2
, "vosub_vidix: query_format was called: %x (%s)\n",format
,vo_format_name(format
)); }
312 vidix_fourcc
.fourcc
= format
;
313 vdlQueryFourcc(vidix_handler
,&vidix_fourcc
);
314 if (vidix_fourcc
.depth
== VID_DEPTH_NONE
)
316 return VFCAP_CSP_SUPPORTED
|VFCAP_CSP_SUPPORTED_BY_HW
|VFCAP_HWSCALE_UP
|VFCAP_HWSCALE_DOWN
|VFCAP_OSD
|VFCAP_ACCEPT_STRIDE
;
319 int vidix_grkey_support(void)
321 return(vidix_fourcc
.flags
& VID_CAP_COLORKEY
);
324 int vidix_grkey_get(vidix_grkey_t
*gr_key
)
326 return(vdlGetGrKeys(vidix_handler
, gr_key
));
329 int vidix_grkey_set(const vidix_grkey_t
*gr_key
)
331 return(vdlSetGrKeys(vidix_handler
, gr_key
));
335 static int is_422_planes_eq
=0;
336 int vidix_init(unsigned src_width
,unsigned src_height
,
337 unsigned x_org
,unsigned y_org
,unsigned dst_width
,
338 unsigned dst_height
,unsigned format
,unsigned dest_bpp
,
339 unsigned vid_w
,unsigned vid_h
)
344 uint32_t sstride
,apitch
;
345 if( mp_msg_test(MSGT_VO
,MSGL_DBG2
) )
346 mp_msg(MSGT_VO
,MSGL_DBG2
, "vosub_vidix: vidix_init() was called\n"
347 "src_w=%u src_h=%u dest_x_y_w_h = %u %u %u %u\n"
348 "format=%s dest_bpp=%u vid_w=%u vid_h=%u\n"
349 ,src_width
,src_height
,x_org
,y_org
,dst_width
,dst_height
350 ,vo_format_name(format
),dest_bpp
,vid_w
,vid_h
);
352 if(vidix_query_fourcc(format
) == 0)
354 mp_msg(MSGT_VO
,MSGL_ERR
, MSGTR_LIBVO_SUB_VIDIX_UnsupportedFourccForThisVidixDriver
,
355 format
,vo_format_name(format
));
359 if(((vidix_cap
.maxwidth
!= -1) && (vid_w
> vidix_cap
.maxwidth
)) ||
360 ((vidix_cap
.minwidth
!= -1) && (vid_w
< vidix_cap
.minwidth
)) ||
361 ((vidix_cap
.maxheight
!= -1) && (vid_h
> vidix_cap
.maxheight
)) ||
362 ((vidix_cap
.minwidth
!= -1 ) && (vid_h
< vidix_cap
.minheight
)))
364 mp_msg(MSGT_VO
,MSGL_ERR
, MSGTR_LIBVO_SUB_VIDIX_VideoServerHasUnsupportedResolution
,
365 vid_w
, vid_h
, vidix_cap
.minwidth
, vidix_cap
.minheight
,
366 vidix_cap
.maxwidth
, vidix_cap
.maxheight
);
373 case 1: err
= ((vidix_fourcc
.depth
& VID_DEPTH_1BPP
) != VID_DEPTH_1BPP
); break;
374 case 2: err
= ((vidix_fourcc
.depth
& VID_DEPTH_2BPP
) != VID_DEPTH_2BPP
); break;
375 case 4: err
= ((vidix_fourcc
.depth
& VID_DEPTH_4BPP
) != VID_DEPTH_4BPP
); break;
376 case 8: err
= ((vidix_fourcc
.depth
& VID_DEPTH_8BPP
) != VID_DEPTH_8BPP
); break;
377 case 12:err
= ((vidix_fourcc
.depth
& VID_DEPTH_12BPP
) != VID_DEPTH_12BPP
); break;
378 case 15:err
= ((vidix_fourcc
.depth
& VID_DEPTH_15BPP
) != VID_DEPTH_15BPP
); break;
379 case 16:err
= ((vidix_fourcc
.depth
& VID_DEPTH_16BPP
) != VID_DEPTH_16BPP
); break;
380 case 24:err
= ((vidix_fourcc
.depth
& VID_DEPTH_24BPP
) != VID_DEPTH_24BPP
); break;
381 case 32:err
= ((vidix_fourcc
.depth
& VID_DEPTH_32BPP
) != VID_DEPTH_32BPP
); break;
382 default: err
=1; break;
386 mp_msg(MSGT_VO
,MSGL_ERR
, MSGTR_LIBVO_SUB_VIDIX_VideoServerHasUnsupportedColorDepth
387 ,vidix_fourcc
.depth
);
390 if((dst_width
> src_width
|| dst_height
> src_height
) && (vidix_cap
.flags
& FLAG_UPSCALER
) != FLAG_UPSCALER
)
392 mp_msg(MSGT_VO
,MSGL_ERR
, MSGTR_LIBVO_SUB_VIDIX_DriverCantUpscaleImage
,
393 src_width
, src_height
, dst_width
, dst_height
);
396 if((dst_width
> src_width
|| dst_height
> src_height
) && (vidix_cap
.flags
& FLAG_DOWNSCALER
) != FLAG_DOWNSCALER
)
398 mp_msg(MSGT_VO
,MSGL_ERR
, MSGTR_LIBVO_SUB_VIDIX_DriverCantDownscaleImage
,
399 src_width
, src_height
, dst_width
, dst_height
);
402 image_width
= src_width
;
403 image_height
= src_height
;
405 if(forced_fourcc
) format
= forced_fourcc
;
406 memset(&vidix_play
,0,sizeof(vidix_playback_t
));
407 vidix_play
.fourcc
= format
;
408 vidix_play
.capability
= vidix_cap
.flags
; /* every ;) */
409 vidix_play
.blend_factor
= 0; /* for now */
410 /* display the full picture.
411 Nick: we could implement here zooming to a specified area -- alex */
412 vidix_play
.src
.x
= vidix_play
.src
.y
= 0;
413 vidix_play
.src
.w
= src_width
;
414 vidix_play
.src
.h
= src_height
;
415 vidix_play
.dest
.x
= x_org
;
416 vidix_play
.dest
.y
= y_org
;
417 vidix_play
.dest
.w
= dst_width
;
418 vidix_play
.dest
.h
= dst_height
;
419 // vidix_play.num_frames=vo_doublebuffering?NUM_FRAMES-1:1;
420 /* we aren't mad...3 buffers are more than enough */
421 vidix_play
.num_frames
=vo_doublebuffering
?3:1;
422 vidix_play
.src
.pitch
.y
= vidix_play
.src
.pitch
.u
= vidix_play
.src
.pitch
.v
= 0;
424 if((err
=vdlConfigPlayback(vidix_handler
,&vidix_play
))!=0)
426 mp_msg(MSGT_VO
,MSGL_ERR
, MSGTR_LIBVO_SUB_VIDIX_CantConfigurePlayback
,strerror(err
));
429 if ( mp_msg_test(MSGT_VO
,MSGL_V
) ) {
430 mp_msg(MSGT_VO
,MSGL_V
, "vosub_vidix: using %d buffer(s)\n", vidix_play
.num_frames
); }
432 vidix_mem
= vidix_play
.dga_addr
;
434 tmp
= calloc(image_width
, image_height
);
435 tmpa
= malloc(image_width
* image_height
);
436 memset(tmpa
, 1, image_width
* image_height
);
437 /* clear every frame with correct address and frame_size */
438 /* HACK: use draw_alpha to clear Y component */
439 for (i
= 0; i
< vidix_play
.num_frames
; i
++) {
441 memset(vidix_mem
+ vidix_play
.offsets
[i
], 0x80,
442 vidix_play
.frame_size
);
443 draw_alpha(0, 0, image_width
, image_height
, tmp
, tmpa
, image_width
);
447 /* show one of the "clear" frames */
459 apitch
= vidix_play
.dest
.pitch
.y
-1;
460 dstrides
.y
= (image_width
+ apitch
) & ~apitch
;
461 apitch
= vidix_play
.dest
.pitch
.v
-1;
462 dstrides
.v
= (image_width
+ apitch
) & ~apitch
;
463 apitch
= vidix_play
.dest
.pitch
.u
-1;
464 dstrides
.u
= (image_width
+ apitch
) & ~apitch
;
469 apitch
= vidix_play
.dest
.pitch
.y
-1;
470 dstrides
.y
= (image_width
*4 + apitch
) & ~apitch
;
471 dstrides
.u
= dstrides
.v
= 0;
476 apitch
= vidix_play
.dest
.pitch
.y
-1;
477 dstrides
.y
= (image_width
*3 + apitch
) & ~apitch
;
478 dstrides
.u
= dstrides
.v
= 0;
482 apitch
= vidix_play
.dest
.pitch
.y
-1;
483 dstrides
.y
= (image_width
*2 + apitch
) & ~apitch
;
484 dstrides
.u
= dstrides
.v
= 0;
488 /* tune some info here */
489 sstride
= src_width
*image_Bpp
;
492 is_422_planes_eq
= sstride
== dstrides
.y
;
494 if(src_format
== IMGFMT_YV12
|| src_format
== IMGFMT_I420
|| src_format
== IMGFMT_IYUV
)
495 vo_server
->draw_slice
= vidix_draw_slice_420
;
496 else if (src_format
== IMGFMT_YVU9
|| src_format
== IMGFMT_IF09
)
497 vo_server
->draw_slice
= vidix_draw_slice_410
;
498 else vo_server
->draw_slice
= vidix_draw_slice_packed
;
503 static uint32_t vidix_get_image(mp_image_t
*mpi
)
505 if(mpi
->type
==MP_IMGTYPE_STATIC
&& vidix_play
.num_frames
>1) return VO_FALSE
;
506 if(mpi
->flags
&MP_IMGFLAG_READABLE
) return VO_FALSE
; /* slow video ram */
507 if(( (mpi
->stride
[0]==dstrides
.y
&& (!(mpi
->flags
&MP_IMGFLAG_PLANAR
) ||
508 (mpi
->stride
[1]==dstrides
.u
&& mpi
->stride
[2]==dstrides
.v
)) )
509 || (mpi
->flags
&(MP_IMGFLAG_ACCEPT_STRIDE
|MP_IMGFLAG_ACCEPT_WIDTH
))) &&
510 (!forced_fourcc
&& !(vidix_play
.flags
& VID_PLAY_INTERLEAVED_UV
)))
512 if(mpi
->flags
&MP_IMGFLAG_ACCEPT_WIDTH
){
513 // check if only width is enough to represent strides:
514 if(mpi
->flags
&MP_IMGFLAG_PLANAR
){
515 if((dstrides
.y
>>1)!=dstrides
.v
|| dstrides
.v
!=dstrides
.u
) return VO_FALSE
;
517 if(dstrides
.y
% (mpi
->bpp
/8)) return VO_FALSE
;
520 mpi
->planes
[0]=vidix_mem
+vidix_play
.offsets
[next_frame
]+vidix_play
.offset
.y
;
521 mpi
->width
=mpi
->stride
[0]=dstrides
.y
;
522 if(mpi
->flags
&MP_IMGFLAG_PLANAR
)
524 mpi
->planes
[1]=vidix_mem
+vidix_play
.offsets
[next_frame
]+vidix_play
.offset
.v
;
525 mpi
->stride
[1]=dstrides
.v
>> mpi
->chroma_x_shift
;
526 mpi
->planes
[2]=vidix_mem
+vidix_play
.offsets
[next_frame
]+vidix_play
.offset
.u
;
527 mpi
->stride
[2]=dstrides
.u
>> mpi
->chroma_x_shift
;
529 mpi
->width
/=mpi
->bpp
/8;
530 mpi
->flags
|=MP_IMGFLAG_DIRECT
;
536 uint32_t vidix_control(uint32_t request
, void *data
, ...)
539 case VOCTRL_QUERY_FORMAT
:
540 return vidix_query_fourcc(*((uint32_t*)data
));
541 case VOCTRL_GET_IMAGE
:
542 return vidix_get_image(data
);
543 case VOCTRL_DRAW_IMAGE
:
544 return vidix_draw_image(data
);
545 case VOCTRL_GET_FRAME_NUM
:
546 *(uint32_t *)data
= next_frame
;
548 case VOCTRL_SET_FRAME_NUM
:
549 next_frame
= *(uint32_t *)data
;
551 case VOCTRL_GET_NUM_FRAMES
:
552 *(uint32_t *)data
= vidix_play
.num_frames
;
554 case VOCTRL_SET_EQUALIZER
:
558 vidix_video_eq_t info
;
560 if(!video_on
) return VO_FALSE
;
562 value
= va_arg(ap
, int);
565 // printf("vidix seteq %s -> %d \n",data,value);
567 /* vidix eq ranges are -1000..1000 */
568 if (!strcasecmp(data
, "brightness"))
570 info
.brightness
= value
*10;
571 info
.cap
= VEQ_CAP_BRIGHTNESS
;
573 else if (!strcasecmp(data
, "contrast"))
575 info
.contrast
= value
*10;
576 info
.cap
= VEQ_CAP_CONTRAST
;
578 else if (!strcasecmp(data
, "saturation"))
580 info
.saturation
= value
*10;
581 info
.cap
= VEQ_CAP_SATURATION
;
583 else if (!strcasecmp(data
, "hue"))
586 info
.cap
= VEQ_CAP_HUE
;
589 if (vdlPlaybackSetEq(vidix_handler
, &info
) == 0)
593 case VOCTRL_GET_EQUALIZER
:
597 vidix_video_eq_t info
;
599 if(!video_on
) return VO_FALSE
;
600 if (vdlPlaybackGetEq(vidix_handler
, &info
) != 0)
604 value
= va_arg(ap
, int*);
607 /* vidix eq ranges are -1000..1000 */
608 if (!strcasecmp(data
, "brightness"))
610 if (info
.cap
& VEQ_CAP_BRIGHTNESS
)
611 *value
= info
.brightness
/10;
613 else if (!strcasecmp(data
, "contrast"))
615 if (info
.cap
& VEQ_CAP_CONTRAST
)
616 *value
= info
.contrast
/10;
618 else if (!strcasecmp(data
, "saturation"))
620 if (info
.cap
& VEQ_CAP_SATURATION
)
621 *value
= info
.saturation
/10;
623 else if (!strcasecmp(data
, "hue"))
625 if (info
.cap
& VEQ_CAP_HUE
)
626 *value
= info
.hue
/10;
633 // WARNING: we drop extra parameters (...) here!
634 // return server_control(request,data); //VO_NOTIMPL;
637 int vidix_preinit(const char *drvname
,vo_functions_t
*server
)
640 if( mp_msg_test(MSGT_VO
,MSGL_DBG2
) ) {
641 mp_msg(MSGT_VO
,MSGL_DBG2
, "vosub_vidix: vidix_preinit(%s) was called\n",drvname
); }
642 if(vdlGetVersion() != VIDIX_VERSION
)
644 mp_msg(MSGT_VO
,MSGL_ERR
, MSGTR_LIBVO_SUB_VIDIX_YouHaveWrongVersionOfVidixLibrary
);
648 vidix_handler
= vdlOpen(MP_VIDIX_PFX
,
649 drvname
? drvname
[0] == ':' ? &drvname
[1] : drvname
[0] ? drvname
: NULL
: NULL
,
653 vidix_handler
= vdlOpen(get_path("vidix/"),
654 drvname
? drvname
[0] == ':' ? &drvname
[1] : drvname
[0] ? drvname
: NULL
: NULL
,
659 if(vidix_handler
== NULL
)
661 mp_msg(MSGT_VO
,MSGL_ERR
, MSGTR_LIBVO_SUB_VIDIX_CouldntFindWorkingVidixDriver
);
664 if((err
=vdlGetCapability(vidix_handler
,&vidix_cap
)) != 0)
666 mp_msg(MSGT_VO
,MSGL_ERR
, MSGTR_LIBVO_SUB_VIDIX_CouldntGetCapability
,strerror(err
));
669 mp_msg(MSGT_VO
,MSGL_INFO
, MSGTR_LIBVO_SUB_VIDIX_Description
, vidix_cap
.name
);
670 mp_msg(MSGT_VO
,MSGL_INFO
, MSGTR_LIBVO_SUB_VIDIX_Author
, vidix_cap
.author
);
671 /* we are able to tune up this stuff depend on fourcc format */
672 server
->draw_slice
=vidix_draw_slice
;
673 server
->draw_frame
=vidix_draw_frame
;
674 server
->flip_page
=vidix_flip_page
;
675 server
->draw_osd
=vidix_draw_osd
;
676 // server_control = server->control;
677 // server->control=vidix_control;