summaryrefslogtreecommitdiff
path: root/src/video_out
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_out')
-rw-r--r--src/video_out/alphablend.c5
-rw-r--r--src/video_out/video_out_directfb.c7
-rw-r--r--src/video_out/video_out_opengl.c82
-rw-r--r--src/video_out/video_out_xv.c3
-rw-r--r--src/video_out/yuv2rgb_mlib.c10
5 files changed, 56 insertions, 51 deletions
diff --git a/src/video_out/alphablend.c b/src/video_out/alphablend.c
index 2f966f7f0..794d602ae 100644
--- a/src/video_out/alphablend.c
+++ b/src/video_out/alphablend.c
@@ -480,8 +480,9 @@ void blend_rgb16 (uint8_t * img, vo_overlay_t * img_overl,
}
break;
case 6: /* Finished */
- printf("Don't ever get here\n");
- assert(0);
+ XINE_ASSERT(0,"Don't ever get here\n");
+ /* This case will not fall through, XINE_ASSERT contains a call to abort() */
+
case 7: /* No button */
clut = (clut_t*) img_overl->color;
trans = img_overl->trans;
diff --git a/src/video_out/video_out_directfb.c b/src/video_out/video_out_directfb.c
index 9c01d12fe..4ddda3eb0 100644
--- a/src/video_out/video_out_directfb.c
+++ b/src/video_out/video_out_directfb.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: video_out_directfb.c,v 1.14 2002/09/05 20:44:42 mroi Exp $
+ * $Id: video_out_directfb.c,v 1.15 2003/02/28 02:51:51 storri Exp $
*
* DirectFB based output plugin.
* Rich Wareham <richwareham@users.sourceforge.net>
@@ -44,7 +44,6 @@
#include <stdlib.h>
#include <string.h>
#include <math.h>
-#include <assert.h>
#include "video_out.h"
@@ -344,8 +343,8 @@ static void directfb_overlay_blend (vo_driver_t *this_gen, vo_frame_t *frame_gen
if( !overlay->rgb_clut || !overlay->clip_rgb_clut)
directfb_overlay_clut_yuv2rgb(this,overlay);
- assert (this->delivered_width == frame->width);
- assert (this->delivered_height == frame->height);
+ XINE_ASSERT (this->delivered_width == frame->width, "Delivered frame width does not match desired width");
+ XINE_ASSERT (this->delivered_height == frame->height, "Delivered frame height does not match desire height");
# if BYTES_PER_PIXEL == 3
blend_rgb24 ((uint8_t *)frame->texture, overlay,
frame->width, frame->height,
diff --git a/src/video_out/video_out_opengl.c b/src/video_out/video_out_opengl.c
index de17a77b3..870f2b6d3 100644
--- a/src/video_out/video_out_opengl.c
+++ b/src/video_out/video_out_opengl.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: video_out_opengl.c,v 1.24 2003/02/02 12:44:03 esnel Exp $
+ * $Id: video_out_opengl.c,v 1.25 2003/02/28 02:51:51 storri Exp $
*
* video_out_glut.c, glut based OpenGL rendering interface for xine
* Matthias Hopf <mat@mshopf.de>
@@ -61,7 +61,6 @@
#include <stdlib.h>
#include <string.h>
#include <math.h>
-#include <assert.h>
#include <X11/Xlib.h>
@@ -338,7 +337,7 @@ static void opengl_update_frame_format (vo_driver_t *this_gen,
frame->chunk[0] = frame->chunk[1] = frame->chunk[2] = NULL;
frame->texture = calloc (1, BYTES_PER_PIXEL * image_size);
- assert (frame->texture);
+ XINE_ASSERT(frame->texture, "Frame texture is NULL");
switch (format) {
case XINE_IMGFMT_YV12:
@@ -501,25 +500,25 @@ static void opengl_render_image (opengl_driver_t *this, opengl_frame_t *frame,
/* already initialized? */
if (! this->drawable || ! this->vinfo)
- {
+ {
fprintf (stderr, "video_out_opengl: early exit due to missing drawable %lx vinfo %p\n", this->drawable, this->vinfo);
return;
- }
-
+ }
+
/*
* check for size changes
*/
if (frame->width != this->last_width ||
frame->height != this->last_height ||
frame->ratio_code != this->last_ratio_code) {
-
- this->last_width = frame->width;
- this->last_height = frame->height;
- this->last_ratio_code = frame->ratio_code;
-
- DEBUGF ((stderr, "video_out_opengl: display format changed\n"));
- opengl_compute_ideal_size (this);
- opengl_compute_output_size (this);
+
+ this->last_width = frame->width;
+ this->last_height = frame->height;
+ this->last_ratio_code = frame->ratio_code;
+
+ DEBUGF ((stderr, "video_out_opengl: display format changed\n"));
+ opengl_compute_ideal_size (this);
+ opengl_compute_output_size (this);
}
/*
@@ -531,37 +530,42 @@ static void opengl_render_image (opengl_driver_t *this, opengl_frame_t *frame,
/*
* check whether a new context has to be created
*/
-DEBUGF ((stderr, "video_out_opengl: CHECK\n"));
+ DEBUGF ((stderr, "video_out_opengl: CHECK\n"));
if (((ctx == this->context || ! ctx) &&
(this->context_state == CONTEXT_BAD ||
this->context_state == CONTEXT_SAME_DRAWABLE)) ||
(self != this->renderthread))
{
-static int glxAttrib[] = {
-GLX_RGBA, GLX_RED_SIZE, 1, GLX_GREEN_SIZE, 1, GLX_BLUE_SIZE, 1, None
-} ;
-DEBUGF ((stderr, "video_out_opengl: ASSERT\n"));
- assert (this->vinfo);
-DEBUGF ((stderr, "video_out_opengl: PASSED\n"));
- if ((this->context_state == CONTEXT_SAME_DRAWABLE) &&
- (self == this->renderthread))
+
+ static int glxAttrib[] = {
+ GLX_RGBA, GLX_RED_SIZE, 1, GLX_GREEN_SIZE, 1, GLX_BLUE_SIZE, 1, None
+ } ;
+
+ XINE_ASSERT (this->vinfo, "this->vinfo is NULL");
+
+ if ((this->context_state == CONTEXT_SAME_DRAWABLE) &&
+ (self == this->renderthread))
{
- DEBUGF ((stderr, "destroy: %p\n", this->context));
- /* Unfortunately for _BAD the drawable is already destroyed.
- * This cannot be resolved right now and will be a memory leak. */
- if (this->context)
- glXDestroyContext (this->display, this->context);
+ DEBUGF ((stderr, "destroy: %p\n", this->context));
+ /* Unfortunately for _BAD the drawable is already destroyed.
+ * This cannot be resolved right now and will be a memory leak. */
+ if (this->context)
+ glXDestroyContext (this->display, this->context);
}
-DEBUGF ((stderr, "screen %dx%d\n", ((Screen *) this->screen)->width, ((Screen *)this->screen)->height));
-DEBUGF ((stderr, "glXChooseVisual\n"));
-this->vinfo = glXChooseVisual (this->display, this->screen, glxAttrib);
- DEBUGF ((stderr, "create display %p vinfo %p\n", this->display, this->vinfo));
- ctx = glXCreateContext (this->display, this->vinfo, NULL, True);
- DEBUGF ((stderr, "created\n"));
- assert (ctx);
- this->context = ctx;
- this->context_state = CONTEXT_RELOAD;
- this->renderthread = self;
+
+ DEBUGF ((stderr, "screen %dx%d\n", ((Screen *) this->screen)->width, ((Screen *)this->screen)->height));
+ DEBUGF ((stderr, "glXChooseVisual\n"));
+
+ this->vinfo = glXChooseVisual (this->display, this->screen, glxAttrib);
+ DEBUGF ((stderr, "create display %p vinfo %p\n", this->display, this->vinfo));
+ ctx = glXCreateContext (this->display, this->vinfo, NULL, True);
+ DEBUGF ((stderr, "created\n"));
+
+ XINE_ASSERT(ctx, "ctx is NULL");
+
+ this->context = ctx;
+ this->context_state = CONTEXT_RELOAD;
+ this->renderthread = self;
}
if (this->context_state == CONTEXT_RELOAD && ! ctx)
@@ -909,7 +913,7 @@ static vo_driver_t *opengl_open_plugin (video_driver_class_t *class_gen,
* allocate plugin struct
*/
this = calloc (1, sizeof (opengl_driver_t));
- assert (this);
+ XINE_ASSERT (this, "OpenGL driver struct is not defined");
this->config = class->config;
this->display = visual->display;
diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c
index 622b61f17..b9f30a551 100644
--- a/src/video_out/video_out_xv.c
+++ b/src/video_out/video_out_xv.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: video_out_xv.c,v 1.158 2003/02/22 16:56:01 hadess Exp $
+ * $Id: video_out_xv.c,v 1.159 2003/02/28 02:51:51 storri Exp $
*
* video_out_xv.c, X11 video extension interface for xine
*
@@ -41,7 +41,6 @@
#include <stdlib.h>
#include <string.h>
#include <math.h>
-#include <assert.h>
#if defined(__FreeBSD__)
#include <machine/param.h>
diff --git a/src/video_out/yuv2rgb_mlib.c b/src/video_out/yuv2rgb_mlib.c
index a8fbd7c44..cdef81a66 100644
--- a/src/video_out/yuv2rgb_mlib.c
+++ b/src/video_out/yuv2rgb_mlib.c
@@ -29,7 +29,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <assert.h>
#include <inttypes.h>
#include <mlib_video.h>
@@ -83,7 +82,8 @@ static void mlib_yuv420_rgb24 (yuv2rgb_t *this,
dy = 0;
dst_height = this->next_slice (this, &image);
- assert((this->dest_width&1) == 0); /* mlib needs an even YUV2 width */
+ XINE_ASSERT((this->dest_width&1) == 0, "mlib needs an even YUV2 width.");
+
for (;;) {
scale_line (pu, this->u_buffer,
this->dest_width >> 1, this->step_dx);
@@ -160,7 +160,8 @@ static void mlib_yuv420_argb32 (yuv2rgb_t *this,
dy = 0;
dst_height = this->next_slice (this, &image);
- assert((this->dest_width&1) == 0); /* mlib needs an even YUV2 width */
+ XINE_ASSERT((this->dest_width&1) == 0, "mlib needs an even YUV2 width");
+
for (;;) {
scale_line (pu, this->u_buffer,
this->dest_width >> 1, this->step_dx);
@@ -237,7 +238,8 @@ static void mlib_yuv420_abgr32 (yuv2rgb_t *this,
dy = 0;
dst_height = this->next_slice (this, &image);
- assert((this->dest_width&1) == 0); /* mlib needs an even YUV2 width */
+ XINE_ASSERT ((this->dest_width&1) == 0, "mlib needs an even YUV2 width.");
+
for (;;) {
scale_line (pu, this->u_buffer,
this->dest_width >> 1, this->step_dx);