changeset 4442:49c410f359e0

return error if unknown depth given. more informative error messages. dont exit if draw_frame was called with Planar YUV, only warn the user
author alex
date Thu, 31 Jan 2002 11:50:59 +0000
parents 90814d64a840
children cf62fa252821
files libvo/vosub_vidix.c
diffstat 1 files changed, 9 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vosub_vidix.c	Thu Jan 31 11:49:30 2002 +0000
+++ b/libvo/vosub_vidix.c	Thu Jan 31 11:50:59 2002 +0000
@@ -86,7 +86,7 @@
 		printf("vosub_vidix: Couldn't get capability: %s\n",strerror(err));
 		return -1;
 	}
-	printf("vosub_vidix: Using: %s\n",vidix_cap.name);
+	printf("vosub_vidix: Using: %s by %s\n",vidix_cap.name,vidix_cap.author);
 	/* we are able to tune up this stuff depend on fourcc format */
 	((vo_functions_t *)server)->draw_slice=vidix_draw_slice;
 	((vo_functions_t *)server)->draw_frame=vidix_draw_frame;
@@ -133,20 +133,24 @@
 	  case 16:err = ((vidix_fourcc.depth & VID_DEPTH_16BPP) != VID_DEPTH_16BPP); break;
 	  case 24:err = ((vidix_fourcc.depth & VID_DEPTH_24BPP) != VID_DEPTH_24BPP); break;
 	  case 32:err = ((vidix_fourcc.depth & VID_DEPTH_32BPP) != VID_DEPTH_32BPP); break;
+	  default: err = 1; break;
 	}
 	if(err)
 	{
-	  printf("vosub_vidix: video server has unsupported color depth by vidix\n");
+	  printf("vosub_vidix: video server has unsupported color depth by vidix (%d)\n",
+	    vidix_fourcc.depth);
 	  return -1;
 	}
 	if((dst_width > src_width || dst_height > src_height) && (vidix_cap.flags & FLAG_UPSCALER) != FLAG_UPSCALER)
 	{
-	  printf("vosub_vidix: vidix driver can't upscale image\n");
+	  printf("vosub_vidix: vidix driver can't upscale image (%dx%d -> %dx%d)\n",
+	    src_width, src_height, dst_width, dst_height);
 	  return -1;
 	}
 	if((dst_width > src_width || dst_height > src_height) && (vidix_cap.flags & FLAG_DOWNSCALER) != FLAG_DOWNSCALER)
 	{
-	  printf("vosub_vidix: vidix driver can't downscale image\n");
+	  printf("vosub_vidix: vidix driver can't downscale image (%dx%d -> %dx%d)\n",
+	    src_width, src_height, dst_width, dst_height);
 	  return -1;
 	}
 	image_width = src_width;
@@ -438,9 +442,7 @@
 /* Note it's very strange but sometime for YUY2 draw_frame is called */
     if(src_format == IMGFMT_YV12 || src_format == IMGFMT_I420 || src_format == IMGFMT_IYUV)
     {
-	printf("vosub_vidix: draw_frame for YUV420 called\nExiting...\n");
-	vidix_term();
-	exit( EXIT_FAILURE );
+	printf("vosub_vidix: draw_frame for YUV420 called, frame cannot be written\n");
     }
     else
     if(src_format == IMGFMT_RGB32 || src_format == IMGFMT_BGR32)