Skip to main content

Locator problem

6 replies [Last post]
tilemahosg
Offline
Joined: 2008-04-08

Hello.

In my previous posts, I think I didn't introduce myself. Well, I'm Tilemahos. I'm a programmer and musician too and I would like to make a turn to BD Authoring.

I tried to make an application (xlet), that runs and plays an HDMV Playlist. I saw that mr. Bill does it (in the HD Cookbook), by implementing org.bluray package and using BDLocator. Since I've tried to find org.bluray package and I couldn't manage to do so, is there any other way of locating an HDMV Playlist and playing it through javax.media.Player or another kind of player? I've read that mr. Bill said that there is a way of doing so, with javax.tv.locator.LocatorFactory.createLocator(). I tried and I couldn't make it neither. Can I have an example pls?
My second question is that when I try to call an HDMV Playlist using a bd format url, is it a string like this ("bd://0.PLAYLIST:00013.MARK:00000")?
And my last question. I've read that when you try to display something with an xlet, background must have a movie because otherwise it won't produce nothing, but a black screen. Is it right or I have translated it in a wrong way?

I'm on a little hurry, so any post - answer, would be appreciated.

Thanks,
Tilemahos.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
bddeveloper
Offline
Joined: 2008-01-14

We saw a similar issue so we tried this:

"bd://1.PLAYLIST:00001.MARK:00000"

This seems to work, we have no idea why.

We did try this:

"bd://PLAYLIST:00001.MARK:00000"

But this does not work.

Can anyone help explain how to create the correct URL?

Thank you,

Scott

tilemahosg
Offline
Joined: 2008-04-08

Well...

From what I can understand, this is the format of a bd url. In my opinion the first part ("1.") shows that we refer to BD with discID 1, to the playlist with ID 00001 and the mark 00000 of this playlist.
But, how did you do it Scott? Using which locator? Could I have an example or a copy of this part of your code pls?

Thanks anyway.
Tilemahos.

bddeveloper
Offline
Joined: 2008-01-14

Here is what we did:

thePlayer.stop();
waitForPlayerStarted(3000);
try {
BDLocator bdlocator = new BDLocator("bd://1.PLAYLIST:00001.MARK:00000");
theplaylistChangeControl.selectPlayList(bdlocator);
} catch (Exception ex)
{ }
thePlayer.start();
waitForPlayerStarted(3000);

This seems to work but we might be just getting lucky and if we change any of the audio and video titles it might not work?

Scott

tilemahosg
Offline
Joined: 2008-04-08

Good, but here you make use of the BDLocator that requires to have the org.bluray package. Can you please tell me where to get this package in order to use BDLocator? As for the bd formatted url I'm not very sure for what I said in my last post... Any other who knows, could help please?

Thanks,
Tilemahos.

Bill Foote

bd-j-dev@mobileandembedded.org wrote:
> Good, but here you make use of the BDLocator that requires to have the org.bluray package. Can you please tell me where to get this package in order to use BDLocator? As for the bd formatted url I'm not very sure for what I said in my last post... Any other who knows, could help please?
>

For the specific case of locators, you can pass the same
string to the JavaTV LocatorFactory API
(javax.tv.locator.LocatorFactory IIRC). The thing that pops
out of the factor will be an instanceof BDLocator, and this
solves your locator problem quite well. But, ultimately,
you really want access to org.bluray APIs, for other reasons.

OK, so here's the deal with that. It's more complicated
than it should be, I'm afraid.

What you need is what are called "compilation stubs" - you need some
.class files in a zip file, like org/bluray/mumble/SomeAPI.class.
Also, it'd probably be nice if you could get javadocs that include
these org.bluray classes.

The "right" way to do this is for the copyright holder (the BDA)
to release them under reasonable licensing terms. Note that you
do (I'm told) get a copy of these "org.bluray stubs" when you get
a licensed copy of the spec book, but that starts at $4K and comes
with other strings attached. The BDA has been made aware that this
is an issue, and that developers need these stubs.

As an employee of a BDA member company myself, the only thing I'm
authorized to say from the BDA side is:

The BDA has formed a working group with the intent of making
these stubs available.

Switching back to my role as BD developer, I can say that I hope this
will be soon :-)

In the meantime, there are pragmatic solutions. Maybe you know
someone (e.g. with a licensed copy), and you can work with them
somehow (subject to any non-disclosures etc.). Failing that, you
can always dig into the implementation of one of the software players.

I haven't done this myself, but if you look around in the directories
that hold a software player's implementation, you'll probably find
a .zip or a .jar file that contains a bunch of .class files, holding
the platform implementation of the software player. It's probably called
"classes.zip" or "rt.jar" or something like that. When you find this,
you can compile against it (javac -classpath).

Note that this is a little dangerous, in that the software player
implementation might be a *superset* of the normatively guaranteed
platform. Also, this gives you the API signatures of org.bluray
(if you run javap), but it doesn't get you the documentation - you
can tell a lot from method names, but it's no substitute for real
documentation.

I'd very much consider this a hack, and it's a bad idea in many ways,
but while the wheels within the BDA are (slowly) turning, it may be
the only option for some.

HTH,

Bill

---------------------------------------------------------------------
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

bddeveloper
Offline
Joined: 2008-01-14

Hello Bill,

Can you explain how this URL works:

"bd://1.PLAYLIST:00001.MARK:00000"

verse this one:

"bd://PLAYLIST:00001.MARK:00000"

Thank you,

Scott