redbutton-devel Mailing List for RedButton MHEG Engine (Page 22)
Brought to you by:
skilvington
You can subscribe to this list here.
| 2006 |
Jan
(1) |
Feb
(4) |
Mar
(27) |
Apr
(6) |
May
(46) |
Jun
(45) |
Jul
(7) |
Aug
(4) |
Sep
(7) |
Oct
(5) |
Nov
(10) |
Dec
(11) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(49) |
Feb
(29) |
Mar
(35) |
Apr
(43) |
May
(23) |
Jun
(4) |
Jul
(1) |
Aug
(58) |
Sep
(66) |
Oct
(27) |
Nov
(15) |
Dec
(1) |
| 2008 |
Jan
(11) |
Feb
|
Mar
(8) |
Apr
|
May
|
Jun
(30) |
Jul
(1) |
Aug
(1) |
Sep
(1) |
Oct
|
Nov
(3) |
Dec
(6) |
| 2009 |
Jan
(6) |
Feb
(1) |
Mar
(2) |
Apr
(5) |
May
(2) |
Jun
(1) |
Jul
(7) |
Aug
|
Sep
(2) |
Oct
(2) |
Nov
|
Dec
(6) |
| 2010 |
Jan
(6) |
Feb
|
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(6) |
Sep
(4) |
Oct
|
Nov
(11) |
Dec
(4) |
| 2011 |
Jan
|
Feb
(11) |
Mar
(8) |
Apr
|
May
|
Jun
(3) |
Jul
|
Aug
|
Sep
(4) |
Oct
|
Nov
(2) |
Dec
|
| 2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Simon K. <s.k...@er...> - 2006-11-06 09:40:16
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, Mario Rossi wrote: > Hi > > Since I cannot see my messages in the mailing list, I'll answer you > directly. > your messages are definitely appearing on the list, not sure why you are not seeing them... > I haven't had any more the segmentation fault, so pthread seems to be > the solution. good! > > I still haven't managed to install the font. I'm using KDE and I've > installed it both as root and as a user, but it does not work. I have > to try to use some low level X.org configuration files. > here's how I installed it manually on Gentoo using X.org server: see where your xorg.conf file stores local fonts, in mine I have this line: FontPath "/usr/local/share/fonts" so, then I did... cp tt7268m_802.ttf /usr/local/share/fonts cd /usr/local/share/fonts ttmkfdir then restart X I've also attached a script I was sent me for installing the font on Debian > I have an other question though: until a week ago (sometimes with > problems, recently very well) I only saw in the main window of > rb-browser only the teletext. > rb-browser uses ffmpeg to decode the video and audio, so the pthreads issue may well have stopped it working > Now (maybe after I've updated ffmpeg from svn) the application tries > to show the video but it is not very succesful. > > The video does not play smoothly (actually it stays fixed for the > first image), the image ratio is wrong (e.g. on BBC ONE), an the > application seems to respond wrose (it is very slow). Moreover it does > not respond to click on the X top left of the window to shut it down. > I have to hit Crtl-C. > If I disable the video using "-o null", I have expirienced a > segmentation fault (just once so far, complaining about losing the > sync) and I still get a lot of warning about audio > > MHEGAudioOutput: buffer underrun (but not always) > > The application being very slow as well. > at the moment, rb-browser does not really use much hardware acceleration that your video card may provide - what you describe sounds like what happens when there is either not enough processing power (or not enough network bandwidth between rb-download and rb-browser) - rb-browser doesn't really cope very well in this situation - it's something I need to do some work on... what speed processor do you have? and are you running rb-download and rb-browser on separate machines or on the same one? if you can reproduce the segfault with "-o null" and send me a gdb backtrace or a core file I would be interested to see it > How can I disable both audio & video? > the easiest thing to do is run rb-download without the "-l" flag, then rb-browser can't connect to it to get the video and audio streams eg, run them like this... rb-download 4165 & rb-browser services/4165 > Some logs > I haven't attached the output of "-v" since it is too big. > kernel 2.6.18 recompilaed (alsa drivers 1.0.12 rc1). > v4l-dvb latest. > I will try later to debug the "Audio invalid argument". > > ============================================================= > rb-browser services/4164/ 2> log.txt > > output on screen: > > Font 'TiresiasScreenfont' not available; using 'sans' for 'rec://font/uk1' > Unable to open '~/z': No such file or directory > GetEngineSupport: unknown feature 'DVR(+)' > Unable to set audio parameters: Invalid argument > > log.txt attached. > > ============================================================= > rb-browser -o null services/4164/ 2> log2.txt > > output on screen > > Font 'TiresiasScreenfont' not available; using 'sans' for 'rec://font/uk1' > Unable to open '~/z': No such file or directory > GetEngineSupport: unknown feature 'DVR(+)' > Unable to set audio parameters: Invalid argument > ObjectReference not found: ~//d/s/mn1q.mhg 80 > > log2.txt attached > > =========================================================== > > meanwhile rb-download runs > > rb-download -l 4164 > > output on screen > > Unknown PID for association tag 0x68 > > ============================================================ > > Can I give better debug output? > > Thanks - -- Simon Kilvington -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.4 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFTwLOmt9ZifioJSwRAtfAAJ4+4aSC3f0kcg8Yh9sglPnFTPcuDQCfWN5r oAsoN+17zDDmlA2R8yZUSPQ= =Y9ad -----END PGP SIGNATURE----- |
|
From: <ski...@us...> - 2006-11-06 08:59:13
|
Revision: 150
http://svn.sourceforge.net/redbutton/?rev=150&view=rev
Author: skilvington
Date: 2006-11-06 00:59:07 -0800 (Mon, 06 Nov 2006)
Log Message:
-----------
don't need this error anymore
Modified Paths:
--------------
redbutton-browser/trunk/utils.c
Modified: redbutton-browser/trunk/utils.c
===================================================================
--- redbutton-browser/trunk/utils.c 2006-11-05 10:30:39 UTC (rev 149)
+++ redbutton-browser/trunk/utils.c 2006-11-06 08:59:07 UTC (rev 150)
@@ -66,9 +66,6 @@
break;
}
- if(fmt == PIX_FMT_NONE)
- error("Unsupported pixel format (bpp=%d r=%lx g=%lx b=%lx)", bpp, rmask, gmask, bmask);
-
return fmt;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: Mario R. <mar...@go...> - 2006-11-05 18:45:33
|
Not sure whether it has anything to do, but the behaviour has improved: - BBC ONE I get a smooth video - ITV1 video still bad, fixed on the first image - I can actually close the application with the mouse click - When I am on page 120 of ITV I get a strange behviour. If I press <- -> only it goes smoothly across the 14 pages. But if I use pressing all 4 arrows (one at a time of course), like down till the bottom and then right right (or more complex combinations of the arrows) it does not go through all 14 pages but it follows some strange path. Until I finally go to an other page and back again to 120 where it is ok. - still a lot of [mp3 @ 0xb7e71984]incorrect frame size On 11/5/06, ski...@us... <ski...@us...> wrote: > Revision: 149 > http://svn.sourceforge.net/redbutton/?rev=149&view=rev > Author: skilvington > Date: 2006-11-05 02:30:39 -0800 (Sun, 05 Nov 2006) > > Log Message: > ----------- > don't convert pixel formats more than we need to > > Modified Paths: > -------------- > redbutton-browser/trunk/MHEGDisplay.c > redbutton-browser/trunk/utils.c > redbutton-browser/trunk/utils.h > redbutton-browser/trunk/videoout_xshm.c > > Modified: redbutton-browser/trunk/MHEGDisplay.c > =================================================================== > --- redbutton-browser/trunk/MHEGDisplay.c 2006-10-12 10:00:30 UTC (rev 148) > +++ redbutton-browser/trunk/MHEGDisplay.c 2006-11-05 10:30:39 UTC (rev 149) > @@ -756,13 +756,28 @@ > */ > for(i=0; i<width*height; i++) > { > - uint8_t r = rgba[(i * 4) + 0]; > - uint8_t g = rgba[(i * 4) + 1]; > - uint8_t b = rgba[(i * 4) + 2]; > - uint8_t a = rgba[(i * 4) + 3]; > -/* TODO */ > -/* if we still need to do r=g=b=0 when a=0, do it here */ > - uint32_t pix = (a << 24) | (r << 16) | (g << 8) | b; > + uint8_t a, r, g, b; > + uint32_t pix; > + /* > + * if the pixel is transparent, set the RGB components to 0 > + * otherwise, if we scale up the bitmap in fullscreen mode, > + * we may end up with a border around the image > + * this happens, for example, with the BBC's "Press Red" image > + * it has a transparent box around it, but the RGB values are not 0 in the transparent area > + * when we scale it up we get a pink border around it > + */ > + a = rgba[(i * 4) + 3]; > + if(a == 0) > + { > + pix = 0; > + } > + else > + { > + r = rgba[(i * 4) + 0]; > + g = rgba[(i * 4) + 1]; > + b = rgba[(i * 4) + 2]; > + pix = (a << 24) | (r << 16) | (g << 8) | b; > + } > *((uint32_t *) &rgba[i * 4]) = pix; > } > > @@ -890,6 +905,7 @@ > unsigned int i, npixs; > XImage *ximg; > XRenderPictFormat *pic_format; > + enum PixelFormat av_format; > GC gc; > > bitmap = safe_malloc(sizeof(MHEGBitmap)); > @@ -897,41 +913,44 @@ > > /* find a matching XRender pixel format */ > pic_format = XRenderFindStandardFormat(d->dpy, PictStandardARGB32); > + av_format = find_av_pix_fmt(32, > + pic_format->direct.redMask << pic_format->direct.red, > + pic_format->direct.greenMask << pic_format->direct.green, > + pic_format->direct.blueMask << pic_format->direct.blue); > > /* copy the RGBA values into a block we can use as XImage data */ > npixs = width * height; > /* 4 bytes per pixel */ > xdata = safe_malloc(npixs * 4); > - /* > - * copy the pixels, converting them to our XRender RGBA order as we go > - * even if the XRender pixel layout is the same as the ffmpeg one we still process each pixel > - * because we want to make sure transparent pixels have 0 for their RGB components > - * otherwise, if we scale up the bitmap in fullscreen mode and apply our bilinear filter, > - * we may end up with a border around the image > - * this happens, for example, with the BBC's "Press Red" image > - * it has a transparent box around it, but the RGB values are not 0 in the transparent area > - * when we scale it up we get a pink border around it > - */ > - for(i=0; i<npixs; i++) > + /* are the pixel layouts exactly the same */ > + if(av_format == PIX_FMT_RGBA32) > { > - rgba_pix = *((uint32_t *) &rgba[i * 4]); > - a = (rgba_pix >> 24) & 0xff; > - r = (rgba_pix >> 16) & 0xff; > - g = (rgba_pix >> 8) & 0xff; > - b = rgba_pix & 0xff; > - /* is it transparent */ > - if(a == 0) > + memcpy(xdata, rgba, npixs * 4); > + } > + else > + { > + /* swap the RGBA components as needed */ > + for(i=0; i<npixs; i++) > { > - xpix = 0; > + rgba_pix = *((uint32_t *) &rgba[i * 4]); > + a = (rgba_pix >> 24) & 0xff; > + r = (rgba_pix >> 16) & 0xff; > + g = (rgba_pix >> 8) & 0xff; > + b = rgba_pix & 0xff; > + /* is it transparent */ > + if(a == 0) > + { > + xpix = 0; > + } > + else > + { > + xpix = a << pic_format->direct.alpha; > + xpix |= r << pic_format->direct.red; > + xpix |= g << pic_format->direct.green; > + xpix |= b << pic_format->direct.blue; > + } > + *((uint32_t *) &xdata[i * 4]) = xpix; > } > - else > - { > - xpix = a << pic_format->direct.alpha; > - xpix |= r << pic_format->direct.red; > - xpix |= g << pic_format->direct.green; > - xpix |= b << pic_format->direct.blue; > - } > - *((uint32_t *) &xdata[i * 4]) = xpix; > } > > /* get X to draw the XImage onto a Pixmap */ > > Modified: redbutton-browser/trunk/utils.c > =================================================================== > --- redbutton-browser/trunk/utils.c 2006-10-12 10:00:30 UTC (rev 148) > +++ redbutton-browser/trunk/utils.c 2006-11-05 10:30:39 UTC (rev 149) > @@ -31,6 +31,48 @@ > #include "utils.h" > > /* > + * returns a PIX_FMT_xxx type that matches the given bits per pixel and RGB bit mask values > + * returns PIX_FMT_NONE if none match > + */ > + > +enum PixelFormat > +find_av_pix_fmt(int bpp, unsigned long rmask, unsigned long gmask, unsigned long bmask) > +{ > + enum PixelFormat fmt; > + > + fmt = PIX_FMT_NONE; > + switch(bpp) > + { > + case 32: > + if(rmask == 0xff0000 && gmask == 0xff00 && bmask == 0xff) > + fmt = PIX_FMT_RGBA32; > + break; > + > + case 24: > + if(rmask == 0xff0000 && gmask == 0xff00 && bmask == 0xff) > + fmt = PIX_FMT_RGB24; > + else if(rmask == 0xff && gmask == 0xff00 && bmask == 0xff0000) > + fmt = PIX_FMT_BGR24; > + break; > + > + case 16: > + if(rmask == 0xf800 && gmask == 0x07e0 && bmask == 0x001f) > + fmt = PIX_FMT_RGB565; > + else if(rmask == 0x7c00 && gmask == 0x03e0 && bmask == 0x001f) > + fmt = PIX_FMT_RGB555; > + break; > + > + default: > + break; > + } > + > + if(fmt == PIX_FMT_NONE) > + error("Unsupported pixel format (bpp=%d r=%lx g=%lx b=%lx)", bpp, rmask, gmask, bmask); > + > + return fmt; > +} > + > +/* > * returns 15 for 'f' etc > */ > > > Modified: redbutton-browser/trunk/utils.h > =================================================================== > --- redbutton-browser/trunk/utils.h 2006-10-12 10:00:30 UTC (rev 148) > +++ redbutton-browser/trunk/utils.h 2006-11-05 10:30:39 UTC (rev 149) > @@ -25,6 +25,7 @@ > > #include <stdlib.h> > #include <stdarg.h> > +#include <ffmpeg/avformat.h> > > #ifndef MIN > #define MIN(a, b) ((a) < (b) ? (a) : (b)) > @@ -33,6 +34,8 @@ > #define MAX(a, b) ((a) > (b) ? (a) : (b)) > #endif > > +enum PixelFormat find_av_pix_fmt(int, unsigned long, unsigned long, unsigned long); > + > unsigned int char2hex(unsigned char); > > int next_utf8(unsigned char *, int, int *); > > Modified: redbutton-browser/trunk/videoout_xshm.c > =================================================================== > --- redbutton-browser/trunk/videoout_xshm.c 2006-10-12 10:00:30 UTC (rev 148) > +++ redbutton-browser/trunk/videoout_xshm.c 2006-11-05 10:30:39 UTC (rev 149) > @@ -31,8 +31,6 @@ > static void vo_xshm_resize_frame(vo_xshm_ctx *, unsigned int, unsigned int); > static void vo_xshm_destroy_frame(vo_xshm_ctx *); > > -static enum PixelFormat find_av_pix_fmt(int, unsigned long, unsigned long, unsigned long); > - > void * > vo_xshm_init(void) > { > @@ -210,45 +208,3 @@ > return; > } > > -/* > - * returns a PIX_FMT_xxx type that matches the given bits per pixel and RGB bit mask values > - * returns PIX_FMT_NONE if none match > - */ > - > -static enum PixelFormat > -find_av_pix_fmt(int bpp, unsigned long rmask, unsigned long gmask, unsigned long bmask) > -{ > - enum PixelFormat fmt; > - > - fmt = PIX_FMT_NONE; > - switch(bpp) > - { > - case 32: > - if(rmask == 0xff0000 && gmask == 0xff00 && bmask == 0xff) > - fmt = PIX_FMT_RGBA32; > - break; > - > - case 24: > - if(rmask == 0xff0000 && gmask == 0xff00 && bmask == 0xff) > - fmt = PIX_FMT_RGB24; > - else if(rmask == 0xff && gmask == 0xff00 && bmask == 0xff0000) > - fmt = PIX_FMT_BGR24; > - break; > - > - case 16: > - if(rmask == 0xf800 && gmask == 0x07e0 && bmask == 0x001f) > - fmt = PIX_FMT_RGB565; > - else if(rmask == 0x7c00 && gmask == 0x03e0 && bmask == 0x001f) > - fmt = PIX_FMT_RGB555; > - break; > - > - default: > - break; > - } > - > - if(fmt == PIX_FMT_NONE) > - error("Unsupported pixel format (bpp=%d r=%lx g=%lx b=%lx)", bpp, rmask, gmask, bmask); > - > - return fmt; > -} > - > > > This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Redbutton-devel mailing list > Red...@li... > https://lists.sourceforge.net/lists/listinfo/redbutton-devel > |
|
From: <ski...@us...> - 2006-11-05 10:30:54
|
Revision: 149
http://svn.sourceforge.net/redbutton/?rev=149&view=rev
Author: skilvington
Date: 2006-11-05 02:30:39 -0800 (Sun, 05 Nov 2006)
Log Message:
-----------
don't convert pixel formats more than we need to
Modified Paths:
--------------
redbutton-browser/trunk/MHEGDisplay.c
redbutton-browser/trunk/utils.c
redbutton-browser/trunk/utils.h
redbutton-browser/trunk/videoout_xshm.c
Modified: redbutton-browser/trunk/MHEGDisplay.c
===================================================================
--- redbutton-browser/trunk/MHEGDisplay.c 2006-10-12 10:00:30 UTC (rev 148)
+++ redbutton-browser/trunk/MHEGDisplay.c 2006-11-05 10:30:39 UTC (rev 149)
@@ -756,13 +756,28 @@
*/
for(i=0; i<width*height; i++)
{
- uint8_t r = rgba[(i * 4) + 0];
- uint8_t g = rgba[(i * 4) + 1];
- uint8_t b = rgba[(i * 4) + 2];
- uint8_t a = rgba[(i * 4) + 3];
-/* TODO */
-/* if we still need to do r=g=b=0 when a=0, do it here */
- uint32_t pix = (a << 24) | (r << 16) | (g << 8) | b;
+ uint8_t a, r, g, b;
+ uint32_t pix;
+ /*
+ * if the pixel is transparent, set the RGB components to 0
+ * otherwise, if we scale up the bitmap in fullscreen mode,
+ * we may end up with a border around the image
+ * this happens, for example, with the BBC's "Press Red" image
+ * it has a transparent box around it, but the RGB values are not 0 in the transparent area
+ * when we scale it up we get a pink border around it
+ */
+ a = rgba[(i * 4) + 3];
+ if(a == 0)
+ {
+ pix = 0;
+ }
+ else
+ {
+ r = rgba[(i * 4) + 0];
+ g = rgba[(i * 4) + 1];
+ b = rgba[(i * 4) + 2];
+ pix = (a << 24) | (r << 16) | (g << 8) | b;
+ }
*((uint32_t *) &rgba[i * 4]) = pix;
}
@@ -890,6 +905,7 @@
unsigned int i, npixs;
XImage *ximg;
XRenderPictFormat *pic_format;
+ enum PixelFormat av_format;
GC gc;
bitmap = safe_malloc(sizeof(MHEGBitmap));
@@ -897,41 +913,44 @@
/* find a matching XRender pixel format */
pic_format = XRenderFindStandardFormat(d->dpy, PictStandardARGB32);
+ av_format = find_av_pix_fmt(32,
+ pic_format->direct.redMask << pic_format->direct.red,
+ pic_format->direct.greenMask << pic_format->direct.green,
+ pic_format->direct.blueMask << pic_format->direct.blue);
/* copy the RGBA values into a block we can use as XImage data */
npixs = width * height;
/* 4 bytes per pixel */
xdata = safe_malloc(npixs * 4);
- /*
- * copy the pixels, converting them to our XRender RGBA order as we go
- * even if the XRender pixel layout is the same as the ffmpeg one we still process each pixel
- * because we want to make sure transparent pixels have 0 for their RGB components
- * otherwise, if we scale up the bitmap in fullscreen mode and apply our bilinear filter,
- * we may end up with a border around the image
- * this happens, for example, with the BBC's "Press Red" image
- * it has a transparent box around it, but the RGB values are not 0 in the transparent area
- * when we scale it up we get a pink border around it
- */
- for(i=0; i<npixs; i++)
+ /* are the pixel layouts exactly the same */
+ if(av_format == PIX_FMT_RGBA32)
{
- rgba_pix = *((uint32_t *) &rgba[i * 4]);
- a = (rgba_pix >> 24) & 0xff;
- r = (rgba_pix >> 16) & 0xff;
- g = (rgba_pix >> 8) & 0xff;
- b = rgba_pix & 0xff;
- /* is it transparent */
- if(a == 0)
+ memcpy(xdata, rgba, npixs * 4);
+ }
+ else
+ {
+ /* swap the RGBA components as needed */
+ for(i=0; i<npixs; i++)
{
- xpix = 0;
+ rgba_pix = *((uint32_t *) &rgba[i * 4]);
+ a = (rgba_pix >> 24) & 0xff;
+ r = (rgba_pix >> 16) & 0xff;
+ g = (rgba_pix >> 8) & 0xff;
+ b = rgba_pix & 0xff;
+ /* is it transparent */
+ if(a == 0)
+ {
+ xpix = 0;
+ }
+ else
+ {
+ xpix = a << pic_format->direct.alpha;
+ xpix |= r << pic_format->direct.red;
+ xpix |= g << pic_format->direct.green;
+ xpix |= b << pic_format->direct.blue;
+ }
+ *((uint32_t *) &xdata[i * 4]) = xpix;
}
- else
- {
- xpix = a << pic_format->direct.alpha;
- xpix |= r << pic_format->direct.red;
- xpix |= g << pic_format->direct.green;
- xpix |= b << pic_format->direct.blue;
- }
- *((uint32_t *) &xdata[i * 4]) = xpix;
}
/* get X to draw the XImage onto a Pixmap */
Modified: redbutton-browser/trunk/utils.c
===================================================================
--- redbutton-browser/trunk/utils.c 2006-10-12 10:00:30 UTC (rev 148)
+++ redbutton-browser/trunk/utils.c 2006-11-05 10:30:39 UTC (rev 149)
@@ -31,6 +31,48 @@
#include "utils.h"
/*
+ * returns a PIX_FMT_xxx type that matches the given bits per pixel and RGB bit mask values
+ * returns PIX_FMT_NONE if none match
+ */
+
+enum PixelFormat
+find_av_pix_fmt(int bpp, unsigned long rmask, unsigned long gmask, unsigned long bmask)
+{
+ enum PixelFormat fmt;
+
+ fmt = PIX_FMT_NONE;
+ switch(bpp)
+ {
+ case 32:
+ if(rmask == 0xff0000 && gmask == 0xff00 && bmask == 0xff)
+ fmt = PIX_FMT_RGBA32;
+ break;
+
+ case 24:
+ if(rmask == 0xff0000 && gmask == 0xff00 && bmask == 0xff)
+ fmt = PIX_FMT_RGB24;
+ else if(rmask == 0xff && gmask == 0xff00 && bmask == 0xff0000)
+ fmt = PIX_FMT_BGR24;
+ break;
+
+ case 16:
+ if(rmask == 0xf800 && gmask == 0x07e0 && bmask == 0x001f)
+ fmt = PIX_FMT_RGB565;
+ else if(rmask == 0x7c00 && gmask == 0x03e0 && bmask == 0x001f)
+ fmt = PIX_FMT_RGB555;
+ break;
+
+ default:
+ break;
+ }
+
+ if(fmt == PIX_FMT_NONE)
+ error("Unsupported pixel format (bpp=%d r=%lx g=%lx b=%lx)", bpp, rmask, gmask, bmask);
+
+ return fmt;
+}
+
+/*
* returns 15 for 'f' etc
*/
Modified: redbutton-browser/trunk/utils.h
===================================================================
--- redbutton-browser/trunk/utils.h 2006-10-12 10:00:30 UTC (rev 148)
+++ redbutton-browser/trunk/utils.h 2006-11-05 10:30:39 UTC (rev 149)
@@ -25,6 +25,7 @@
#include <stdlib.h>
#include <stdarg.h>
+#include <ffmpeg/avformat.h>
#ifndef MIN
#define MIN(a, b) ((a) < (b) ? (a) : (b))
@@ -33,6 +34,8 @@
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#endif
+enum PixelFormat find_av_pix_fmt(int, unsigned long, unsigned long, unsigned long);
+
unsigned int char2hex(unsigned char);
int next_utf8(unsigned char *, int, int *);
Modified: redbutton-browser/trunk/videoout_xshm.c
===================================================================
--- redbutton-browser/trunk/videoout_xshm.c 2006-10-12 10:00:30 UTC (rev 148)
+++ redbutton-browser/trunk/videoout_xshm.c 2006-11-05 10:30:39 UTC (rev 149)
@@ -31,8 +31,6 @@
static void vo_xshm_resize_frame(vo_xshm_ctx *, unsigned int, unsigned int);
static void vo_xshm_destroy_frame(vo_xshm_ctx *);
-static enum PixelFormat find_av_pix_fmt(int, unsigned long, unsigned long, unsigned long);
-
void *
vo_xshm_init(void)
{
@@ -210,45 +208,3 @@
return;
}
-/*
- * returns a PIX_FMT_xxx type that matches the given bits per pixel and RGB bit mask values
- * returns PIX_FMT_NONE if none match
- */
-
-static enum PixelFormat
-find_av_pix_fmt(int bpp, unsigned long rmask, unsigned long gmask, unsigned long bmask)
-{
- enum PixelFormat fmt;
-
- fmt = PIX_FMT_NONE;
- switch(bpp)
- {
- case 32:
- if(rmask == 0xff0000 && gmask == 0xff00 && bmask == 0xff)
- fmt = PIX_FMT_RGBA32;
- break;
-
- case 24:
- if(rmask == 0xff0000 && gmask == 0xff00 && bmask == 0xff)
- fmt = PIX_FMT_RGB24;
- else if(rmask == 0xff && gmask == 0xff00 && bmask == 0xff0000)
- fmt = PIX_FMT_BGR24;
- break;
-
- case 16:
- if(rmask == 0xf800 && gmask == 0x07e0 && bmask == 0x001f)
- fmt = PIX_FMT_RGB565;
- else if(rmask == 0x7c00 && gmask == 0x03e0 && bmask == 0x001f)
- fmt = PIX_FMT_RGB555;
- break;
-
- default:
- break;
- }
-
- if(fmt == PIX_FMT_NONE)
- error("Unsupported pixel format (bpp=%d r=%lx g=%lx b=%lx)", bpp, rmask, gmask, bmask);
-
- return fmt;
-}
-
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: Simon K. <s.k...@er...> - 2006-11-02 09:19:52
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, not having pthread support compiled in would probably cause ffmpeg to crash if two threads tried to use it at the same time sounds like you've fixed the problem, but let me know if it starts happening again... Mario Rossi wrote: > The bug is showing most of the times but not always and always at the > same place. > I've recompiled ffmpeg with --enable-pthread and it has not occurred any more. > Could it be the reason? > > > > On 10/30/06, Simon Kilvington <s.k...@er...> wrote: > >>-----BEGIN PGP SIGNED MESSAGE----- >>Hash: SHA1 >> >>Hi, >> >> it looks like a bug in libavcodec which is part of the ffmpeg >>package - though I don't know why we would be using >>mpeg1_encode_picture_header() - what version of ffmpeg are you using? >>and does the crash happen at the same point everytime? >> > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Redbutton-devel mailing list > Red...@li... > https://lists.sourceforge.net/lists/listinfo/redbutton-devel > > - -- Simon Kilvington -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.4 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFSbgCmt9ZifioJSwRAkFEAJwInTBl4HMoIx4vHis2U97id9K3fQCeKw92 aFuI3rG7OQaIdBMy2EP4ySo= =fVo6 -----END PGP SIGNATURE----- |
|
From: Mario R. <mar...@go...> - 2006-11-01 23:58:00
|
The bug is showing most of the times but not always and always at the same place. I've recompiled ffmpeg with --enable-pthread and it has not occurred any more. Could it be the reason? On 10/30/06, Simon Kilvington <s.k...@er...> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi, > > it looks like a bug in libavcodec which is part of the ffmpeg > package - though I don't know why we would be using > mpeg1_encode_picture_header() - what version of ffmpeg are you using? > and does the crash happen at the same point everytime? > |
|
From: Simon K. <s.k...@er...> - 2006-10-30 10:00:55
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, it looks like a bug in libavcodec which is part of the ffmpeg package - though I don't know why we would be using mpeg1_encode_picture_header() - what version of ffmpeg are you using? and does the crash happen at the same point everytime? Mario Rossi wrote: > Hi, > > I'm having troubles using redbutton. > I live in London and I get dvb-t fron uk-CrystalPalace. > I'm using a Haupauge WinTV NOVA T USB2 > kernel 2.6.18 , v4l-dvb latest from mercurial. > redbutton latest svn > > Then in one window I do > > tzap "BBC ONE" > > elsewhere rb-download -v -l 4164 > > and in one other window (from the same directory) > rb-browser -vv services/4164 > log.txt > > the rb-browser prints the following error message > > [mp3 @ 0xb7e63e44]incorrect frame size > [mp3 @ 0xb7e63e44]incorrect frame size > Segmentation fault > > and log.txt is the file attached. > > rb-download keeps running troughout the test. rb-browser shortly shows > the black window with "LOADING" on the top right and the crashes. > > Same thing fro ITV1. > > I'm not too good with gdb, but this is the stack at the moment of the > crash: > > one of the threads > > #0 0xb7f57410 in ?? () > #1 0xbffd27e8 in ?? () > #2 0x0000127c in ?? () > #3 0x00000001 in ?? () > #4 0x4dd4f440 in poll () from /lib/libc.so.6 > #5 0x4f5590ea in XtAddTimeOut () from /usr/lib/libXt.so.6 > #6 0x4f559625 in _XtWaitForSomething () from /usr/lib/libXt.so.6 > #7 0x4f55a6ef in XtAppNextEvent () from /usr/lib/libXt.so.6 > #8 0x0804eb24 in MHEGDisplay_processEvents (d=0x80a5728, block=true) > at MHEGDisplay.c:296 > #9 0x0804bbd5 in MHEGEngine_run (derfile=0xbffd2c34) at MHEGEngine.c:216 > #10 0x0804b7a7 in main (argc=2, argv=0xbffd2d14) at rb-browser.c:121 > > and here is the fault > > #0 0xb79c3f06 in mpeg1_encode_picture_header () from > /usr/local/lib/libavcodec.so.51 > > gdb says it cannot restore the full stack though. > > any ideas? > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > > ------------------------------------------------------------------------ > > _______________________________________________ > Redbutton-devel mailing list > Red...@li... > https://lists.sourceforge.net/lists/listinfo/redbutton-devel - -- Simon Kilvington -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.4 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFRc0jmt9ZifioJSwRAsc/AJ96/Arze1UXaTKX12UD7lMBLhfPNgCeIAJA Vg8fCOT17ZHGrvAxughmvxg= =np7I -----END PGP SIGNATURE----- |
|
From: Mario R. <mar...@go...> - 2006-10-29 23:56:47
|
Hi, I'm having troubles using redbutton. I live in London and I get dvb-t fron uk-CrystalPalace. I'm using a Haupauge WinTV NOVA T USB2 kernel 2.6.18 , v4l-dvb latest from mercurial. redbutton latest svn Then in one window I do tzap "BBC ONE" elsewhere rb-download -v -l 4164 and in one other window (from the same directory) rb-browser -vv services/4164 > log.txt the rb-browser prints the following error message [mp3 @ 0xb7e63e44]incorrect frame size [mp3 @ 0xb7e63e44]incorrect frame size Segmentation fault and log.txt is the file attached. rb-download keeps running troughout the test. rb-browser shortly shows the black window with "LOADING" on the top right and the crashes. Same thing fro ITV1. I'm not too good with gdb, but this is the stack at the moment of the crash: one of the threads #0 0xb7f57410 in ?? () #1 0xbffd27e8 in ?? () #2 0x0000127c in ?? () #3 0x00000001 in ?? () #4 0x4dd4f440 in poll () from /lib/libc.so.6 #5 0x4f5590ea in XtAddTimeOut () from /usr/lib/libXt.so.6 #6 0x4f559625 in _XtWaitForSomething () from /usr/lib/libXt.so.6 #7 0x4f55a6ef in XtAppNextEvent () from /usr/lib/libXt.so.6 #8 0x0804eb24 in MHEGDisplay_processEvents (d=0x80a5728, block=true) at MHEGDisplay.c:296 #9 0x0804bbd5 in MHEGEngine_run (derfile=0xbffd2c34) at MHEGEngine.c:216 #10 0x0804b7a7 in main (argc=2, argv=0xbffd2d14) at rb-browser.c:121 and here is the fault #0 0xb79c3f06 in mpeg1_encode_picture_header () from /usr/local/lib/libavcodec.so.51 gdb says it cannot restore the full stack though. any ideas? |
|
From: Mario R. <mar...@go...> - 2006-10-29 23:45:10
|
Hi, I'm having troubles using redbutton. I live in London and I get dvb-t fron uk-CrystalPalace. I'm using a Haupauge WinTV NOVA T USB2 kernel 2.6.18 , v4l-dvb latest from mercurial. redbutton latest svn Then in one window I do tzap "BBC ONE" elsewhere rb-download -v -l 4164 and in one other window (from the same directory) rb-browser -vv services/4164 > log_vv.txt the rb-browser prints the following error message [mp3 @ 0xb7e63e44]incorrect frame size [mp3 @ 0xb7e63e44]incorrect frame size Segmentation fault and log.txt is the file attached. rb-download keeps running troughout the test. rb-browser shortly shows the black window with "LOADING" on the top right and the crashes. Same thing fro ITV1. any ideas? |
|
From: <ski...@us...> - 2006-10-12 10:00:42
|
Revision: 148
http://svn.sourceforge.net/redbutton/?rev=148&view=rev
Author: skilvington
Date: 2006-10-12 03:00:30 -0700 (Thu, 12 Oct 2006)
Log Message:
-----------
include extra lib for ffmpeg
Modified Paths:
--------------
redbutton-browser/trunk/Makefile
Modified: redbutton-browser/trunk/Makefile
===================================================================
--- redbutton-browser/trunk/Makefile 2006-10-08 08:45:09 UTC (rev 147)
+++ redbutton-browser/trunk/Makefile 2006-10-12 10:00:30 UTC (rev 148)
@@ -7,7 +7,7 @@
# safe_malloc debugging
#DEFS=-DDEBUG_ALLOC -D_REENTRANT -D_GNU_SOURCE
INCS=`freetype-config --cflags`
-LIBS=-lm -lz -L/usr/X11R6/lib -lX11 -lXext -lXt -lXrender -lXft -lpng -lavformat -lavcodec -lasound -lpthread
+LIBS=-lm -lz -L/usr/X11R6/lib -lX11 -lXext -lXt -lXrender -lXft -lpng -lavformat -lavcodec -lavutil -lasound -lpthread
CLASSES=ActionClass.o \
ApplicationClass.o \
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ski...@us...> - 2006-10-08 08:45:28
|
Revision: 147
http://svn.sourceforge.net/redbutton/?rev=147&view=rev
Author: skilvington
Date: 2006-10-08 01:45:09 -0700 (Sun, 08 Oct 2006)
Log Message:
-----------
corrigendum says ignore context-changing actions in OnStartUp and OnCloseDown
Modified Paths:
--------------
redbutton-browser/trunk/ActionClass.c
redbutton-browser/trunk/MHEGEngine.c
redbutton-browser/trunk/TokenGroupClass.c
Modified: redbutton-browser/trunk/ActionClass.c
===================================================================
--- redbutton-browser/trunk/ActionClass.c 2006-09-20 09:00:19 UTC (rev 146)
+++ redbutton-browser/trunk/ActionClass.c 2006-10-08 08:45:09 UTC (rev 147)
@@ -9,6 +9,9 @@
/*
* caller_gid should be the group identifier of the object containing the ActionClass
* it is used to resolve the ObjectReference's in the ElementaryAction's
+ * this function should only be called to run OnStartUp and OnCloseDown actions
+ * all other times (ie CallActionSlot) use MHEGEngine_addToTempActionQ instead
+ * Corrigendum says we should ignore context changing actions - TransitionTo, Launch, Spawn and Quit
*/
void
@@ -18,7 +21,14 @@
while(list)
{
- ElementaryAction_execute(&list->item, caller_gid);
+ unsigned int type = list->item.choice;
+ if(type == ElementaryAction_transition_to
+ || type == ElementaryAction_launch
+ || type == ElementaryAction_spawn
+ || type == ElementaryAction_quit)
+ error("ActionClass: ignoring %s in OnStartup/OnCloseDown actions", ElementaryAction_name(&list->item));
+ else
+ ElementaryAction_execute(&list->item, caller_gid);
list = list->next;
}
Modified: redbutton-browser/trunk/MHEGEngine.c
===================================================================
--- redbutton-browser/trunk/MHEGEngine.c 2006-09-20 09:00:19 UTC (rev 146)
+++ redbutton-browser/trunk/MHEGEngine.c 2006-10-08 08:45:09 UTC (rev 147)
@@ -348,14 +348,6 @@
safe_free(scene_id.data);
return;
}
-#if 0
-/* TODO */
-/* should we do this before or after we destroy the current scene? */
- /* empty the Async event queue and any pending actions */
- LIST_FREE(&engine.async_eventq, MHEGAsyncEvent, free_MHEGAsyncEventListItem);
- LIST_FREE(&engine.main_actionq, MHEGAction, free_MHEGActionListItem);
- LIST_FREE(&engine.temp_actionq, MHEGAction, free_MHEGActionListItem);
-#endif
/*
* do Deactivation of all Ingredients in the current app that are not shared
* in the reverse order they appear in the items list
@@ -377,9 +369,7 @@
SceneClass_Deactivation(current_scene);
SceneClass_Destruction(current_scene);
}
-/* TODO */
-/* should we do this before or after we destroy the current scene? */
- /* empty the Async event queue and any pending actions */
+ /* now the old scene is destroyed, empty the Async event queue and any pending actions */
LIST_FREE(&engine.async_eventq, MHEGAsyncEvent, free_MHEGAsyncEventListItem);
LIST_FREE(&engine.main_actionq, MHEGAction, free_MHEGActionListItem);
LIST_FREE(&engine.temp_actionq, MHEGAction, free_MHEGActionListItem);
Modified: redbutton-browser/trunk/TokenGroupClass.c
===================================================================
--- redbutton-browser/trunk/TokenGroupClass.c 2006-09-20 09:00:19 UTC (rev 146)
+++ redbutton-browser/trunk/TokenGroupClass.c 2006-10-08 08:45:09 UTC (rev 147)
@@ -314,7 +314,8 @@
* if the action is not Null, add the ElementaryActions to temp_actionq
* note, just doing:
* ActionClass_execute(&action->item.u.action_class, &t->rootClass.inst.ref.group_identifier);
- * does not work - it makes some BBC apps get into an infinite loop
+ * is not the same as adding the actions to the queue
+ * (also ActionClass_execute will ignore context changing actions - TransitionTo, Launch, Spawn and Quit)
*/
if(action->item.choice == ActionSlot_action_class)
MHEGEngine_addToTempActionQ(&action->item.u.action_class, &t->rootClass.inst.ref.group_identifier);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ski...@us...> - 2006-09-20 09:00:28
|
Revision: 146
http://svn.sourceforge.net/redbutton/?rev=146&view=rev
Author: skilvington
Date: 2006-09-20 02:00:19 -0700 (Wed, 20 Sep 2006)
Log Message:
-----------
don't try to access memory after we've free'd it
Modified Paths:
--------------
redbutton-browser/trunk/MHEGEngine.c
Modified: redbutton-browser/trunk/MHEGEngine.c
===================================================================
--- redbutton-browser/trunk/MHEGEngine.c 2006-09-11 10:07:05 UTC (rev 145)
+++ redbutton-browser/trunk/MHEGEngine.c 2006-09-20 09:00:19 UTC (rev 146)
@@ -329,6 +329,10 @@
|| OctetString_cmp(¤t_scene->rootClass.inst.ref.group_identifier, &scene_id) != 0)
{
verbose("TransitionTo: %s", ExternalReference_name(&ref->u.external_reference));
+ /* UK MHEG Profile says we don't need to support transition effects */
+ /* (remember that 'to' will get destroyed when we free the action queues, so use it now if you need it) */
+ if(to->have_transition_effect)
+ error("Transition effects not supported");
/* get the active app */
current_app = MHEGEngine_getActiveApplication();
/* check the new scene is available */
@@ -386,9 +390,6 @@
SceneClass_Preparation(current_scene);
SceneClass_Activation(current_scene);
}
- /* UK MHEG Profile says we don't need to support transition effects */
- if(to->have_transition_effect)
- error("Transition effects not supported");
}
/* clean up */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ski...@us...> - 2006-09-11 10:07:11
|
Revision: 145
http://svn.sourceforge.net/redbutton/?rev=145&view=rev
Author: skilvington
Date: 2006-09-11 03:07:05 -0700 (Mon, 11 Sep 2006)
Log Message:
-----------
use ffmpeg's PIX_FMT_RGBA32 as our intermediate MHEGBitmap pixel format
Modified Paths:
--------------
redbutton-browser/trunk/MHEGDisplay.c
Modified: redbutton-browser/trunk/MHEGDisplay.c
===================================================================
--- redbutton-browser/trunk/MHEGDisplay.c 2006-09-01 16:55:19 UTC (rev 144)
+++ redbutton-browser/trunk/MHEGDisplay.c 2006-09-11 10:07:05 UTC (rev 145)
@@ -732,6 +732,7 @@
MHEGBitmap *b;
png_uint_32 width, height;
unsigned char *rgba;
+ unsigned int i;
/* nothing to do */
if(png == NULL || png->size == 0)
@@ -747,7 +748,25 @@
/*
* we now have an array of 32-bit RGBA pixels in network byte order
* ie if pix is a char *: pix[0] = R, pix[1] = G, pix[2] = B, pix[3] = A
+ * we need to convert it to ffmpeg's PIX_FMT_RGBA32 format
+ * ffmpeg always stores PIX_FMT_RGBA32 as
+ * (A << 24) | (R << 16) | (G << 8) | B
+ * no matter what byte order our CPU uses. ie,
+ * it is stored as BGRA on little endian CPU architectures and ARGB on big endian CPUs
*/
+ for(i=0; i<width*height; i++)
+ {
+ uint8_t r = rgba[(i * 4) + 0];
+ uint8_t g = rgba[(i * 4) + 1];
+ uint8_t b = rgba[(i * 4) + 2];
+ uint8_t a = rgba[(i * 4) + 3];
+/* TODO */
+/* if we still need to do r=g=b=0 when a=0, do it here */
+ uint32_t pix = (a << 24) | (r << 16) | (g << 8) | b;
+ *((uint32_t *) &rgba[i * 4]) = pix;
+ }
+
+ /* convert the PIX_FMT_RGBA32 data to a MHEGBitmap */
b = MHEGBitmap_fromRGBA(d, rgba, width, height);
/* clean up */
@@ -777,7 +796,6 @@
unsigned int height;
int nbytes;
unsigned char *rgba = NULL;
- unsigned int i;
/* nothing to do */
if(mpeg == NULL || mpeg->size == 0)
@@ -827,25 +845,7 @@
rgba = safe_malloc(nbytes);
avpicture_fill((AVPicture *) rgb_frame, rgba, PIX_FMT_RGBA32, width, height);
img_convert((AVPicture *) rgb_frame, PIX_FMT_RGBA32, (AVPicture*) yuv_frame, codec_ctx->pix_fmt, width, height);
- /*
- * ffmpeg always stores PIX_FMT_RGBA32 as
- * (A << 24) | (R << 16) | (G << 8) | B
- * no matter what byte order our CPU uses. ie,
- * it is stored as BGRA on little endian CPU architectures and ARGB on big endian CPUs
- * we need RGBA, so swap the components as needed
- */
- for(i=0; i<width*height; i++)
- {
- uint32_t pix = *((uint32_t *) &rgba[(i * 4)]);
- rgba[(i * 4) + 0] = (pix >> 16) & 0xff; /* R */
- rgba[(i * 4) + 1] = (pix >> 8) & 0xff; /* G */
- rgba[(i * 4) + 2] = pix & 0xff; /* B */
- rgba[(i * 4) + 3] = 0xff; /* opaque */
- }
- /*
- * we now have an array of 32-bit RGBA pixels in network byte order
- * ie if pix is a char *: pix[0] = R, pix[1] = G, pix[2] = B, pix[3] = A
- */
+ /* convert the PIX_FMT_RGBA32 data to a MHEGBitmap */
b = MHEGBitmap_fromRGBA(d, rgba, width, height);
}
@@ -872,8 +872,11 @@
}
/*
- * construct a MHEGBitmap from an array of 32-bit RGBA pixels in network byte order
- * ie if pix is a char *: pix[0] = R, pix[1] = G, pix[2] = B, pix[3] = A
+ * construct a MHEGBitmap from an array of ffmpeg's PIX_FMT_RGBA32 pixels
+ * ffmpeg always stores PIX_FMT_RGBA32 as
+ * (A << 24) | (R << 16) | (G << 8) | B
+ * no matter what byte order our CPU uses. ie,
+ * it is stored as BGRA on little endian CPU architectures and ARGB on big endian CPUs
*/
MHEGBitmap *
@@ -881,8 +884,9 @@
{
MHEGBitmap *bitmap;
unsigned char *xdata;
+ uint32_t rgba_pix;
uint32_t xpix;
- unsigned char r, g, b, a;
+ uint8_t r, g, b, a;
unsigned int i, npixs;
XImage *ximg;
XRenderPictFormat *pic_format;
@@ -900,7 +904,7 @@
xdata = safe_malloc(npixs * 4);
/*
* copy the pixels, converting them to our XRender RGBA order as we go
- * even if the XRender pixel layout is the same as the PNG one we still process each pixel
+ * even if the XRender pixel layout is the same as the ffmpeg one we still process each pixel
* because we want to make sure transparent pixels have 0 for their RGB components
* otherwise, if we scale up the bitmap in fullscreen mode and apply our bilinear filter,
* we may end up with a border around the image
@@ -910,10 +914,11 @@
*/
for(i=0; i<npixs; i++)
{
- r = rgba[(i * 4) + 0];
- g = rgba[(i * 4) + 1];
- b = rgba[(i * 4) + 2];
- a = rgba[(i * 4) + 3];
+ rgba_pix = *((uint32_t *) &rgba[i * 4]);
+ a = (rgba_pix >> 24) & 0xff;
+ r = (rgba_pix >> 16) & 0xff;
+ g = (rgba_pix >> 8) & 0xff;
+ b = rgba_pix & 0xff;
/* is it transparent */
if(a == 0)
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ski...@us...> - 2006-09-01 16:55:25
|
Revision: 144
http://svn.sourceforge.net/redbutton/?rev=144&view=rev
Author: skilvington
Date: 2006-09-01 09:55:19 -0700 (Fri, 01 Sep 2006)
Log Message:
-----------
less TODO
Modified Paths:
--------------
redbutton-browser/trunk/TODO
Modified: redbutton-browser/trunk/TODO
===================================================================
--- redbutton-browser/trunk/TODO 2006-09-01 16:21:28 UTC (rev 143)
+++ redbutton-browser/trunk/TODO 2006-09-01 16:55:19 UTC (rev 144)
@@ -1,7 +1,3 @@
-use ffmpeg to convert MPEG I-frames to MHEGBitmaps in MHEGDisplay_newMPEGBitmap
-(rather than libmpeg2)
-
-
use ffmpeg to permenantly scale-up bitmaps in MHEGBitmap_fromRGBA
(rather than having to apply an XRender xform matrix and filter each time)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ski...@us...> - 2006-09-01 16:21:37
|
Revision: 143
http://svn.sourceforge.net/redbutton/?rev=143&view=rev
Author: skilvington
Date: 2006-09-01 09:21:28 -0700 (Fri, 01 Sep 2006)
Log Message:
-----------
Tagged release 20060901
Added Paths:
-----------
redbutton-download/tags/redbutton-download-20060901/
Copied: redbutton-download/tags/redbutton-download-20060901 (from rev 142, redbutton-download/trunk)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ski...@us...> - 2006-09-01 16:20:55
|
Revision: 142
http://svn.sourceforge.net/redbutton/?rev=142&view=rev
Author: skilvington
Date: 2006-09-01 09:20:47 -0700 (Fri, 01 Sep 2006)
Log Message:
-----------
Tagged release 20060901
Added Paths:
-----------
redbutton-browser/tags/redbutton-browser-20060901/
Copied: redbutton-browser/tags/redbutton-browser-20060901 (from rev 141, redbutton-browser/trunk)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ski...@us...> - 2006-09-01 16:10:22
|
Revision: 141
http://svn.sourceforge.net/redbutton/?rev=141&view=rev
Author: skilvington
Date: 2006-09-01 09:08:41 -0700 (Fri, 01 Sep 2006)
Log Message:
-----------
use ffmpeg to decode MPEG I-frame bitmaps rather than libmpeg2 (also gets the colours correct now)
Modified Paths:
--------------
redbutton-browser/trunk/MHEGDisplay.c
redbutton-browser/trunk/Makefile
Modified: redbutton-browser/trunk/MHEGDisplay.c
===================================================================
--- redbutton-browser/trunk/MHEGDisplay.c 2006-09-01 16:07:41 UTC (rev 140)
+++ redbutton-browser/trunk/MHEGDisplay.c 2006-09-01 16:08:41 UTC (rev 141)
@@ -13,8 +13,6 @@
#include <X11/Intrinsic.h>
#include <X11/Shell.h>
#include <X11/keysym.h>
-#include <mpeg2dec/mpeg2.h>
-#include <mpeg2dec/mpeg2convert.h>
#include <ffmpeg/avformat.h>
#include "MHEGEngine.h"
@@ -767,78 +765,95 @@
MHEGDisplay_newMPEGBitmap(MHEGDisplay *d, OctetString *mpeg)
{
MHEGBitmap *b;
- mpeg2dec_t *decoder;
- const mpeg2_info_t *info;
- bool done;
- unsigned int width = 0; /* keep the compiler happy */
- unsigned int height = 0; /* keep the compiler happy */
- unsigned char *rgba = NULL; /* keep the compiler happy */
+ AVCodecContext *codec_ctx;
+ AVCodec *codec;
+ AVFrame *yuv_frame;
+ AVFrame *rgb_frame;
+ unsigned char *data;
+ unsigned int size;
+ int used;
+ int got_picture;
+ unsigned int width;
+ unsigned int height;
+ int nbytes;
+ unsigned char *rgba = NULL;
unsigned int i;
/* nothing to do */
if(mpeg == NULL || mpeg->size == 0)
return NULL;
- /* use libmpeg2 to convert the data into a standard format we can use as an XImage */
- if((decoder = mpeg2_init()) == NULL)
- {
- error("Unable to initialise MPEG decoder");
- return NULL;
- }
- info = mpeg2_info(decoder);
+ /* use ffmpeg to convert the data into a standard format we can use as an XImage */
+ if((codec_ctx = avcodec_alloc_context()) == NULL)
+ fatal("Out of memory");
- /* feed all the data into the buffer */
- mpeg2_buffer(decoder, mpeg->data, mpeg->data + mpeg->size);
+ if((codec = avcodec_find_decoder(CODEC_ID_MPEG2VIDEO)) == NULL)
+ fatal("Unable to initialise MPEG decoder");
- done = false;
+ if(avcodec_open(codec_ctx, codec) < 0)
+ fatal("Unable to open video codec");
+
+ if((yuv_frame = avcodec_alloc_frame()) == NULL)
+ fatal("Out of memory");
+ if((rgb_frame = avcodec_alloc_frame()) == NULL)
+ fatal("Out of memory");
+
+ /* decode the YUV frame */
+ data = mpeg->data;
+ size = mpeg->size;
do
{
- mpeg2_state_t state = mpeg2_parse(decoder);
- switch(state)
+ used = avcodec_decode_video(codec_ctx, yuv_frame, &got_picture, data, size);
+ data += used;
+ size -= used;
+ }
+ while(!got_picture && size > 0);
+ /* need to call it one final time with size=0, to actually get the frame */
+ if(!got_picture)
+ (void) avcodec_decode_video(codec_ctx, yuv_frame, &got_picture, data, size);
+
+ if(!got_picture)
+ {
+ error("Unable to decode MPEG image");
+ b = NULL;
+ }
+ else
+ {
+ /* convert to RGBA */
+ width = codec_ctx->width;
+ height = codec_ctx->height;
+ if((nbytes = avpicture_get_size(PIX_FMT_RGBA32, width, height)) < 0)
+ fatal("Invalid MPEG image");
+ rgba = safe_malloc(nbytes);
+ avpicture_fill((AVPicture *) rgb_frame, rgba, PIX_FMT_RGBA32, width, height);
+ img_convert((AVPicture *) rgb_frame, PIX_FMT_RGBA32, (AVPicture*) yuv_frame, codec_ctx->pix_fmt, width, height);
+ /*
+ * ffmpeg always stores PIX_FMT_RGBA32 as
+ * (A << 24) | (R << 16) | (G << 8) | B
+ * no matter what byte order our CPU uses. ie,
+ * it is stored as BGRA on little endian CPU architectures and ARGB on big endian CPUs
+ * we need RGBA, so swap the components as needed
+ */
+ for(i=0; i<width*height; i++)
{
- case STATE_BUFFER:
- /*
- * we've already filled the buffer with all the data
- * if the decoder needs more, the data is probably invalid
- */
- error("Unable to decode MPEG image");
- mpeg2_close(decoder);
- return NULL;
-
- case STATE_SEQUENCE:
- mpeg2_convert(decoder, mpeg2convert_rgb32, NULL);
- break;
-
- case STATE_SLICE:
- case STATE_END:
- case STATE_INVALID_END:
- /* do we have a picture */
- if(info->display_fbuf)
- {
- width = info->sequence->width;
- height = info->sequence->height;
- rgba = info->display_fbuf->buf[0];
- /* set the alpha channel values to opaque */
- for(i=0; i<width*height; i++)
- rgba[(i * 4) + 3] = 0xff;
- done = true;
- }
- break;
-
- default:
- break;
+ uint32_t pix = *((uint32_t *) &rgba[(i * 4)]);
+ rgba[(i * 4) + 0] = (pix >> 16) & 0xff; /* R */
+ rgba[(i * 4) + 1] = (pix >> 8) & 0xff; /* G */
+ rgba[(i * 4) + 2] = pix & 0xff; /* B */
+ rgba[(i * 4) + 3] = 0xff; /* opaque */
}
+ /*
+ * we now have an array of 32-bit RGBA pixels in network byte order
+ * ie if pix is a char *: pix[0] = R, pix[1] = G, pix[2] = B, pix[3] = A
+ */
+ b = MHEGBitmap_fromRGBA(d, rgba, width, height);
}
- while(!done);
- /*
- * we now have an array of 32-bit RGBA pixels in network byte order
- * ie if pix is a char *: pix[0] = R, pix[1] = G, pix[2] = B, pix[3] = A
- */
- b = MHEGBitmap_fromRGBA(d, rgba, width, height);
-
/* clean up */
- mpeg2_close(decoder);
+ safe_free(rgba);
+ av_free(yuv_frame);
+ av_free(rgb_frame);
+ avcodec_close(codec_ctx);
return b;
}
Modified: redbutton-browser/trunk/Makefile
===================================================================
--- redbutton-browser/trunk/Makefile 2006-09-01 16:07:41 UTC (rev 140)
+++ redbutton-browser/trunk/Makefile 2006-09-01 16:08:41 UTC (rev 141)
@@ -7,7 +7,7 @@
# safe_malloc debugging
#DEFS=-DDEBUG_ALLOC -D_REENTRANT -D_GNU_SOURCE
INCS=`freetype-config --cflags`
-LIBS=-lm -lz -L/usr/X11R6/lib -lX11 -lXext -lXt -lXrender -lXft -lpng -lmpeg2 -lmpeg2convert -lavformat -lavcodec -lasound -lpthread
+LIBS=-lm -lz -L/usr/X11R6/lib -lX11 -lXext -lXt -lXrender -lXft -lpng -lavformat -lavcodec -lasound -lpthread
CLASSES=ActionClass.o \
ApplicationClass.o \
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ski...@us...> - 2006-09-01 16:07:48
|
Revision: 140
http://svn.sourceforge.net/redbutton/?rev=140&view=rev
Author: skilvington
Date: 2006-09-01 09:07:41 -0700 (Fri, 01 Sep 2006)
Log Message:
-----------
add -v flag description for rb-download and remove libmpeg2 dependancy for rb-browser
Modified Paths:
--------------
www/index.html
Modified: www/index.html
===================================================================
--- www/index.html 2006-08-25 15:55:26 UTC (rev 139)
+++ www/index.html 2006-09-01 16:07:41 UTC (rev 140)
@@ -30,7 +30,7 @@
<H2>rb-download</H2>
Usage:
<PRE>
-rb-download [-a <adapter>] [-b <base_dir>] [-t <timeout>] [-l[<listen_addr>]] [-c <carousel_id>] [<service_id>]
+rb-download [-v] [-a <adapter>] [-b <base_dir>] [-t <timeout>] [-l[<listen_addr>]] [-c <carousel_id>] [<service_id>]
</PRE>
Download the DVB Object Carousel for the given channel onto the local hard disc.
<P>
@@ -57,6 +57,8 @@
<P>
The <carousel_id> will normally be read from the PMT, but you can use the -c option to explicitly choose a carousel.
<P>
+-v is verbose/debug mode. Use -vv for even more mind-numbing tedium.
+<P>
If no <service_id> is given, a list of possible channels (and their <service_id>) is printed.
These will be the channels available on the MUX your DVB card is currently tuned to. Use dvbtune or equivalent to tune your card.
<P>
@@ -95,7 +97,7 @@
and <service_gateway> should be an entry in the services directory.
Eg, on a single host, do this:
<PRE>
-rb-download -l 4165 > /dev/null &
+rb-download -l 4165 &
rb-browser services/4165
</PRE>
or, you could run rb-browser like this:
@@ -104,7 +106,7 @@
</PRE>
To run the frontend on a different host, do this on the backend:
<PRE>
-rb-download -l 4165 > /dev/null &
+rb-download -l 4165 &
</PRE>
and run this on the frontend:
<PRE>
@@ -143,7 +145,7 @@
If the compile fails with errors about missing .c files, expat is not installed.
If the compile fails with errors about function names ending in "_dup" being missing, libxslt is not installed.
<P>
-To run it you need an X server that supports the Xrender extension and you need to have libpng, libmpeg2, freetype2 and ffmpeg installed.
+To run it you need an X server that supports the Xrender extension and you need to have libpng, freetype2 and ffmpeg installed.
<H2>Notes</H2>
It does not implement the whole MHEG spec.
However, it seems to be enough to view everything that is currently being broadcast on the 'Freeview' channels in the UK.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ski...@us...> - 2006-08-25 15:55:31
|
Revision: 139 Author: skilvington Date: 2006-08-25 08:55:26 -0700 (Fri, 25 Aug 2006) ViewCVS: http://svn.sourceforge.net/redbutton/?rev=139&view=rev Log Message: ----------- more TODO Modified Paths: -------------- redbutton-browser/trunk/TODO Modified: redbutton-browser/trunk/TODO =================================================================== --- redbutton-browser/trunk/TODO 2006-08-25 15:34:16 UTC (rev 138) +++ redbutton-browser/trunk/TODO 2006-08-25 15:55:26 UTC (rev 139) @@ -1,3 +1,11 @@ +use ffmpeg to convert MPEG I-frames to MHEGBitmaps in MHEGDisplay_newMPEGBitmap +(rather than libmpeg2) + + +use ffmpeg to permenantly scale-up bitmaps in MHEGBitmap_fromRGBA +(rather than having to apply an XRender xform matrix and filter each time) + + vsync video drawing with monitor refresh This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <ski...@us...> - 2006-08-25 15:34:25
|
Revision: 138 Author: skilvington Date: 2006-08-25 08:34:16 -0700 (Fri, 25 Aug 2006) ViewCVS: http://svn.sourceforge.net/redbutton/?rev=138&view=rev Log Message: ----------- don't try to display video if we failed to open the MPEG stream Modified Paths: -------------- redbutton-browser/trunk/MHEGStreamPlayer.c redbutton-browser/trunk/VideoClass.c redbutton-browser/trunk/add_instance_vars.conf Modified: redbutton-browser/trunk/MHEGStreamPlayer.c =================================================================== --- redbutton-browser/trunk/MHEGStreamPlayer.c 2006-08-25 10:35:11 UTC (rev 137) +++ redbutton-browser/trunk/MHEGStreamPlayer.c 2006-08-25 15:34:16 UTC (rev 138) @@ -164,6 +164,10 @@ { verbose("MHEGStreamPlayer_play: audio_tag=%d video_tag=%d", p->audio_tag, p->video_tag); + /* make sure the VideoClass doesn't try to draw anything yet */ + if(p->video != NULL) + p->video->inst.no_video = true; + p->audio_pid = p->audio_tag; p->video_pid = p->video_tag; if((p->ts = MHEGEngine_openStream(p->have_audio, &p->audio_pid, &p->audio_type, @@ -173,6 +177,10 @@ return; } + /* let the VideoClass know we now have a video stream */ + if(p->video != NULL) + p->video->inst.no_video = false; + p->playing = true; p->stop = false; Modified: redbutton-browser/trunk/VideoClass.c =================================================================== --- redbutton-browser/trunk/VideoClass.c 2006-08-25 10:35:11 UTC (rev 137) +++ redbutton-browser/trunk/VideoClass.c 2006-08-25 15:34:16 UTC (rev 138) @@ -34,6 +34,8 @@ pthread_mutex_init(&v->scaled_lock, NULL); v->scaled = false; + v->no_video = false; + return; } @@ -376,6 +378,10 @@ verbose("VideoClass: %s; render", ExternalReference_name(&t->rootClass.inst.ref)); + /* if the MHEGStreamPlayer failed to open the video stream, don't display anything */ + if(t->inst.no_video) + return; + if(!intersects(pos, box, &t->inst.Position, &t->inst.BoxSize, &ins_pos, &ins_box)) return; Modified: redbutton-browser/trunk/add_instance_vars.conf =================================================================== --- redbutton-browser/trunk/add_instance_vars.conf 2006-08-25 10:35:11 UTC (rev 137) +++ redbutton-browser/trunk/add_instance_vars.conf 2006-08-25 15:34:16 UTC (rev 138) @@ -184,6 +184,8 @@ bool scaled; unsigned int scaled_width; unsigned int scaled_height; + /* this gets set if the MHEGStreamPlayer fails to open the video stream */ + bool no_video; } VideoClassInstanceVars; </VideoClass> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <ski...@us...> - 2006-08-25 10:35:18
|
Revision: 137 Author: skilvington Date: 2006-08-25 03:35:11 -0700 (Fri, 25 Aug 2006) ViewCVS: http://svn.sourceforge.net/redbutton/?rev=137&view=rev Log Message: ----------- avoid enum/int memory alignment issues that cause problems with some processors/compilers Modified Paths: -------------- redbutton-browser/trunk/xsd2c.c Modified: redbutton-browser/trunk/xsd2c.c =================================================================== --- redbutton-browser/trunk/xsd2c.c 2006-08-22 16:10:53 UTC (rev 136) +++ redbutton-browser/trunk/xsd2c.c 2006-08-25 10:35:11 UTC (rev 137) @@ -8,7 +8,7 @@ * -c gives the output C source file (default is <ASN1-types>.c) * -h gives the output header file (default is <ASN1-types>.h) * - * Simon Kilvington, 9/1/2006 + * Simon Kilvington, 25/8/2006 */ #include <unistd.h> @@ -1188,6 +1188,10 @@ } } + /* do we need the ENUMERATED value variable */ + if(strcmp(t->type, "xsd:token") == 0) + fprintf(src, "\tint value;\n"); + /* output the type name */ fprintf(src, "\n#ifdef DER_VERBOSE\n"); fprintf(src, "\tprintf(\"<%s>\\n\");\n", t->name); @@ -1242,8 +1246,9 @@ { /* ENUMERATED is stored as an INTEGER */ fprintf(src, "\t/* ENUMERATED */\n"); - output_decode_subtype(src, t->name, "Integer", "(int *) type", "length", 1); + output_decode_subtype(src, t->name, "Integer", "&value", "length", 1); fprintf(src, "\tleft -= sublen;\n\n"); + fprintf(src, "\t*type = (%s) value;\n\n", t->name); } /* is it a SEQUENCE OF primitive-type, or a SEQUENCE OF complex-type */ else if((strcmp(t->type, "xsd:list") == 0 && t->subtypes && t->subtypes->next == NULL) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <ski...@us...> - 2006-08-22 16:11:13
|
Revision: 136 Author: skilvington Date: 2006-08-22 09:10:53 -0700 (Tue, 22 Aug 2006) ViewCVS: http://svn.sourceforge.net/redbutton/?rev=136&view=rev Log Message: ----------- typo Modified Paths: -------------- redbutton-browser/trunk/rb-browser.c Modified: redbutton-browser/trunk/rb-browser.c =================================================================== --- redbutton-browser/trunk/rb-browser.c 2006-07-31 20:48:59 UTC (rev 135) +++ redbutton-browser/trunk/rb-browser.c 2006-08-22 16:10:53 UTC (rev 136) @@ -1,5 +1,5 @@ /* - * rb-browser [-v] [-f] [-o <video-output-method>] [-k <keymap_file>] [-t <timeout>] [-r] <service_gateway> + * rb-browser [-v] [-f] [-o <video_output_method>] [-k <keymap_file>] [-t <timeout>] [-r] <service_gateway> * * -v is verbose/debug mode * -f is full screen, otherwise it uses a window @@ -138,7 +138,7 @@ fatal("Usage: %s " "[-v] " "[-f] " - "[-o <video-output-method>] " + "[-o <video_output_method>] " "[-k <keymap_file>] " "[-t <timeout>] " "[-r] " This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <ski...@us...> - 2006-07-31 20:49:10
|
Revision: 135 Author: skilvington Date: 2006-07-31 13:48:59 -0700 (Mon, 31 Jul 2006) ViewCVS: http://svn.sourceforge.net/redbutton/?rev=135&view=rev Log Message: ----------- TODO list updates Modified Paths: -------------- redbutton-browser/trunk/TODO Modified: redbutton-browser/trunk/TODO =================================================================== --- redbutton-browser/trunk/TODO 2006-07-30 10:52:10 UTC (rev 134) +++ redbutton-browser/trunk/TODO 2006-07-31 20:48:59 UTC (rev 135) @@ -1,6 +1,9 @@ -maintain A/V sync in MHEGStreamPlayer +vsync video drawing with monitor refresh +better audio sync in MHEGStreamPlayer + + if openStream fails - need to make sure either: contents picture gets filled with black, or VideoClass_render does not make a transparent rectangle in the overlay picture This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <ski...@us...> - 2006-07-30 10:52:23
|
Revision: 134 Author: skilvington Date: 2006-07-30 03:52:10 -0700 (Sun, 30 Jul 2006) ViewCVS: http://svn.sourceforge.net/redbutton/?rev=134&view=rev Log Message: ----------- maintain A/V sync if audio gets ahead Modified Paths: -------------- redbutton-browser/trunk/MHEGStreamPlayer.c Modified: redbutton-browser/trunk/MHEGStreamPlayer.c =================================================================== --- redbutton-browser/trunk/MHEGStreamPlayer.c 2006-07-28 21:17:34 UTC (rev 133) +++ redbutton-browser/trunk/MHEGStreamPlayer.c 2006-07-30 10:52:10 UTC (rev 134) @@ -488,7 +488,7 @@ drop_frame = (usecs < 0); if(drop_frame) { - verbose("MHEGStreamPlayer: dropped frame %u (usecs=%d)", nframes, usecs); + verbose("MHEGStreamPlayer: dropped video frame %u (usecs=%d)", nframes, usecs); } else { @@ -592,6 +592,7 @@ int64_t now_time, next_time; double now_pts, next_pts; int usecs; + double vpts = 0.0; if(!p->have_audio) return NULL; @@ -724,8 +725,20 @@ /* TODO */ /* need to make sure pts is what we expect */ /* if we missed decoding a sample, play silence */ - /* this will block until the sound card can take the data */ - MHEGAudioOutput_addSamples(&ao, af->data, af->size); + /* if the audio is getting ahead, don't play this sample */ + pthread_mutex_lock(&p->videoq_lock); + vpts = p->videoq ? p->videoq->item.pts : vpts; + pthread_mutex_unlock(&p->videoq_lock); + if(vpts <= af->pts) + { + /* this will block until the sound card can take the data */ + MHEGAudioOutput_addSamples(&ao, af->data, af->size); + } + else + { + verbose("MHEGStreamPlayer: dropped audio frame (%f ahead)", vpts - af->pts); + } +/* TODO handle case when video is ahead */ /* we can delete the frame from the queue now */ pthread_mutex_lock(&p->audioq_lock); LIST_FREE_HEAD(&p->audioq, AudioFrame, free_AudioFrameListItem); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <ski...@us...> - 2006-07-28 21:17:48
|
Revision: 133 Author: skilvington Date: 2006-07-28 14:17:34 -0700 (Fri, 28 Jul 2006) ViewCVS: http://svn.sourceforge.net/redbutton/?rev=133&view=rev Log Message: ----------- fix typos from previous commit Modified Paths: -------------- redbutton-browser/trunk/MHEGVideoOutput.c redbutton-browser/trunk/rb-browser.c redbutton-browser/trunk/videoout_xshm.c Modified: redbutton-browser/trunk/MHEGVideoOutput.c =================================================================== --- redbutton-browser/trunk/MHEGVideoOutput.c 2006-07-28 11:30:58 UTC (rev 132) +++ redbutton-browser/trunk/MHEGVideoOutput.c 2006-07-28 21:17:34 UTC (rev 133) @@ -72,6 +72,10 @@ void MHEGVideoOutput_init(MHEGVideoOutput *v, MHEGVideoOutputMethod *fns) { + /* assert */ + if(fns == NULL) + fatal("MHEGVideoOutput_init: video output method not defined"); + v->fns = fns; v->ctx = (*(v->fns->init))(); Modified: redbutton-browser/trunk/rb-browser.c =================================================================== --- redbutton-browser/trunk/rb-browser.c 2006-07-28 11:30:58 UTC (rev 132) +++ redbutton-browser/trunk/rb-browser.c 2006-07-28 21:17:34 UTC (rev 133) @@ -3,7 +3,7 @@ * * -v is verbose/debug mode * -f is full screen, otherwise it uses a window - * -o allws you to choose a video output method if the default is not supported/too slow on your graphics card + * -o allows you to choose a video output method if the default is not supported/too slow on your graphics card * (do 'rb-browser -o' for a list of available methods) * -k changes the default key map to the given file * (use rb-keymap to generate a keymap config file) Modified: redbutton-browser/trunk/videoout_xshm.c =================================================================== --- redbutton-browser/trunk/videoout_xshm.c 2006-07-28 11:30:58 UTC (rev 132) +++ redbutton-browser/trunk/videoout_xshm.c 2006-07-28 21:17:34 UTC (rev 133) @@ -100,7 +100,7 @@ v->resize_out.height = out_height; /* somewhere to store the resized frame */ if((resized_size = avpicture_get_size(f->pix_fmt, out_width, out_height)) < 0) - fatal("x11_shm_prepareFrame: invalid frame size"); + fatal("vo_xshm_prepareFrame: invalid frame size"); v->resized_data = safe_realloc(v->resized_data, resized_size); avpicture_fill(&v->resized_frame, v->resized_data, f->pix_fmt, out_width, out_height); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |