From 84133d2fad4c392de75d41d88a19850734ea5523 Mon Sep 17 00:00:00 2001 From: Simon Farnsworth Date: Wed, 2 May 2007 17:23:48 +0100 Subject: [PATCH] Enhance logging in demux_ts, input_dvb and video_out_xv The three attached patches (against 1.1.6) each increase the amount of debug logging in their respective components. We've found the extra logging useful when trying to track down faults. I've split this into three patches to make it easier to apply only some of our changes. -- Comments welcome, Simon Farnsworth --- src/video_out/video_out_xv.c | 48 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) (limited to 'src/video_out') diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c index dde15fb0f..95a847c2c 100644 --- a/src/video_out/video_out_xv.c +++ b/src/video_out/video_out_xv.c @@ -56,6 +56,7 @@ #include #include #include +#include #define LOG_MODULE "video_out_xv" #define LOG_VERBOSE @@ -262,7 +263,9 @@ static XvImage *create_ximage (xv_driver_t *this, XShmSegmentInfo *shminfo, height = 1; if (this->use_pitch_alignment) { + lprintf ("use_pitch_alignment old width=%d",width); width = (width + 7) & ~0x7; + lprintf ("use_pitch_alignment new width=%d",width); } switch (format) { @@ -286,6 +289,7 @@ static XvImage *create_ximage (xv_driver_t *this, XShmSegmentInfo *shminfo, gX11Fail = 0; x11_InstallXErrorHandler (this); + lprintf( "XvShmCreateImage format=0x%x, width=%d, height=%d\n", xv_format, width, height ); image = XvShmCreateImage(this->display, this->xv_port, xv_format, 0, width, height, shminfo); @@ -297,6 +301,22 @@ static XvImage *create_ximage (xv_driver_t *this, XShmSegmentInfo *shminfo, goto finishShmTesting; } + { + int q; + + lprintf( "XvImage id %d\n", image->id ); + lprintf( "XvImage width %d\n", image->width ); + lprintf( "XvImage height %d\n", image->height ); + lprintf( "XvImage data_size %d\n", image->data_size ); + lprintf( "XvImage num_planes %d\n", image->num_planes ); + + for( q=0; q < image->num_planes; q++) + { + lprintf( "XvImage pitches[%d] %d\n", q, image->pitches[q] ); + lprintf( "XvImage offsets[%d] %d\n", q, image->offsets[q] ); + } + } + shminfo->shmid = shmget(IPC_PRIVATE, image->data_size, IPC_CREAT | 0777); if (image->data_size==0) { @@ -750,6 +770,16 @@ static int xv_redraw_needed (vo_driver_t *this_gen) { return ret; } +/* Used in xv_display_frame to determine how long XvShmPutImage takes + - if slower than 60fps, print a message +*/ +static double timeOfDay() +{ + struct timeval t; + gettimeofday( &t, NULL ); + return ((double)t.tv_sec) + (((double)t.tv_usec)/1000000.0); +} + static void xv_display_frame (vo_driver_t *this_gen, vo_frame_t *frame_gen) { xv_driver_t *this = (xv_driver_t *) this_gen; xv_frame_t *frame = (xv_frame_t *) frame_gen; @@ -793,9 +823,14 @@ static void xv_display_frame (vo_driver_t *this_gen, vo_frame_t *frame_gen) { * ask for offset and output size */ xv_redraw_needed (this_gen); + { + double start_time; + double end_time; + double elapse_time; + int factor; LOCK_DISPLAY(this); - + start_time = timeOfDay(); if (this->use_shm) { XvShmPutImage(this->display, this->xv_port, this->drawable, this->gc, this->cur_frame->image, @@ -814,9 +849,20 @@ static void xv_display_frame (vo_driver_t *this_gen, vo_frame_t *frame_gen) { } XSync(this->display, False); + end_time = timeOfDay(); UNLOCK_DISPLAY(this); + elapse_time = end_time - start_time; + factor = (int)(elapse_time/(1.0/60.0)); + + if( factor > 1 ) + { + lprintf( "%s PutImage %dX interval (%fs)\n", + log_line_prefix(), factor, elapse_time ); + } + } + /* printf ("video_out_xv: xv_display_frame... done\n"); */ -- cgit v1.2.3 From 5f170aeb405f44ce67bf8827494c2a933b3e3241 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Thu, 17 May 2007 00:24:21 +0100 Subject: Convert comments (and the occasional string where it doesn't matter) to UTF-8. --- src/video_out/libdha/kernelhelper/dhahelper.c | 4 ++-- src/video_out/libdha/libdha.c | 2 +- src/video_out/libdha/libdha.h | 2 +- src/video_out/libdha/pci.c | 2 +- src/video_out/libdha/ports.c | 2 +- src/video_out/video_out_xxmc.c | 4 ++-- src/video_out/vidix/drivers/cyberblade_vid.c | 2 +- src/video_out/vidix/drivers/pm2_vid.c | 4 ++-- src/video_out/vidix/drivers/pm3_vid.c | 4 ++-- src/video_out/xvmc_vld.c | 2 +- src/video_out/xxmc.h | 2 +- 11 files changed, 15 insertions(+), 15 deletions(-) (limited to 'src/video_out') diff --git a/src/video_out/libdha/kernelhelper/dhahelper.c b/src/video_out/libdha/kernelhelper/dhahelper.c index 3ccbee107..0e755064a 100644 --- a/src/video_out/libdha/kernelhelper/dhahelper.c +++ b/src/video_out/libdha/kernelhelper/dhahelper.c @@ -3,7 +3,7 @@ (C) 2002 Alex Beregszaszi (C) 2002-2003 Nick Kurshev - (C) 2002-2004 Måns Rullgård + (C) 2002-2004 MÃ¥ns RullgÃ¥rd Accessing hardware from userspace as USER (no root needed!) @@ -109,7 +109,7 @@ #define irqreturn(n) return #endif -MODULE_AUTHOR("Alex Beregszaszi , Nick Kurshev , Måns Rullgård "); +MODULE_AUTHOR("Alex Beregszaszi , Nick Kurshev , MÃ¥ns RullgÃ¥rd "); MODULE_DESCRIPTION("Provides userspace access to hardware"); #ifdef MODULE_LICENSE MODULE_LICENSE("GPL"); diff --git a/src/video_out/libdha/libdha.c b/src/video_out/libdha/libdha.c index cb99e1c2d..73a4387a2 100644 --- a/src/video_out/libdha/libdha.c +++ b/src/video_out/libdha/libdha.c @@ -3,7 +3,7 @@ Copyrights: 1996/10/27 - Robin Cutshaw (robin@xfree86.org) XFree86 3.3.3 implementation - 1999 - Øyvind Aabling. + 1999 - Øyvind Aabling. Modified for GATOS/win/gfxdump. 2002 - library implementation by Nick Kurshev diff --git a/src/video_out/libdha/libdha.h b/src/video_out/libdha/libdha.h index e37cae515..2bd8fe39b 100644 --- a/src/video_out/libdha/libdha.h +++ b/src/video_out/libdha/libdha.h @@ -3,7 +3,7 @@ Copyrights: 1996/10/27 - Robin Cutshaw (robin@xfree86.org) XFree86 3.3.3 implementation - 1999 - Øyvind Aabling. + 1999 - Øyvind Aabling. Modified for GATOS/win/gfxdump. 2002 - library implementation by Nick Kurshev diff --git a/src/video_out/libdha/pci.c b/src/video_out/libdha/pci.c index 1cc70b7aa..db8f4ddd5 100644 --- a/src/video_out/libdha/pci.c +++ b/src/video_out/libdha/pci.c @@ -1,6 +1,6 @@ /* (C) 2002 - library implementation by Nick Kyrshev - XFree86 3.3.3 scanpci.c, modified for GATOS/win/gfxdump by Øyvind Aabling. + XFree86 3.3.3 scanpci.c, modified for GATOS/win/gfxdump by Øyvind Aabling. */ /* $XConsortium: scanpci.c /main/25 1996/10/27 11:48:40 kaleb $ */ /* diff --git a/src/video_out/libdha/ports.c b/src/video_out/libdha/ports.c index 73ad671d1..b531082d3 100644 --- a/src/video_out/libdha/ports.c +++ b/src/video_out/libdha/ports.c @@ -1,6 +1,6 @@ /* (C) 2002 - library implementation by Nick Kyrshev - XFree86 3.3.3 scanpci.c, modified for GATOS/win/gfxdump by Øyvind Aabling. + XFree86 3.3.3 scanpci.c, modified for GATOS/win/gfxdump by Øyvind Aabling. */ /* $XConsortium: scanpci.c /main/25 1996/10/27 11:48:40 kaleb $ */ /* diff --git a/src/video_out/video_out_xxmc.c b/src/video_out/video_out_xxmc.c index 11bfc7e1a..1c71bb534 100644 --- a/src/video_out/video_out_xxmc.c +++ b/src/video_out/video_out_xxmc.c @@ -31,8 +31,8 @@ * * overlay support by James Courtier-Dutton - July 2001 * X11 unscaled overlay support by Miguel Freitas - Nov 2003 - * XvMC VLD implementation by Thomas Hellström - 2004, 2005. - * XvMC merge by Thomas Hellström - Sep 2004 + * XvMC VLD implementation by Thomas Hellström - 2004, 2005. + * XvMC merge by Thomas Hellström - Sep 2004 * */ diff --git a/src/video_out/vidix/drivers/cyberblade_vid.c b/src/video_out/vidix/drivers/cyberblade_vid.c index 4b2f243f5..7a32ce7bd 100644 --- a/src/video_out/vidix/drivers/cyberblade_vid.c +++ b/src/video_out/vidix/drivers/cyberblade_vid.c @@ -4,7 +4,7 @@ Copyright (C) 2002 by Alastair M. Robinson. Official homepage: http://www.blackfiveservices.co.uk/EPIAVidix.shtml - Based on Permedia 3 driver by Måns Rullgård + Based on Permedia 3 driver by MÃ¥ns RullgÃ¥rd Thanks to Gilles Frattini for bugfixes diff --git a/src/video_out/vidix/drivers/pm2_vid.c b/src/video_out/vidix/drivers/pm2_vid.c index 1422bbd8b..075b178de 100644 --- a/src/video_out/vidix/drivers/pm2_vid.c +++ b/src/video_out/vidix/drivers/pm2_vid.c @@ -1,7 +1,7 @@ /** Driver for 3DLabs Permedia 2. - Copyright (C) 2002 Måns Rullgård + Copyright (C) 2002 MÃ¥ns RullgÃ¥rd This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -62,7 +62,7 @@ int pm2_vidmem = PM2_VIDMEM; static vidix_capability_t pm2_cap = { "3DLabs Permedia2 driver", - "Måns Rullgård ", + "MÃ¥ns RullgÃ¥rd ", TYPE_OUTPUT, { 0, 0, 0, 0 }, 2048, diff --git a/src/video_out/vidix/drivers/pm3_vid.c b/src/video_out/vidix/drivers/pm3_vid.c index 8a9e86c7b..72a6523b3 100644 --- a/src/video_out/vidix/drivers/pm3_vid.c +++ b/src/video_out/vidix/drivers/pm3_vid.c @@ -1,7 +1,7 @@ /** Driver for 3DLabs GLINT R3 and Permedia3 chips. - Copyright (C) 2002, 2003 Måns Rullgård + Copyright (C) 2002, 2003 MÃ¥ns RullgÃ¥rd This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -63,7 +63,7 @@ static u_int page_size; static vidix_capability_t pm3_cap = { "3DLabs GLINT R3/Permedia3 driver", - "Måns Rullgård ", + "MÃ¥ns RullgÃ¥rd ", TYPE_OUTPUT, { 0, 0, 0, 0 }, 2048, diff --git a/src/video_out/xvmc_vld.c b/src/video_out/xvmc_vld.c index ba1b51795..953b65563 100644 --- a/src/video_out/xvmc_vld.c +++ b/src/video_out/xvmc_vld.c @@ -22,7 +22,7 @@ * * xvmc_vld.c, X11 decoding accelerated video extension interface for xine * - * Author: Thomas Hellström, (2004) + * Author: Thomas Hellström, (2004) */ #include "xxmc.h" diff --git a/src/video_out/xxmc.h b/src/video_out/xxmc.h index 5fb9f66ee..d5c067d36 100644 --- a/src/video_out/xxmc.h +++ b/src/video_out/xxmc.h @@ -31,7 +31,7 @@ * * overlay support by James Courtier-Dutton - July 2001 * X11 unscaled overlay support by Miguel Freitas - Nov 2003 - * XxMC implementation by Thomas Hellström - August 2004 + * XxMC implementation by Thomas Hellström - August 2004 */ #ifndef _XXMC_H -- cgit v1.2.3