changeset 6203:94330609dd5b

removed screenshot thingie - it will be moved to video filter layer
author alex
date Mon, 27 May 2002 15:45:02 +0000
parents 1e275c6cabb2
children 1ba75212f7ef
files libvo/vo_fbdev.c libvo/vo_vesa.c
diffstat 2 files changed, 0 insertions(+), 107 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_fbdev.c	Mon May 27 11:19:56 2002 +0000
+++ b/libvo/vo_fbdev.c	Mon May 27 15:45:02 2002 +0000
@@ -1350,55 +1350,11 @@
     return(-1);
 }
 
-#ifdef HAVE_PNG
-static int fbdev_screenshot(void)
-{
-    uint32_t i;
-    uint8_t *ptrs[fb_vinfo.yres];
-    if(video_out_png.preinit(NULL)) 
-    {
-	printf("\nvo_fbdev: can't preinit vo_png\n");
-	return 1;
-    }
-    if(!video_out_png.control(VOCTRL_QUERY_FORMAT, &dstFourcc))
-    {
-	printf("\nvo_fbdev: vo_png doesn't support: %s fourcc\n",vo_format_name(dstFourcc));
-	return 1;
-    }
-    if(video_out_png.config(fb_vinfo.xres,
-			    fb_vinfo.yres,
-			    fb_vinfo.xres,
-			    fb_vinfo.yres,
-			    0,NULL,dstFourcc,NULL))
-    {
-	printf("\nvo_fbdev: can't configure vo_png\n");
-	return 1;
-    }
-    ptrs[0] = L123123875;
-    for(i=1;i<fb_vinfo.yres;i++)
-		ptrs[i] = ptrs[i-1]+fb_line_len;
-    if(video_out_png.draw_frame(ptrs))
-    {
-	printf("\nvo_fbdev: vo_png: error during dumping\n");
-	return 1;
-    }
-    
-    video_out_png.uninit();
-    if(verbose) printf("\nvo_fbdev: png output has been created\n");
-    return 0;
-}
-#endif
-
 static uint32_t control(uint32_t request, void *data, ...)
 {
   switch (request) {
   case VOCTRL_QUERY_FORMAT:
     return query_format(*((uint32_t*)data));
-#ifdef HAVE_PNG
-  case VOCTRL_SCREENSHOT:
-    return fbdev_screenshot();
-    break;
-#endif
   }
   return VO_NOTIMPL;
 }
--- a/libvo/vo_vesa.c	Mon May 27 11:19:56 2002 +0000
+++ b/libvo/vo_vesa.c	Mon May 27 15:45:02 2002 +0000
@@ -946,74 +946,11 @@
   return pre_init_err;
 }
 
-#ifdef HAVE_PNG
-static int vesa_screenshot(const char *fname)
-{
-    uint32_t i,n;
-    uint8_t *ptrs[video_mode_info.YResolution];
-    if(video_out_png.preinit(NULL)) 
-    {
-	printf("\nvo_vesa: can't preinit vo_png\n");
-	return 1;
-    }
-    if(!video_out_png.control(VOCTRL_QUERY_FORMAT, &dstFourcc))
-    {
-	printf("\nvo_vesa: vo_png doesn't support: %s fourcc\n",vo_format_name(dstFourcc));
-	return 1;
-    }
-    if(video_out_png.config(HAS_DGA()?video_mode_info.XResolution:dstW,
-			    HAS_DGA()?video_mode_info.YResolution:dstH,
-			    HAS_DGA()?video_mode_info.XResolution:dstW,
-			    HAS_DGA()?video_mode_info.YResolution:dstH,
-			    0,NULL,dstFourcc,NULL))
-    {
-	printf("\nvo_vesa: can't configure vo_png\n");
-	return 1;
-    }
-    n = HAS_DGA()?video_mode_info.YResolution:dstH;
-    for(i=0;i<n;i++)
-		ptrs[i] = &dga_buffer[(HAS_DGA()?video_mode_info.XResolution:dstW)*i*PIXEL_SIZE()];
-    if(video_out_png.draw_frame(ptrs))
-    {
-	printf("\nvo_vesa: vo_png: error during dumping\n");
-	return 1;
-    }
-    
-    video_out_png.uninit();
-    if(verbose) printf("\nvo_vesa: png output has been created\n");
-    return 0;
-}
-
-
-static char _home_name[FILENAME_MAX + 1];
-static char * __get_home_filename(const char *progname)
-{
-    char *p = getenv("HOME");
-
-    if (p == NULL || strlen(p) < 2) {
-	struct passwd *psw = getpwuid(getuid());
-	if (psw != NULL) p = psw->pw_dir;
-    }	
-
-    if (p == NULL || strlen(p) > FILENAME_MAX - (strlen(progname) + 4))
-	p = "/tmp";
-
-    strcpy(_home_name, p);
-    strcat(_home_name, "/.");
-    return strcat(_home_name, progname);
-}
-#endif
-
 static uint32_t control(uint32_t request, void *data, ...)
 {
   switch (request) {
   case VOCTRL_QUERY_FORMAT:
     return query_format(*((uint32_t*)data));
-#ifdef HAVE_PNG
-  case VOCTRL_SCREENSHOT:
-    return vesa_screenshot(__get_home_filename("mplayer_vesa_dump.png"));
-    break;
-#endif
   }
   return VO_NOTIMPL;
 }