redbutton-devel Mailing List for RedButton MHEG Engine (Page 20)
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: <ski...@us...> - 2007-01-23 08:38:03
|
Revision: 190
http://svn.sourceforge.net/redbutton/?rev=190&view=rev
Author: skilvington
Date: 2007-01-23 00:37:58 -0800 (Tue, 23 Jan 2007)
Log Message:
-----------
add an extra condition to the search assert
Modified Paths:
--------------
redbutton-browser/trunk/ResidentProgramClass.c
Modified: redbutton-browser/trunk/ResidentProgramClass.c
===================================================================
--- redbutton-browser/trunk/ResidentProgramClass.c 2007-01-22 17:11:52 UTC (rev 189)
+++ redbutton-browser/trunk/ResidentProgramClass.c 2007-01-23 08:37:58 UTC (rev 190)
@@ -797,7 +797,8 @@
search_substring(OctetString *string, int start, OctetString *search)
{
/* assert */
- if(start < 1 || start > string->size)
+ if(string->size != 0
+ && (start < 1 || start > string->size))
fatal("search_substring: start=%d string->size=%d", start, string->size);
/* simple cases */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: Mario R. <mar...@go...> - 2007-01-22 17:50:51
|
Good. The flag is working. I will use it until I find how to fix video/ffmpeg/audio. Thanks On 1/22/07, Simon Kilvington <s.k...@er...> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi, > > I've just added a "-d" flag to rb-browser that will disable > all audio and video output |
|
From: <ski...@us...> - 2007-01-22 17:12:03
|
Revision: 189
http://svn.sourceforge.net/redbutton/?rev=189&view=rev
Author: skilvington
Date: 2007-01-22 09:11:52 -0800 (Mon, 22 Jan 2007)
Log Message:
-----------
clamp search positions to the length of the string, rather than just returning a failed search
Modified Paths:
--------------
redbutton-browser/trunk/ResidentProgramClass.c
Modified: redbutton-browser/trunk/ResidentProgramClass.c
===================================================================
--- redbutton-browser/trunk/ResidentProgramClass.c 2007-01-22 16:49:24 UTC (rev 188)
+++ redbutton-browser/trunk/ResidentProgramClass.c 2007-01-22 17:11:52 UTC (rev 189)
@@ -796,9 +796,9 @@
int
search_substring(OctetString *string, int start, OctetString *search)
{
- /* range check */
+ /* assert */
if(start < 1 || start > string->size)
- return -1;
+ fatal("search_substring: start=%d string->size=%d", start, string->size);
/* simple cases */
if(string->size == 0)
@@ -847,6 +847,10 @@
startIndex = GenericInteger_getInteger(startIndex_par, caller_gid);
searchString = GenericOctetString_getOctetString(searchString_par, caller_gid);
+ /* range checks */
+ startIndex = MAX(startIndex, 1);
+ startIndex = MIN(startIndex, string->size);
+
stringPosition = search_substring(string, startIndex, searchString);
GenericInteger_setInteger(stringPosition_par, caller_gid, stringPosition);
@@ -892,6 +896,10 @@
startIndex = GenericInteger_getInteger(startIndex_par, caller_gid);
searchString = GenericOctetString_getOctetString(searchString_par, caller_gid);
+ /* range checks */
+ startIndex = MAX(startIndex, 1);
+ startIndex = MIN(startIndex, string->size);
+
if((search_pos = search_substring(string, startIndex, searchString)) != -1)
{
stringResult.size = search_pos - startIndex;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ski...@us...> - 2007-01-22 16:49:28
|
Revision: 188
http://svn.sourceforge.net/redbutton/?rev=188&view=rev
Author: skilvington
Date: 2007-01-22 08:49:24 -0800 (Mon, 22 Jan 2007)
Log Message:
-----------
change timeout TODO
Modified Paths:
--------------
redbutton-browser/trunk/TODO
Modified: redbutton-browser/trunk/TODO
===================================================================
--- redbutton-browser/trunk/TODO 2007-01-22 16:47:23 UTC (rev 187)
+++ redbutton-browser/trunk/TODO 2007-01-22 16:49:24 UTC (rev 188)
@@ -15,9 +15,8 @@
print avstream error message in rb-browser if openStream fails
-use -t timeout when searching for initial object to boot
-(only use it when searching for boot obj? all other times raise ContentRefError
-immediately?)
+only use -t timeout when searching for boot obj?
+all other times raise ContentRefError immediately?
handle SIGPIPE - default handler terminates the process
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ski...@us...> - 2007-01-22 16:47:28
|
Revision: 187
http://svn.sourceforge.net/redbutton/?rev=187&view=rev
Author: skilvington
Date: 2007-01-22 08:47:23 -0800 (Mon, 22 Jan 2007)
Log Message:
-----------
use timeout value when searching for initial boot object
Modified Paths:
--------------
redbutton-browser/trunk/MHEGEngine.c
Modified: redbutton-browser/trunk/MHEGEngine.c
===================================================================
--- redbutton-browser/trunk/MHEGEngine.c 2007-01-22 15:23:21 UTC (rev 186)
+++ redbutton-browser/trunk/MHEGEngine.c 2007-01-22 16:47:23 UTC (rev 187)
@@ -192,19 +192,27 @@
bool block;
unsigned int i;
bool found;
+ struct timeval start;
+ struct timeval now;
/* search order for the app to boot in the Service Gateway dir */
char *boot_order[] = { "~//a", "~//startup", NULL };
do
{
- /* search for the boot object */
+ /* search for the boot object for timeout seconds */
found = false;
- for(i=0; !found && boot_order[i] != NULL; i++)
+ gettimeofday(&start, NULL);
+ do
{
- boot_obj.size = strlen(boot_order[i]);
- boot_obj.data = boot_order[i];
- found = MHEGEngine_checkContentRef(&boot_obj);
+ for(i=0; !found && boot_order[i] != NULL; i++)
+ {
+ boot_obj.size = strlen(boot_order[i]);
+ boot_obj.data = boot_order[i];
+ found = MHEGEngine_checkContentRef(&boot_obj);
+ }
+ gettimeofday(&now, NULL);
}
+ while(!found && now.tv_sec <= (start.tv_sec + engine.timeout));
if(!found)
{
error("Unable to find boot object in service gateway");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: Simon K. <s.k...@er...> - 2007-01-22 15:30:17
|
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
PS: you'll have to do a "make clean" before compiling
Simon Kilvington wrote:
> Hi,
>
> I've just added a "-d" flag to rb-browser that will disable
> all audio and video output
>
> Mario Rossi wrote:
>
>>>I will try it this way, but I guess I would loose the new feature of retuning.
>>>Thanks
>>>
>>>On 1/22/07, Simon Kilvington <s.k...@er...> wrote:
>>>
>>>Hi,
>>>
>>> glad the problem sorted itself out!
>>>
>>> the warnings you are getting are from ffmpeg - generally it
>>>means the mpeg stream is corrupt or not all of it is getting through
>>>to the decoder in rb-browser
>>>
>>> the only way to totally disable audio and video is to not
>>>run rb-download - run it for a bit to get the files downloaded onto
>>>the file system, then stop it and start "rb-browser services/XXX"
>>>(I'm going to make "-o null" disable audio/video, but that's not
>>>done yet)
>>>
>>> once I've got the retuning stuff finished I'm going to start
>>>looking at different video output methods and making rb-browser more
>>>responsive when there are problems with the video...
>>>
>>>Mario Rossi wrote:
>>>
>>>
>>>>Hi,
>>>
>>>>I must have made a mistake compiling since it works now.
>>>
>>>>I still have problems with the video output I had some times ago.
>>>
>>>>I run redbutton like this:
>>>
>>>>rb-download 4415
>>>
>>>>and in another console
>>>
>>>>rb-browser -o null services/4415
>>>
>>>>I get a lot of warnings like that, and rb becomes very slow in responding.
>>>
>>>>[mpeg2video @ 0xb7dfdcc4]ac-tex damaged at 1 24
>>>>[mpeg2video @ 0xb7dfdcc4]00 motion_type at 35 25
>>>>[mpeg2video @ 0xb7dfdcc4]00 motion_type at 8 26
>>>>[mpeg2video @ 0xb7dfdcc4]invalid cbp at 7 27
>>>>[mpeg2video @ 0xb7dfdcc4]00 motion_type at 30 28
>>>>[mpeg2video @ 0xb7dfdcc4]invalid cbp at 12 29
>>>>[mpeg2video @ 0xb7dfdcc4]slice mismatch
>>>
>>>>and some about mp3
>>>
>>>>[mp3 @ 0xb7dfdcc4]incorrect frame size
>>>
>>>>And finally, I get again the behaviour when a click on the X on the
>>>>top right of the window does not close it, but it freezes.
>>>>I thought that "-o null" and not using "-l" in the rb-download meant
>>>>not to bother with the underlying vide but I must be wrong: how can I
>>>>completely disable the video and audio output?
>>>
>>>>Here is a gdb backtrace when it freezes:
>>>
>>>>I've run it like "rb-browser -o null services/4415/
>>>
>>>>Thread 2 (Thread -1234822240 (LWP 2304)):
>>>>#0 0x4dcba004 in getenv () from /lib/libc.so.6
>>>>#1 0x4146178b in snd_strerror () from /usr/lib/libasound.so.2
>>>>#2 0x4147bbee in snd_pcm_writei () from /usr/lib/libasound.so.2
>>>>#3 0x08055ae7 in MHEGAudioOutput_addSamples (a=0xb6661354,
>>>>samples=0xb51b601c, nbytes=4608) at MHEGAudioOutput.c:118
>>>>#4 0x08054b98 in audio_thread (arg=0x80d50b4) at MHEGStreamPlayer.c:743
>>>>#5 0x4dfe7433 in start_thread () from /lib/libpthread.so.0
>>>>#6 0x4dd58a1e in clone () from /lib/libc.so.6
>>>
>>>>Thread 1 (Thread -1218033984 (LWP 2300)):
>>>>#0 0xb7f58410 in ?? ()
>>>>#1 0xbf9fed78 in ?? ()
>>>>#2 0x00000900 in ?? ()
>>>>#3 0x00000000 in ?? ()
>>>
>>>>This behaviour is quite random. Could it be related to the fact that I
>>>>update ffmpeg quite often?
>>>
>>>>On 1/22/07, Simon Kilvington <s.k...@er...> wrote:
>>>
>>>
>>>>>-----BEGIN PGP SIGNED MESSAGE-----
>>>>>Hash: SHA1
>>>
>>>>>Hi,
>>>
>>>>> I can't understand why this is happening - the "Unable to find
>>>>>Carousel Descriptor in PMT" error is triggered if no boot/carousel
>>>>>info is found - but the log here shows that we do find it "Set
>>>>>boot_pid=2100 carousel_id=4"
>>>
>>>>> can you add some lines to print the value of "_car.npids" at
>>>>>various points in the find_mheg function in find_mheg.c - eg add
>>>>>something like:
>>>
>>>>>printf("npids=%u\n", _car.npids);
>>>
>>>>> around line 187 in find_mheg.c
>>>
>>>>> what happens if you don't run tzap at the same time?
>>>
>>>>> some of the svn changes lately mean you need to do a
>>>>>"make clean" before compiling - can you try that?
>>>
>>>>>SK.
>>>
>>>>>Mario Rossi wrote:
>>>
>>>
>>>>-------------------------------------------------------------------------
>>>>Take Surveys. Earn Cash. Influence the Future of IT
>>>>Join SourceForge.net's Techsay panel and you'll get the chance to share your
>>>>opinions on IT & business topics through brief surveys - and earn cash
>>>>http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>>>>_______________________________________________
>>>>Redbutton-devel mailing list
>>>>Red...@li...
>>>>https://lists.sourceforge.net/lists/listinfo/redbutton-devel
>>>
>>>
>>>
>>>--
>>>Simon Kilvington
>>>
>>>
>
>
>>>-------------------------------------------------------------------------
>>>Take Surveys. Earn Cash. Influence the Future of IT
>>>Join SourceForge.net's Techsay panel and you'll get the chance to share your
>>>opinions on IT & business topics through brief surveys - and earn cash
>>>http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>>>_______________________________________________
>>>Redbutton-devel mailing list
>>>Red...@li...
>>>https://lists.sourceforge.net/lists/listinfo/redbutton-devel
>
>
>
>
> --
> Simon Kilvington
>
>
- -------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
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
iD8DBQFFtNgemt9ZifioJSwRAnA1AJ9IbLMrRRFmDgYICe53BkAqyW95fgCfStfu
R1Dgl9XTrtBKe5rJBPLdXkQ=
=OSuW
-----END PGP SIGNATURE-----
|
|
From: Simon K. <s.k...@er...> - 2007-01-22 15:24:54
|
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
I've just added a "-d" flag to rb-browser that will disable
all audio and video output
Mario Rossi wrote:
> I will try it this way, but I guess I would loose the new feature of retuning.
> Thanks
>
> On 1/22/07, Simon Kilvington <s.k...@er...> wrote:
>
> Hi,
>
> glad the problem sorted itself out!
>
> the warnings you are getting are from ffmpeg - generally it
> means the mpeg stream is corrupt or not all of it is getting through
> to the decoder in rb-browser
>
> the only way to totally disable audio and video is to not
> run rb-download - run it for a bit to get the files downloaded onto
> the file system, then stop it and start "rb-browser services/XXX"
> (I'm going to make "-o null" disable audio/video, but that's not
> done yet)
>
> once I've got the retuning stuff finished I'm going to start
> looking at different video output methods and making rb-browser more
> responsive when there are problems with the video...
>
> Mario Rossi wrote:
>
>>Hi,
>
>>I must have made a mistake compiling since it works now.
>
>>I still have problems with the video output I had some times ago.
>
>>I run redbutton like this:
>
>>rb-download 4415
>
>>and in another console
>
>>rb-browser -o null services/4415
>
>>I get a lot of warnings like that, and rb becomes very slow in responding.
>
>>[mpeg2video @ 0xb7dfdcc4]ac-tex damaged at 1 24
>>[mpeg2video @ 0xb7dfdcc4]00 motion_type at 35 25
>>[mpeg2video @ 0xb7dfdcc4]00 motion_type at 8 26
>>[mpeg2video @ 0xb7dfdcc4]invalid cbp at 7 27
>>[mpeg2video @ 0xb7dfdcc4]00 motion_type at 30 28
>>[mpeg2video @ 0xb7dfdcc4]invalid cbp at 12 29
>>[mpeg2video @ 0xb7dfdcc4]slice mismatch
>
>>and some about mp3
>
>>[mp3 @ 0xb7dfdcc4]incorrect frame size
>
>>And finally, I get again the behaviour when a click on the X on the
>>top right of the window does not close it, but it freezes.
>>I thought that "-o null" and not using "-l" in the rb-download meant
>>not to bother with the underlying vide but I must be wrong: how can I
>>completely disable the video and audio output?
>
>>Here is a gdb backtrace when it freezes:
>
>>I've run it like "rb-browser -o null services/4415/
>
>>Thread 2 (Thread -1234822240 (LWP 2304)):
>>#0 0x4dcba004 in getenv () from /lib/libc.so.6
>>#1 0x4146178b in snd_strerror () from /usr/lib/libasound.so.2
>>#2 0x4147bbee in snd_pcm_writei () from /usr/lib/libasound.so.2
>>#3 0x08055ae7 in MHEGAudioOutput_addSamples (a=0xb6661354,
>>samples=0xb51b601c, nbytes=4608) at MHEGAudioOutput.c:118
>>#4 0x08054b98 in audio_thread (arg=0x80d50b4) at MHEGStreamPlayer.c:743
>>#5 0x4dfe7433 in start_thread () from /lib/libpthread.so.0
>>#6 0x4dd58a1e in clone () from /lib/libc.so.6
>
>>Thread 1 (Thread -1218033984 (LWP 2300)):
>>#0 0xb7f58410 in ?? ()
>>#1 0xbf9fed78 in ?? ()
>>#2 0x00000900 in ?? ()
>>#3 0x00000000 in ?? ()
>
>>This behaviour is quite random. Could it be related to the fact that I
>>update ffmpeg quite often?
>
>>On 1/22/07, Simon Kilvington <s.k...@er...> wrote:
>
>
>>>-----BEGIN PGP SIGNED MESSAGE-----
>>>Hash: SHA1
>
>>>Hi,
>
>>> I can't understand why this is happening - the "Unable to find
>>>Carousel Descriptor in PMT" error is triggered if no boot/carousel
>>>info is found - but the log here shows that we do find it "Set
>>>boot_pid=2100 carousel_id=4"
>
>>> can you add some lines to print the value of "_car.npids" at
>>>various points in the find_mheg function in find_mheg.c - eg add
>>>something like:
>
>>>printf("npids=%u\n", _car.npids);
>
>>> around line 187 in find_mheg.c
>
>>> what happens if you don't run tzap at the same time?
>
>>> some of the svn changes lately mean you need to do a
>>>"make clean" before compiling - can you try that?
>
>>>SK.
>
>>>Mario Rossi wrote:
>
>
>>-------------------------------------------------------------------------
>>Take Surveys. Earn Cash. Influence the Future of IT
>>Join SourceForge.net's Techsay panel and you'll get the chance to share your
>>opinions on IT & business topics through brief surveys - and earn cash
>>http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>>_______________________________________________
>>Redbutton-devel mailing list
>>Red...@li...
>>https://lists.sourceforge.net/lists/listinfo/redbutton-devel
>
>
>
> --
> Simon Kilvington
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> 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
iD8DBQFFtNc/mt9ZifioJSwRAup4AJ9ecPMfJ+tNFUQgtn8X85gIJlhjJwCfZuEe
jEC9MtMjFvqv3+0K7PN5vUk=
=63XD
-----END PGP SIGNATURE-----
|
|
From: <ski...@us...> - 2007-01-22 15:23:27
|
Revision: 186
http://svn.sourceforge.net/redbutton/?rev=186&view=rev
Author: skilvington
Date: 2007-01-22 07:23:21 -0800 (Mon, 22 Jan 2007)
Log Message:
-----------
add -d flag to disable all audio and video output
Modified Paths:
--------------
redbutton-browser/trunk/MHEGEngine.c
redbutton-browser/trunk/MHEGEngine.h
redbutton-browser/trunk/MHEGStreamPlayer.c
redbutton-browser/trunk/rb-browser.c
www/index.html
Modified: redbutton-browser/trunk/MHEGEngine.c
===================================================================
--- redbutton-browser/trunk/MHEGEngine.c 2007-01-22 10:31:43 UTC (rev 185)
+++ redbutton-browser/trunk/MHEGEngine.c 2007-01-22 15:23:21 UTC (rev 186)
@@ -174,6 +174,7 @@
MHEGDisplay_init(&engine.display, opts->fullscreen, opts->keymap);
engine.vo_method = MHEGVideoOutputMethod_fromString(opts->vo_method);
+ engine.av_disabled = opts->av_disabled;
MHEGBackend_init(&engine.backend, opts->remote, opts->srg_loc);
@@ -261,7 +262,7 @@
boot_obj.size = engine.quit_data.size;
boot_obj.data = engine.quit_data.data;
break;
-
+
case QuitReason_Spawn:
verbose("Spawn '%.*s'", engine.quit_data.size, engine.quit_data.data);
/* TODO */
@@ -270,12 +271,12 @@
boot_obj.size = engine.quit_data.size;
boot_obj.data = engine.quit_data.data;
break;
-
+
case QuitReason_Retune:
verbose("Retune to '%.*s'", engine.quit_data.size, engine.quit_data.data);
MHEGEngine_retune(&engine.quit_data);
break;
-
+
default:
/* nothing to do */
break;
@@ -316,6 +317,12 @@
return engine.vo_method;
}
+bool
+MHEGEngine_avDisabled(void)
+{
+ return engine.av_disabled;
+}
+
/*
* according to the ISO MHEG spec this should be part of the SceneClass
* but we need info about the current app etc too
Modified: redbutton-browser/trunk/MHEGEngine.h
===================================================================
--- redbutton-browser/trunk/MHEGEngine.h 2007-01-22 10:31:43 UTC (rev 185)
+++ redbutton-browser/trunk/MHEGEngine.h 2007-01-22 15:23:21 UTC (rev 186)
@@ -86,6 +86,7 @@
unsigned int timeout; /* seconds to poll for missing content before generating a ContentRefError */
bool fullscreen; /* scale to fullscreen? */
char *vo_method; /* MHEGVideoOutputMethod name (NULL for default) */
+ bool av_disabled; /* true => audio and video output totally disabled */
char *keymap; /* keymap config file to use (NULL for default) */
} MHEGEngineOptions;
@@ -168,6 +169,7 @@
unsigned int timeout; /* how long to poll for missing content before generating an error */
MHEGDisplay display; /* make porting easier */
MHEGVideoOutputMethod *vo_method; /* video output method (resolved from name given in MHEGEngineOptions) */
+ bool av_disabled; /* true => video and audio output totally disabled */
MHEGBackend backend; /* local or remote access to DSMCC carousel and MPEG streams */
MHEGApp active_app; /* application we are currently running */
QuitReason quit_reason; /* do we need to stop the current app */
@@ -189,6 +191,7 @@
MHEGDisplay *MHEGEngine_getDisplay(void);
MHEGVideoOutputMethod *MHEGEngine_getVideoOutputMethod(void);
+bool MHEGEngine_avDisabled(void);
void MHEGEngine_TransitionTo(TransitionTo *, OctetString *);
Modified: redbutton-browser/trunk/MHEGStreamPlayer.c
===================================================================
--- redbutton-browser/trunk/MHEGStreamPlayer.c 2007-01-22 10:31:43 UTC (rev 185)
+++ redbutton-browser/trunk/MHEGStreamPlayer.c 2007-01-22 15:23:21 UTC (rev 186)
@@ -168,6 +168,10 @@
if(p->video != NULL)
p->video->inst.no_video = true;
+ /* is audio/video output totally disabled */
+ if(MHEGEngine_avDisabled())
+ return;
+
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,
Modified: redbutton-browser/trunk/rb-browser.c
===================================================================
--- redbutton-browser/trunk/rb-browser.c 2007-01-22 10:31:43 UTC (rev 185)
+++ redbutton-browser/trunk/rb-browser.c 2007-01-22 15:23:21 UTC (rev 186)
@@ -1,8 +1,9 @@
/*
- * rb-browser [-v] [-f] [-o <video_output_method>] [-k <keymap_file>] [-t <timeout>] [-r] <service_gateway>
+ * rb-browser [-v] [-f] [-d] [-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
+ * -d disables all video and audio output
* -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
@@ -49,10 +50,11 @@
opts.verbose = 0;
opts.fullscreen = false;
opts.vo_method = NULL;
+ opts.av_disabled = false;
opts.timeout = MISSING_CONTENT_TIMEOUT;
opts.keymap = NULL;
- while((arg = getopt(argc, argv, "rvfo:k:t:")) != EOF)
+ while((arg = getopt(argc, argv, "rvfdo:k:t:")) != EOF)
{
switch(arg)
{
@@ -68,6 +70,10 @@
opts.fullscreen = true;
break;
+ case 'd':
+ opts.av_disabled = true;
+ break;
+
case 'o':
opts.vo_method = optarg;
break;
@@ -114,6 +120,7 @@
fatal("Usage: %s "
"[-v] "
"[-f] "
+ "[-d] "
"[-o <video_output_method>] "
"[-k <keymap_file>] "
"[-t <timeout>] "
Modified: www/index.html
===================================================================
--- www/index.html 2007-01-22 10:31:43 UTC (rev 185)
+++ www/index.html 2007-01-22 15:23:21 UTC (rev 186)
@@ -95,7 +95,7 @@
<H2>rb-browser</H2>
Usage:
<PRE>
-rb-browser [-v] [-f] [-k <keymap_config_file>] [-t <timeout>] [-r] <service_gateway>
+rb-browser [-v] [-f] [-d] [-o <video_output_method>] [-k <keymap_config_file>] [-t <timeout>] [-r] <service_gateway>
</PRE>
Display the MHEG apps downloaded with rb-download.
<P>
@@ -124,6 +124,11 @@
<P>
It will display the app in a window, use -f for full screen mode.
<P>
+The -d flag disables all audio and video output.
+<P>
+Use -o to choose a video output method if the default is not supported/too slow on your graphics card.
+'rb-browser -o' will give a list of available video output methods.
+<P>
The -v flag enables verbose/debug mode.
<P>
The -t flag determines how long (in seconds) it will poll for missing files before passing an error to the MHEG application.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: Mario R. <mar...@go...> - 2007-01-22 14:27:57
|
I will try it this way, but I guess I would loose the new feature of retuning.
Thanks
On 1/22/07, Simon Kilvington <s.k...@er...> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> glad the problem sorted itself out!
>
> the warnings you are getting are from ffmpeg - generally it
> means the mpeg stream is corrupt or not all of it is getting through
> to the decoder in rb-browser
>
> the only way to totally disable audio and video is to not
> run rb-download - run it for a bit to get the files downloaded onto
> the file system, then stop it and start "rb-browser services/XXX"
> (I'm going to make "-o null" disable audio/video, but that's not
> done yet)
>
> once I've got the retuning stuff finished I'm going to start
> looking at different video output methods and making rb-browser more
> responsive when there are problems with the video...
>
> Mario Rossi wrote:
> > Hi,
> >
> > I must have made a mistake compiling since it works now.
> >
> > I still have problems with the video output I had some times ago.
> >
> > I run redbutton like this:
> >
> > rb-download 4415
> >
> > and in another console
> >
> > rb-browser -o null services/4415
> >
> > I get a lot of warnings like that, and rb becomes very slow in responding.
> >
> > [mpeg2video @ 0xb7dfdcc4]ac-tex damaged at 1 24
> > [mpeg2video @ 0xb7dfdcc4]00 motion_type at 35 25
> > [mpeg2video @ 0xb7dfdcc4]00 motion_type at 8 26
> > [mpeg2video @ 0xb7dfdcc4]invalid cbp at 7 27
> > [mpeg2video @ 0xb7dfdcc4]00 motion_type at 30 28
> > [mpeg2video @ 0xb7dfdcc4]invalid cbp at 12 29
> > [mpeg2video @ 0xb7dfdcc4]slice mismatch
> >
> > and some about mp3
> >
> > [mp3 @ 0xb7dfdcc4]incorrect frame size
> >
> > And finally, I get again the behaviour when a click on the X on the
> > top right of the window does not close it, but it freezes.
> > I thought that "-o null" and not using "-l" in the rb-download meant
> > not to bother with the underlying vide but I must be wrong: how can I
> > completely disable the video and audio output?
> >
> > Here is a gdb backtrace when it freezes:
> >
> > I've run it like "rb-browser -o null services/4415/
> >
> > Thread 2 (Thread -1234822240 (LWP 2304)):
> > #0 0x4dcba004 in getenv () from /lib/libc.so.6
> > #1 0x4146178b in snd_strerror () from /usr/lib/libasound.so.2
> > #2 0x4147bbee in snd_pcm_writei () from /usr/lib/libasound.so.2
> > #3 0x08055ae7 in MHEGAudioOutput_addSamples (a=0xb6661354,
> > samples=0xb51b601c, nbytes=4608) at MHEGAudioOutput.c:118
> > #4 0x08054b98 in audio_thread (arg=0x80d50b4) at MHEGStreamPlayer.c:743
> > #5 0x4dfe7433 in start_thread () from /lib/libpthread.so.0
> > #6 0x4dd58a1e in clone () from /lib/libc.so.6
> >
> > Thread 1 (Thread -1218033984 (LWP 2300)):
> > #0 0xb7f58410 in ?? ()
> > #1 0xbf9fed78 in ?? ()
> > #2 0x00000900 in ?? ()
> > #3 0x00000000 in ?? ()
> >
> > This behaviour is quite random. Could it be related to the fact that I
> > update ffmpeg quite often?
> >
> > On 1/22/07, Simon Kilvington <s.k...@er...> wrote:
> >
> >>-----BEGIN PGP SIGNED MESSAGE-----
> >>Hash: SHA1
> >>
> >>Hi,
> >>
> >> I can't understand why this is happening - the "Unable to find
> >>Carousel Descriptor in PMT" error is triggered if no boot/carousel
> >>info is found - but the log here shows that we do find it "Set
> >>boot_pid=2100 carousel_id=4"
> >>
> >> can you add some lines to print the value of "_car.npids" at
> >>various points in the find_mheg function in find_mheg.c - eg add
> >>something like:
> >>
> >>printf("npids=%u\n", _car.npids);
> >>
> >> around line 187 in find_mheg.c
> >>
> >> what happens if you don't run tzap at the same time?
> >>
> >> some of the svn changes lately mean you need to do a
> >>"make clean" before compiling - can you try that?
> >>
> >>SK.
> >>
> >>Mario Rossi wrote:
> >
> >
> > -------------------------------------------------------------------------
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net's Techsay panel and you'll get the chance to share your
> > opinions on IT & business topics through brief surveys - and earn cash
> > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > _______________________________________________
> > 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
>
> iD8DBQFFtL7Nmt9ZifioJSwRAjruAJ9NWGQ0sGNR5ExZrQ7O3ikfLA1+/QCggcRp
> Zh268wMAgTY/GiN5kaMMo1w=
> =HeiT
> -----END PGP SIGNATURE-----
>
|
|
From: Simon K. <s.k...@er...> - 2007-01-22 13:40:56
|
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
glad the problem sorted itself out!
the warnings you are getting are from ffmpeg - generally it
means the mpeg stream is corrupt or not all of it is getting through
to the decoder in rb-browser
the only way to totally disable audio and video is to not
run rb-download - run it for a bit to get the files downloaded onto
the file system, then stop it and start "rb-browser services/XXX"
(I'm going to make "-o null" disable audio/video, but that's not
done yet)
once I've got the retuning stuff finished I'm going to start
looking at different video output methods and making rb-browser more
responsive when there are problems with the video...
Mario Rossi wrote:
> Hi,
>
> I must have made a mistake compiling since it works now.
>
> I still have problems with the video output I had some times ago.
>
> I run redbutton like this:
>
> rb-download 4415
>
> and in another console
>
> rb-browser -o null services/4415
>
> I get a lot of warnings like that, and rb becomes very slow in responding.
>
> [mpeg2video @ 0xb7dfdcc4]ac-tex damaged at 1 24
> [mpeg2video @ 0xb7dfdcc4]00 motion_type at 35 25
> [mpeg2video @ 0xb7dfdcc4]00 motion_type at 8 26
> [mpeg2video @ 0xb7dfdcc4]invalid cbp at 7 27
> [mpeg2video @ 0xb7dfdcc4]00 motion_type at 30 28
> [mpeg2video @ 0xb7dfdcc4]invalid cbp at 12 29
> [mpeg2video @ 0xb7dfdcc4]slice mismatch
>
> and some about mp3
>
> [mp3 @ 0xb7dfdcc4]incorrect frame size
>
> And finally, I get again the behaviour when a click on the X on the
> top right of the window does not close it, but it freezes.
> I thought that "-o null" and not using "-l" in the rb-download meant
> not to bother with the underlying vide but I must be wrong: how can I
> completely disable the video and audio output?
>
> Here is a gdb backtrace when it freezes:
>
> I've run it like "rb-browser -o null services/4415/
>
> Thread 2 (Thread -1234822240 (LWP 2304)):
> #0 0x4dcba004 in getenv () from /lib/libc.so.6
> #1 0x4146178b in snd_strerror () from /usr/lib/libasound.so.2
> #2 0x4147bbee in snd_pcm_writei () from /usr/lib/libasound.so.2
> #3 0x08055ae7 in MHEGAudioOutput_addSamples (a=0xb6661354,
> samples=0xb51b601c, nbytes=4608) at MHEGAudioOutput.c:118
> #4 0x08054b98 in audio_thread (arg=0x80d50b4) at MHEGStreamPlayer.c:743
> #5 0x4dfe7433 in start_thread () from /lib/libpthread.so.0
> #6 0x4dd58a1e in clone () from /lib/libc.so.6
>
> Thread 1 (Thread -1218033984 (LWP 2300)):
> #0 0xb7f58410 in ?? ()
> #1 0xbf9fed78 in ?? ()
> #2 0x00000900 in ?? ()
> #3 0x00000000 in ?? ()
>
> This behaviour is quite random. Could it be related to the fact that I
> update ffmpeg quite often?
>
> On 1/22/07, Simon Kilvington <s.k...@er...> wrote:
>
>>-----BEGIN PGP SIGNED MESSAGE-----
>>Hash: SHA1
>>
>>Hi,
>>
>> I can't understand why this is happening - the "Unable to find
>>Carousel Descriptor in PMT" error is triggered if no boot/carousel
>>info is found - but the log here shows that we do find it "Set
>>boot_pid=2100 carousel_id=4"
>>
>> can you add some lines to print the value of "_car.npids" at
>>various points in the find_mheg function in find_mheg.c - eg add
>>something like:
>>
>>printf("npids=%u\n", _car.npids);
>>
>> around line 187 in find_mheg.c
>>
>> what happens if you don't run tzap at the same time?
>>
>> some of the svn changes lately mean you need to do a
>>"make clean" before compiling - can you try that?
>>
>>SK.
>>
>>Mario Rossi wrote:
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> 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
iD8DBQFFtL7Nmt9ZifioJSwRAjruAJ9NWGQ0sGNR5ExZrQ7O3ikfLA1+/QCggcRp
Zh268wMAgTY/GiN5kaMMo1w=
=HeiT
-----END PGP SIGNATURE-----
|
|
From: Mario R. <mar...@go...> - 2007-01-22 12:46:56
|
Hi,
I must have made a mistake compiling since it works now.
I still have problems with the video output I had some times ago.
I run redbutton like this:
rb-download 4415
and in another console
rb-browser -o null services/4415
I get a lot of warnings like that, and rb becomes very slow in responding.
[mpeg2video @ 0xb7dfdcc4]ac-tex damaged at 1 24
[mpeg2video @ 0xb7dfdcc4]00 motion_type at 35 25
[mpeg2video @ 0xb7dfdcc4]00 motion_type at 8 26
[mpeg2video @ 0xb7dfdcc4]invalid cbp at 7 27
[mpeg2video @ 0xb7dfdcc4]00 motion_type at 30 28
[mpeg2video @ 0xb7dfdcc4]invalid cbp at 12 29
[mpeg2video @ 0xb7dfdcc4]slice mismatch
and some about mp3
[mp3 @ 0xb7dfdcc4]incorrect frame size
And finally, I get again the behaviour when a click on the X on the
top right of the window does not close it, but it freezes.
I thought that "-o null" and not using "-l" in the rb-download meant
not to bother with the underlying vide but I must be wrong: how can I
completely disable the video and audio output?
Here is a gdb backtrace when it freezes:
I've run it like "rb-browser -o null services/4415/
Thread 2 (Thread -1234822240 (LWP 2304)):
#0 0x4dcba004 in getenv () from /lib/libc.so.6
#1 0x4146178b in snd_strerror () from /usr/lib/libasound.so.2
#2 0x4147bbee in snd_pcm_writei () from /usr/lib/libasound.so.2
#3 0x08055ae7 in MHEGAudioOutput_addSamples (a=0xb6661354,
samples=0xb51b601c, nbytes=4608) at MHEGAudioOutput.c:118
#4 0x08054b98 in audio_thread (arg=0x80d50b4) at MHEGStreamPlayer.c:743
#5 0x4dfe7433 in start_thread () from /lib/libpthread.so.0
#6 0x4dd58a1e in clone () from /lib/libc.so.6
Thread 1 (Thread -1218033984 (LWP 2300)):
#0 0xb7f58410 in ?? ()
#1 0xbf9fed78 in ?? ()
#2 0x00000900 in ?? ()
#3 0x00000000 in ?? ()
This behaviour is quite random. Could it be related to the fact that I
update ffmpeg quite often?
On 1/22/07, Simon Kilvington <s.k...@er...> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> I can't understand why this is happening - the "Unable to find
> Carousel Descriptor in PMT" error is triggered if no boot/carousel
> info is found - but the log here shows that we do find it "Set
> boot_pid=2100 carousel_id=4"
>
> can you add some lines to print the value of "_car.npids" at
> various points in the find_mheg function in find_mheg.c - eg add
> something like:
>
> printf("npids=%u\n", _car.npids);
>
> around line 187 in find_mheg.c
>
> what happens if you don't run tzap at the same time?
>
> some of the svn changes lately mean you need to do a
> "make clean" before compiling - can you try that?
>
> SK.
>
> Mario Rossi wrote:
|
|
From: <ski...@us...> - 2007-01-22 10:31:47
|
Revision: 185
http://svn.sourceforge.net/redbutton/?rev=185&view=rev
Author: skilvington
Date: 2007-01-22 02:31:43 -0800 (Mon, 22 Jan 2007)
Log Message:
-----------
use ~/.tzap/channels.conf as default channels.conf file
Modified Paths:
--------------
redbutton-download/trunk/channels.c
redbutton-download/trunk/rb-download.c
www/index.html
Modified: redbutton-download/trunk/channels.c
===================================================================
--- redbutton-download/trunk/channels.c 2007-01-18 22:26:22 UTC (rev 184)
+++ redbutton-download/trunk/channels.c 2007-01-22 10:31:43 UTC (rev 185)
@@ -41,7 +41,7 @@
/*
* if filename is NULL, it searches for:
- * ~/channels.conf
+ * ~/.tzap/channels.conf
* /etc/channels.conf
*/
@@ -58,7 +58,7 @@
{
if((home = getenv("HOME")) != NULL)
{
- snprintf(pathname, sizeof(pathname), "%s/channels.conf", home);
+ snprintf(pathname, sizeof(pathname), "%s/.tzap/channels.conf", home);
verbose("Trying to open %s", pathname);
_channels = fopen(pathname, "r");
}
Modified: redbutton-download/trunk/rb-download.c
===================================================================
--- redbutton-download/trunk/rb-download.c 2007-01-18 22:26:22 UTC (rev 184)
+++ redbutton-download/trunk/rb-download.c 2007-01-22 10:31:43 UTC (rev 185)
@@ -18,7 +18,7 @@
* rb-download needs a "channels.conf" file which gives tuning parameters for service_id's
* channels.conf files can be generated by the "scan" utility in the dvb-apps package at www.linuxtv.org
* if not specified with -f, rb-download will search for:
- * ~/channels.conf
+ * ~/.tzap/channels.conf
* /etc/channels.conf
*
* rb-download listens on the network for commands from a remote rb-browser
Modified: www/index.html
===================================================================
--- www/index.html 2007-01-18 22:26:22 UTC (rev 184)
+++ www/index.html 2007-01-22 10:31:43 UTC (rev 185)
@@ -52,7 +52,7 @@
A channels.conf files can be generated by the "scan" utility in the dvb-apps package at <A HREF="http://www.linuxtv.org">www.linuxtv.org</A>.
If not specified with -f, rb-download will search for:
<UL>
-<LI>~/channels.conf</LI>
+<LI>~/.tzap/channels.conf</LI>
<LI>/etc/channels.conf</LI>
</UL>
<P>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: Simon K. <s.k...@er...> - 2007-01-22 09:48:45
|
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
I can't understand why this is happening - the "Unable to find
Carousel Descriptor in PMT" error is triggered if no boot/carousel
info is found - but the log here shows that we do find it "Set
boot_pid=2100 carousel_id=4"
can you add some lines to print the value of "_car.npids" at
various points in the find_mheg function in find_mheg.c - eg add
something like:
printf("npids=%u\n", _car.npids);
around line 187 in find_mheg.c
what happens if you don't run tzap at the same time?
some of the svn changes lately mean you need to do a
"make clean" before compiling - can you try that?
SK.
Mario Rossi wrote:
> This is a more detailed output
>
> [andrea@thinkpad tmp]$ rb-download -vv -f /home/andrea/.tzap/channels.conf 8261
> Trying to open /home/andrea/.tzap/channels.conf
> Getting frontend info
> Searching channels.conf for service_id 8261
> ITV1:481833330:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:520:521:8261
> Current frequency 481833330; needed 481833330
> PMT PID: 256
> PID=520 component_tag=0
> PID=521 component_tag=138
> PID=522 component_tag=148
> PID=523 descriptor=0x59
> 0x00000000 65 6e 67 10 00 02 00 02 eng.....
> PID=2100 descriptor=0xe
> 0x00000000 c0 45 d9 .E.
> PID=2100 carousel_id=4
> PID=2100 boot_priority_hint=0
> PID=2100 component_tag=39
> Set boot_pid=2100 carousel_id=4
> Adding PID 2100 to filter
> PID=2101 descriptor=0xe
> 0x00000000 c0 45 d9 .E.
> PID=2101 component_tag=40
> PID=2302 descriptor=0xe
> 0x00000000 c0 45 d9 .E.
> PID=2302 component_tag=41
> PID=2301 descriptor=0xe
> 0x00000000 c0 45 d9 .E.
> PID=2301 component_tag=42
> Unable to find Carousel Descriptor in PMT
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> 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
iD8DBQFFtIhrmt9ZifioJSwRAnYJAJ0e5PdpY9iyJFMZ562rOe9VL/lOmACfc3Xl
YIId4z6eyF0QdRnh+imiIXc=
=bnnG
-----END PGP SIGNATURE-----
|
|
From: Mario R. <mar...@go...> - 2007-01-21 00:31:04
|
This is a more detailed output [andrea@thinkpad tmp]$ rb-download -vv -f /home/andrea/.tzap/channels.conf 8261 Trying to open /home/andrea/.tzap/channels.conf Getting frontend info Searching channels.conf for service_id 8261 ITV1:481833330:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:520:521:8261 Current frequency 481833330; needed 481833330 PMT PID: 256 PID=520 component_tag=0 PID=521 component_tag=138 PID=522 component_tag=148 PID=523 descriptor=0x59 0x00000000 65 6e 67 10 00 02 00 02 eng..... PID=2100 descriptor=0xe 0x00000000 c0 45 d9 .E. PID=2100 carousel_id=4 PID=2100 boot_priority_hint=0 PID=2100 component_tag=39 Set boot_pid=2100 carousel_id=4 Adding PID 2100 to filter PID=2101 descriptor=0xe 0x00000000 c0 45 d9 .E. PID=2101 component_tag=40 PID=2302 descriptor=0xe 0x00000000 c0 45 d9 .E. PID=2302 component_tag=41 PID=2301 descriptor=0xe 0x00000000 c0 45 d9 .E. PID=2301 component_tag=42 Unable to find Carousel Descriptor in PMT |
|
From: Mario R. <mar...@go...> - 2007-01-21 00:01:34
|
Hi, I've had problems since the introduction of the new handling of the file channels.conf. This is the output of rb-download [andrea@thinkpad tmp]$ rb-download -f /home/andrea/.tzap/channels.conf Channels on this mutiplex: ID Channel == ======= 8261 ITV1 8294 ITV3 8325 ITV2 8353 ITV4 8358 CITV 8384 Channel 4 8390 SETANTA SPORTS 8442 More 4 8448 E4 8452 Film4+1 8517 Teletext 8643 Teletext Cars 8768 Teletext on 4 8771 RadioMusicShop 8772 Heart [andrea@thinkpad tmp]$ rb-download -v -f /home/andrea/.tzap/channels.conf 8261 Trying to open /home/andrea/.tzap/channels.conf Searching channels.conf for service_id 8261 ITV1:481833330:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:520:521:8261 Adding PID 2100 to filter Unable to find Carousel Descriptor in PMT If I try the release with tag 20070108 I get everything ok. When I use redbutton, I always have tzap running in an other console tuning one channel of the multiplex I'm interested. In this case: [andrea@thinkpad ~]$ tzap "ITV1" using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0' reading channels from file '/home/andrea/.tzap/channels.conf' tuning to 481833330 Hz video pid 0x0208, audio pid 0x0209 status 1f | signal 90b3 | snr 0000 | ber 001fffff | unc 00000000 | FE_HAS_LOCK status 1f | signal 90af | snr 0000 | ber 00000000 | unc 00000000 | FE_HAS_LOCK I've tried without -f channels.conf but it does not like it. Am I doing the right things? Cheers |
|
From: <ski...@us...> - 2007-01-18 22:39:06
|
Revision: 184
http://svn.sourceforge.net/redbutton/?rev=184&view=rev
Author: skilvington
Date: 2007-01-18 14:26:22 -0800 (Thu, 18 Jan 2007)
Log Message:
-----------
it does retune to different channels now
Modified Paths:
--------------
www/index.html
Modified: www/index.html
===================================================================
--- www/index.html 2007-01-18 22:23:40 UTC (rev 183)
+++ www/index.html 2007-01-18 22:26:22 UTC (rev 184)
@@ -159,10 +159,6 @@
However, it seems to be enough to view everything that is currently being broadcast on the 'Freeview' channels in the UK.
If it comes across something that is not yet implemented it will print out a message on the console. Let us know if you find anything it can't do.
<P>
-It does not retune to different channels yet if the app requests it.
-It will print out a message saying what service ID it needs to tune to,
-but you will have to retune manually and restart it.
-<P>
It does not currently use any acceleration that your graphics card may provide
so it'll drop video frames in full screen mode unless you have a very fast processor
(or your full screen X resolution is set to 720x576 pixels).
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ski...@us...> - 2007-01-18 22:39:04
|
Revision: 182
http://svn.sourceforge.net/redbutton/?rev=182&view=rev
Author: skilvington
Date: 2007-01-18 14:22:54 -0800 (Thu, 18 Jan 2007)
Log Message:
-----------
remove TODO comment
Modified Paths:
--------------
redbutton-browser/trunk/MHEGBackend.c
Modified: redbutton-browser/trunk/MHEGBackend.c
===================================================================
--- redbutton-browser/trunk/MHEGBackend.c 2007-01-18 22:22:31 UTC (rev 181)
+++ redbutton-browser/trunk/MHEGBackend.c 2007-01-18 22:22:54 UTC (rev 182)
@@ -601,9 +601,6 @@
snprintf(cmd, sizeof(cmd), "retune %u\n", si_get_service_id(service));
-/* TODO */
-printf("TODO: Retune remote backend to '%.*s' (service_id %u). This will fail if the new service is on a different frequency.", service->size, service->data, si_get_service_id(service));
-
if((sock = remote_command(t, true, cmd)) == NULL
|| remote_response(sock) != BACKEND_RESPONSE_OK)
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ski...@us...> - 2007-01-18 22:39:04
|
Revision: 183
http://svn.sourceforge.net/redbutton/?rev=183&view=rev
Author: skilvington
Date: 2007-01-18 14:23:40 -0800 (Thu, 18 Jan 2007)
Log Message:
-----------
add rb-download -f flag and channels.conf description to web page
Modified Paths:
--------------
www/index.html
Modified: www/index.html
===================================================================
--- www/index.html 2007-01-18 22:22:54 UTC (rev 182)
+++ www/index.html 2007-01-18 22:23:40 UTC (rev 183)
@@ -30,7 +30,7 @@
<H2>rb-download</H2>
Usage:
<PRE>
-rb-download [-v] [-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>] [-f <channels_file>] [-c <carousel_id>] [<service_id>]
</PRE>
Download the DVB Object Carousel for the given channel onto the local hard disc.
<P>
@@ -41,12 +41,21 @@
If no DSM-CC data is found after this time, it is assumed none is being broadcast.
<P>
The DVB devices used will be:
-<ul>
-<li>/dev/dvb/adapter0/demux0</li>
-<li>/dev/dvb/adapter0/dvr0</li>
-</ul>
-use the -a option to change the adapter number (eg "-a 1" will use /dev/dvb/adapter1/demux0 etc).
+<UL>
+<LI>/dev/dvb/adapter0/frontend0</LI>
+<LI>/dev/dvb/adapter0/demux0</LI>
+<LI>/dev/dvb/adapter0/dvr0</LI>
+</UL>
+use the -a option to change the adapter number (eg "-a 1" will use /dev/dvb/adapter1/frontend0 etc).
<P>
+rb-download needs a "channels.conf" file which gives tuning parameters for service_id's.
+A channels.conf files can be generated by the "scan" utility in the dvb-apps package at <A HREF="http://www.linuxtv.org">www.linuxtv.org</A>.
+If not specified with -f, rb-download will search for:
+<UL>
+<LI>~/channels.conf</LI>
+<LI>/etc/channels.conf</LI>
+</UL>
+<P>
rb-download listens on the network for commands from a remote rb-browser.
The default IP to listen on is 0.0.0.0 (ie all interfaces), the default TCP port is 10101.
The -l option changes the default IP and port.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ski...@us...> - 2007-01-18 22:22:35
|
Revision: 181
http://svn.sourceforge.net/redbutton/?rev=181&view=rev
Author: skilvington
Date: 2007-01-18 14:22:31 -0800 (Thu, 18 Jan 2007)
Log Message:
-----------
allow backend to retune to different frequencies (only works for DVB-T at present)
Modified Paths:
--------------
redbutton-download/trunk/Makefile
redbutton-download/trunk/TODO
redbutton-download/trunk/listen.c
redbutton-download/trunk/rb-download.c
redbutton-download/trunk/utils.h
Added Paths:
-----------
redbutton-download/trunk/channels.c
redbutton-download/trunk/channels.h
Modified: redbutton-download/trunk/Makefile
===================================================================
--- redbutton-download/trunk/Makefile 2007-01-17 12:32:41 UTC (rev 180)
+++ redbutton-download/trunk/Makefile 2007-01-18 22:22:31 UTC (rev 181)
@@ -16,6 +16,7 @@
dsmcc.o \
biop.o \
fs.o \
+ channels.o \
utils.o
LIBS=-lz
Modified: redbutton-download/trunk/TODO
===================================================================
--- redbutton-download/trunk/TODO 2007-01-17 12:32:41 UTC (rev 180)
+++ redbutton-download/trunk/TODO 2007-01-18 22:22:31 UTC (rev 181)
@@ -5,9 +5,6 @@
(start of C4 news)
can't see how avstream can cause an out of memory error
-Sky Teletext - can't find PIDs for tags 1 and 2
-(need to read the component_tag descriptors for *all* service_id's on the MUX)
-
look into new splice() and tee() syscalls in 2.6.17 kernel for avstream
be able to read from a file
Added: redbutton-download/trunk/channels.c
===================================================================
--- redbutton-download/trunk/channels.c (rev 0)
+++ redbutton-download/trunk/channels.c 2007-01-18 22:22:31 UTC (rev 181)
@@ -0,0 +1,296 @@
+/*
+ * channels.c
+ */
+
+/*
+ * Copyright (C) 2007, Simon Kilvington
+ *
+ * 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <unistd.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdint.h>
+#include <stdbool.h>
+#include <errno.h>
+#include <limits.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+#include <linux/dvb/frontend.h>
+
+#include "utils.h"
+
+/* internal functions */
+static struct dvb_frontend_parameters *get_tune_params(uint16_t);
+
+static FILE *_channels = NULL;
+
+/*
+ * if filename is NULL, it searches for:
+ * ~/channels.conf
+ * /etc/channels.conf
+ */
+
+bool
+init_channels_conf(char *filename)
+{
+ char *home;
+ char pathname[PATH_MAX];
+
+ if(_channels != NULL)
+ fatal("init_channels_conf: already initialised");
+
+ if(filename == NULL)
+ {
+ if((home = getenv("HOME")) != NULL)
+ {
+ snprintf(pathname, sizeof(pathname), "%s/channels.conf", home);
+ verbose("Trying to open %s", pathname);
+ _channels = fopen(pathname, "r");
+ }
+ if(_channels == NULL)
+ {
+ verbose("Trying to open /etc/channels.conf");
+ _channels = fopen("/etc/channels.conf", "r");
+ }
+ }
+ else
+ {
+ verbose("Trying to open %s", filename);
+ _channels = fopen(filename, "r");
+ }
+
+ return (_channels != NULL);
+}
+
+/*
+ * map strings to frontend enum values
+ * based on tzap utility in linuxtv dvb-apps package
+ */
+struct param
+{
+ char *name;
+ int value;
+};
+
+static const struct param inversion_list[] =
+{
+ { "INVERSION_OFF", INVERSION_OFF },
+ { "INVERSION_ON", INVERSION_ON },
+ { "INVERSION_AUTO", INVERSION_AUTO }
+};
+
+static const struct param bw_list[] =
+{
+ { "BANDWIDTH_6_MHZ", BANDWIDTH_6_MHZ },
+ { "BANDWIDTH_7_MHZ", BANDWIDTH_7_MHZ },
+ { "BANDWIDTH_8_MHZ", BANDWIDTH_8_MHZ }
+};
+
+static const struct param fec_list[] =
+{
+ { "FEC_1_2", FEC_1_2 },
+ { "FEC_2_3", FEC_2_3 },
+ { "FEC_3_4", FEC_3_4 },
+ { "FEC_4_5", FEC_4_5 },
+ { "FEC_5_6", FEC_5_6 },
+ { "FEC_6_7", FEC_6_7 },
+ { "FEC_7_8", FEC_7_8 },
+ { "FEC_8_9", FEC_8_9 },
+ { "FEC_AUTO", FEC_AUTO },
+ { "FEC_NONE", FEC_NONE }
+};
+
+static const struct param guard_list[] =
+{
+ {"GUARD_INTERVAL_1_16", GUARD_INTERVAL_1_16},
+ {"GUARD_INTERVAL_1_32", GUARD_INTERVAL_1_32},
+ {"GUARD_INTERVAL_1_4", GUARD_INTERVAL_1_4},
+ {"GUARD_INTERVAL_1_8", GUARD_INTERVAL_1_8}
+};
+
+static const struct param hierarchy_list[] =
+{
+ { "HIERARCHY_1", HIERARCHY_1 },
+ { "HIERARCHY_2", HIERARCHY_2 },
+ { "HIERARCHY_4", HIERARCHY_4 },
+ { "HIERARCHY_NONE", HIERARCHY_NONE }
+};
+
+static const struct param constellation_list[] =
+{
+ { "QPSK", QPSK },
+ { "QAM_128", QAM_128 },
+ { "QAM_16", QAM_16 },
+ { "QAM_256", QAM_256 },
+ { "QAM_32", QAM_32 },
+ { "QAM_64", QAM_64 }
+};
+
+static const struct param transmissionmode_list[] =
+{
+ { "TRANSMISSION_MODE_2K", TRANSMISSION_MODE_2K },
+ { "TRANSMISSION_MODE_8K", TRANSMISSION_MODE_8K },
+};
+
+#define LIST_SIZE(x) (sizeof(x) / sizeof(struct param))
+
+static int
+str2enum(char *str, const struct param *map, int map_size)
+{
+ while(map_size >= 0)
+ {
+ map_size --;
+ if(strcmp(str, map[map_size].name) == 0)
+ return map[map_size].value;
+ }
+
+ fatal("Invalid parameter '%s' in channels.conf file", str);
+
+ /* not reached */
+ return -1;
+}
+
+/*
+ * return the params needed to tune to the given service_id
+ * the data is read from the channels.conf file
+ * returns NULL if the service_id is not found
+ */
+
+static struct dvb_frontend_parameters _params;
+
+static struct dvb_frontend_parameters *
+get_tune_params(uint16_t service_id)
+{
+ char line[1024];
+ unsigned int freq;
+ char inv[32];
+ char bw[32];
+ char hp[32];
+ char lp[32];
+ char qam[32];
+ char trans[32];
+ char gi[32];
+ char hier[32];
+ unsigned int id;
+ int len;
+
+ bzero(&_params, sizeof(_params));
+
+ verbose("Searching channels.conf for service_id %u", service_id);
+
+ rewind(_channels);
+ while(!feof(_channels))
+ {
+ if(fgets(line, sizeof(line), _channels) == NULL
+ || sscanf(line, "%*[^:]:%u:%32[^:]:%32[^:]:%32[^:]:%32[^:]:%32[^:]:%32[^:]:%32[^:]:%32[^:]:%*[^:]:%*[^:]:%u", &freq, inv, bw, hp, lp, qam, trans, gi, hier, &id) != 10
+ || id != service_id)
+ continue;
+ /* chop off trailing \n */
+ len = strlen(line) - 1;
+ while(len >= 0 && line[len] == '\n')
+ line[len--] = '\0';
+ verbose("%s", line);
+ _params.frequency = freq;
+ _params.inversion = str2enum(inv, inversion_list, LIST_SIZE(inversion_list));
+ _params.u.ofdm.bandwidth = str2enum(bw, bw_list, LIST_SIZE(bw_list));
+ _params.u.ofdm.code_rate_HP = str2enum(hp, fec_list, LIST_SIZE(fec_list));
+ _params.u.ofdm.code_rate_LP = str2enum(lp, fec_list, LIST_SIZE(fec_list));
+ _params.u.ofdm.constellation = str2enum(qam, constellation_list, LIST_SIZE(constellation_list));
+ _params.u.ofdm.transmission_mode = str2enum(trans, transmissionmode_list, LIST_SIZE(transmissionmode_list));
+ _params.u.ofdm.guard_interval = str2enum(gi, guard_list, LIST_SIZE(guard_list));
+ _params.u.ofdm.hierarchy_information = str2enum(hier, hierarchy_list, LIST_SIZE(hierarchy_list));
+ return &_params;
+ }
+
+ return NULL;
+}
+
+/*
+ * retune to the frequency the given service_id is on
+ */
+
+bool
+tune_service_id(unsigned int adapter, unsigned int timeout, uint16_t service_id)
+{
+ char fe_dev[PATH_MAX];
+ struct dvb_frontend_info fe_info;
+ struct dvb_frontend_parameters current_params;
+ struct dvb_frontend_parameters *needed_params;
+ struct dvb_frontend_event event;
+ bool lock;
+ /* need to keep the frontend device open to stop it untuning itself */
+ /* TODO: fix this hack */
+ static int fe_fd = -1;
+
+ vverbose("Getting frontend info");
+
+ /* see what we are currently tuned to */
+ snprintf(fe_dev, sizeof(fe_dev), FE_DEVICE, adapter);
+ /*
+ * need O_RDWR if you want to tune, O_RDONLY is okay for getting info
+ * if someone else is using the frontend, we can only open O_RDONLY
+ * => we can still download data, but just not retune
+ */
+ if(fe_fd != -1)
+ close(fe_fd);
+ if((fe_fd = open(fe_dev, O_RDONLY | O_NONBLOCK)) < 0)
+ fatal("open '%s': %s", fe_dev, strerror(errno));
+
+ if(ioctl(fe_fd, FE_GET_INFO, &fe_info) < 0)
+ fatal("ioctl FE_GET_INFO: %s", strerror(errno));
+
+ if(fe_info.type != FE_OFDM)
+ fatal("TODO: Only able to tune DVB-T devices at present");
+
+ if(ioctl(fe_fd, FE_GET_FRONTEND, ¤t_params) < 0)
+ fatal("ioctl FE_GET_FRONTEND: %s", strerror(errno));
+
+ /* find the tuning params for the service */
+ if((needed_params = get_tune_params(service_id)) == NULL)
+ fatal("service_id %u not found in channels.conf file", service_id);
+
+ /* are we already tuned to the right frequency */
+ vverbose("Current frequency %u; needed %u", current_params.frequency, needed_params->frequency);
+ if(current_params.frequency != needed_params->frequency)
+ {
+ verbose("Retuning to frequency %u", needed_params->frequency);
+ close(fe_fd);
+ if((fe_fd = open(fe_dev, O_RDWR | O_NONBLOCK)) < 0)
+ fatal("open '%s': %s", fe_dev, strerror(errno));
+ /* empty event queue */
+ while(ioctl(fe_fd, FE_GET_EVENT, &event) >= 0)
+ ; /* do nothing */
+ /* tune in */
+ if(ioctl(fe_fd, FE_SET_FRONTEND, needed_params) < 0)
+ fatal("ioctl FE_GET_FRONTEND: %s", strerror(errno));
+ /* wait for lock */
+ vverbose("Waiting for tuner to lock on");
+ /* TODO: use timeout value here */
+ lock = false;
+ while(!lock)
+ {
+ if(ioctl(fe_fd, FE_GET_EVENT, &event) >= 0)
+ lock = event.status & FE_HAS_LOCK;
+ }
+ vverbose("Retuned");
+ }
+
+ return true;
+}
+
+
Added: redbutton-download/trunk/channels.h
===================================================================
--- redbutton-download/trunk/channels.h (rev 0)
+++ redbutton-download/trunk/channels.h 2007-01-18 22:22:31 UTC (rev 181)
@@ -0,0 +1,34 @@
+/*
+ * channels.h
+ */
+
+/*
+ * Copyright (C) 2007, Simon Kilvington
+ *
+ * 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef __CHANNELS_H__
+#define __CHANNELS_H__
+
+#include <stdint.h>
+#include <stdbool.h>
+
+bool init_channels_conf(char *);
+
+bool tune_service_id(unsigned int, unsigned int, uint16_t);
+
+#endif /* __CHANNELS_H__ */
+
Modified: redbutton-download/trunk/listen.c
===================================================================
--- redbutton-download/trunk/listen.c 2007-01-17 12:32:41 UTC (rev 180)
+++ redbutton-download/trunk/listen.c 2007-01-18 22:22:31 UTC (rev 181)
@@ -19,6 +19,7 @@
#include "command.h"
#include "findmheg.h"
#include "carousel.h"
+#include "channels.h"
#include "utils.h"
/* listen() backlog, 5 is max for BSD apparently */
@@ -276,6 +277,9 @@
{
struct carousel *car;
pid_t child;
+
+ /* retune if needed */
+ tune_service_id(adapter, timeout, service_id);
/* find the MHEG PIDs */
car = find_mheg(adapter, timeout, service_id, carousel_id);
Modified: redbutton-download/trunk/rb-download.c
===================================================================
--- redbutton-download/trunk/rb-download.c 2007-01-17 12:32:41 UTC (rev 180)
+++ redbutton-download/trunk/rb-download.c 2007-01-18 22:22:31 UTC (rev 181)
@@ -1,5 +1,5 @@
/*
- * rb-download [-v] [-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>] [-f <channels_file>] [-l <listen_addr>] [-c <carousel_id>] [<service_id>]
*
* Download the DVB Object Carousel for the given channel onto the local hard disc
* files will be stored under the current dir if no -b option is given
@@ -15,6 +15,12 @@
* /dev/dvb/adapter0/dvr0
* use the -a option to change the adapter number (eg "-a 1" will use /dev/dvb/adapter1/demux0 etc)
*
+ * rb-download needs a "channels.conf" file which gives tuning parameters for service_id's
+ * channels.conf files can be generated by the "scan" utility in the dvb-apps package at www.linuxtv.org
+ * if not specified with -f, rb-download will search for:
+ * ~/channels.conf
+ * /etc/channels.conf
+ *
* rb-download listens on the network for commands from a remote rb-browser
* the default IP to listen on is 0.0.0.0 (ie all interfaces), the default TCP port is 10101
* the -l option changes the default IP and port
@@ -64,6 +70,7 @@
#include "findmheg.h"
#include "carousel.h"
#include "listen.h"
+#include "channels.h"
#include "utils.h"
/* seconds before we assume no DSMCC data is available on this PID */
@@ -82,7 +89,9 @@
{
char *prog_name = argv[0];
unsigned int adapter;
+ char *base_dir;
unsigned int timeout;
+ char *channels_file;
struct sockaddr_in listen_addr;
int carousel_id;
uint16_t service_id;
@@ -90,12 +99,14 @@
/* default values */
adapter = 0;
+ base_dir = NULL;
timeout = DEFAULT_TIMEOUT;
+ channels_file = NULL;
listen_addr.sin_addr.s_addr = htonl(DEFAULT_LISTEN_ADDR);
listen_addr.sin_port = htons(DEFAULT_LISTEN_PORT);
carousel_id = -1; /* read it from the PMT */
- while((arg = getopt(argc, argv, "a:b:t:l:c:v")) != EOF)
+ while((arg = getopt(argc, argv, "a:b:f:t:l:c:v")) != EOF)
{
switch(arg)
{
@@ -104,10 +115,14 @@
break;
case 'b':
- if(chdir(optarg) < 0)
- fatal("Unable to cd to '%s': %s", optarg, strerror(errno));
+ /* don't chdir yet, in case we have a relative -f param */
+ base_dir = optarg;
break;
+ case 'f':
+ channels_file = optarg;
+ break;
+
case 't':
timeout = strtoul(optarg, NULL, 0);
break;
@@ -131,6 +146,15 @@
}
}
+ /* initialise channels.conf */
+ if(!init_channels_conf(channels_file))
+ fatal("Unable to parse channels.conf file");
+
+ /* do we need to change the base directory */
+ if(base_dir != NULL
+ && chdir(base_dir) < 0)
+ fatal("Unable to cd to '%s': %s", base_dir, strerror(errno));
+
if(argc == optind)
{
list_channels(adapter, timeout);
@@ -196,6 +220,7 @@
"[-a <adapter>] "
"[-b <base_dir>] "
"[-t <timeout>] "
+ "[-f <channels_file>] "
"[-l <listen_addr>] "
"[-c carousel_id] "
"[<service_id>]", prog_name);
Modified: redbutton-download/trunk/utils.h
===================================================================
--- redbutton-download/trunk/utils.h 2007-01-17 12:32:41 UTC (rev 180)
+++ redbutton-download/trunk/utils.h 2007-01-18 22:22:31 UTC (rev 181)
@@ -45,6 +45,13 @@
#define DVR_DEVICE "/dev/dvb/adapter%u/dvr0"
#endif
+/* DVB frontend device - %u is card number */
+#if defined(HAVE_DREAMBOX_HARDWARE)
+#define FE_DEVICE "/dev/dvb/card%u/frontend0"
+#else
+#define FE_DEVICE "/dev/dvb/adapter%u/frontend0"
+#endif
+
char *skip_ws(char *);
char hex_digit(uint8_t);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ski...@us...> - 2007-01-17 12:32:45
|
Revision: 180
http://svn.sourceforge.net/redbutton/?rev=180&view=rev
Author: skilvington
Date: 2007-01-17 04:32:41 -0800 (Wed, 17 Jan 2007)
Log Message:
-----------
how to fix a TODO item
Modified Paths:
--------------
redbutton-download/trunk/TODO
Modified: redbutton-download/trunk/TODO
===================================================================
--- redbutton-download/trunk/TODO 2007-01-15 15:25:10 UTC (rev 179)
+++ redbutton-download/trunk/TODO 2007-01-17 12:32:41 UTC (rev 180)
@@ -6,6 +6,7 @@
can't see how avstream can cause an out of memory error
Sky Teletext - can't find PIDs for tags 1 and 2
+(need to read the component_tag descriptors for *all* service_id's on the MUX)
look into new splice() and tee() syscalls in 2.6.17 kernel for avstream
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ski...@us...> - 2007-01-15 15:25:21
|
Revision: 179
http://svn.sourceforge.net/redbutton/?rev=179&view=rev
Author: skilvington
Date: 2007-01-15 07:25:10 -0800 (Mon, 15 Jan 2007)
Log Message:
-----------
add missing \n to stop remote backend retune hanging
Modified Paths:
--------------
redbutton-browser/trunk/MHEGBackend.c
Modified: redbutton-browser/trunk/MHEGBackend.c
===================================================================
--- redbutton-browser/trunk/MHEGBackend.c 2007-01-12 21:35:14 UTC (rev 178)
+++ redbutton-browser/trunk/MHEGBackend.c 2007-01-15 15:25:10 UTC (rev 179)
@@ -599,10 +599,10 @@
char cmd[128];
FILE *sock;
- snprintf(cmd, sizeof(cmd), "retune %u", si_get_service_id(service));
+ snprintf(cmd, sizeof(cmd), "retune %u\n", si_get_service_id(service));
/* TODO */
-fatal("TODO: Retune remote backend to '%.*s' (service_id %u)", service->size, service->data, si_get_service_id(service));
+printf("TODO: Retune remote backend to '%.*s' (service_id %u). This will fail if the new service is on a different frequency.", service->size, service->data, si_get_service_id(service));
if((sock = remote_command(t, true, cmd)) == NULL
|| remote_response(sock) != BACKEND_RESPONSE_OK)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ski...@us...> - 2007-01-12 21:35:21
|
Revision: 178
http://svn.sourceforge.net/redbutton/?rev=178&view=rev
Author: skilvington
Date: 2007-01-12 13:35:14 -0800 (Fri, 12 Jan 2007)
Log Message:
-----------
how the frontend would tell a remote backend to retune
Modified Paths:
--------------
redbutton-browser/trunk/MHEGBackend.c
Modified: redbutton-browser/trunk/MHEGBackend.c
===================================================================
--- redbutton-browser/trunk/MHEGBackend.c 2007-01-12 17:23:33 UTC (rev 177)
+++ redbutton-browser/trunk/MHEGBackend.c 2007-01-12 21:35:14 UTC (rev 178)
@@ -596,9 +596,27 @@
void
remote_retune(MHEGBackend *t, OctetString *service)
{
+ char cmd[128];
+ FILE *sock;
+
+ snprintf(cmd, sizeof(cmd), "retune %u", si_get_service_id(service));
+
/* TODO */
fatal("TODO: Retune remote backend to '%.*s' (service_id %u)", service->size, service->data, si_get_service_id(service));
+ if((sock = remote_command(t, true, cmd)) == NULL
+ || remote_response(sock) != BACKEND_RESPONSE_OK)
+ {
+ error("Unable to retune to '%.*s' (service_id %u)", service->size, service->data, si_get_service_id(service));
+ }
+
+ /* a "retune" command closes the connection to the backend, so close our end */
+ if(t->be_sock != NULL)
+ {
+ fclose(t->be_sock);
+ t->be_sock = NULL;
+ }
+
return;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ski...@us...> - 2007-01-12 17:23:41
|
Revision: 177
http://svn.sourceforge.net/redbutton/?rev=177&view=rev
Author: skilvington
Date: 2007-01-12 09:23:33 -0800 (Fri, 12 Jan 2007)
Log Message:
-----------
whitespace
Modified Paths:
--------------
redbutton-download/trunk/command.c
Modified: redbutton-download/trunk/command.c
===================================================================
--- redbutton-download/trunk/command.c 2007-01-12 14:59:27 UTC (rev 176)
+++ redbutton-download/trunk/command.c 2007-01-12 17:23:33 UTC (rev 177)
@@ -519,7 +519,6 @@
unsigned int service_id;
union sigval value;
-
CHECK_USAGE(2, "retune <ServiceID>");
service_id = strtoul(argv[1], NULL, 0);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ski...@us...> - 2007-01-12 14:59:31
|
Revision: 176
http://svn.sourceforge.net/redbutton/?rev=176&view=rev
Author: skilvington
Date: 2007-01-12 06:59:27 -0800 (Fri, 12 Jan 2007)
Log Message:
-----------
allow remote backends to retune (only to services on the current frequency)
Modified Paths:
--------------
redbutton-download/trunk/TODO
redbutton-download/trunk/command.c
redbutton-download/trunk/listen.c
redbutton-download/trunk/module.h
redbutton-download/trunk/table.c
Modified: redbutton-download/trunk/TODO
===================================================================
--- redbutton-download/trunk/TODO 2007-01-11 17:59:20 UTC (rev 175)
+++ redbutton-download/trunk/TODO 2007-01-12 14:59:27 UTC (rev 176)
@@ -1,3 +1,6 @@
+need to kill all existing command connections on retune
+(listen_data->carousel is stale for them)
+
got an "Out of memory" error when doing avstream and video changed size
(start of C4 news)
can't see how avstream can cause an out of memory error
Modified: redbutton-download/trunk/command.c
===================================================================
--- redbutton-download/trunk/command.c 2007-01-11 17:59:20 UTC (rev 175)
+++ redbutton-download/trunk/command.c 2007-01-12 14:59:27 UTC (rev 176)
@@ -8,6 +8,7 @@
#include <stdbool.h>
#include <stdint.h>
#include <fcntl.h>
+#include <signal.h>
#include "command.h"
#include "assoc.h"
@@ -26,6 +27,7 @@
bool cmd_file(struct listen_data *, FILE *, int, char **);
bool cmd_help(struct listen_data *, FILE *, int, char **);
bool cmd_quit(struct listen_data *, FILE *, int, char **);
+bool cmd_retune(struct listen_data *, FILE *, int, char **);
bool cmd_vstream(struct listen_data *, FILE *, int, char **);
static struct
@@ -44,6 +46,7 @@
{ "file", "<ContentReference>", cmd_file, "Retrieve the given file from the carousel" },
{ "help", "", cmd_help, "List available commands" },
{ "quit", "", cmd_quit, "Close the connection" },
+ { "retune", "<ServiceID>", cmd_retune, "Start downloading the carousel from ServiceID" },
{ "vstream", "<ComponentTag>", cmd_vstream, "Stream the given video component tag" },
{ NULL, NULL, NULL, NULL }
};
@@ -504,6 +507,38 @@
}
/*
+ * retune <ServiceID>
+ * stop downloading the current carousel
+ * start downloading the carousel on the given ServiceID
+ */
+
+bool
+cmd_retune(struct listen_data *listen_data, FILE *client, int argc, char *argv[])
+{
+ struct carousel *car = listen_data->carousel;
+ unsigned int service_id;
+ union sigval value;
+
+
+ CHECK_USAGE(2, "retune <ServiceID>");
+
+ service_id = strtoul(argv[1], NULL, 0);
+
+ /* do we need to retune */
+ if(service_id != car->service_id)
+ {
+ /* send a SIGHUP to the main listener process */
+ value.sival_int = service_id;
+ sigqueue(getppid(), SIGHUP, value);
+ }
+
+ SEND_RESPONSE(200, "OK");
+
+ /* need to close the connection as this process now has stale listen_data->carousel */
+ return true;
+}
+
+/*
* help
*/
Modified: redbutton-download/trunk/listen.c
===================================================================
--- redbutton-download/trunk/listen.c 2007-01-11 17:59:20 UTC (rev 175)
+++ redbutton-download/trunk/listen.c 2007-01-12 14:59:27 UTC (rev 176)
@@ -28,9 +28,21 @@
static int get_host_addr(char *, struct in_addr *);
static void handle_connection(struct listen_data *, int, struct sockaddr_in *);
+
static void dead_child(int);
+static void hup_handler(int, siginfo_t *, void *);
/*
+ * we have a main process that listens for commands on the network
+ * each time a new command is received a new process is forked to handle it
+ * the main process also has a child downloading the carousel
+ * to retune, the command processing process sends a SIGHUP to the main process
+ * the siginfo contains the new service_id
+ * this variable is set by the SIGHUP handler from the siginfo, -1 => no retune needed
+ */
+static volatile int retune_id = -1;
+
+/*
* extract the IP addr and port number from a string in one of these forms:
* host:port
* ip-addr:port
@@ -131,6 +143,13 @@
/* fork off a child to download the carousel */
listen_data.carousel = start_downloader(adapter, timeout, service_id, carousel_id);
+ /* catch SIGHUP - tells us to retune */
+ action.sa_sigaction = hup_handler;
+ sigemptyset(&action.sa_mask);
+ action.sa_flags = SA_SIGINFO;
+ if(sigaction(SIGHUP, &action, NULL) < 0)
+ fatal("signal: SIGHUP: %s", strerror(errno));
+
/* listen on the given ip:port */
verbose("Listening on %s:%u", inet_ntoa(listen_addr->sin_addr), ntohs(listen_addr->sin_port));
@@ -151,11 +170,21 @@
/* listen for connections */
while(true)
{
+ /* do we need to retune */
+ if(retune_id != -1)
+ {
+ verbose("Retune to service_id %d", retune_id);
+ /* kill the current downloader process and start a new one */
+ kill(listen_data.carousel->downloader, SIGKILL);
+ listen_data.carousel = start_downloader(adapter, timeout, retune_id, -1);
+ retune_id = -1;
+ }
+ /* listen for a connection */
FD_ZERO(&read_fds);
FD_SET(listen_sock, &read_fds);
if(select(listen_sock + 1, &read_fds, NULL, NULL, NULL) < 0)
{
- /* could have been interupted by SIGCHLD */
+ /* could have been interupted by SIGCHLD or SIGHUP */
if(errno != EINTR)
error("select: %s", strerror(errno));
continue;
@@ -270,6 +299,9 @@
load_carousel(car);
/* parent continues */
+ /* remember the PID of the downloader process so we can kill it on retune */
+ car->downloader = child;
+
return car;
}
@@ -281,3 +313,13 @@
return;
}
+
+static void
+hup_handler(int signo, siginfo_t *info, void *ctx)
+{
+ if(signo == SIGHUP)
+ retune_id = info->si_value.sival_int;
+
+ return;
+}
+
Modified: redbutton-download/trunk/module.h
===================================================================
--- redbutton-download/trunk/module.h 2007-01-11 17:59:20 UTC (rev 175)
+++ redbutton-download/trunk/module.h 2007-01-12 14:59:27 UTC (rev 176)
@@ -26,6 +26,7 @@
#include <stdint.h>
#include <stdbool.h>
#include <limits.h>
+#include <sys/types.h>
#include "dsmcc.h"
#include "assoc.h"
@@ -58,6 +59,7 @@
char demux_device[PATH_MAX]; /* demux device path */
char dvr_device[PATH_MAX]; /* dvr device path */
unsigned int timeout; /* timeout for the DVB devices */
+ pid_t downloader; /* ID of the process downloading the carousel */
uint16_t service_id;
uint32_t carousel_id;
uint16_t boot_pid; /* PID containing DSI */
Modified: redbutton-download/trunk/table.c
===================================================================
--- redbutton-download/trunk/table.c 2007-01-11 17:59:20 UTC (rev 175)
+++ redbutton-download/trunk/table.c 2007-01-12 14:59:27 UTC (rev 176)
@@ -84,12 +84,14 @@
timeout.tv_usec = 0;
do
{
- _buf[0] = 0;
+ _buf[0] = 0xff; /* we never want table ID 0xff */
FD_ZERO(&readfds);
FD_SET(fd_data, &readfds);
if(select(fd_data + 1, &readfds, NULL, NULL, &timeout) < 0)
{
- error("select: %s", strerror(errno));
+ if(errno == EINTR)
+ continue;
+ error("read_table: select: %s", strerror(errno));
close(fd_data);
return NULL;
}
@@ -147,7 +149,7 @@
/* wait for some data to be ready */
if(select(max + 1, &readfds, NULL, NULL, &timeout) < 0)
{
- error("select: %s", strerror(errno));
+ error("read_dsmcc_tables: select: %s", strerror(errno));
return NULL;
}
/* see which fd is ready */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ski...@us...> - 2007-01-11 17:59:21
|
Revision: 175
http://svn.sourceforge.net/redbutton/?rev=175&view=rev
Author: skilvington
Date: 2007-01-11 09:59:20 -0800 (Thu, 11 Jan 2007)
Log Message:
-----------
remove -l flag from rb-download examples
Modified Paths:
--------------
www/index.html
Modified: www/index.html
===================================================================
--- www/index.html 2007-01-11 17:02:20 UTC (rev 174)
+++ www/index.html 2007-01-11 17:59:20 UTC (rev 175)
@@ -91,12 +91,12 @@
Display the MHEG apps downloaded with rb-download.
<P>
The -r option means use a remote backend (rb-download running on another host).
-If -r is specified, then <service_gateway> should be the host[:port] that "rb-download -l" is running on.
+If -r is specified, then <service_gateway> should be the host[:port] that rb-download is running on.
If -r is not specified, rb-download is running on the same machine
and <service_gateway> should be an entry in the services directory.
Eg, on a single host, do this:
<PRE>
-rb-download -l 4165 &
+rb-download 4165 &
rb-browser services/4165
</PRE>
or, you could run rb-browser like this:
@@ -105,7 +105,7 @@
</PRE>
To run the frontend on a different host, do this on the backend:
<PRE>
-rb-download -l 4165 &
+rb-download 4165 &
</PRE>
and run this on the frontend:
<PRE>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|