Skip to main content

How to create BD-J PlayList

4 replies [Last post]
yktd26
Offline
Joined: 2009-12-02

Hi,
I'm newbie in BD-J

I just compiled my first project BD-J with JavaME SDK 3

Now I want to play a video with PlayList, but I don't know how to use the Playlist, and the worse is that, I even don't know how to create it.

Someone can help me?

Just un other question is what is the different between
bd://PLAYLIST:00000
and
bd://0.PLAYLIST:00000

when I want to create a BDLocator

Thx!!

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
yogesh123
Offline
Joined: 2010-07-23

hi,

I am new to BDJ....Could you please let me know how to create a playlist and add in to BDMV directory. I am using J2ME sdk 3.0 for building my project.

I am also not able to setup ADA and BUDA directory for read and writing the files. I know we need to create a bluray.Xlet.perm file. But i dont know, how to create the permission file. I have set few properties in project.properties filein nbproject folder but no success.

Please guide me

thanks

ihupont
Offline
Joined: 2010-03-03

Hi all!

I am trying to develop a (a priori!) very simple BD-J application for PS3 whose objective is to show on the screen a jmf player reproducing a .mp4 video file in a scene container. I have tried this code… unsuccessfully :-(

public class XletviewJMFExample
extends HContainer
implements Xlet, ControllerListener {
private HScene scene;
private XletContext context;
private Player player;

public void initXlet(XletContext ctx)
throws XletStateChangeException {
this.context = ctx;
HSceneFactory factory = HSceneFactory.getInstance();
HSceneTemplate hst = new HSceneTemplate();
hst.setPreference(HSceneTemplate.SCENE_SCREEN_DIMENSION,
new org.havi.ui.HScreenDimension(1, 1),
HSceneTemplate.REQUIRED);
hst.setPreference(HSceneTemplate.SCENE_SCREEN_LOCATION,
new org.havi.ui.HScreenPoint(0, 0),
HSceneTemplate.REQUIRED);
scene = factory.getBestScene(hst);
if (scene == null)
throw new XletStateChangeException("Can't create HScene");
Rectangle rect = scene.getBounds();
setBounds(rect);

scene.setVisible(false);
scene.add(this);
}

public void startXlet() {
scene.setVisible(true);
try {
// My BDLocator is "bd://0.PLAYLIST:00008"
String bdUrl = (new BDLocator(null, -1, 8, -1, -1, null)).toExternalForm();
MediaLocator medialocator = new MediaLocator(bdUrl);
player = Manager.createPlayer(medialocator);
player.addControllerListener(this);
player.setMediaTime(new Time(0));
player.prefetch();
player.setRate(1f);
player.start();
if (context != null){}
System.out.println("sleeping...");
Thread.sleep(10000);

System.out.println("stopping video 1");
player.stop();

Thread.sleep(5000);
System.out.println("deallocating video 1");
player.deallocate();

Thread.sleep(5000);
System.out.println("closing video 1");
player.close();

Thread.sleep(5000);
System.out.println("starting video 2");
player.addControllerListener(this);
player.start();

System.out.println("started video 2");
Thread.sleep(10000);

}
catch (NoPlayerException e){
e.printStackTrace();
}
catch (org.davic.net.InvalidLocatorException e){
e.printStackTrace();
}
catch (InterruptedException e){
e.printStackTrace();
}
catch (IOException e) {
e.printStackTrace();
}

}

public void pauseXlet() {
player.stop();
player.close();
player = null;
}

public void destroyXlet(boolean unconditional) {
player.stop();
player.close();
player = null;
if (scene != null) {
scene.setVisible(false);
scene.remove(this);
HSceneFactory.getInstance().dispose(scene);
}
scene = null;
}

public void controllerUpdate(ControllerEvent event) {
System.out.println("! " + event + " !");
if (event instanceof RealizeCompleteEvent) {
Component comp;
if ((comp = player.getVisualComponent()) != null) {
add(comp);
System.out.println("Added " + comp + " as a video component");
comp.setSize(720, 576);
setSize(720, 576);
validate();
repaint();
}
}
else if (event instanceof EndOfMediaEvent) {
player.setMediaTime(new Time(0));
player.start();
}
}
}

I think maybe my problem is due to one of these issues:

- I am creating the PLAYLIST and STREAM directories of the BDMV root directory of my blu-ray disc thanks to the soft multiAVCHD (http://multiavchd.deanbg.com/tutorial.php): I just add the media (in this case, my .mp4 video files) and start the blu-ray disc building process. Then, the soft outputs the BDMV directory and I copy the obtained PLAYLIST and STREAM sub-directories into my own BDMV directory (where my BD-J application is located). Is this process correct? Do I have to do something more? I have seen that some files with .clpi extension are also created by the software, but I’m not able to understand what they mean and whether they are related to the playlist or not.
- When I debug my project, I don’t have any Exception. So my player seems to be correctly created and started, and my bdlocator seems to point to an existing playlist. I am even able to get the events related to the player life-cycle (startEvent, prefetchEvent, etc.). So maybe the problem could be related to the way I paint the visualComponent and controlComponent of the player in the screen? Do I need any permission in my PRF file to achieve it?
- In a more general way, do I need to establish any extra permission/configuration to use jmf players and playlists in my blu-ray disc?
- Finally, could my problem be related to the codecs that PS3 is able to reproduce? I use .mp4 video files…

I would be very grateful if someone could help me with that problem. I am really in a hurry with that BD-J project and not able to make any interesting progress :_(
Thanks in advance ;-) Best,

ihupont

yktd26
Offline
Joined: 2009-12-02

hi,
I can now create the PlayList by Ble-Print, and I can run a film by using it,

At the same time, I find that, with the player in BDJO I can also playback a

content who has already a menu, when I clic the button on the menu, it works,

but I can't use Left or Right key to active the button beside

With mouse it could be done, but not with keyboard

guydou
Offline
Joined: 2009-11-19

Hey,

I am also a beginner with blu-ray, but I think I can help you.

In the HDcookbook src you can find under the package bd.tools.playlist, a tool that can help you convert from xml to MPLS and from MPLS to XML.

I converted existing MPLS to XML, I tried to understand my configuration options, later I converted an XML I created to MPLS.

Hope that helps