# HG changeset patch # User alex # Date 1011194565 0 # Node ID 7e2bf04c9a7c1aa78211dec82b050a9035ad0355 # Parent 374f2cc73d0db6079c86fe66027ebc97fc66f551 added vidix_start() and vidix_stop() for better runtime-resize support ;) diff -r 374f2cc73d0d -r 7e2bf04c9a7c libvo/vo_fbdev.c --- a/libvo/vo_fbdev.c Wed Jan 16 14:54:56 2002 +0000 +++ b/libvo/vo_fbdev.c Wed Jan 16 15:22:45 2002 +0000 @@ -1105,7 +1105,7 @@ return -1; } else printf(FBDEV "Using VIDIX\n"); - + vidix_start(); } else #endif diff -r 374f2cc73d0d -r 7e2bf04c9a7c libvo/vo_vesa.c --- a/libvo/vo_vesa.c Wed Jan 16 14:54:56 2002 +0000 +++ b/libvo/vo_vesa.c Wed Jan 16 15:22:45 2002 +0000 @@ -928,6 +928,7 @@ return -1; } else printf("vo_vesa: Using VIDIX\n"); + vidix_start(); } #endif } diff -r 374f2cc73d0d -r 7e2bf04c9a7c libvo/vo_xvidix.c --- a/libvo/vo_xvidix.c Wed Jan 16 14:54:56 2002 +0000 +++ b/libvo/vo_xvidix.c Wed Jan 16 15:22:45 2002 +0000 @@ -78,9 +78,9 @@ window_y = drwcY; window_width = drwWidth; window_height = drwHeight; + /* FIXME: implement runtime resize/move if possible, this way is very ugly! */ - vidix_term(); - vidix_preinit(vidix_name, &video_out_xvidix); + vidix_stop(); if (vidix_init(image_width, image_height, window_x, window_y, window_width, window_height, image_format, vo_depthonscreen, vo_screenwidth, vo_screenheight) != 0) { @@ -89,9 +89,10 @@ vidix_term(); uninit(); exit(1); /* !!! */ - x = window_width; - y = window_height; } + vidix_start(); + x = window_width; + y = window_height; } mp_msg(MSGT_VO, MSGL_INFO, "[xvidix] window properties: pos: %dx%d, size: %dx%d\n", diff -r 374f2cc73d0d -r 7e2bf04c9a7c libvo/vosub_vidix.c --- a/libvo/vosub_vidix.c Wed Jan 16 14:54:56 2002 +0000 +++ b/libvo/vosub_vidix.c Wed Jan 16 15:22:45 2002 +0000 @@ -145,11 +145,6 @@ printf("vosub_vidix: Can't configure playback: %s\n",strerror(err)); return -1; } - if((err=vdlPlaybackOn(vidix_handler))!=0) - { - printf("vosub_vidix: Can't start playback: %s\n",strerror(err)); - return -1; - } next_frame = 0; vidix_mem =vidix_play.dga_addr; @@ -159,10 +154,35 @@ return 0; } +void vidix_start(void) +{ + int err; + + if((err=vdlPlaybackOn(vidix_handler))!=0) + { + printf("vosub_vidix: Can't start playback: %s\n",strerror(err)); + return -1; + } + return 0; +} + +void vidix_stop(void) +{ + int err; + + if((err=vdlPlaybackOff(vidix_handler))!=0) + { + printf("vosub_vidix: Can't stop playback: %s\n",strerror(err)); + return -1; + } + return 0; +} + void vidix_term( void ) { if(verbose > 1) printf("vosub_vidix: vidix_term() was called\n"); - vdlPlaybackOff(vidix_handler); +// vdlPlaybackOff(vidix_handler); + vidix_stop(); vdlClose(vidix_handler); } diff -r 374f2cc73d0d -r 7e2bf04c9a7c libvo/vosub_vidix.h --- a/libvo/vosub_vidix.h Wed Jan 16 14:54:56 2002 +0000 +++ b/libvo/vosub_vidix.h Wed Jan 16 15:22:45 2002 +0000 @@ -19,6 +19,8 @@ unsigned dest_x,unsigned dest_y,unsigned dst_width, unsigned dst_height,unsigned format,unsigned dest_bpp, unsigned vid_w,unsigned vid_h); +void vidix_start(void); +void vidix_stop(void); void vidix_term( void ); uint32_t vidix_query_fourcc(unsigned fourcc);