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>
28 #include "vosub_vidix.h"
29 #include "vidix/vidixlib.h"
30 #include "fastmemcpy.h"
32 #include "video_out.h"
35 #include "libmpcodecs/vfcap.h"
36 #include "libmpcodecs/mp_image.h"
38 #define NUM_FRAMES VID_PLAY_MAXFRAMES /* Temporary: driver will overwrite it */
40 static VDL_HANDLE vidix_handler
= NULL
;
41 static uint8_t *vidix_mem
= NULL
;
42 static uint8_t next_frame
;
43 static unsigned image_Bpp
,image_height
,image_width
,src_format
,forced_fourcc
=0;
45 static int video_on
=0;
47 static vidix_capability_t vidix_cap
;
48 static vidix_playback_t vidix_play
;
49 static vidix_fourcc_t vidix_fourcc
;
50 static vo_functions_t
* vo_server
;
51 static vidix_yuv_t dstrides
;
52 /*static uint32_t (*server_control)(uint32_t request, void *data, ...);*/
54 static int vidix_get_video_eq(vidix_video_eq_t
*info
);
55 static int vidix_set_video_eq(const vidix_video_eq_t
*info
);
56 static int vidix_get_num_fx(unsigned *info
);
57 static int vidix_get_oem_fx(vidix_oem_fx_t
*info
);
58 static int vidix_set_oem_fx(const vidix_oem_fx_t
*info
);
59 static int vidix_set_deint(const vidix_deinterlace_t
*info
);
64 if((err
=vdlPlaybackOn(vidix_handler
))!=0)
66 printf("vosub_vidix: Can't start playback: %s\n",strerror(err
));
76 if((err
=vdlPlaybackOff(vidix_handler
))!=0)
78 printf("vosub_vidix: Can't stop playback: %s\n",strerror(err
));
85 void vidix_term( void )
87 if(verbose
> 1) printf("vosub_vidix: vidix_term() was called\n");
89 vdlClose(vidix_handler
);
90 // ((vo_functions_t *)vo_server)->control=server_control;
93 static uint32_t vidix_draw_slice_420(uint8_t *image
[], int stride
[], int w
,int h
,int x
,int y
)
100 dest
= vidix_mem
+ vidix_play
.offsets
[next_frame
] + vidix_play
.offset
.y
;
101 dest
+= dstrides
.y
*y
+ x
;
109 if (vidix_play
.flags
& VID_PLAY_INTERLEAVED_UV
)
113 dest
= vidix_mem
+ vidix_play
.offsets
[next_frame
] + vidix_play
.offset
.v
;
114 dest
+= dstrides
.y
*y
/2 + x
; // <- is this correct ?
119 for(hi
= 0; hi
< h
; hi
++)
121 for(wi
= 0; wi
< w
; wi
++)
123 dest
[2*wi
+0] = src
[wi
];
124 dest
[2*wi
+1] = src2
[wi
];
134 dest
= vidix_mem
+ vidix_play
.offsets
[next_frame
] + vidix_play
.offset
.v
;
135 dest
+= dstrides
.v
*y
/4 + x
;
138 memcpy(dest
,src
,w
/2);
144 dest
= vidix_mem
+ vidix_play
.offsets
[next_frame
] + vidix_play
.offset
.u
;
145 dest
+= dstrides
.u
*y
/4 + x
;
148 memcpy(dest
,src
,w
/2);
150 dest
+= dstrides
.u
/2;
157 static uint32_t vidix_draw_slice_410(uint8_t *image
[], int stride
[], int w
,int h
,int x
,int y
)
164 dest
= vidix_mem
+ vidix_play
.offsets
[next_frame
] + vidix_play
.offset
.y
;
165 dest
+= dstrides
.y
*y
+ x
;
173 if (vidix_play
.flags
& VID_PLAY_INTERLEAVED_UV
)
175 printf("vosub_vidix: interleaved uv for yuv410p not supported\n");
180 dest
= vidix_mem
+ vidix_play
.offsets
[next_frame
] + vidix_play
.offset
.v
;
181 dest
+= dstrides
.v
*y
/8 + x
;
184 memcpy(dest
,src
,w
/4);
190 dest
= vidix_mem
+ vidix_play
.offsets
[next_frame
] + vidix_play
.offset
.u
;
191 dest
+= dstrides
.u
*y
/8 + x
;
194 memcpy(dest
,src
,w
/4);
196 dest
+= dstrides
.u
/4;
203 static uint32_t vidix_draw_slice_410_fast(uint8_t *image
[], int stride
[], int w
, int h
, int x
, int y
)
208 dest
= vidix_mem
+ vidix_play
.offsets
[next_frame
] + vidix_play
.offset
.y
;
209 dest
+= dstrides
.y
*y
+ x
;
211 memcpy(dest
, src
, dstrides
.y
*h
*9/8);
215 static uint32_t vidix_draw_slice_400(uint8_t *image
[], int stride
[], int w
,int h
,int x
,int y
)
221 dest
= vidix_mem
+ vidix_play
.offsets
[next_frame
] + vidix_play
.offset
.y
;
222 dest
+= dstrides
.y
*y
+ x
;
232 static uint32_t vidix_draw_slice_packed(uint8_t *image
[], int stride
[], int w
,int h
,int x
,int y
)
238 dest
= vidix_mem
+ vidix_play
.offsets
[next_frame
] + vidix_play
.offset
.y
;
239 dest
+= dstrides
.y
*y
+ x
;
242 memcpy(dest
,src
,w
*image_Bpp
);
249 uint32_t vidix_draw_slice(uint8_t *image
[], int stride
[], int w
,int h
,int x
,int y
)
251 printf("vosub_vidix: dummy vidix_draw_slice() was called\n");
255 static uint32_t vidix_draw_image(mp_image_t
*mpi
){
256 if(verbose
> 1) printf("vosub_vidix: vidix_draw_image() was called\n");
258 // if -dr or -slices then do nothing:
259 if(mpi
->flags
&(MP_IMGFLAG_DIRECT
|MP_IMGFLAG_DRAW_CALLBACK
)) return VO_TRUE
;
261 vo_server
->draw_slice(mpi
->planes
,mpi
->stride
,
262 vidix_play
.src
.w
,vidix_play
.src
.h
,vidix_play
.src
.x
,vidix_play
.src
.y
);
266 uint32_t vidix_draw_frame(uint8_t *image
[])
268 printf("vosub_vidix: dummy vidix_draw_frame() was called\n");
272 void vidix_flip_page(void)
274 if(verbose
> 1) printf("vosub_vidix: vidix_flip_page() was called\n");
275 if(vo_doublebuffering
)
277 vdlPlaybackFrameSelect(vidix_handler
,next_frame
);
278 next_frame
=(next_frame
+1)%vidix_play
.num_frames
;
282 static void draw_alpha(int x0
,int y0
, int w
,int h
, unsigned char* src
, unsigned char *srca
, int stride
)
284 uint32_t apitch
,bespitch
;
286 lvo_mem
= vidix_mem
+ vidix_play
.offsets
[next_frame
] + vidix_play
.offset
.y
;
287 apitch
= vidix_play
.dest
.pitch
.y
-1;
288 switch(vidix_play
.fourcc
){
296 bespitch
= (vidix_play
.src
.w
+ apitch
) & (~apitch
);
297 vo_draw_alpha_yv12(w
,h
,src
,srca
,stride
,lvo_mem
+bespitch
*y0
+x0
,bespitch
);
300 bespitch
= (vidix_play
.src
.w
*2 + apitch
) & (~apitch
);
301 vo_draw_alpha_yuy2(w
,h
,src
,srca
,stride
,lvo_mem
+bespitch
*y0
+2*x0
,bespitch
);
304 bespitch
= (vidix_play
.src
.w
*2 + apitch
) & (~apitch
);
305 vo_draw_alpha_yuy2(w
,h
,src
,srca
,stride
,lvo_mem
+bespitch
*y0
+2*x0
+1,bespitch
);
309 bespitch
= (vidix_play
.src
.w
*4 + apitch
) & (~apitch
);
310 vo_draw_alpha_rgb32(w
,h
,src
,srca
,stride
,lvo_mem
+y0
*bespitch
+4*x0
,bespitch
);
314 bespitch
= (vidix_play
.src
.w
*3 + apitch
) & (~apitch
);
315 vo_draw_alpha_rgb24(w
,h
,src
,srca
,stride
,lvo_mem
+y0
*bespitch
+3*x0
,bespitch
);
319 bespitch
= (vidix_play
.src
.w
*2 + apitch
) & (~apitch
);
320 vo_draw_alpha_rgb16(w
,h
,src
,srca
,stride
,lvo_mem
+y0
*bespitch
+2*x0
,bespitch
);
324 bespitch
= (vidix_play
.src
.w
*2 + apitch
) & (~apitch
);
325 vo_draw_alpha_rgb15(w
,h
,src
,srca
,stride
,lvo_mem
+y0
*bespitch
+2*x0
,bespitch
);
332 void vidix_draw_osd(void)
334 if(verbose
> 1) printf("vosub_vidix: vidix_draw_osd() was called\n");
335 /* TODO: hw support */
336 vo_draw_text(vidix_play
.src
.w
,vidix_play
.src
.h
,draw_alpha
);
339 uint32_t vidix_query_fourcc(uint32_t format
)
341 if(verbose
> 1) printf("vosub_vidix: query_format was called: %x (%s)\n",format
,vo_format_name(format
));
342 vidix_fourcc
.fourcc
= format
;
343 vdlQueryFourcc(vidix_handler
,&vidix_fourcc
);
344 if (vidix_fourcc
.depth
== VID_DEPTH_NONE
)
346 return VFCAP_CSP_SUPPORTED
|VFCAP_CSP_SUPPORTED_BY_HW
|VFCAP_HWSCALE_UP
|VFCAP_HWSCALE_DOWN
|VFCAP_OSD
|VFCAP_ACCEPT_STRIDE
;
349 int vidix_grkey_support(void)
351 return(vidix_fourcc
.flags
& VID_CAP_COLORKEY
);
354 int vidix_grkey_get(vidix_grkey_t
*gr_key
)
356 return(vdlGetGrKeys(vidix_handler
, gr_key
));
359 int vidix_grkey_set(const vidix_grkey_t
*gr_key
)
361 return(vdlSetGrKeys(vidix_handler
, gr_key
));
365 static int vidix_get_video_eq(vidix_video_eq_t
*info
)
367 if(!video_on
) return EPERM
;
368 return vdlPlaybackGetEq(vidix_handler
, info
);
371 static int vidix_set_video_eq(const vidix_video_eq_t
*info
)
373 if(!video_on
) return EPERM
;
374 return vdlPlaybackSetEq(vidix_handler
, info
);
377 static int vidix_get_num_fx(unsigned *info
)
379 if(!video_on
) return EPERM
;
380 return vdlQueryNumOemEffects(vidix_handler
, info
);
383 static int vidix_get_oem_fx(vidix_oem_fx_t
*info
)
385 if(!video_on
) return EPERM
;
386 return vdlGetOemEffect(vidix_handler
, info
);
389 static int vidix_set_oem_fx(const vidix_oem_fx_t
*info
)
391 if(!video_on
) return EPERM
;
392 return vdlSetOemEffect(vidix_handler
, info
);
395 static int vidix_set_deint(const vidix_deinterlace_t
*info
)
397 if(!video_on
) return EPERM
;
398 return vdlPlaybackSetDeint(vidix_handler
, info
);
401 static int is_422_planes_eq
=0;
402 int vidix_init(unsigned src_width
,unsigned src_height
,
403 unsigned x_org
,unsigned y_org
,unsigned dst_width
,
404 unsigned dst_height
,unsigned format
,unsigned dest_bpp
,
405 unsigned vid_w
,unsigned vid_h
)
409 uint32_t sstride
,apitch
;
411 printf("vosub_vidix: vidix_init() was called\n"
412 "src_w=%u src_h=%u dest_x_y_w_h = %u %u %u %u\n"
413 "format=%s dest_bpp=%u vid_w=%u vid_h=%u\n"
414 ,src_width
,src_height
,x_org
,y_org
,dst_width
,dst_height
415 ,vo_format_name(format
),dest_bpp
,vid_w
,vid_h
);
417 if(vidix_query_fourcc(format
) == 0)
419 printf("vosub_vidix: unsupported fourcc for this vidix driver: %x (%s)\n",
420 format
,vo_format_name(format
));
424 if(((vidix_cap
.maxwidth
!= -1) && (vid_w
> vidix_cap
.maxwidth
)) ||
425 ((vidix_cap
.minwidth
!= -1) && (vid_w
< vidix_cap
.minwidth
)) ||
426 ((vidix_cap
.maxheight
!= -1) && (vid_h
> vidix_cap
.maxheight
)) ||
427 ((vidix_cap
.minwidth
!= -1 ) && (vid_h
< vidix_cap
.minheight
)))
429 printf("vosub_vidix: video server has unsupported resolution (%dx%d), supported: %dx%d-%dx%d\n",
430 vid_w
, vid_h
, vidix_cap
.minwidth
, vidix_cap
.minheight
,
431 vidix_cap
.maxwidth
, vidix_cap
.maxheight
);
438 case 1: err
= ((vidix_fourcc
.depth
& VID_DEPTH_1BPP
) != VID_DEPTH_1BPP
); break;
439 case 2: err
= ((vidix_fourcc
.depth
& VID_DEPTH_2BPP
) != VID_DEPTH_2BPP
); break;
440 case 4: err
= ((vidix_fourcc
.depth
& VID_DEPTH_4BPP
) != VID_DEPTH_4BPP
); break;
441 case 8: err
= ((vidix_fourcc
.depth
& VID_DEPTH_8BPP
) != VID_DEPTH_8BPP
); break;
442 case 12:err
= ((vidix_fourcc
.depth
& VID_DEPTH_12BPP
) != VID_DEPTH_12BPP
); break;
443 case 15:err
= ((vidix_fourcc
.depth
& VID_DEPTH_15BPP
) != VID_DEPTH_15BPP
); break;
444 case 16:err
= ((vidix_fourcc
.depth
& VID_DEPTH_16BPP
) != VID_DEPTH_16BPP
); break;
445 case 24:err
= ((vidix_fourcc
.depth
& VID_DEPTH_24BPP
) != VID_DEPTH_24BPP
); break;
446 case 32:err
= ((vidix_fourcc
.depth
& VID_DEPTH_32BPP
) != VID_DEPTH_32BPP
); break;
447 default: err
=1; break;
451 printf("vosub_vidix: video server has unsupported color depth by vidix (%d)\n"
452 ,vidix_fourcc
.depth
);
455 if((dst_width
> src_width
|| dst_height
> src_height
) && (vidix_cap
.flags
& FLAG_UPSCALER
) != FLAG_UPSCALER
)
457 printf("vosub_vidix: vidix driver can't upscale image (%d%d -> %d%d)\n",
458 src_width
, src_height
, dst_width
, dst_height
);
461 if((dst_width
> src_width
|| dst_height
> src_height
) && (vidix_cap
.flags
& FLAG_DOWNSCALER
) != FLAG_DOWNSCALER
)
463 printf("vosub_vidix: vidix driver can't downscale image (%d%d -> %d%d)\n",
464 src_width
, src_height
, dst_width
, dst_height
);
467 image_width
= src_width
;
468 image_height
= src_height
;
470 if(forced_fourcc
) format
= forced_fourcc
;
471 memset(&vidix_play
,0,sizeof(vidix_playback_t
));
472 vidix_play
.fourcc
= format
;
473 vidix_play
.capability
= vidix_cap
.flags
; /* every ;) */
474 vidix_play
.blend_factor
= 0; /* for now */
475 /* display the full picture.
476 Nick: we could implement here zooming to a specified area -- alex */
477 vidix_play
.src
.x
= vidix_play
.src
.y
= 0;
478 vidix_play
.src
.w
= src_width
;
479 vidix_play
.src
.h
= src_height
;
480 vidix_play
.dest
.x
= x_org
;
481 vidix_play
.dest
.y
= y_org
;
482 vidix_play
.dest
.w
= dst_width
;
483 vidix_play
.dest
.h
= dst_height
;
484 // vidix_play.num_frames=vo_doublebuffering?NUM_FRAMES-1:1;
485 /* we aren't mad...3 buffers are more than enough */
486 vidix_play
.num_frames
=vo_doublebuffering
?3:1;
487 vidix_play
.src
.pitch
.y
= vidix_play
.src
.pitch
.u
= vidix_play
.src
.pitch
.v
= 0;
489 if((err
=vdlConfigPlayback(vidix_handler
,&vidix_play
))!=0)
491 printf("vosub_vidix: Can't configure playback: %s\n",strerror(err
));
494 if (verbose
) printf("vosub_vidix: using %d buffer(s)\n", vidix_play
.num_frames
);
496 vidix_mem
= vidix_play
.dga_addr
;
498 /* select first frame */
500 // vdlPlaybackFrameSelect(vidix_handler,next_frame);
502 /* clear every frame with correct address and frame_size */
503 for (i
= 0; i
< vidix_play
.num_frames
; i
++)
504 memset(vidix_mem
+ vidix_play
.offsets
[i
], 0x80,
505 vidix_play
.frame_size
);
515 apitch
= vidix_play
.dest
.pitch
.y
-1;
516 dstrides
.y
= (image_width
+ apitch
) & ~apitch
;
517 apitch
= vidix_play
.dest
.pitch
.v
-1;
518 dstrides
.v
= (image_width
+ apitch
) & ~apitch
;
519 apitch
= vidix_play
.dest
.pitch
.u
-1;
520 dstrides
.u
= (image_width
+ apitch
) & ~apitch
;
525 apitch
= vidix_play
.dest
.pitch
.y
-1;
526 dstrides
.y
= (image_width
*4 + apitch
) & ~apitch
;
527 dstrides
.u
= dstrides
.v
= 0;
532 apitch
= vidix_play
.dest
.pitch
.y
-1;
533 dstrides
.y
= (image_width
*3 + apitch
) & ~apitch
;
534 dstrides
.u
= dstrides
.v
= 0;
538 apitch
= vidix_play
.dest
.pitch
.y
-1;
539 dstrides
.y
= (image_width
*2 + apitch
) & ~apitch
;
540 dstrides
.u
= dstrides
.v
= 0;
544 /* tune some info here */
545 sstride
= src_width
*image_Bpp
;
548 is_422_planes_eq
= sstride
== dstrides
.y
;
550 if(src_format
== IMGFMT_YV12
|| src_format
== IMGFMT_I420
|| src_format
== IMGFMT_IYUV
)
551 vo_server
->draw_slice
= vidix_draw_slice_420
;
552 else if (src_format
== IMGFMT_YVU9
|| src_format
== IMGFMT_IF09
)
553 vo_server
->draw_slice
= vidix_draw_slice_410
;
554 else vo_server
->draw_slice
= vidix_draw_slice_packed
;
559 static uint32_t vidix_get_image(mp_image_t
*mpi
)
561 if(mpi
->type
==MP_IMGTYPE_STATIC
&& vidix_play
.num_frames
>1) return VO_FALSE
;
562 if(mpi
->flags
&MP_IMGFLAG_READABLE
) return VO_FALSE
; /* slow video ram */
563 if(( (mpi
->stride
[0]==dstrides
.y
&& (!(mpi
->flags
&MP_IMGFLAG_PLANAR
) ||
564 (mpi
->stride
[1]==dstrides
.u
&& mpi
->stride
[2]==dstrides
.v
)) )
565 || (mpi
->flags
&(MP_IMGFLAG_ACCEPT_STRIDE
|MP_IMGFLAG_ACCEPT_WIDTH
))) &&
566 (!forced_fourcc
&& !(vidix_play
.flags
& VID_PLAY_INTERLEAVED_UV
)))
568 if(mpi
->flags
&MP_IMGFLAG_ACCEPT_WIDTH
){
569 // check if only width is enough to represent strides:
570 if(mpi
->flags
&MP_IMGFLAG_PLANAR
){
571 if((dstrides
.y
>>1)!=dstrides
.v
|| dstrides
.v
!=dstrides
.u
) return VO_FALSE
;
573 if(dstrides
.y
% (mpi
->bpp
/8)) return VO_FALSE
;
576 mpi
->planes
[0]=vidix_mem
+vidix_play
.offsets
[next_frame
]+vidix_play
.offset
.y
;
577 mpi
->width
=mpi
->stride
[0]=dstrides
.y
;
578 if(mpi
->flags
&MP_IMGFLAG_PLANAR
)
580 mpi
->planes
[1]=vidix_mem
+vidix_play
.offsets
[next_frame
]+vidix_play
.offset
.v
;
581 mpi
->stride
[1]=dstrides
.v
>> mpi
->chroma_x_shift
;
582 mpi
->planes
[2]=vidix_mem
+vidix_play
.offsets
[next_frame
]+vidix_play
.offset
.u
;
583 mpi
->stride
[2]=dstrides
.u
>> mpi
->chroma_x_shift
;
585 mpi
->width
/=mpi
->bpp
/8;
586 mpi
->flags
|=MP_IMGFLAG_DIRECT
;
592 uint32_t vidix_control(uint32_t request
, void *data
, ...)
595 case VOCTRL_QUERY_FORMAT
:
596 return vidix_query_fourcc(*((uint32_t*)data
));
597 case VOCTRL_GET_IMAGE
:
598 return vidix_get_image(data
);
599 case VOCTRL_DRAW_IMAGE
:
600 return vidix_draw_image(data
);
601 case VOCTRL_GET_FRAME_NUM
:
602 *(uint32_t *)data
= next_frame
;
604 case VOCTRL_SET_FRAME_NUM
:
605 next_frame
= *(uint32_t *)data
;
607 case VOCTRL_GET_NUM_FRAMES
:
608 *(uint32_t *)data
= vidix_play
.num_frames
;
610 case VOCTRL_SET_EQUALIZER
:
614 vidix_video_eq_t info
;
616 if(!video_on
) return VO_FALSE
;
618 value
= va_arg(ap
, int);
621 // printf("vidix seteq %s -> %d \n",data,value);
623 /* vidix eq ranges are -1000..1000 */
624 if (!strcasecmp(data
, "brightness"))
626 info
.brightness
= value
*10;
627 info
.cap
= VEQ_CAP_BRIGHTNESS
;
629 else if (!strcasecmp(data
, "contrast"))
631 info
.contrast
= value
*10;
632 info
.cap
= VEQ_CAP_CONTRAST
;
634 else if (!strcasecmp(data
, "saturation"))
636 info
.saturation
= value
*10;
637 info
.cap
= VEQ_CAP_SATURATION
;
639 else if (!strcasecmp(data
, "hue"))
642 info
.cap
= VEQ_CAP_HUE
;
645 if (vdlPlaybackSetEq(vidix_handler
, &info
) == 0)
649 case VOCTRL_GET_EQUALIZER
:
653 vidix_video_eq_t info
;
655 if(!video_on
) return VO_FALSE
;
656 if (vdlPlaybackGetEq(vidix_handler
, &info
) != 0)
660 value
= va_arg(ap
, int*);
663 /* vidix eq ranges are -1000..1000 */
664 if (!strcasecmp(data
, "brightness"))
666 if (info
.cap
& VEQ_CAP_BRIGHTNESS
)
667 *value
= info
.brightness
/10;
669 else if (!strcasecmp(data
, "contrast"))
671 if (info
.cap
& VEQ_CAP_CONTRAST
)
672 *value
= info
.contrast
/10;
674 else if (!strcasecmp(data
, "saturation"))
676 if (info
.cap
& VEQ_CAP_SATURATION
)
677 *value
= info
.saturation
/10;
679 else if (!strcasecmp(data
, "hue"))
681 if (info
.cap
& VEQ_CAP_HUE
)
682 *value
= info
.hue
/10;
689 // WARNING: we drop extra parameters (...) here!
690 // return server_control(request,data); //VO_NOTIMPL;
693 int vidix_preinit(const char *drvname
,void *server
)
696 if(verbose
> 1) printf("vosub_vidix: vidix_preinit(%s) was called\n",drvname
);
697 if(vdlGetVersion() != VIDIX_VERSION
)
699 printf("vosub_vidix: You have wrong version of VIDIX library\n");
703 vidix_handler
= vdlOpen(MPLAYER_LIBDIR
"/mplayer/vidix/",
704 drvname
? drvname
[0] == ':' ? &drvname
[1] : drvname
[0] ? drvname
: NULL
: NULL
,
708 vidix_handler
= vdlOpen(get_path("vidix/"),
709 drvname
? drvname
[0] == ':' ? &drvname
[1] : drvname
[0] ? drvname
: NULL
: NULL
,
714 if(vidix_handler
== NULL
)
716 printf("vosub_vidix: Couldn't find working VIDIX driver\n");
719 if((err
=vdlGetCapability(vidix_handler
,&vidix_cap
)) != 0)
721 printf("vosub_vidix: Couldn't get capability: %s\n",strerror(err
));
724 printf("VIDIX: Description: %s\n", vidix_cap
.name
);
725 printf("VIDIX: Author: %s\n", vidix_cap
.author
);
726 /* we are able to tune up this stuff depend on fourcc format */
727 ((vo_functions_t
*)server
)->draw_slice
=vidix_draw_slice
;
728 ((vo_functions_t
*)server
)->draw_frame
=vidix_draw_frame
;
729 ((vo_functions_t
*)server
)->flip_page
=vidix_flip_page
;
730 ((vo_functions_t
*)server
)->draw_osd
=vidix_draw_osd
;
731 // server_control = ((vo_functions_t *)server)->control;
732 // ((vo_functions_t *)server)->control=vidix_control;