Skip to main content

GRIN Questions

1 reply [Last post]
Anonymous

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Bill Foote

Hey Joe,

Mark R. Johnson wrote:
> Joe,
>
> I've answered all the questions I could below, but many of these are
> going to require Bill's input.
>
> --Mark
>
>
> At 12:08 AM 5/5/2007, Joe Rice wrote:
>> After GRINning a bunch today, a few more questions....
>>
>> 1. Does GRIN currently support loading assets from outside a JAR file?
>> (eg fonts from the AUXDATA directory)
>
> [MJ] No. Not yet.

True, but it's foreseen: I think it's com.hdcookbook.util that
has a class that all asset loading goes through. It should be
easy to tweak for now, and I'll figure out something to make
it easier before too long.

>
>> 2. Must all images in each image sequence currently be anchored to the
>> same point?
>
> [MJ] Yes.
>
>
>> 3. When loading fonts from within the JAR, is the dvb.fontindex file
>> required?
>
> [MJ] Bill?

I believe so. A word about the font stuff:

Right now, it's untested. I just gave away my BD-J development laptop,
and the Dell won't come in for a week or so, so it'll be hard for me to
test this stuff for at least a week or two. I think I have font handling
figured out (I had to, for that chapter of the book!), but I haven't looked
at this untested part of GRIN since then. So, handle with care, and if you
find something that's wrong, please do a putback!

>
>> 4. Under what conditions is the default font used instead of a
>> requested font? Perhaps GRIN could write some debug info when it has a
>> problem loading a font, indicating why it uses the default font. (I'm
>> getting some loaded fonts to work, some not - I think the problems are
>> with the fonts that aren't loading, and not GRIN, but it'd be useful
>> to have some debug info)
>
> [MJ] Bill?

I bet GRIN doesn't know. The Java runtime probably just falls back
to the default when there's a problem.

>
>> 5. How does one specify the default font for text display? Font name
>> of "default" with a null value for the file_name field?
>
> [MJ] Bill?

You don't, and using the default font is a radioactive idea.
The thing is, the BD spec offers nothing more than correct
informative guidance: PBP requires that there be a default
font, and it ought to be visible, but it doesn't say anything
about what that font is. So, you should only use the default
font if you like having a disc that looks different on different
players.

>
>> 6. Looking at the Ryan sample code, it seems that multiple color_entry
>> values can be applied for text entries. Does this result in animation
>> of the text?
>
> [MJ] Bill?

Yes.

>
>> I also encountered an issue where I was able to lock up PowerDVD with
>> a certain combination of using the same source png in a fixed image
>> and an image sequence - no exception was thrown, but it got stuck in
>> some sort of loop. I'll work on reproducing it in a format that's a
>> bit more portable than the CES Demo so that it can be tested in
>> various players to see where the problem lies.
>>
>> The offending section: (this image was loaded previously in a
>> fixed_image feature)
>>
>> feature image_sequence F:Quiz.Countdown.Timeout
>> 744 577
>> "images/Clock_BG/N1_Clock_BG_v"
>> {
>> 02 + + + + +
>> - - - - - -
>> } ".PNG" repeat
>> ;
>>
>>
>> Swapping the order of empty frames and image frames fixed it:
>>
>> ## If the two lines in the name_or_continuation array below are
>> swapped, playback hangs
>>
>> feature image_sequence F:Quiz.Countdown.Timeout
>> 744 577
>> "images/Clock_BG/N1_Clock_BG_v"
>> {
>> - - - - - -
>> 02 + + + + +
>> } ".PNG" repeat
>> ;
>>
>> Cheers,
>> Joe

Huh. That sounds more like a GRIN bug than a PowerDVD bug. It'd
be really interesting if it could be reproduced under big JDK. The
point here is that if you can get it to happen with big JDK, then
you can get a thread dump, or step through it in a debugger. I've
used NetBeans like this with good success.

Check out GuiGenericMain, in com.hdcookbook.grin.test.bigjdk.
It's designed to let you drive a GRIN script with a simple GUI
running under big JDK. Mark will remember this well - we were
looking at an off-by-one-frame bug in the Fox CES demo, so I initially
threw this together so I could single-step through an animation and
thereby debug the script. In general, I'm a big believer in being
able to do at least some simulation under big JDK, where you have
a quick cycle time and a full debugger.

Bill
--
Bill Foote
Blu-ray Java Televangelist, Sun Microsystems
bill.foote at sun.com

---------------------------------------------------------------------
To unsubscribe, e-mail: bd-j-dev-unsubscribe@hdcookbook.dev.java.net
For additional commands, e-mail: bd-j-dev-help@hdcookbook.dev.java.net