redbutton-devel Mailing List for RedButton MHEG Engine
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: ashwin f. <ash...@ho...> - 2012-05-10 09:49:15
|
.5 keys for work at home successfully http://captain.bololo.free.fr/yahoo.news.php?rus=55ze4 |
From: <ski...@us...> - 2011-11-30 16:04:54
|
Revision: 551 http://redbutton.svn.sourceforge.net/redbutton/?rev=551&view=rev Author: skilvington Date: 2011-11-30 16:04:47 +0000 (Wed, 30 Nov 2011) Log Message: ----------- Ubuntu --as-needed linker fix. (This patch and the previous were from Andrew Benham) Modified Paths: -------------- redbutton-download/trunk/Makefile Modified: redbutton-download/trunk/Makefile =================================================================== --- redbutton-download/trunk/Makefile 2011-11-30 16:02:19 UTC (rev 550) +++ redbutton-download/trunk/Makefile 2011-11-30 16:04:47 UTC (rev 551) @@ -21,7 +21,7 @@ utils.o CPPFLAGS+=-MD -LDFLAGS+=-lz +LDLIBS=-lz TARDIR=${basename ${PWD}} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ski...@us...> - 2011-11-30 16:02:30
|
Revision: 550 http://redbutton.svn.sourceforge.net/redbutton/?rev=550&view=rev Author: skilvington Date: 2011-11-30 16:02:19 +0000 (Wed, 30 Nov 2011) Log Message: ----------- prevent 'address family not supported' errors with IPv6 enabled kernels Modified Paths: -------------- redbutton-download/trunk/rb-download.c Modified: redbutton-download/trunk/rb-download.c =================================================================== --- redbutton-download/trunk/rb-download.c 2011-09-14 17:52:07 UTC (rev 549) +++ redbutton-download/trunk/rb-download.c 2011-11-30 16:02:19 UTC (rev 550) @@ -112,6 +112,7 @@ channels_file = NULL; listen_addr.sin_addr.s_addr = htonl(DEFAULT_LISTEN_ADDR); listen_addr.sin_port = htons(DEFAULT_LISTEN_PORT); + listen_addr.sin_family = AF_INET; carousel_id = -1; /* read it from the PMT */ while((arg = getopt(argc, argv, "a:x:y:z:b:f:t:l:c:v")) != EOF) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Simon K. <s.k...@er...> - 2011-09-15 08:20:30
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I committed a change last night that should fix this - though I did notice that gcc complained that another ffmpeg function we are using is now marked as deprecated, so we may get the same problem when that function is finally removed too... On 08/09/11 13:00, Simon Kilvington wrote: > looks like ffmpeg have changed their API again - you could try > downloading an older version of ffmpeg and compile against that - you > may need to make some minor changes to the rb-browser Makefile to make > sure it finds your downloaded ffmpeg rather than the system one > > I'll have a look at the new API and see how much pain it is going to be > to convert rb-browser to use it - I may end up packaging a known version > of ffmpeg with rb-browser as this is not the first time this type of > thing has happened with ffmpeg... > > On 07/09/11 20:56, Andrew Benton wrote: >> Hello, >> when I try to compile redbutton-browser The build fails like so: > >> gcc -MD -Wall -O2 -D_REENTRANT -D_GNU_SOURCE `freetype-config --cflags` -o rb-browser rb-browser.o MHEGEngine.o MHEGDisplay.o MHEGCanvas.o MHEGBackend.o MHEGApp.o MHEGColour.o MHEGFont.o MHEGTimer.o MHEGStreamPlayer.o MHEGVideoOutput.o videoout_null.o videoout_xshm.o MHEGAudioOutput.o ActionClass.o ApplicationClass.o AudioClass.o BitmapClass.o BooleanVariableClass.o ContentBody.o ContentRefVariableClass.o CursorShapeClass.o DynamicLineArtClass.o ElementaryAction.o EntryFieldClass.o EventType.o ExternalReference.o FontClass.o GenericBoolean.o GenericContentReference.o GenericInteger.o GenericObjectReference.o GenericOctetString.o GroupClass.o GroupItem.o HotspotClass.o HyperTextClass.o IntegerVariableClass.o InterchangedProgramClass.o LineArtClass.o LinkClass.o ListGroupClass.o NewContent.o ObjectReference.o ObjectRefVariableClass.o OctetStringVariableClass.o PaletteClass.o Parameter.o PushButtonClass.o RectangleClass.o RemoteProgramClass.o ResidentProgramClass.o RootClass. o > R >> TGraphicsClass.o SceneClass.o SliderClass.o StreamClass.o StreamComponent.o SwitchButtonClass.o TextClass.o TokenGroupClass.o VariableClass.o VideoClass.o VisibleClass.o ISO13522-MHEG-5.o der_decode.o clone.o si.o readpng.o mpegts.o utils.o -lm -lz -L/usr/X11R6/lib -lX11 -lXext -lXt -lXrender -lXft -lpng -lavformat -lavcodec -lavutil -lasound -lpthread -lswscale >> MHEGDisplay.o: In function `MHEGDisplay_newMPEGBitmap': >> MHEGDisplay.c:(.text+0x1994): undefined reference to `avcodec_decode_video' >> MHEGDisplay.c:(.text+0x1ae4): undefined reference to `avcodec_decode_video' >> MHEGStreamPlayer.o: In function `decode_thread': >> MHEGStreamPlayer.c:(.text+0xf4c): undefined reference to `avcodec_decode_video' >> MHEGStreamPlayer.c:(.text+0x103c): undefined reference to `avcodec_decode_audio2' >> collect2: ld returned 1 exit status >> make: *** [rb-browser] Error 1 > >> Google tels me that these avcodec_decode_video and >> avcodec_decode_audio2 used to be part of ffmpeg > >> Andy > >> ------------------------------------------------------------------------------ >> Using storage to extend the benefits of virtualization and iSCSI >> Virtualization increases hardware utilization and delivers a new level of >> agility. Learn what those decisions are and how to modernize your storage >> and backup environments for virtualization. >> http://www.accelacomm.com/jaw/sfnl/114/51434361/ >> _______________________________________________ >> Redbutton-devel mailing list >> Red...@li... >> https://lists.sourceforge.net/lists/listinfo/redbutton-devel > > - ------------------------------------------------------------------------------ Doing More with Less: The Next Generation Virtual Desktop What are the key obstacles that have prevented many mid-market businesses from deploying virtual desktops? How do next-generation virtual desktops provide companies an easier-to-deploy, easier-to-manage and more affordable virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/ _______________________________________________ Redbutton-devel mailing list Red...@li... https://lists.sourceforge.net/lists/listinfo/redbutton-devel - -- Simon Kilvington -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk5xtUIACgkQmt9ZifioJSyJ2QCdGNoXRgPlIvjU52RfR2kzOSD1 hkcAniD/cwDrOiiUqIfggHvsnmp5IHVo =nC4z -----END PGP SIGNATURE----- |
From: <ski...@us...> - 2011-09-14 17:52:13
|
Revision: 549 http://redbutton.svn.sourceforge.net/redbutton/?rev=549&view=rev Author: skilvington Date: 2011-09-14 17:52:07 +0000 (Wed, 14 Sep 2011) Log Message: ----------- make our own copies of some deprecated ffmpeg functions Modified Paths: -------------- redbutton-browser/trunk/MHEGDisplay.c redbutton-browser/trunk/MHEGStreamPlayer.c redbutton-browser/trunk/utils.c redbutton-browser/trunk/utils.h Modified: redbutton-browser/trunk/MHEGDisplay.c =================================================================== --- redbutton-browser/trunk/MHEGDisplay.c 2011-06-02 08:19:51 UTC (rev 548) +++ redbutton-browser/trunk/MHEGDisplay.c 2011-09-14 17:52:07 UTC (rev 549) @@ -895,14 +895,14 @@ size = mpeg->size; do { - used = avcodec_decode_video(codec_ctx, yuv_frame, &got_picture, data, size); + used = my_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); + (void) my_avcodec_decode_video(codec_ctx, yuv_frame, &got_picture, data, size); if(!got_picture) { Modified: redbutton-browser/trunk/MHEGStreamPlayer.c =================================================================== --- redbutton-browser/trunk/MHEGStreamPlayer.c 2011-06-02 08:19:51 UTC (rev 548) +++ redbutton-browser/trunk/MHEGStreamPlayer.c 2011-09-14 17:52:07 UTC (rev 549) @@ -512,7 +512,7 @@ { audio_frame = new_AudioFrameListItem(); af = &audio_frame->item; - used = avcodec_decode_audio2(audio_codec_ctx, (int16_t *) af->data, (int *) &af->size, data, size); + used = my_avcodec_decode_audio2(audio_codec_ctx, (int16_t *) af->data, (int *) &af->size, data, size); data += used; size -= used; if(used > 0 && af->size > 0) @@ -541,7 +541,7 @@ } else if(p->have_video && pkt.stream_index == p->video_pid && pkt.dts != AV_NOPTS_VALUE) { - (void) avcodec_decode_video(video_codec_ctx, frame, &got_picture, pkt.data, pkt.size); + (void) my_avcodec_decode_video(video_codec_ctx, frame, &got_picture, pkt.data, pkt.size); if(got_picture) { pts = pkt.dts / video_time_base; Modified: redbutton-browser/trunk/utils.c =================================================================== --- redbutton-browser/trunk/utils.c 2011-06-02 08:19:51 UTC (rev 548) +++ redbutton-browser/trunk/utils.c 2011-09-14 17:52:07 UTC (rev 549) @@ -69,6 +69,32 @@ return fmt; } +/* deprecated FFMPEG functions that have now been removed */ +int +my_avcodec_decode_audio2(AVCodecContext *avctx, int16_t *samples, int *frame_size_ptr, const uint8_t *buf, int buf_size) +{ + AVPacket avpkt; + av_init_packet(&avpkt); + avpkt.data = (uint8_t *) buf; + avpkt.size = buf_size; + + return avcodec_decode_audio3(avctx, samples, frame_size_ptr, &avpkt); +} + +int +my_avcodec_decode_video(AVCodecContext *avctx, AVFrame *picture, int *got_picture_ptr, const uint8_t *buf, int buf_size) +{ + AVPacket avpkt; + av_init_packet(&avpkt); + avpkt.data = (uint8_t *) buf; + avpkt.size = buf_size; + // HACK for CorePNG to decode as normal PNG by default + avpkt.flags = AV_PKT_FLAG_KEY; + + return avcodec_decode_video2(avctx, picture, got_picture_ptr, &avpkt); +} + + /* * returns 15 for 'f' etc */ Modified: redbutton-browser/trunk/utils.h =================================================================== --- redbutton-browser/trunk/utils.h 2011-06-02 08:19:51 UTC (rev 548) +++ redbutton-browser/trunk/utils.h 2011-09-14 17:52:07 UTC (rev 549) @@ -41,6 +41,10 @@ enum PixelFormat find_av_pix_fmt(int, unsigned long, unsigned long, unsigned long); +/* deprecated FFMPEG functions that have now been removed */ +int my_avcodec_decode_audio2(AVCodecContext *, int16_t *, int *, const uint8_t *, int); +int my_avcodec_decode_video(AVCodecContext *, AVFrame *, int *, const uint8_t *, int); + unsigned int char2hex(unsigned char); int next_utf8(unsigned char *, int, int *); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Simon K. <s.k...@er...> - 2011-09-08 12:18:10
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 looks like ffmpeg have changed their API again - you could try downloading an older version of ffmpeg and compile against that - you may need to make some minor changes to the rb-browser Makefile to make sure it finds your downloaded ffmpeg rather than the system one I'll have a look at the new API and see how much pain it is going to be to convert rb-browser to use it - I may end up packaging a known version of ffmpeg with rb-browser as this is not the first time this type of thing has happened with ffmpeg... On 07/09/11 20:56, Andrew Benton wrote: > Hello, > when I try to compile redbutton-browser The build fails like so: > > gcc -MD -Wall -O2 -D_REENTRANT -D_GNU_SOURCE `freetype-config --cflags` -o rb-browser rb-browser.o MHEGEngine.o MHEGDisplay.o MHEGCanvas.o MHEGBackend.o MHEGApp.o MHEGColour.o MHEGFont.o MHEGTimer.o MHEGStreamPlayer.o MHEGVideoOutput.o videoout_null.o videoout_xshm.o MHEGAudioOutput.o ActionClass.o ApplicationClass.o AudioClass.o BitmapClass.o BooleanVariableClass.o ContentBody.o ContentRefVariableClass.o CursorShapeClass.o DynamicLineArtClass.o ElementaryAction.o EntryFieldClass.o EventType.o ExternalReference.o FontClass.o GenericBoolean.o GenericContentReference.o GenericInteger.o GenericObjectReference.o GenericOctetString.o GroupClass.o GroupItem.o HotspotClass.o HyperTextClass.o IntegerVariableClass.o InterchangedProgramClass.o LineArtClass.o LinkClass.o ListGroupClass.o NewContent.o ObjectReference.o ObjectRefVariableClass.o OctetStringVariableClass.o PaletteClass.o Parameter.o PushButtonClass.o RectangleClass.o RemoteProgramClass.o ResidentProgramClass.o RootClass.o R > TGraphicsClass.o SceneClass.o SliderClass.o StreamClass.o StreamComponent.o SwitchButtonClass.o TextClass.o TokenGroupClass.o VariableClass.o VideoClass.o VisibleClass.o ISO13522-MHEG-5.o der_decode.o clone.o si.o readpng.o mpegts.o utils.o -lm -lz -L/usr/X11R6/lib -lX11 -lXext -lXt -lXrender -lXft -lpng -lavformat -lavcodec -lavutil -lasound -lpthread -lswscale > MHEGDisplay.o: In function `MHEGDisplay_newMPEGBitmap': > MHEGDisplay.c:(.text+0x1994): undefined reference to `avcodec_decode_video' > MHEGDisplay.c:(.text+0x1ae4): undefined reference to `avcodec_decode_video' > MHEGStreamPlayer.o: In function `decode_thread': > MHEGStreamPlayer.c:(.text+0xf4c): undefined reference to `avcodec_decode_video' > MHEGStreamPlayer.c:(.text+0x103c): undefined reference to `avcodec_decode_audio2' > collect2: ld returned 1 exit status > make: *** [rb-browser] Error 1 > > Google tels me that these avcodec_decode_video and > avcodec_decode_audio2 used to be part of ffmpeg > > Andy > > ------------------------------------------------------------------------------ > Using storage to extend the benefits of virtualization and iSCSI > Virtualization increases hardware utilization and delivers a new level of > agility. Learn what those decisions are and how to modernize your storage > and backup environments for virtualization. > http://www.accelacomm.com/jaw/sfnl/114/51434361/ > _______________________________________________ > Redbutton-devel mailing list > Red...@li... > https://lists.sourceforge.net/lists/listinfo/redbutton-devel - -- Simon Kilvington -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk5ormcACgkQmt9ZifioJSwESgCfaI3Nk6soLjj0/fv/N+dlCw+8 XcwAn0rz/8m3Lt8BqXZ1NWmbEP67CRph =VDba -----END PGP SIGNATURE----- |
From: Andrew B. <b3...@gm...> - 2011-09-07 19:56:57
|
Hello, when I try to compile redbutton-browser The build fails like so: gcc -MD -Wall -O2 -D_REENTRANT -D_GNU_SOURCE `freetype-config --cflags` -o rb-browser rb-browser.o MHEGEngine.o MHEGDisplay.o MHEGCanvas.o MHEGBackend.o MHEGApp.o MHEGColour.o MHEGFont.o MHEGTimer.o MHEGStreamPlayer.o MHEGVideoOutput.o videoout_null.o videoout_xshm.o MHEGAudioOutput.o ActionClass.o ApplicationClass.o AudioClass.o BitmapClass.o BooleanVariableClass.o ContentBody.o ContentRefVariableClass.o CursorShapeClass.o DynamicLineArtClass.o ElementaryAction.o EntryFieldClass.o EventType.o ExternalReference.o FontClass.o GenericBoolean.o GenericContentReference.o GenericInteger.o GenericObjectReference.o GenericOctetString.o GroupClass.o GroupItem.o HotspotClass.o HyperTextClass.o IntegerVariableClass.o InterchangedProgramClass.o LineArtClass.o LinkClass.o ListGroupClass.o NewContent.o ObjectReference.o ObjectRefVariableClass.o OctetStringVariableClass.o PaletteClass.o Parameter.o PushButtonClass.o RectangleClass.o RemoteProgramClass.o ResidentProgramClass.o RootClass.o RTGraphicsClass.o SceneClass.o SliderClass.o StreamClass.o StreamComponent.o SwitchButtonClass.o TextClass.o TokenGroupClass.o VariableClass.o VideoClass.o VisibleClass.o ISO13522-MHEG-5.o der_decode.o clone.o si.o readpng.o mpegts.o utils.o -lm -lz -L/usr/X11R6/lib -lX11 -lXext -lXt -lXrender -lXft -lpng -lavformat -lavcodec -lavutil -lasound -lpthread -lswscale MHEGDisplay.o: In function `MHEGDisplay_newMPEGBitmap': MHEGDisplay.c:(.text+0x1994): undefined reference to `avcodec_decode_video' MHEGDisplay.c:(.text+0x1ae4): undefined reference to `avcodec_decode_video' MHEGStreamPlayer.o: In function `decode_thread': MHEGStreamPlayer.c:(.text+0xf4c): undefined reference to `avcodec_decode_video' MHEGStreamPlayer.c:(.text+0x103c): undefined reference to `avcodec_decode_audio2' collect2: ld returned 1 exit status make: *** [rb-browser] Error 1 Google tels me that these avcodec_decode_video and avcodec_decode_audio2 used to be part of ffmpeg Andy |
From: <ski...@us...> - 2011-06-02 08:19:57
|
Revision: 548 http://redbutton.svn.sourceforge.net/redbutton/?rev=548&view=rev Author: skilvington Date: 2011-06-02 08:19:51 +0000 (Thu, 02 Jun 2011) Log Message: ----------- spec says we should not activate unknown programs - doesn't fix Freesat ITV sadly Modified Paths: -------------- redbutton-browser/trunk/ResidentProgramClass.c redbutton-browser/trunk/ResidentProgramClass.h Modified: redbutton-browser/trunk/ResidentProgramClass.c =================================================================== --- redbutton-browser/trunk/ResidentProgramClass.c 2011-06-02 07:53:55 UTC (rev 547) +++ redbutton-browser/trunk/ResidentProgramClass.c 2011-06-02 08:19:51 UTC (rev 548) @@ -24,6 +24,7 @@ #include "si.h" /* internal functions */ +bool unknown_program(ResidentProgramClass *); bool run_program(ResidentProgramClass *, LIST_OF(Parameter) *, OctetString *, bool); bool check_parameters(LIST_OF(Parameter) *, unsigned int, ...); Parameter *get_parameter(LIST_OF(Parameter) *, unsigned int); @@ -67,14 +68,18 @@ return; } -void +bool ResidentProgramClass_Activation(ResidentProgramClass *t) { verbose("ResidentProgramClass: %s; Activation", ExternalReference_name(&t->rootClass.inst.ref)); + /* MHEG spec says if the program is unknown, then disregard this action */ + if(unknown_program(t)) + return false; + /* has it already been activated */ if(!RootClass_Activation(&t->rootClass)) - return; + return true; /* set RunningStatus */ t->rootClass.inst.RunningStatus = true; @@ -82,7 +87,7 @@ /* generate IsRunning event */ MHEGEngine_generateEvent(&t->rootClass.inst.ref, EventType_is_running, NULL); - return; + return true; } void @@ -159,8 +164,11 @@ verbose("ResidentProgramClass: %s; Call '%.*s'", ExternalReference_name(&p->rootClass.inst.ref), p->name.size, p->name.data); + /* Activation will fail for unknown programs */ + if(!ResidentProgramClass_Activation(p)) + return; + /* run it and wait for it to complete */ - ResidentProgramClass_Activation(p); rc = run_program(p, params->parameters, caller_gid, false); /* store the return value */ @@ -199,11 +207,14 @@ verbose("ResidentProgramClass: %s; Fork '%.*s'", ExternalReference_name(&p->rootClass.inst.ref), p->name.size, p->name.data); + /* Activation will fail for unknown programs */ + if(!ResidentProgramClass_Activation(p)) + return; + /* run it in the background */ /******************************************************************************************/ /* TODO */ printf("TODO: ResidentProgramClass_Fork not yet implemented - running in foreground\n"); - ResidentProgramClass_Activation(p); rc = run_program(p, params->parameters, caller_gid, true); /* return immediately */ /******************************************************************************************/ @@ -234,11 +245,7 @@ } /* - * run the given program (identified by the name field in the ResidentProgramClass) - * returns true if the program succeeds - * sets the parameters to the values described by the UK MHEG Profile - * caller_gid is used to resolve Generic variables in the parameters - * if forked is true, return immediately and run the program in the background + * programs defined in the UK MHEG Profile */ struct @@ -275,7 +282,37 @@ { "", "", NULL } }; +/* + * returns true if the program is not found in our list + */ + bool +unknown_program(ResidentProgramClass *p) +{ + unsigned int i; + + for(i=0; resident_progs[i].func!=NULL; i++) + { + if(OctetString_strcmp(&p->name, resident_progs[i].short_name) == 0 + || OctetString_strcmp(&p->name, resident_progs[i].long_name) == 0) + return false; + } + + /* not found */ + error("Unknown ResidentProgram: '%.*s'", p->name.size, p->name.data); + + return true; +} + +/* + * run the given program (identified by the name field in the ResidentProgramClass) + * returns true if the program succeeds + * sets the parameters to the values described by the UK MHEG Profile + * caller_gid is used to resolve Generic variables in the parameters + * if forked is true, return immediately and run the program in the background + */ + +bool run_program(ResidentProgramClass *p, LIST_OF(Parameter) *params, OctetString *caller_gid, bool forked) { bool rc; Modified: redbutton-browser/trunk/ResidentProgramClass.h =================================================================== --- redbutton-browser/trunk/ResidentProgramClass.h 2011-06-02 07:53:55 UTC (rev 547) +++ redbutton-browser/trunk/ResidentProgramClass.h 2011-06-02 08:19:51 UTC (rev 548) @@ -8,7 +8,7 @@ #include "ISO13522-MHEG-5.h" void ResidentProgramClass_Preparation(ResidentProgramClass *); -void ResidentProgramClass_Activation(ResidentProgramClass *); +bool ResidentProgramClass_Activation(ResidentProgramClass *); void ResidentProgramClass_Deactivation(ResidentProgramClass *); void ResidentProgramClass_Destruction(ResidentProgramClass *); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ski...@us...> - 2011-06-02 07:54:01
|
Revision: 547 http://redbutton.svn.sourceforge.net/redbutton/?rev=547&view=rev Author: skilvington Date: 2011-06-02 07:53:55 +0000 (Thu, 02 Jun 2011) Log Message: ----------- get rid of horrible hack in non-destructive retunes Modified Paths: -------------- redbutton-browser/trunk/MHEGStreamPlayer.c redbutton-browser/trunk/MHEGStreamPlayer.h redbutton-browser/trunk/ResidentProgramClass.c Modified: redbutton-browser/trunk/MHEGStreamPlayer.c =================================================================== --- redbutton-browser/trunk/MHEGStreamPlayer.c 2011-06-02 07:43:23 UTC (rev 546) +++ redbutton-browser/trunk/MHEGStreamPlayer.c 2011-06-02 07:53:55 UTC (rev 547) @@ -399,23 +399,6 @@ /* signal the threads to stop */ p->stop = true; - /* - * we want to set the EOF flag on the transport stream, - * so if the decoder thread is blocked in fread in mpegts_demux_frame it can escape and check p->stop - * otherwise the pthread_join call below will never return - */ - if(p->ts != NULL) - { - /* wake up the fread, fread will now start returning 0, but feof() will still return 0 */ - close(fileno(p->ts->ts)); - /* - * now fread no longer has the stdio lock on the p->ts->ts FILE, do a freopen on it - * reading /dev/null will set EOF, so feof() will return non-0 - * and the decoder thread will break out of mpegts_demux_frame - */ - p->ts->ts = freopen("/dev/null", "r", p->ts->ts); - } - /* wait for the threads to finish */ pthread_join(p->decode_tid, NULL); pthread_join(p->video_tid, NULL); @@ -438,26 +421,13 @@ } /* - * call this after a non-destructive retune - * if any StreamClass objects are active and playing A/V streams this will update their A/V PIDs to the new service + * returns true if currently playing an A/V stream */ -void -MHEGStreamPlayer_retuned(void) +bool +MHEGStreamPlayer_isPlaying(void) { - /* there can be only one */ - MHEGStreamPlayer *p = &player; - - /* are we playing anything */ - if(p->playing) - { - verbose("MHEGStreamPlayer: retuned while playing"); - /* just stop and restart, when we start playing the A/V PIDs are recalculated */ - MHEGStreamPlayer_stop(); - MHEGStreamPlayer_play(); - } - - return; + return player.playing; } /* Modified: redbutton-browser/trunk/MHEGStreamPlayer.h =================================================================== --- redbutton-browser/trunk/MHEGStreamPlayer.h 2011-06-02 07:43:23 UTC (rev 546) +++ redbutton-browser/trunk/MHEGStreamPlayer.h 2011-06-02 07:53:55 UTC (rev 547) @@ -92,6 +92,6 @@ void MHEGStreamPlayer_play(void); void MHEGStreamPlayer_stop(void); -void MHEGStreamPlayer_retuned(void); +bool MHEGStreamPlayer_isPlaying(void); #endif /* __MHEGSTREAMPLAYER_H__ */ Modified: redbutton-browser/trunk/ResidentProgramClass.c =================================================================== --- redbutton-browser/trunk/ResidentProgramClass.c 2011-06-02 07:43:23 UTC (rev 546) +++ redbutton-browser/trunk/ResidentProgramClass.c 2011-06-02 07:53:55 UTC (rev 547) @@ -1010,9 +1010,23 @@ /* non-destructive tune, ie current app keeps running */ ApplicationClass *current_app = MHEGEngine_getActiveApplication(); EventData event_tag; + bool stream_playing = MHEGStreamPlayer_isPlaying(); verbose("ResidentProgram: SI_TuneIndex: non-destructive tune"); + /* + * if a stream is playing, stop it now + * otherwise, when we retune the player will block in fread trying to read data from the old service + * and we will never be able to stop it + */ + if(stream_playing) + MHEGStreamPlayer_stop(); MHEGEngine_retune(service_url); - MHEGStreamPlayer_retuned(); + /* + * if we were playing, restart + * if necessary, this will re-evaluate any A/V PIDs based on the new service ID + */ + if(stream_playing) + MHEGStreamPlayer_play(); + /* let the app know we have successfully retuned */ event_tag.choice = EventData_integer; event_tag.u.integer = EngineEvent_NonDestructiveTuneOK; MHEGEngine_generateAsyncEvent(¤t_app->rootClass.inst.ref, EventType_engine_event, &event_tag); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ski...@us...> - 2011-06-02 07:43:29
|
Revision: 546 http://redbutton.svn.sourceforge.net/redbutton/?rev=546&view=rev Author: skilvington Date: 2011-06-02 07:43:23 +0000 (Thu, 02 Jun 2011) Log Message: ----------- no need for external pointers to the MHEGStreamPlayer singleton Modified Paths: -------------- redbutton-browser/trunk/MHEGStreamPlayer.c redbutton-browser/trunk/MHEGStreamPlayer.h redbutton-browser/trunk/StreamClass.c redbutton-browser/trunk/StreamComponent.c redbutton-browser/trunk/StreamComponent.h redbutton-browser/trunk/add_instance_vars.conf Modified: redbutton-browser/trunk/MHEGStreamPlayer.c =================================================================== --- redbutton-browser/trunk/MHEGStreamPlayer.c 2011-03-20 20:34:51 UTC (rev 545) +++ redbutton-browser/trunk/MHEGStreamPlayer.c 2011-06-02 07:43:23 UTC (rev 546) @@ -127,7 +127,7 @@ static MHEGStreamPlayer player; void -MHEGStreamPlayer_init(MHEGStreamPlayer **p) +MHEGStreamPlayer_init(void) { static bool created = false; @@ -168,22 +168,16 @@ verbose("MHEGStreamPlayer: %u users", player.nusers); - *p = &player; - return; } void -MHEGStreamPlayer_fini(MHEGStreamPlayer **p) +MHEGStreamPlayer_fini(void) { - /* assert */ - if(*p != &player) - fatal("MHEGStreamPlayer: *p=%p, &player=%p", *p, &player); - if(player.nusers == 0) fatal("MHEGStreamPlayer: nusers is 0"); - MHEGStreamPlayer_stop(&player); + MHEGStreamPlayer_stop(); player.nusers --; @@ -200,8 +194,6 @@ verbose("MHEGStreamPlayer: %u users", player.nusers); - *p = NULL; - #if 0 /* this is how you would destroy it */ pthread_mutex_destroy(&player.base_lock); @@ -221,11 +213,10 @@ */ void -MHEGStreamPlayer_setServiceID(MHEGStreamPlayer *p, int id) +MHEGStreamPlayer_setServiceID(int id) { - /* assert */ - if(p != &player) - fatal("MHEGStreamPlayer_setServiceID: p=%p, &player=%p", p, &player); + /* there can be only one */ + MHEGStreamPlayer *p = &player; /* assert */ if(p->playing && p->service_id != id) @@ -237,11 +228,10 @@ } void -MHEGStreamPlayer_setVideoStream(MHEGStreamPlayer *p, VideoClass *video) +MHEGStreamPlayer_setVideoStream(VideoClass *video) { - /* assert */ - if(p != &player) - fatal("MHEGStreamPlayer_setVideoStream: p=%p, &player=%p", p, &player); + /* there can be only one */ + MHEGStreamPlayer *p = &player; /* assert */ if(p->playing) @@ -277,11 +267,10 @@ } void -MHEGStreamPlayer_setAudioStream(MHEGStreamPlayer *p, AudioClass *audio) +MHEGStreamPlayer_setAudioStream(AudioClass *audio) { - /* assert */ - if(p != &player) - fatal("MHEGStreamPlayer_setAudioStream: p=%p, &player=%p", p, &player); + /* there can be only one */ + MHEGStreamPlayer *p = &player; /* assert */ if(p->playing) @@ -320,11 +309,10 @@ } void -MHEGStreamPlayer_play(MHEGStreamPlayer *p) +MHEGStreamPlayer_play(void) { - /* assert */ - if(p != &player) - fatal("MHEGStreamPlayer_play: p=%p, &player=%p", p, &player); + /* there can be only one */ + MHEGStreamPlayer *p = &player; verbose("MHEGStreamPlayer_play: service_id=%d audio_tag=%d video_tag=%d", p->service_id, p->audio_tag, p->video_tag); @@ -397,11 +385,10 @@ } void -MHEGStreamPlayer_stop(MHEGStreamPlayer *p) +MHEGStreamPlayer_stop(void) { - /* assert */ - if(p != &player) - fatal("MHEGStreamPlayer_stop: p=%p, &player=%p", p, &player); + /* there can be only one */ + MHEGStreamPlayer *p = &player; verbose("MHEGStreamPlayer_stop"); @@ -466,8 +453,8 @@ { verbose("MHEGStreamPlayer: retuned while playing"); /* just stop and restart, when we start playing the A/V PIDs are recalculated */ - MHEGStreamPlayer_stop(p); - MHEGStreamPlayer_play(p); + MHEGStreamPlayer_stop(); + MHEGStreamPlayer_play(); } return; Modified: redbutton-browser/trunk/MHEGStreamPlayer.h =================================================================== --- redbutton-browser/trunk/MHEGStreamPlayer.h 2011-03-20 20:34:51 UTC (rev 545) +++ redbutton-browser/trunk/MHEGStreamPlayer.h 2011-06-02 07:43:23 UTC (rev 546) @@ -82,15 +82,15 @@ LIST_OF(AudioFrame) *audioq; /* head of list is next to be played */ } MHEGStreamPlayer; -void MHEGStreamPlayer_init(MHEGStreamPlayer **); -void MHEGStreamPlayer_fini(MHEGStreamPlayer **); +void MHEGStreamPlayer_init(void); +void MHEGStreamPlayer_fini(void); -void MHEGStreamPlayer_setServiceID(MHEGStreamPlayer *, int); -void MHEGStreamPlayer_setVideoStream(MHEGStreamPlayer *, VideoClass *); -void MHEGStreamPlayer_setAudioStream(MHEGStreamPlayer *, AudioClass *); +void MHEGStreamPlayer_setServiceID(int); +void MHEGStreamPlayer_setVideoStream(VideoClass *); +void MHEGStreamPlayer_setAudioStream(AudioClass *); -void MHEGStreamPlayer_play(MHEGStreamPlayer *); -void MHEGStreamPlayer_stop(MHEGStreamPlayer *); +void MHEGStreamPlayer_play(void); +void MHEGStreamPlayer_stop(void); void MHEGStreamPlayer_retuned(void); Modified: redbutton-browser/trunk/StreamClass.c =================================================================== --- redbutton-browser/trunk/StreamClass.c 2011-03-20 20:34:51 UTC (rev 545) +++ redbutton-browser/trunk/StreamClass.c 2011-06-02 07:43:23 UTC (rev 546) @@ -26,7 +26,7 @@ v->CounterTriggers = NULL; - MHEGStreamPlayer_init(&v->player); + MHEGStreamPlayer_init(); return; } @@ -34,7 +34,7 @@ void free_StreamClassInstanceVars(StreamClassInstanceVars *v) { - MHEGStreamPlayer_fini(&v->player); + MHEGStreamPlayer_fini(); LIST_FREE(&v->CounterTriggers, CounterTrigger, safe_free); @@ -110,7 +110,7 @@ */ if(OctetString_strncmp(service, "dvb:", 4) == 0) { - MHEGStreamPlayer_setServiceID(t->inst.player, si_get_service_id(service)); + MHEGStreamPlayer_setServiceID(si_get_service_id(service)); } else if(OctetString_strncmp(service, "rec://svc/lcn/", 14) == 0) { @@ -120,7 +120,7 @@ else if(OctetString_strcmp(service, "rec://svc/def") == 0) { /* use the service ID we are currently tuned to */ - MHEGStreamPlayer_setServiceID(t->inst.player, -1); + MHEGStreamPlayer_setServiceID(-1); } /* leave player's service ID as it is for "rec://svc/cur" */ else if(OctetString_strcmp(service, "rec://svc/cur") != 0) @@ -135,10 +135,10 @@ { if((r = StreamComponent_rootClass(&comp->item)) != NULL && r->inst.RunningStatus) - StreamComponent_play(&comp->item, t->inst.player); + StreamComponent_play(&comp->item); comp = comp->next; } - MHEGStreamPlayer_play(t->inst.player); + MHEGStreamPlayer_play(); /* multiplex is now playing */ MHEGEngine_generateAsyncEvent(&t->rootClass.inst.ref, EventType_stream_playing, NULL); @@ -179,13 +179,13 @@ } /* stop playing all active StreamComponents */ - MHEGStreamPlayer_stop(t->inst.player); + MHEGStreamPlayer_stop(); comp = t->multiplex; while(comp) { if((r = StreamComponent_rootClass(&comp->item)) != NULL && r->inst.RunningStatus) - StreamComponent_stop(&comp->item, t->inst.player); + StreamComponent_stop(&comp->item); comp = comp->next; } @@ -262,12 +262,12 @@ /* if we are activated, stop playing while we change the component */ if(t->rootClass.inst.RunningStatus) - MHEGStreamPlayer_stop(t->inst.player); + MHEGStreamPlayer_stop(); - MHEGStreamPlayer_setVideoStream(t->inst.player, c); + MHEGStreamPlayer_setVideoStream(c); if(t->rootClass.inst.RunningStatus) - MHEGStreamPlayer_play(t->inst.player); + MHEGStreamPlayer_play(); return; } @@ -284,12 +284,12 @@ /* if we are activated, stop playing while we change the component */ if(t->rootClass.inst.RunningStatus) - MHEGStreamPlayer_stop(t->inst.player); + MHEGStreamPlayer_stop(); - MHEGStreamPlayer_setAudioStream(t->inst.player, c); + MHEGStreamPlayer_setAudioStream(c); if(t->rootClass.inst.RunningStatus) - MHEGStreamPlayer_play(t->inst.player); + MHEGStreamPlayer_play(); return; } @@ -306,12 +306,12 @@ /* if we are activated, stop playing while we change the component */ if(t->rootClass.inst.RunningStatus) - MHEGStreamPlayer_stop(t->inst.player); + MHEGStreamPlayer_stop(); - MHEGStreamPlayer_setVideoStream(t->inst.player, NULL); + MHEGStreamPlayer_setVideoStream(NULL); if(t->rootClass.inst.RunningStatus) - MHEGStreamPlayer_play(t->inst.player); + MHEGStreamPlayer_play(); return; } @@ -328,12 +328,12 @@ /* if we are activated, stop playing while we change the component */ if(t->rootClass.inst.RunningStatus) - MHEGStreamPlayer_stop(t->inst.player); + MHEGStreamPlayer_stop(); - MHEGStreamPlayer_setAudioStream(t->inst.player, NULL); + MHEGStreamPlayer_setAudioStream(NULL); if(t->rootClass.inst.RunningStatus) - MHEGStreamPlayer_play(t->inst.player); + MHEGStreamPlayer_play(); return; } @@ -381,7 +381,7 @@ // new_service_id = -1; do the strncmps; if getServiceID != new_service_id {if(playing) stop; setServiceID; if(playing) play} /* if playing, stop */ if(t->rootClass.inst.RunningStatus) - MHEGStreamPlayer_stop(t->inst.player); + MHEGStreamPlayer_stop(); // TODO: the below is very similar to StreamClass_Activation /* * update the service ID @@ -394,7 +394,7 @@ */ if(OctetString_strncmp(service, "dvb:", 4) == 0) { - MHEGStreamPlayer_setServiceID(t->inst.player, si_get_service_id(service)); + MHEGStreamPlayer_setServiceID(si_get_service_id(service)); } else if(OctetString_strncmp(service, "rec://svc/lcn/", 14) == 0) { @@ -405,7 +405,7 @@ || OctetString_strcmp(service, "rec://svc/cur") == 0) { /* use the service ID we are currently tuned to */ - MHEGStreamPlayer_setServiceID(t->inst.player, -1); + MHEGStreamPlayer_setServiceID(-1); } else { @@ -413,7 +413,7 @@ } /* if playing, restart, this also update audio/video PIDs */ if(t->rootClass.inst.RunningStatus) - MHEGStreamPlayer_play(t->inst.player); + MHEGStreamPlayer_play(); //TODO: MHEGEngine_setRecSvcCur(service) - will need to copy 'service' contents printf("TODO: update rec://svc/cur\n"); //TODO: make sure "rec://svc/cur" and "rec://svc/def" usage is still correct everywhere else Modified: redbutton-browser/trunk/StreamComponent.c =================================================================== --- redbutton-browser/trunk/StreamComponent.c 2011-03-20 20:34:51 UTC (rev 545) +++ redbutton-browser/trunk/StreamComponent.c 2011-06-02 07:43:23 UTC (rev 546) @@ -125,16 +125,16 @@ } void -StreamComponent_play(StreamComponent *s, MHEGStreamPlayer *player) +StreamComponent_play(StreamComponent *s) { switch(s->choice) { case StreamComponent_audio: - MHEGStreamPlayer_setAudioStream(player, &s->u.audio); + MHEGStreamPlayer_setAudioStream(&s->u.audio); break; case StreamComponent_video: - MHEGStreamPlayer_setVideoStream(player, &s->u.video); + MHEGStreamPlayer_setVideoStream(&s->u.video); break; case StreamComponent_rtgraphics: @@ -150,16 +150,16 @@ } void -StreamComponent_stop(StreamComponent *s, MHEGStreamPlayer *player) +StreamComponent_stop(StreamComponent *s) { switch(s->choice) { case StreamComponent_audio: - MHEGStreamPlayer_setAudioStream(player, NULL); + MHEGStreamPlayer_setAudioStream(NULL); break; case StreamComponent_video: - MHEGStreamPlayer_setVideoStream(player, NULL); + MHEGStreamPlayer_setVideoStream(NULL); break; case StreamComponent_rtgraphics: Modified: redbutton-browser/trunk/StreamComponent.h =================================================================== --- redbutton-browser/trunk/StreamComponent.h 2011-03-20 20:34:51 UTC (rev 545) +++ redbutton-browser/trunk/StreamComponent.h 2011-06-02 07:43:23 UTC (rev 546) @@ -17,8 +17,8 @@ void StreamComponent_Activation(StreamComponent *); void StreamComponent_Destruction(StreamComponent *); -void StreamComponent_play(StreamComponent *, MHEGStreamPlayer *); -void StreamComponent_stop(StreamComponent *, MHEGStreamPlayer *); +void StreamComponent_play(StreamComponent *); +void StreamComponent_stop(StreamComponent *); #endif /* __STREAMCOMPONENT_H__ */ Modified: redbutton-browser/trunk/add_instance_vars.conf =================================================================== --- redbutton-browser/trunk/add_instance_vars.conf 2011-03-20 20:34:51 UTC (rev 545) +++ redbutton-browser/trunk/add_instance_vars.conf 2011-06-02 07:43:23 UTC (rev 546) @@ -226,8 +226,6 @@ int CounterPosition; int CounterEndPosition; LIST_OF(CounterTrigger) *CounterTriggers; - /* we add this */ - MHEGStreamPlayer *player; } StreamClassInstanceVars; </StreamClass> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ski...@us...> - 2011-03-20 20:34:57
|
Revision: 545 http://redbutton.svn.sourceforge.net/redbutton/?rev=545&view=rev Author: skilvington Date: 2011-03-20 20:34:51 +0000 (Sun, 20 Mar 2011) Log Message: ----------- avoid trying to do freopen when fread has the lock on the FILE Modified Paths: -------------- redbutton-browser/trunk/MHEGStreamPlayer.c Modified: redbutton-browser/trunk/MHEGStreamPlayer.c =================================================================== --- redbutton-browser/trunk/MHEGStreamPlayer.c 2011-03-20 20:01:17 UTC (rev 544) +++ redbutton-browser/trunk/MHEGStreamPlayer.c 2011-03-20 20:34:51 UTC (rev 545) @@ -414,12 +414,20 @@ /* * we want to set the EOF flag on the transport stream, - * so if the decoder thread is blocked in fread it will wake up + * so if the decoder thread is blocked in fread in mpegts_demux_frame it can escape and check p->stop * otherwise the pthread_join call below will never return */ -//TODO: probably need to lock changes to p->ts->ts if(p->ts != NULL) + { + /* wake up the fread, fread will now start returning 0, but feof() will still return 0 */ + close(fileno(p->ts->ts)); + /* + * now fread no longer has the stdio lock on the p->ts->ts FILE, do a freopen on it + * reading /dev/null will set EOF, so feof() will return non-0 + * and the decoder thread will break out of mpegts_demux_frame + */ p->ts->ts = freopen("/dev/null", "r", p->ts->ts); + } /* wait for the threads to finish */ pthread_join(p->decode_tid, NULL); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ski...@us...> - 2011-03-20 20:01:23
|
Revision: 544 http://redbutton.svn.sourceforge.net/redbutton/?rev=544&view=rev Author: skilvington Date: 2011-03-20 20:01:17 +0000 (Sun, 20 Mar 2011) Log Message: ----------- try to stop the decoder thread blocking in fread on non-destructive tunes Modified Paths: -------------- redbutton-browser/trunk/MHEGStreamPlayer.c redbutton-browser/trunk/StreamClass.c Modified: redbutton-browser/trunk/MHEGStreamPlayer.c =================================================================== --- redbutton-browser/trunk/MHEGStreamPlayer.c 2011-03-11 14:08:54 UTC (rev 543) +++ redbutton-browser/trunk/MHEGStreamPlayer.c 2011-03-20 20:01:17 UTC (rev 544) @@ -412,7 +412,16 @@ /* signal the threads to stop */ p->stop = true; - /* wait for them to finish */ + /* + * we want to set the EOF flag on the transport stream, + * so if the decoder thread is blocked in fread it will wake up + * otherwise the pthread_join call below will never return + */ +//TODO: probably need to lock changes to p->ts->ts + if(p->ts != NULL) + p->ts->ts = freopen("/dev/null", "r", p->ts->ts); + + /* wait for the threads to finish */ pthread_join(p->decode_tid, NULL); pthread_join(p->video_tid, NULL); pthread_join(p->audio_tid, NULL); @@ -421,6 +430,7 @@ LIST_FREE(&p->videoq, VideoFrame, free_VideoFrameListItem); LIST_FREE(&p->audioq, AudioFrame, free_AudioFrameListItem); + /* free the MHEGStream object */ if(p->ts != NULL) { MHEGEngine_closeStream(p->ts); Modified: redbutton-browser/trunk/StreamClass.c =================================================================== --- redbutton-browser/trunk/StreamClass.c 2011-03-11 14:08:54 UTC (rev 543) +++ redbutton-browser/trunk/StreamClass.c 2011-03-20 20:01:17 UTC (rev 544) @@ -417,6 +417,7 @@ //TODO: MHEGEngine_setRecSvcCur(service) - will need to copy 'service' contents printf("TODO: update rec://svc/cur\n"); //TODO: make sure "rec://svc/cur" and "rec://svc/def" usage is still correct everywhere else +//TODO: new service should replace original_content /* ContentPreparation behaviour specified in the ISO MHEG Corrigendum */ MHEGEngine_generateAsyncEvent(&t->rootClass.inst.ref, EventType_content_available, NULL); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: John W. <jo...@po...> - 2011-03-19 11:35:57
|
Hello, I've got a first version of a plugin for the VDR program (http://www.tvdr.de/) using the code of "redbutton". If anyone is interested, they can download it from: http://pond-weed.com/redbutton/ Regards, John Williams |
From: <ski...@us...> - 2011-03-11 14:09:01
|
Revision: 543 http://redbutton.svn.sourceforge.net/redbutton/?rev=543&view=rev Author: skilvington Date: 2011-03-11 14:08:54 +0000 (Fri, 11 Mar 2011) Log Message: ----------- auto-generate dependencies Modified Paths: -------------- redbutton-browser/trunk/Makefile Modified: redbutton-browser/trunk/Makefile =================================================================== --- redbutton-browser/trunk/Makefile 2011-03-08 18:20:09 UTC (rev 542) +++ redbutton-browser/trunk/Makefile 2011-03-11 14:08:54 UTC (rev 543) @@ -2,6 +2,7 @@ CFLAGS=-Wall -O2 # gprof profiling #CFLAGS=-Wall -O2 -pg +CPPFLAGS=-MD DESTDIR=/usr/local @@ -91,15 +92,15 @@ default: rb-browser rb-keymap rb-browser: ${OBJS} - ${CC} ${CFLAGS} ${DEFS} ${INCS} -o rb-browser ${OBJS} ${LIBS} + ${CC} ${CPPFLAGS} ${CFLAGS} ${DEFS} ${INCS} -o rb-browser ${OBJS} ${LIBS} ${OBJS}: clone.c rtti.h .c.o: - ${CC} ${CFLAGS} ${DEFS} ${INCS} -c $< + ${CC} ${CPPFLAGS} ${CFLAGS} ${DEFS} ${INCS} -c $< ISO13522-MHEG-5.o: rtti.h - ${CC} ${CFLAGS} ${DEFS} ${INCS} -c ISO13522-MHEG-5.c + ${CC} ${CPPFLAGS} ${CFLAGS} ${DEFS} ${INCS} -c ISO13522-MHEG-5.c rtti.h: xsd2c ISO13522-MHEG-5.xsd add_instance_vars.conf add_rtti.conf ./xsd2c ISO13522-MHEG-5.xsd @@ -107,29 +108,29 @@ ./add_rtti ISO13522-MHEG-5.c > rtti.h xsd2c: xsd2c.c - ${CC} ${CFLAGS} ${DEFS} -o xsd2c xsd2c.c -lexpat + ${CC} ${CPPFLAGS} ${CFLAGS} ${DEFS} -o xsd2c xsd2c.c -lexpat clone.c: mkclone.conf ./mkclone rb-keymap: rb-keymap.c - ${CC} ${CFLAGS} -o rb-keymap rb-keymap.c -L/usr/X11R6/lib -lX11 + ${CC} ${CPPFLAGS} ${CFLAGS} -o rb-keymap rb-keymap.c -L/usr/X11R6/lib -lX11 dertest: dertest.c dertest-mheg.c der_decode.c utils.c - ${CC} ${CFLAGS} ${DEFS} -DDER_VERBOSE ${INCS} -o dertest dertest.c dertest-mheg.c der_decode.c utils.c + ${CC} ${CPPFLAGS} ${CFLAGS} ${DEFS} -DDER_VERBOSE ${INCS} -o dertest dertest.c dertest-mheg.c der_decode.c utils.c dertest-mheg.c: xsd2c ISO13522-MHEG-5.xsd ./xsd2c -c dertest-mheg.c -h dertest-mheg.h ISO13522-MHEG-5.xsd berdecode: berdecode.c - ${CC} ${CFLAGS} ${DEFS} -o berdecode berdecode.c + ${CC} ${CPPFLAGS} ${CFLAGS} ${DEFS} -o berdecode berdecode.c install: rb-browser rb-keymap install -m 755 rb-browser ${DESTDIR}/bin install -m 755 rb-keymap ${DESTDIR}/bin clean: - rm -f rb-browser rb-keymap xsd2c dertest dertest-mheg.[ch] *.o ISO13522-MHEG-5.[ch] clone.[ch] rtti.h gmon.out core + rm -f rb-browser rb-keymap xsd2c dertest dertest-mheg.[ch] ${OBJS} ${OBJS:.o=.d} ISO13522-MHEG-5.[ch] clone.[ch] rtti.h gmon.out core TARDIR=`basename ${PWD}` @@ -137,3 +138,6 @@ (cd ..; tar zcvf ${TARDIR}.tar.gz --exclude .svn ${TARDIR}) .PHONY: clean install tar + +-include ${OBJS:.o=.d} + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ski...@us...> - 2011-03-08 18:20:15
|
Revision: 542 http://redbutton.svn.sourceforge.net/redbutton/?rev=542&view=rev Author: skilvington Date: 2011-03-08 18:20:09 +0000 (Tue, 08 Mar 2011) Log Message: ----------- re-evaluate A/V PIDs on non-destructive tunes Modified Paths: -------------- redbutton-browser/trunk/MHEGStreamPlayer.c redbutton-browser/trunk/MHEGStreamPlayer.h redbutton-browser/trunk/ResidentProgramClass.c redbutton-browser/trunk/StreamClass.c Modified: redbutton-browser/trunk/MHEGStreamPlayer.c =================================================================== --- redbutton-browser/trunk/MHEGStreamPlayer.c 2011-03-04 16:53:56 UTC (rev 541) +++ redbutton-browser/trunk/MHEGStreamPlayer.c 2011-03-08 18:20:09 UTC (rev 542) @@ -433,6 +433,29 @@ } /* + * call this after a non-destructive retune + * if any StreamClass objects are active and playing A/V streams this will update their A/V PIDs to the new service + */ + +void +MHEGStreamPlayer_retuned(void) +{ + /* there can be only one */ + MHEGStreamPlayer *p = &player; + + /* are we playing anything */ + if(p->playing) + { + verbose("MHEGStreamPlayer: retuned while playing"); + /* just stop and restart, when we start playing the A/V PIDs are recalculated */ + MHEGStreamPlayer_stop(p); + MHEGStreamPlayer_play(p); + } + + return; +} + +/* * decode_thread * reads the MPEG TS file * decodes the data into YUV video frames and audio samples Modified: redbutton-browser/trunk/MHEGStreamPlayer.h =================================================================== --- redbutton-browser/trunk/MHEGStreamPlayer.h 2011-03-04 16:53:56 UTC (rev 541) +++ redbutton-browser/trunk/MHEGStreamPlayer.h 2011-03-08 18:20:09 UTC (rev 542) @@ -92,4 +92,6 @@ void MHEGStreamPlayer_play(MHEGStreamPlayer *); void MHEGStreamPlayer_stop(MHEGStreamPlayer *); +void MHEGStreamPlayer_retuned(void); + #endif /* __MHEGSTREAMPLAYER_H__ */ Modified: redbutton-browser/trunk/ResidentProgramClass.c =================================================================== --- redbutton-browser/trunk/ResidentProgramClass.c 2011-03-04 16:53:56 UTC (rev 541) +++ redbutton-browser/trunk/ResidentProgramClass.c 2011-03-08 18:20:09 UTC (rev 542) @@ -1012,6 +1012,7 @@ EventData event_tag; verbose("ResidentProgram: SI_TuneIndex: non-destructive tune"); MHEGEngine_retune(service_url); + MHEGStreamPlayer_retuned(); event_tag.choice = EventData_integer; event_tag.u.integer = EngineEvent_NonDestructiveTuneOK; MHEGEngine_generateAsyncEvent(¤t_app->rootClass.inst.ref, EventType_engine_event, &event_tag); Modified: redbutton-browser/trunk/StreamClass.c =================================================================== --- redbutton-browser/trunk/StreamClass.c 2011-03-04 16:53:56 UTC (rev 541) +++ redbutton-browser/trunk/StreamClass.c 2011-03-08 18:20:09 UTC (rev 542) @@ -377,6 +377,8 @@ /* did we get a valid service */ if(service != NULL && service->size > 0) { +//TODO: now we do MHEGStreamPlayer_retuned, we probably want to ignore a SetData if it keeps the service ID the same as it currently is +// new_service_id = -1; do the strncmps; if getServiceID != new_service_id {if(playing) stop; setServiceID; if(playing) play} /* if playing, stop */ if(t->rootClass.inst.RunningStatus) MHEGStreamPlayer_stop(t->inst.player); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Simon K. <s.k...@er...> - 2011-03-04 17:00:11
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 28/02/11 20:16, John Williams wrote: > On Mon, 28 Feb 2011 12:44:45 +0000 > Simon Kilvington <s.k...@er...> wrote: > >> just got a quick question - I don't have access to FreeSat, so I can't >> test this, but what happens to the video stream when the channel >> changes with your patch? Does the video carry on playing? > > No. In fact the new channel is on a completely different transponder > (12.441GHz instead of 10.773GHz), it has a different SID, different > VPID and APID etc etc. The video just freezes. > > The spec says "any prepared MHEG-5 Stream objects shall be re-evaluated > according to the context of the new service as if a SetData action had > occurred". I would *guess* that this means that, if it was playing the > default video/audio for the service before the tune, it should start > playing the video/audio of the new service after the tune. This would > require some code to change the PES filters to the new VPID and APID, > which doesn't exist at the moment. Also, I think I've sometimes > seem a StreamClass SetData action, which isn't implemented: perhaps > this is setting some details of the new service? > > If I navigate to the menu option that takes me back to the original > program on BBC1, then the video comes back to life again. So the PES > filters must still be working OK, they are just filtering the wrong PIDs > for the new service. > I've just committed a patch that should (hopefully) allow the video to continue running when it changes channel - can you give it a try? it only handles the case when SetData is called explicitly, so it should work on this example, but I need to do an implicit SetData call when we do a non-destructive retune - if this works, I'll add that in... -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk1xGpEACgkQmt9ZifioJSwLwQCZASz2ShAvBktaw6zjMCQG7ZwR 2ncAn2fr/vN4ulnYVDv5DzEDDxUNIIdy =Pn+E -----END PGP SIGNATURE----- |
From: <ski...@us...> - 2011-03-04 16:54:02
|
Revision: 541 http://redbutton.svn.sourceforge.net/redbutton/?rev=541&view=rev Author: skilvington Date: 2011-03-04 16:53:56 +0000 (Fri, 04 Mar 2011) Log Message: ----------- refresh video service ID when doing StreamClass_SetData Modified Paths: -------------- redbutton-browser/trunk/StreamClass.c Modified: redbutton-browser/trunk/StreamClass.c =================================================================== --- redbutton-browser/trunk/StreamClass.c 2011-03-01 20:53:45 UTC (rev 540) +++ redbutton-browser/trunk/StreamClass.c 2011-03-04 16:53:56 UTC (rev 541) @@ -377,15 +377,44 @@ /* did we get a valid service */ if(service != NULL && service->size > 0) { + /* if playing, stop */ + if(t->rootClass.inst.RunningStatus) + MHEGStreamPlayer_stop(t->inst.player); +// TODO: the below is very similar to StreamClass_Activation + /* + * update the service ID + * service can be: + * "dvb://<original_network_id>.[<transport_stream_id>].<service_id>" + * "rec://svc/def" - use the service we are downloading the carousel from + * "rec://svc/cur" - use the current service + * this will be the same as "def" unless SetData has been called on the StreamClass + * "rec://svc/lcn/X" - use logical channel number X (eg 1 for BBC1, 3 for ITV1, etc) + */ + if(OctetString_strncmp(service, "dvb:", 4) == 0) + { + MHEGStreamPlayer_setServiceID(t->inst.player, si_get_service_id(service)); + } + else if(OctetString_strncmp(service, "rec://svc/lcn/", 14) == 0) + { /* TODO */ -printf("TODO: StreamClass_SetData '%.*s' not yet implemented\n", service->size, service->data); -// if playing, stop -// do same as StreamClass_Activation to call MHEGStreamPlayer_setServiceID(...) -// (should be able to factor out the code) -// if playing, update audio/video PIDs -// if playing, restart -// MHEGEngine_setRecSvcCur(service) - will need to copy 'service' contents -// make sure "rec://svc/cur" and "rec://svc/def" usage is still correct everywhere else +printf("TODO: StreamClass_SetData: service='%.*s'\n", service->size, service->data); + } + else if(OctetString_strcmp(service, "rec://svc/def") == 0 + || OctetString_strcmp(service, "rec://svc/cur") == 0) + { + /* use the service ID we are currently tuned to */ + MHEGStreamPlayer_setServiceID(t->inst.player, -1); + } + else + { + error("StreamClass: unexpected service '%.*s'", service->size, service->data); + } + /* if playing, restart, this also update audio/video PIDs */ + if(t->rootClass.inst.RunningStatus) + MHEGStreamPlayer_play(t->inst.player); +//TODO: MHEGEngine_setRecSvcCur(service) - will need to copy 'service' contents +printf("TODO: update rec://svc/cur\n"); +//TODO: make sure "rec://svc/cur" and "rec://svc/def" usage is still correct everywhere else /* ContentPreparation behaviour specified in the ISO MHEG Corrigendum */ MHEGEngine_generateAsyncEvent(&t->rootClass.inst.ref, EventType_content_available, NULL); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ski...@us...> - 2011-03-01 20:53:51
|
Revision: 540 http://redbutton.svn.sourceforge.net/redbutton/?rev=540&view=rev Author: skilvington Date: 2011-03-01 20:53:45 +0000 (Tue, 01 Mar 2011) Log Message: ----------- the easy part of StreamClass_SetData method Modified Paths: -------------- redbutton-browser/trunk/StreamClass.c Modified: redbutton-browser/trunk/StreamClass.c =================================================================== --- redbutton-browser/trunk/StreamClass.c 2011-02-28 17:04:27 UTC (rev 539) +++ redbutton-browser/trunk/StreamClass.c 2011-03-01 20:53:45 UTC (rev 540) @@ -7,6 +7,8 @@ #include "StreamComponent.h" #include "ExternalReference.h" #include "ContentBody.h" +#include "GenericOctetString.h" +#include "GenericContentReference.h" #include "si.h" #include "utils.h" @@ -344,11 +346,49 @@ void StreamClass_SetData(StreamClass *t, SetData *set, OctetString *caller_gid) { + NewContent *n = &set->new_content; + OctetString *service; + verbose("StreamClass: %s; SetData", ExternalReference_name(&t->rootClass.inst.ref)); + /* + * normally you'd do: + * NewContent_getContent(&set->new_content, caller_gid, &t->rootClass, &service) + * but FreeSat sends us a ContentReference, not IncludedContent + * so that would end up trying to load a file called "rec://svc/cur" and using its contents as the service + * so treat both types as if the value of the ContentRef or the IncludedContent is what we should set the service to + */ + switch(n->choice) + { + case NewContent_new_included_content: + service = GenericOctetString_getOctetString(&n->u.new_included_content, caller_gid); + break; + + case NewContent_new_referenced_content: + service = GenericContentReference_getContentReference(&n->u.new_referenced_content.generic_content_reference, caller_gid); + break; + + default: + error("Unknown StreamClass NewContent type: %d", n->choice); + service = NULL; + break; + } + + /* did we get a valid service */ + if(service != NULL && service->size > 0) + { /* TODO */ -printf("TODO: StreamClass_SetData not yet implemented\n"); -// MHEGEngine_setRecSvcCur(...) +printf("TODO: StreamClass_SetData '%.*s' not yet implemented\n", service->size, service->data); +// if playing, stop +// do same as StreamClass_Activation to call MHEGStreamPlayer_setServiceID(...) +// (should be able to factor out the code) +// if playing, update audio/video PIDs +// if playing, restart +// MHEGEngine_setRecSvcCur(service) - will need to copy 'service' contents +// make sure "rec://svc/cur" and "rec://svc/def" usage is still correct everywhere else + /* ContentPreparation behaviour specified in the ISO MHEG Corrigendum */ + MHEGEngine_generateAsyncEvent(&t->rootClass.inst.ref, EventType_content_available, NULL); + } return; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: John W. <jo...@po...> - 2011-02-28 20:16:22
|
On Mon, 28 Feb 2011 12:44:45 +0000 Simon Kilvington <s.k...@er...> wrote: > just got a quick question - I don't have access to FreeSat, so I can't > test this, but what happens to the video stream when the channel > changes with your patch? Does the video carry on playing? No. In fact the new channel is on a completely different transponder (12.441GHz instead of 10.773GHz), it has a different SID, different VPID and APID etc etc. The video just freezes. The spec says "any prepared MHEG-5 Stream objects shall be re-evaluated according to the context of the new service as if a SetData action had occurred". I would *guess* that this means that, if it was playing the default video/audio for the service before the tune, it should start playing the video/audio of the new service after the tune. This would require some code to change the PES filters to the new VPID and APID, which doesn't exist at the moment. Also, I think I've sometimes seem a StreamClass SetData action, which isn't implemented: perhaps this is setting some details of the new service? If I navigate to the menu option that takes me back to the original program on BBC1, then the video comes back to life again. So the PES filters must still be working OK, they are just filtering the wrong PIDs for the new service. Actually, I've built the code of rb-download into a plugin for the "vdr" program, so that rb-download uses vdr to do the tuning; this means that the new channel appears on my TV after the tune. Now the rb-browser program doesn't show any video at all, because vdr has got control of the dvr0 device; but my plan is to make rb-browser into a vdr plugin too, so that its text output will appear overlayed on top of the video output from vdr. Regards, John |
From: <ski...@us...> - 2011-02-28 17:04:34
|
Revision: 539 http://redbutton.svn.sourceforge.net/redbutton/?rev=539&view=rev Author: skilvington Date: 2011-02-28 17:04:27 +0000 (Mon, 28 Feb 2011) Log Message: ----------- allow non-destructive tuning, based on patch from John Williams Modified Paths: -------------- redbutton-browser/trunk/MHEGEngine.c redbutton-browser/trunk/MHEGEngine.h redbutton-browser/trunk/ResidentProgramClass.c redbutton-browser/trunk/si.c redbutton-browser/trunk/si.h Modified: redbutton-browser/trunk/MHEGEngine.c =================================================================== --- redbutton-browser/trunk/MHEGEngine.c 2010-12-03 14:18:04 UTC (rev 538) +++ redbutton-browser/trunk/MHEGEngine.c 2011-02-28 17:04:27 UTC (rev 539) @@ -226,6 +226,8 @@ /* boot it */ verbose("Booting '%.*s'", boot_obj.size, boot_obj.data); engine.quit_reason = QuitReason_DontQuit; + /* SI_TuneIndexInfo lifetime is per app, so reset to default value */ + MHEGEngine_setTuneInfo(0); /* load the app */ if((app = MHEGApp_loadApplication(&engine.active_app, &boot_obj)) == NULL) return EXIT_FAILURE; @@ -532,6 +534,20 @@ return &engine.active_app.scene->u.scene; } +int +MHEGEngine_getTuneInfo(void) +{ + return engine.tuneinfo; +} + +void +MHEGEngine_setTuneInfo(int tuneinfo) +{ + engine.tuneinfo = tuneinfo; + + return; +} + /* * adds the given object to the top of the DisplayStack for the active application * (if it is not already in the DisplayStack) Modified: redbutton-browser/trunk/MHEGEngine.h =================================================================== --- redbutton-browser/trunk/MHEGEngine.h 2010-12-03 14:18:04 UTC (rev 538) +++ redbutton-browser/trunk/MHEGEngine.h 2011-02-28 17:04:27 UTC (rev 539) @@ -30,23 +30,24 @@ /* EngineEvent EventTag values */ /* 0 and 1 are reserved */ -#define EngineEvent_GroupIDRefError 2 -#define EngineEvent_ContentRefError 3 -#define EngineEvent_TextKeyFunction 4 +#define EngineEvent_GroupIDRefError 2 +#define EngineEvent_ContentRefError 3 +#define EngineEvent_TextKeyFunction 4 /* 5 is reserved */ -#define EngineEvent_VideoPrefChanged 6 -#define EngineEvent_PauseResume 7 +#define EngineEvent_VideoPrefChanged 6 +#define EngineEvent_PauseResume 7 /* 8 is reserved */ -#define EngineEvent_NetworkBootInfo 9 -/* 10-15 are reserved */ -#define EngineEvent_CancelKeyFunction 16 +#define EngineEvent_NetworkBootInfo 9 +#define EngineEvent_NonDestructiveTuneOK 10 +/* 11-15 are reserved */ +#define EngineEvent_CancelKeyFunction 16 /* 17-99 are reserved */ -#define EngineEvent_RedKeyFunction 100 -#define EngineEvent_GreenKeyFunction 101 -#define EngineEvent_YellowKeyFunction 102 -#define EngineEvent_BlueKeyFunction 103 +#define EngineEvent_RedKeyFunction 100 +#define EngineEvent_GreenKeyFunction 101 +#define EngineEvent_YellowKeyFunction 102 +#define EngineEvent_BlueKeyFunction 103 /* from the NZ profile */ -#define EngineEvent_EPGKeyFunction 300 +#define EngineEvent_EPGKeyFunction 300 /* all other values are reserved */ /* EventTag key numbers for UserInput events */ @@ -188,6 +189,7 @@ LIST_OF(MHEGAction) *main_actionq; /* UK MHEG Profile event processing method */ LIST_OF(MHEGAction) *temp_actionq; /* UK MHEG Profile event processing method */ LIST_OF(PersistentData) *persistent; /* persistent files */ + int tuneinfo; /* SI_TuneIndexInfo value */ } MHEGEngine; /* prototypes */ @@ -207,6 +209,9 @@ ApplicationClass *MHEGEngine_getActiveApplication(void); SceneClass *MHEGEngine_getActiveScene(void); +int MHEGEngine_getTuneInfo(void); +void MHEGEngine_setTuneInfo(int); + void MHEGEngine_addVisibleObject(RootClass *); void MHEGEngine_removeVisibleObject(RootClass *); void MHEGEngine_bringToFront(RootClass *); Modified: redbutton-browser/trunk/ResidentProgramClass.c =================================================================== --- redbutton-browser/trunk/ResidentProgramClass.c 2010-12-03 14:18:04 UTC (rev 538) +++ redbutton-browser/trunk/ResidentProgramClass.c 2011-02-28 17:04:27 UTC (rev 539) @@ -976,6 +976,8 @@ { GenericInteger *serviceIndex_par; int serviceIndex; + OctetString *service_url; + int tuneinfo; if(!check_parameters(params, 1, Parameter_new_generic_integer)) /* in: serviceIndex */ { @@ -986,21 +988,88 @@ serviceIndex_par = &(get_parameter(params, 1)->u.new_generic_integer); serviceIndex = GenericInteger_getInteger(serviceIndex_par, caller_gid); - (void) si_tune_index(serviceIndex); + /* what do we need to tune to */ + if((service_url = si_get_url(serviceIndex)) == NULL) + { + error("ResidentProgram: SI_TuneIndex (TIn): invalid service index (%d)", serviceIndex); + return false; + } + /* + * see ES 202 184 v2.1.1, section 11.10.8.4 for details of the TuneInfo parameter + */ + tuneinfo = MHEGEngine_getTuneInfo(); + verbose("ResidentProgram: SI_TuneIndex: tuneinfo=%d", tuneinfo); + + /* tuneinfo, bit 0: 'quiet' tune flag */ + /* don't care */ + + /* tuneinfo, bit 1: destructive/non-destructive tune */ + if((tuneinfo & 0x02) != 0) + { + /* non-destructive tune, ie current app keeps running */ + ApplicationClass *current_app = MHEGEngine_getActiveApplication(); + EventData event_tag; + verbose("ResidentProgram: SI_TuneIndex: non-destructive tune"); + MHEGEngine_retune(service_url); + event_tag.choice = EventData_integer; + event_tag.u.integer = EngineEvent_NonDestructiveTuneOK; + MHEGEngine_generateAsyncEvent(¤t_app->rootClass.inst.ref, EventType_engine_event, &event_tag); + } + else + { + /* destructive tune, ie current app dies */ + verbose("ResidentProgram: SI_TuneIndex: destructive tune"); + MHEGEngine_quit(QuitReason_Retune, service_url); + } + + /* tuneinfo, bit 2: explicit carousel ID flag */ + if((tuneinfo & 0x04) == 0) + { + /* tuneinfo, bit 3: carousel ID mapping flag */ + if((tuneinfo & 0x08) == 0) + { +printf("TODO: SI_TuneIndex: tuneinfo=%d; use current carousel\n", tuneinfo); + } + else + { +printf("TODO: SI_TuneIndex: tuneinfo=%d; use initial carousel\n", tuneinfo); + } + } + else + { + /* carousel ID is in bits 8-15 */ +printf("TODO: SI_TuneIndex: tuneinfo=%d; carousel ID=%d\n", tuneinfo, (tuneinfo >> 8) & 0xff); + } + + /* tuneinfo, bit 4: broadcaster interrupt flag */ + if((tuneinfo & 0x10) != 0) + { +printf("TODO: SI_TuneIndex: tuneinfo=%d; disable broadcaster interrupt flag\n", tuneinfo); + } + return true; } bool prog_SI_TuneIndexInfo(LIST_OF(Parameter) *params, OctetString *caller_gid) { + GenericInteger *tuneinfo_par; + int tuneinfo; + if(!check_parameters(params, 1, Parameter_new_generic_integer)) /* in: tuneinfo */ { error("ResidentProgram: SI_TuneIndexInfo (TII): wrong number or type of parameters"); return false; } -/* TODO */ -printf("TODO: program TII SI_TuneIndexInfo\n"); + + tuneinfo_par = &(get_parameter(params, 1)->u.new_generic_integer); + tuneinfo = GenericInteger_getInteger(tuneinfo_par, caller_gid); + + verbose("ResidentProgram: SI_TuneIndexInfo(%d)", tuneinfo); + + MHEGEngine_setTuneInfo(tuneinfo); + return true; } Modified: redbutton-browser/trunk/si.c =================================================================== --- redbutton-browser/trunk/si.c 2010-12-03 14:18:04 UTC (rev 538) +++ redbutton-browser/trunk/si.c 2011-02-28 17:04:27 UTC (rev 539) @@ -93,20 +93,6 @@ return &si_channel[index]; } -bool -si_tune_index(int index) -{ - if(index < 0 || index > si_max_index) - { - error("SI_TuneIndex: invalid service index (%d); range is 0-%d", index, si_max_index); - return false; - } - - MHEGEngine_quit(QuitReason_Retune, &si_channel[index]); - - return true; -} - /* * URL format is: * dvb://original_network_id.[transport_id].service_id Modified: redbutton-browser/trunk/si.h =================================================================== --- redbutton-browser/trunk/si.h 2010-12-03 14:18:04 UTC (rev 538) +++ redbutton-browser/trunk/si.h 2011-02-28 17:04:27 UTC (rev 539) @@ -10,8 +10,6 @@ int si_get_index(OctetString *); OctetString *si_get_url(int); -bool si_tune_index(int); - unsigned int si_get_network_id(OctetString *); unsigned int si_get_transport_id(OctetString *); unsigned int si_get_service_id(OctetString *); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Simon K. <s.k...@er...> - 2011-02-28 12:44:56
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 21/02/11 17:41, Simon Kilvington wrote: > On 19/02/11 18:51, John Williams wrote: > >> I've attached a patch which makes it work. > >> This needs more work on it: my patch just keeps running the original >> carousel, and we should instead switch to using a carousel from the new >> service. But it has got me past the point where it was going wrong. >> When I've got time I'll try to produce a complete fix. > >> Thanks, >> John > > > cool! I'll integrate what you've done - I think the carousel switching > will need a bit of thinking about... just got a quick question - I don't have access to FreeSat, so I can't test this, but what happens to the video stream when the channel changes with your patch? Does the video carry on playing? If it works as it is (ie the new channel video appears) then it is probably just lucky. I think we are going to have to reset the MHEGStreamPlayer object after the tune - actually, the PID filter to the dvr device will need updating, but it is done through the stream player object. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk1rmL0ACgkQmt9ZifioJSzFNACeOVt0ouVfReFYBfgqjgg/qp2k 3EEAnirmcQpyExsMEfzVVr2JyhGQsv88 =jY0T -----END PGP SIGNATURE----- |
From: Simon K. <s.k...@er...> - 2011-02-21 17:41:24
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 19/02/11 18:51, John Williams wrote: > > I've attached a patch which makes it work. > > This needs more work on it: my patch just keeps running the original > carousel, and we should instead switch to using a carousel from the new > service. But it has got me past the point where it was going wrong. > When I've got time I'll try to produce a complete fix. > > Thanks, > John > cool! I'll integrate what you've done - I think the carousel switching will need a bit of thinking about... -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk1io7oACgkQmt9ZifioJSyAlgCfdkwMoZyl3PGh2g1CdyGmT1ET t3MAnigabownJqZ9dQALfIpxXVxZnS8g =eY6h -----END PGP SIGNATURE----- |
From: John W. <jo...@po...> - 2011-02-19 18:51:27
|
On Sat, 19 Feb 2011 10:45:28 +0000 Simon Kay <si...@un...> wrote: > the attached patch will print out what value the app is trying to pass > to the SI_TuneIndexInfo function - can you give it a try so we can see > what the app is trying to do? Thanks for this: it was just the clue I needed to get it working. The parameter to SI_TuneIndexInfo is 11 (0x0b); so we should keep running after the tune. I've attached a patch which makes it work. This needs more work on it: my patch just keeps running the original carousel, and we should instead switch to using a carousel from the new service. But it has got me past the point where it was going wrong. When I've got time I'll try to produce a complete fix. Thanks, John |
From: Simon K. <si...@un...> - 2011-02-19 11:20:11
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 18/02/11 22:54, John Williams wrote: > On Fri, 18 Feb 2011 17:31:28 +0000 > Simon Kilvington <s.k...@er...> wrote: > >> think I can see what the problem is - looking into this missing >> Resident Program a bit more... >> >> TODO: program TII SI_TuneIndexInfo >> >> it looks like this should tell the browser to continue running the >> current MHEG app when it retunes the video - that would explain why >> there is no ~//a or ~//startup etc in the new channel - it's supposed >> to keep running the current app > > I found some new documentation: > http://www.etsi.org/deliver/etsi_es/202100_202199/202184/02.01.01_60/es_202184v020101p.pdf > > which explains what SI_TuneIndexInfo should do. > > If I can produce a patch myself, I'll send it to you. Although I don't > have much time for it either. > > Thanks, > John > the attached patch will print out what value the app is trying to pass to the SI_TuneIndexInfo function - can you give it a try so we can see what the app is trying to do? -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk1fn0gACgkQlZ0YqQ0PBu5p3wCfeSnGN7gboD3uWg1JgpLNpTlV xiwAoK0dMAp4JAboXu5pNDtj2uthv7pb =1Ptl -----END PGP SIGNATURE----- |
From: John W. <jo...@po...> - 2011-02-18 22:55:01
|
On Fri, 18 Feb 2011 17:31:28 +0000 Simon Kilvington <s.k...@er...> wrote: > think I can see what the problem is - looking into this missing > Resident Program a bit more... > > TODO: program TII SI_TuneIndexInfo > > it looks like this should tell the browser to continue running the > current MHEG app when it retunes the video - that would explain why > there is no ~//a or ~//startup etc in the new channel - it's supposed > to keep running the current app I found some new documentation: http://www.etsi.org/deliver/etsi_es/202100_202199/202184/02.01.01_60/es_202184v020101p.pdf which explains what SI_TuneIndexInfo should do. If I can produce a patch myself, I'll send it to you. Although I don't have much time for it either. Thanks, John |