diff options
author | Daniel Caujolle-Bert <f1rmb@users.sourceforge.net> | 2003-11-26 23:44:08 +0000 |
---|---|---|
committer | Daniel Caujolle-Bert <f1rmb@users.sourceforge.net> | 2003-11-26 23:44:08 +0000 |
commit | e76d60c53d666cc42408bcea5e4060ac173798dd (patch) | |
tree | a2b395870a898ad7bdfe1f49a7717499f40e1386 /src/video_out | |
parent | 23176d5f3aaafdf90795fb847a064d0bb1b8d198 (diff) | |
download | xine-lib-e76d60c53d666cc42408bcea5e4060ac173798dd.tar.gz xine-lib-e76d60c53d666cc42408bcea5e4060ac173798dd.tar.bz2 |
xprintf clean pass. xprintf now log into new XINE_LOG_TRACE log buffer. scratch buffer enhancement (thanks Thibaut for the malloc tips), enlarge log buffer from 25 lines (very useless), to 150 (better).
CVS patchset: 5801
CVS date: 2003/11/26 23:44:08
Diffstat (limited to 'src/video_out')
-rw-r--r-- | src/video_out/video_out_vidix.c | 36 | ||||
-rw-r--r-- | src/video_out/video_out_xshm.c | 72 | ||||
-rw-r--r-- | src/video_out/video_out_xv.c | 109 |
3 files changed, 91 insertions, 126 deletions
diff --git a/src/video_out/video_out_vidix.c b/src/video_out/video_out_vidix.c index bb4baf299..1531dcb4d 100644 --- a/src/video_out/video_out_vidix.c +++ b/src/video_out/video_out_vidix.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_vidix.c,v 1.54 2003/11/26 19:43:37 f1rmb Exp $ + * $Id: video_out_vidix.c,v 1.55 2003/11/26 23:44:10 f1rmb Exp $ * * video_out_vidix.c * @@ -755,8 +755,7 @@ static int vidix_set_property (vo_driver_t *this_gen, this->vidix_eq.hue = value; if((err = vdlPlaybackSetEq(this->vidix_handler, &this->vidix_eq)) != 0) - if(this->xine->verbosity >= XINE_VERBOSITY_LOG) - printf("video_out_vidix: can't set hue: %s\n", strerror(err)); + xprintf(this->xine, XINE_VERBOSITY_LOG, "video_out_vidix: can't set hue: %s\n", strerror(err)); } if ( property == VO_PROP_SATURATION ) { @@ -764,8 +763,7 @@ static int vidix_set_property (vo_driver_t *this_gen, this->vidix_eq.saturation = value; if((err = vdlPlaybackSetEq(this->vidix_handler, &this->vidix_eq)) != 0) - if(this->xine->verbosity >= XINE_VERBOSITY_LOG) - printf("video_out_vidix: can't set saturation: %s\n", strerror(err)); + xprintf(this->xine, XINE_VERBOSITY_LOG, "video_out_vidix: can't set saturation: %s\n", strerror(err)); } if ( property == VO_PROP_BRIGHTNESS ) { @@ -773,8 +771,7 @@ static int vidix_set_property (vo_driver_t *this_gen, this->vidix_eq.brightness = value; if((err = vdlPlaybackSetEq(this->vidix_handler, &this->vidix_eq)) != 0) - if(this->xine->verbosity >= XINE_VERBOSITY_LOG) - printf("video_out_vidix: can't set brightness: %s\n", strerror(err)); + xprintf(this->xine, XINE_VERBOSITY_LOG, "video_out_vidix: can't set brightness: %s\n", strerror(err)); } if ( property == VO_PROP_CONTRAST ) { @@ -782,8 +779,7 @@ static int vidix_set_property (vo_driver_t *this_gen, this->vidix_eq.contrast = value; if((err = vdlPlaybackSetEq(this->vidix_handler, &this->vidix_eq)) != 0) - if(this->xine->verbosity >= XINE_VERBOSITY_LOG) - printf("video_out_vidix: can't set contrast: %s\n", strerror(err)); + xprintf(this->xine, XINE_VERBOSITY_LOG, "video_out_vidix: can't set contrast: %s\n", strerror(err)); } } @@ -836,8 +832,7 @@ static void vidix_rgb_callback(vo_driver_t *this_gen, xine_cfg_entry_t *entry) { } if((err = vdlPlaybackSetEq(this->vidix_handler, &this->vidix_eq))) - if(this->xine->verbosity >= XINE_VERBOSITY_LOG) - printf("video_out_vidix: can't set rgb intensity: %s\n", strerror(err)); + xprintf(this->xine, XINE_VERBOSITY_LOG, "video_out_vidix: can't set rgb intensity: %s\n", strerror(err)); } @@ -964,8 +959,8 @@ static vidix_driver_t *open_plugin (video_driver_class_t *class_gen) { /* Find what equalizer flags are supported */ if(this->vidix_cap.flags & FLAG_EQUALIZER) { if((err = vdlPlaybackGetEq(this->vidix_handler, &this->vidix_eq)) != 0) { - if(this->xine->verbosity >= XINE_VERBOSITY_LOG) - printf("video_out_vidix: couldn't get equalizer capabilities: %s\n", strerror(err)); + xprintf(this->xine, XINE_VERBOSITY_LOG, + "video_out_vidix: couldn't get equalizer capabilities: %s\n", strerror(err)); } else { if(this->vidix_eq.cap & VEQ_CAP_BRIGHTNESS) { this->props[VO_PROP_BRIGHTNESS].value = 0; @@ -1008,9 +1003,8 @@ static vidix_driver_t *open_plugin (video_driver_class_t *class_gen) { (void*) vidix_rgb_callback, this); if((err = vdlPlaybackSetEq(this->vidix_handler, &this->vidix_eq))) - if(this->xine->verbosity >= XINE_VERBOSITY_LOG) - printf("video_out_vidix: can't set rgb intensity: %s\n", - strerror(err)); + xprintf(this->xine, XINE_VERBOSITY_LOG, + "video_out_vidix: can't set rgb intensity: %s\n", strerror(err)); } } } @@ -1061,8 +1055,7 @@ static void query_fourccs (vidix_driver_t *this) { if((err = vdlQueryFourcc(this->vidix_handler, &vidix_fourcc)) == 0) { this->capabilities |= VO_CAP_YUY2; - if(this->xine->verbosity >= XINE_VERBOSITY_LOG) - printf("video_out_vidix: adaptor supports the yuy2 format\n"); + xprintf(this->xine, XINE_VERBOSITY_LOG, "video_out_vidix: adaptor supports the yuy2 format\n"); } /* Detect if YV12 is supported - we always support yv12 but we need @@ -1072,8 +1065,7 @@ static void query_fourccs (vidix_driver_t *this) { if((err = vdlQueryFourcc(this->vidix_handler, &vidix_fourcc)) == 0) { this->supports_yv12 = 1; - if(this->xine->verbosity >= XINE_VERBOSITY_LOG) - printf("video_out_vidix: adaptor supports the yv12 format\n"); + xprintf(this->xine, XINE_VERBOSITY_LOG, "video_out_vidix: adaptor supports the yv12 format\n"); } else this->supports_yv12 = 0; } @@ -1110,9 +1102,9 @@ static void *init_class (xine_t *xine, void *visual_gen) { free(this); return NULL; } - if(xine->verbosity >= XINE_VERBOSITY_LOG) - printf("video_out_vidix: using driver: %s by %s\n",this->vidix_cap.name,this->vidix_cap.author); + xprintf(xine, XINE_VERBOSITY_LOG, + "video_out_vidix: using driver: %s by %s\n",this->vidix_cap.name,this->vidix_cap.author); this->xine = xine; this->config = xine->config; diff --git a/src/video_out/video_out_xshm.c b/src/video_out/video_out_xshm.c index 4cde70123..86e81593d 100644 --- a/src/video_out/video_out_xshm.c +++ b/src/video_out/video_out_xshm.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_xshm.c,v 1.122 2003/11/26 19:43:37 f1rmb Exp $ + * $Id: video_out_xshm.c,v 1.123 2003/11/26 23:44:10 f1rmb Exp $ * * video_out_xshm.c, X11 shared memory extension interface for xine * @@ -184,10 +184,9 @@ static XImage *create_ximage (xshm_driver_t *this, XShmSegmentInfo *shminfo, height); if (myimage == NULL ) { - if (this->xine->verbosity >= XINE_VERBOSITY_LOG) { - printf ("video_out_xshm: shared memory error when allocating image\n"); - printf ("video_out_xshm: => not using MIT Shared Memory extension.\n"); - } + xprintf(this->xine, XINE_VERBOSITY_LOG, + "video_out_xshm: shared memory error when allocating image\n" + "video_out_xshm: => not using MIT Shared Memory extension.\n"); this->use_shm = 0; goto finishShmTesting; } @@ -201,10 +200,9 @@ static XImage *create_ximage (xshm_driver_t *this, XShmSegmentInfo *shminfo, IPC_CREAT | 0777); if (shminfo->shmid < 0 ) { - if (this->xine->verbosity >= XINE_VERBOSITY_LOG) { - printf ("video_out_xshm: %s: allocating image\n",strerror(errno)); - printf ("video_out_xshm: => not using MIT Shared Memory extension.\n"); - } + xprintf(this->xine, XINE_VERBOSITY_LOG, + "video_out_xshm: %s: allocating image\n" + "video_out_xshm: => not using MIT Shared Memory extension.\n", strerror(errno)); this->use_shm = 0; goto finishShmTesting; } @@ -212,10 +210,9 @@ static XImage *create_ximage (xshm_driver_t *this, XShmSegmentInfo *shminfo, shminfo->shmaddr = (char *) shmat(shminfo->shmid, 0, 0); if (shminfo->shmaddr == ((char *) -1)) { - if (this->xine->verbosity >= XINE_VERBOSITY_LOG) { - printf ("video_out_xshm: shared memory error (address error) when allocating image \n"); - printf ("video_out_xshm: => not using MIT Shared Memory extension.\n"); - } + xprintf(this->xine, XINE_VERBOSITY_LOG, + "video_out_xshm: shared memory error (address error) when allocating image \n" + "video_out_xshm: => not using MIT Shared Memory extension.\n"); shmctl (shminfo->shmid, IPC_RMID, 0); shminfo->shmid = -1; this->use_shm = 0; @@ -230,10 +227,9 @@ static XImage *create_ximage (xshm_driver_t *this, XShmSegmentInfo *shminfo, XSync(this->display, False); if (gX11Fail) { - if (this->xine->verbosity >= XINE_VERBOSITY_LOG) { - printf ("video_out_xshm: x11 error during shared memory XImage creation\n"); - printf ("video_out_xshm: => not using MIT Shared Memory extension.\n"); - } + xprintf(this->xine, XINE_VERBOSITY_LOG, + "video_out_xshm: x11 error during shared memory XImage creation\n" + "video_out_xshm: => not using MIT Shared Memory extension.\n"); shmdt (shminfo->shmaddr); shmctl (shminfo->shmid, IPC_RMID, 0); shminfo->shmid = -1; @@ -786,10 +782,8 @@ static int xshm_get_property (vo_driver_t *this_gen, int property) { case VO_PROP_WINDOW_HEIGHT: return this->sc.gui_height; default: - if (this->xine->verbosity >= XINE_VERBOSITY_LOG) { - printf ("video_out_xshm: tried to get unsupported property %d\n", - property); - } + xprintf(this->xine, XINE_VERBOSITY_LOG, + "video_out_xshm: tried to get unsupported property %d\n", property); } return 0; @@ -804,10 +798,8 @@ static int xshm_set_property (vo_driver_t *this_gen, if (value>=XINE_VO_ASPECT_NUM_RATIOS) value = XINE_VO_ASPECT_AUTO; this->sc.user_ratio = value; - if (this->xine->verbosity >= XINE_VERBOSITY_LOG) { - printf ("video_out_xshm: aspect ratio changed to %s\n", - _x_vo_scale_aspect_ratio_name(value)); - } + xprintf(this->xine, XINE_VERBOSITY_LOG, + "video_out_xshm: aspect ratio changed to %s\n", _x_vo_scale_aspect_ratio_name(value)); } else if (property == VO_PROP_BRIGHTNESS) { @@ -1115,13 +1107,10 @@ static vo_driver_t *xshm_open_plugin (video_driver_class_t *class_gen, const voi this->visual = attribs.visual; this->depth = attribs.depth; - if (this->xine->verbosity >= XINE_VERBOSITY_LOG) { - if (this->depth>16) - printf ("\n\n" - "WARNING: current display depth is %d. For better performance\n" - "a depth of 16 bpp is recommended!\n\n", - this->depth); - } + if (this->depth>16) + xprintf(this->xine, XINE_VERBOSITY_LOG, + "\n\nWARNING: current display depth is %d. For better performance\n" + "a depth of 16 bpp is recommended!\n\n", this->depth); /* * check for X shared memory support @@ -1132,8 +1121,8 @@ static vo_driver_t *xshm_open_plugin (video_driver_class_t *class_gen, const voi this->use_shm = 1; } else { - if (this->xine->verbosity >= XINE_VERBOSITY_LOG) - printf ("video_out_xshm: MIT shared memory extension not present on display.\n"); + xprintf(this->xine, XINE_VERBOSITY_LOG, + "video_out_xshm: MIT shared memory extension not present on display.\n"); this->use_shm = 0; } @@ -1153,14 +1142,13 @@ static vo_driver_t *xshm_open_plugin (video_driver_class_t *class_gen, const voi cpu_byte_order = htonl(1) == 1 ? MSBFirst : LSBFirst; swapped = cpu_byte_order != this->image_byte_order; - if (this->xine->verbosity >= XINE_VERBOSITY_LOG) { - printf ("video_out_xshm: video mode depth is %d (%d bpp), %s, %sswapped,\n" - "\tred: %08lx, green: %08lx, blue: %08lx\n", - this->depth, this->bpp, - visual_class_name(this->visual), - swapped ? "" : "not ", - this->visual->red_mask, this->visual->green_mask, this->visual->blue_mask); - } + xprintf(this->xine, XINE_VERBOSITY_LOG, + "video_out_xshm: video mode depth is %d (%d bpp), %s, %sswapped,\n" + "\tred: %08lx, green: %08lx, blue: %08lx\n", + this->depth, this->bpp, + visual_class_name(this->visual), + swapped ? "" : "not ", + this->visual->red_mask, this->visual->green_mask, this->visual->blue_mask); mode = 0; diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c index a91bf39eb..1e3be022a 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.184 2003/11/26 19:43:37 f1rmb Exp $ + * $Id: video_out_xv.c,v 1.185 2003/11/26 23:44:10 f1rmb Exp $ * * video_out_xv.c, X11 video extension interface for xine * @@ -41,6 +41,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <errno.h> #include <math.h> #if defined (__SVR4) && defined (__sun) @@ -279,10 +280,9 @@ static XvImage *create_ximage (xv_driver_t *this, XShmSegmentInfo *shminfo, width, height, shminfo); if (image == NULL ) { - if (this->xine->verbosity >= XINE_VERBOSITY_LOG) { - printf("video_out_xv: XvShmCreateImage failed\n"); - printf("video_out_xv: => not using MIT Shared Memory extension.\n"); - } + xprintf(this->xine, XINE_VERBOSITY_LOG, + "video_out_xv: XvShmCreateImage failed\n" + "video_out_xv: => not using MIT Shared Memory extension.\n"); this->use_shm = 0; goto finishShmTesting; } @@ -290,19 +290,17 @@ static XvImage *create_ximage (xv_driver_t *this, XShmSegmentInfo *shminfo, shminfo->shmid = shmget(IPC_PRIVATE, image->data_size, IPC_CREAT | 0777); if (image->data_size==0) { - if (this->xine->verbosity >= XINE_VERBOSITY_LOG) { - printf("video_out_xv: XvShmCreateImage returned a zero size\n"); - printf("video_out_xv: => not using MIT Shared Memory extension.\n"); - } + xprintf(this->xine, XINE_VERBOSITY_LOG, + "video_out_xv: XvShmCreateImage returned a zero size\n" + "video_out_xv: => not using MIT Shared Memory extension.\n"); this->use_shm = 0; goto finishShmTesting; } if (shminfo->shmid < 0 ) { - if (this->xine->verbosity >= XINE_VERBOSITY_LOG) { - perror("video_out_xv: shared memory error in shmget: "); - printf("video_out_xv: => not using MIT Shared Memory extension.\n"); - } + xprintf(this->xine, XINE_VERBOSITY_LOG, + "video_out_xv: shared memory error in shmget: %s" + "video_out_xv: => not using MIT Shared Memory extension.\n", strerror(errno)); this->use_shm = 0; goto finishShmTesting; } @@ -310,15 +308,15 @@ static XvImage *create_ximage (xv_driver_t *this, XShmSegmentInfo *shminfo, shminfo->shmaddr = (char *) shmat(shminfo->shmid, 0, 0); if (shminfo->shmaddr == NULL) { - if (this->xine->verbosity >= XINE_VERBOSITY_LOG) - printf("video_out_xv: shared memory error (address error NULL)\n"); + xprintf(this->xine, XINE_VERBOSITY_LOG, + "video_out_xv: shared memory error (address error NULL)\n"); this->use_shm = 0; goto finishShmTesting; } if (shminfo->shmaddr == ((char *) -1)) { - if (this->xine->verbosity >= XINE_VERBOSITY_LOG) - printf("video_out_xv: shared memory error (address error)\n"); + xprintf(this->xine, XINE_VERBOSITY_LOG, + "video_out_xv: shared memory error (address error)\n"); this->use_shm = 0; goto finishShmTesting; } @@ -332,10 +330,9 @@ static XvImage *create_ximage (xv_driver_t *this, XShmSegmentInfo *shminfo, shmctl(shminfo->shmid, IPC_RMID, 0); if (gX11Fail) { - if (this->xine->verbosity >= XINE_VERBOSITY_LOG) { - printf ("video_out_xv: x11 error during shared memory XImage creation\n"); - printf ("video_out_xv: => not using MIT Shared Memory extension.\n"); - } + xprintf(this->xine, XINE_VERBOSITY_LOG, + "video_out_xv: x11 error during shared memory XImage creation\n" + "video_out_xv: => not using MIT Shared Memory extension.\n"); shmdt (shminfo->shmaddr); shmctl (shminfo->shmid, IPC_RMID, 0); shminfo->shmid = -1; @@ -798,9 +795,8 @@ static int xv_get_property (vo_driver_t *this_gen, int property) { break; } - if (this->xine->verbosity >= XINE_VERBOSITY_LOG) - printf ("video_out_xv: property #%d = %d\n", property, - this->props[property].value); + xprintf(this->xine, XINE_VERBOSITY_LOG, + "video_out_xv: property #%d = %d\n", property, this->props[property].value); return this->props[property].value; } @@ -844,10 +840,8 @@ static int xv_set_property (vo_driver_t *this_gen, case VO_PROP_INTERLACED: this->props[property].value = value; - if (this->xine->verbosity >= XINE_VERBOSITY_LOG) { - printf("video_out_xv: VO_PROP_INTERLACED(%d)\n", - this->props[property].value); - } + xprintf(this->xine, XINE_VERBOSITY_LOG, + "video_out_xv: VO_PROP_INTERLACED(%d)\n", this->props[property].value); this->deinterlace_enabled = value; if (this->deinterlace_method == DEINTERLACE_ONEFIELDXV) { xv_compute_ideal_size (this); @@ -860,10 +854,8 @@ static int xv_set_property (vo_driver_t *this_gen, value = XINE_VO_ASPECT_AUTO; this->props[property].value = value; - if (this->xine->verbosity >= XINE_VERBOSITY_LOG) { - printf("video_out_xv: VO_PROP_ASPECT_RATIO(%d)\n", - this->props[property].value); - } + xprintf(this->xine, XINE_VERBOSITY_LOG, + "video_out_xv: VO_PROP_ASPECT_RATIO(%d)\n", this->props[property].value); this->sc.user_ratio = value; xv_compute_ideal_size (this); @@ -874,10 +866,9 @@ static int xv_set_property (vo_driver_t *this_gen, case VO_PROP_ZOOM_X: if ((value >= XINE_VO_ZOOM_MIN) && (value <= XINE_VO_ZOOM_MAX)) { this->props[property].value = value; - if (this->xine->verbosity >= XINE_VERBOSITY_LOG) - printf ("video_out_xv: VO_PROP_ZOOM_X = %d\n", - this->props[property].value); - + xprintf(this->xine, XINE_VERBOSITY_LOG, + "video_out_xv: VO_PROP_ZOOM_X = %d\n", this->props[property].value); + this->sc.zoom_factor_x = (double)value / (double)XINE_VO_ZOOM_STEP; xv_compute_ideal_size (this); @@ -889,9 +880,8 @@ static int xv_set_property (vo_driver_t *this_gen, case VO_PROP_ZOOM_Y: if ((value >= XINE_VO_ZOOM_MIN) && (value <= XINE_VO_ZOOM_MAX)) { this->props[property].value = value; - if (this->xine->verbosity >= XINE_VERBOSITY_LOG) - printf ("video_out_xv: VO_PROP_ZOOM_Y = %d\n", - this->props[property].value); + xprintf(this->xine, XINE_VERBOSITY_LOG, + "video_out_xv: VO_PROP_ZOOM_Y = %d\n", this->props[property].value); this->sc.zoom_factor_y = (double)value / (double)XINE_VO_ZOOM_STEP; @@ -1086,10 +1076,9 @@ static void xv_check_capability (xv_driver_t *this, XvGetPortAttribute (this->display, this->xv_port, this->props[property].atom, &int_default); - if (this->xine->verbosity >= XINE_VERBOSITY_LOG) - printf ("video_out_xv: port attribute %s (%d) value is %d\n", - str_prop, property, int_default); - + xprintf(this->xine, XINE_VERBOSITY_LOG, + "video_out_xv: port attribute %s (%d) value is %d\n", str_prop, property, int_default); + if (config_name) { /* is this a boolean property ? */ if ((attr.min_value == 0) && (attr.max_value == 1)) { @@ -1146,8 +1135,8 @@ static void xv_update_XV_FILTER(void *this_gen, xine_cfg_entry_t *entry) { XvSetPortAttribute (this->display, this->xv_port, atom, xv_filter); XUnlockDisplay(this->display); - if (this->xine->verbosity >= XINE_VERBOSITY_LOG) - printf("video_out_xv: bilinear scaling mode (XV_FILTER) = %d\n",xv_filter); + xprintf(this->xine, XINE_VERBOSITY_LOG, + "video_out_xv: bilinear scaling mode (XV_FILTER) = %d\n",xv_filter); } static void xv_update_XV_DOUBLE_BUFFER(void *this_gen, xine_cfg_entry_t *entry) { @@ -1162,8 +1151,8 @@ static void xv_update_XV_DOUBLE_BUFFER(void *this_gen, xine_cfg_entry_t *entry) XvSetPortAttribute (this->display, this->xv_port, atom, xv_double_buffer); XUnlockDisplay(this->display); - if (this->xine->verbosity >= XINE_VERBOSITY_LOG) - printf("video_out_xv: double buffering mode = %d\n",xv_double_buffer); + xprintf(this->xine, XINE_VERBOSITY_LOG, + "video_out_xv: double buffering mode = %d\n", xv_double_buffer); } static void xv_update_xv_pitch_alignment(void *this_gen, xine_cfg_entry_t *entry) { @@ -1322,9 +1311,8 @@ static vo_driver_t *open_plugin (video_driver_class_t *class_gen, const void *vi } XFree(attr); } - else if (this->xine->verbosity >= XINE_VERBOSITY_DEBUG) { - printf("video_out_xv: no port attributes defined.\n"); - } + else + xprintf(this->xine, XINE_VERBOSITY_DEBUG, "video_out_xv: no port attributes defined.\n"); /* * check supported image formats @@ -1344,13 +1332,11 @@ static vo_driver_t *open_plugin (video_driver_class_t *class_gen, const void *vi if (fo[i].id == XINE_IMGFMT_YV12) { this->xv_format_yv12 = fo[i].id; this->capabilities |= VO_CAP_YV12; - if (this->xine->verbosity >= XINE_VERBOSITY_LOG) - printf("video_out_xv: this adaptor supports the yv12 format.\n"); + xprintf(this->xine, XINE_VERBOSITY_LOG,"video_out_xv: this adaptor supports the yv12 format.\n"); } else if (fo[i].id == XINE_IMGFMT_YUY2) { this->xv_format_yuy2 = fo[i].id; this->capabilities |= VO_CAP_YUY2; - if (this->xine->verbosity >= XINE_VERBOSITY_LOG) - printf("video_out_xv: this adaptor supports the yuy2 format.\n"); + xprintf(this->xine, XINE_VERBOSITY_LOG, "video_out_xv: this adaptor supports the yuy2 format.\n"); } } @@ -1468,18 +1454,17 @@ static void *init_class (xine_t *xine, void *visual_gen) { } if (!xv_port) { - if (xine->verbosity >= XINE_VERBOSITY_LOG) { - printf ("video_out_xv: Xv extension is present but " - "I couldn't find a usable yuv12 port.\n"); - printf (" Looks like your graphics hardware " - "driver doesn't support Xv?!\n"); - } + xprintf(xine, XINE_VERBOSITY_LOG, + "video_out_xv: Xv extension is present but I couldn't find a usable yuv12 port.\n" + " Looks like your graphics hardware driver doesn't support Xv?!\n"); + /* XvFreeAdaptorInfo (adaptor_info); this crashed on me (gb)*/ XUnlockDisplay(display); return NULL; } - else if (xine->verbosity >= XINE_VERBOSITY_LOG) - printf ("video_out_xv: using Xv port %ld from adaptor %s for hardware " + else + xprintf(xine, XINE_VERBOSITY_LOG, + "video_out_xv: using Xv port %ld from adaptor %s for hardware " "colorspace conversion and scaling.\n", xv_port, adaptor_info[adaptor_num].name); |