changeset 4198:7e2bf04c9a7c

added vidix_start() and vidix_stop() for better runtime-resize support ;)
author alex
date Wed, 16 Jan 2002 15:22:45 +0000
parents 374f2cc73d0d
children bcaf75e384d8
files libvo/vo_fbdev.c libvo/vo_vesa.c libvo/vo_xvidix.c libvo/vosub_vidix.c libvo/vosub_vidix.h
diffstat 5 files changed, 35 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- 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
--- 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
 	}
--- 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",
--- 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);
 }
 
--- 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);