Re: [Redbutton-devel] Testing rb-browser with NZ MHEG Profile
Brought to you by:
skilvington
|
From: Simon K. <s.k...@er...> - 2007-04-03 11:20:59
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, thanks for the patches and the sample app - I've just applied the EPG key patch - I'll have a look at implementing the two resident programmes we need - but I can't see any problems. Open Media Support wrote: > OK I've done a quick hack on the rb-browser code to return the same values > as the MythTV MHEG stack for the missing functions. This means that the > test data will now display a semi-working EPG screen. New diff is attached > below. This really is a brute force hack as I'm still trying to understand > the code. > > Steve > > > > -------------------------------------------- > OpenMedia Limited > sales - sa...@op... > support - su...@op... > website - http://www.openmedia.co.nz > > > ------------------------------------------------------------------------ > > Index: ResidentProgramClass.c > =================================================================== > --- ResidentProgramClass.c (revision 272) > +++ ResidentProgramClass.c (working copy) > @@ -991,6 +991,13 @@ > bool > prog_SI_GetBasicSI(LIST_OF(Parameter) *params, OctetString *caller_gid) > { > + GenericInteger *serviceIndex_par; > + GenericInteger *networkId_par; > + GenericInteger *orignetworkId_par; > + GenericInteger *transportId_par; > + GenericInteger *serviceId_par; > + > + int serviceIndex; > if(!check_parameters(params, 5, Parameter_new_generic_integer, /* in: serviceIndex */ > Parameter_new_generic_integer, /* out: networkId */ > Parameter_new_generic_integer, /* out: origNetworkId */ > @@ -1000,8 +1007,23 @@ > error("ResidentProgram: SI_GetBasicSI (BSI): wrong number or type of parameters"); > return false; > } > + serviceIndex_par = &(get_parameter(params, 1)->u.new_generic_integer); > + serviceIndex = GenericInteger_getInteger(serviceIndex_par, caller_gid); > /* TODO */ > -printf("TODO: program BSI SI_GetBasicSI\n"); > +printf("TODO: program BSI SI_GetBasicSI %d %d\n",*serviceIndex_par,serviceIndex); > + > + networkId_par = &(get_parameter(params, 2)->u.new_generic_integer); > + orignetworkId_par = &(get_parameter(params, 3)->u.new_generic_integer); > + transportId_par = &(get_parameter(params, 4)->u.new_generic_integer); > + serviceId_par = &(get_parameter(params, 5)->u.new_generic_integer); > + > + GenericInteger_setInteger(networkId_par, caller_gid, 47); > + GenericInteger_setInteger(orignetworkId_par, caller_gid, 47); > + GenericInteger_setInteger(transportId_par, caller_gid, 22); > + GenericInteger_setInteger(serviceId_par, caller_gid, 1035); > + > +printf("TODO: program BSI SI_GetBasicSI faked return values 47 47 22 1035\n"); > + > return true; > } > > @@ -1022,6 +1044,11 @@ > bool > prog_CheckContentRef(LIST_OF(Parameter) *params, OctetString *caller_gid) > { > + GenericInteger *contentRef_par; > + GenericBoolean *ret_boolean_par; > + GenericInteger *ret_contentRef_par; > + ContentReference ref; > + > if(!check_parameters(params, 3, Parameter_new_generic_content_reference, /* in: ref-to-check */ > Parameter_new_generic_boolean, /* out: ref-valid-var */ > Parameter_new_generic_content_reference)) /* out: ref-checked-var */ > @@ -1029,8 +1056,19 @@ > error("ResidentProgram: CheckContentRef (CCR): wrong number or type of parameters"); > return false; > } > + contentRef_par = &(get_parameter(params, 1)->u.new_generic_integer); > + ret_boolean_par = &(get_parameter(params, 2)->u.new_generic_boolean); > + ret_contentRef_par = &(get_parameter(params, 3)->u.new_generic_integer); > + > + ContentReference *val = GenericContentReference_getContentReference(contentRef_par, caller_gid); > + ref.size = val->size; > + ref.data = val->data; > /* TODO */ > printf("TODO: program CCR CheckContentRef\n"); > + > + GenericBoolean_setBoolean(ret_boolean_par, caller_gid, true); > + GenericContentReference_setContentReference(ret_contentRef_par, caller_gid, &ref); > + verbose("ResidentProgram: CheckContentRef(\"%.*s\")", val->size, val->data); > return true; > } > > Index: rb-keymap.c > =================================================================== > --- rb-keymap.c (revision 272) > +++ rb-keymap.c (working copy) > @@ -47,6 +47,7 @@ > "Yellow", > "Blue", > "Text", > + "EPG", > NULL > }; > int i; > Index: MHEGEngine.c > =================================================================== > --- MHEGEngine.c (revision 272) > +++ MHEGEngine.c (working copy) > @@ -818,6 +818,11 @@ > data.u.integer = EngineEvent_TextKeyFunction; > MHEGEngine_generateAsyncEvent(&app->rootClass.inst.ref, EventType_engine_event, &data); > } > + else if(key == MHEGKey_EPG) > + { > + data.u.integer = EngineEvent_EPGKeyFunction; > + MHEGEngine_generateAsyncEvent(&app->rootClass.inst.ref, EventType_engine_event, &data); > + } > else if(key == MHEGKey_Cancel) > { > data.u.integer = EngineEvent_CancelKeyFunction; > Index: MHEGEngine.h > =================================================================== > --- MHEGEngine.h (revision 272) > +++ MHEGEngine.h (working copy) > @@ -45,6 +45,7 @@ > #define EngineEvent_GreenKeyFunction 101 > #define EngineEvent_YellowKeyFunction 102 > #define EngineEvent_BlueKeyFunction 103 > +#define EngineEvent_EPGKeyFunction 300 > /* all other values are reserved */ > > /* EventTag key numbers for UserInput events */ > @@ -69,6 +70,7 @@ > #define MHEGKey_Yellow 102 > #define MHEGKey_Blue 103 > #define MHEGKey_Text 104 > +#define MHEGKey_EPG 300 > > /* ContentHook values */ > #define ContentHook_Bitmap_MPEG 2 > Index: Makefile > =================================================================== > --- Makefile (revision 272) > +++ Makefile (working copy) > @@ -1,7 +1,7 @@ > CC=gcc > -CFLAGS=-Wall -O2 > +#CFLAGS=-Wall -O2 > # gprof profiling > -#CFLAGS=-Wall -O2 -pg > +CFLAGS=-Wall -O2 -pg -g > > DESTDIR=/usr/local > > Index: MHEGDisplay.c > =================================================================== > --- MHEGDisplay.c (revision 272) > +++ MHEGDisplay.c (working copy) > @@ -60,6 +60,7 @@ > { XK_y, MHEGKey_Yellow }, > { XK_b, MHEGKey_Blue }, > { XK_t, MHEGKey_Text }, > + { XK_e, MHEGKey_EPG }, > { 0, 0 } /* terminator */ > }; > > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > 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 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.4 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGEjiLmt9ZifioJSwRAkj2AJ4mfuL1cZERG2xeGlIAEJ0TCAiHAgCfUOyp iCIquhWlI4TIxN4lYVbrvjE= =3M9Y -----END PGP SIGNATURE----- |