Skip to main content

How to Stop BD Player (not javax.media.Player)

3 replies [Last post]
vinaykagarwal
Offline
Joined: 2006-01-14

Hello,

In my Xlet, the Stop button is being captured for internal use. I am trying to create a function that achieves effect similar to pressing the Stop button, i.e., the disk is stopped and subsequent pressing of Play restarts the disk and Xlets.

To remove unnecessary complexities, I am using "hello world" Xlet generated automatically by NetBeans. Only addition to it is add UserEventListener to look for any keystroke to terminate the Xlet. I have tried the following to achieve this functionality unsuccessfully (on TMT and on Sony BDPS 360)

1. Cleanup and notifyDestroyed() - makes the screen blank but the BD player is left in some state where the Play key does not start Xlet again. Ejecting and reinserting starts Xlet just fine.

2. destroyXlet(true) - Called it from an independent thread - has exactly the same effect as notifyDestroyed().

3. System.exit(1) - results in security exception.

4. Tried to throw exceptions - tried RuntimeException, IndexOutOfBoundsException, and DivideByZeroException - seem to have no effect on Xlet.

I would appreciate any guidance. Thanks in advance.

Message was edited by: vinaykagarwal

Reply viewing options

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

Joe - It works! Thanks for pointing me to it.
Vinay

Joe Rice

The most reliable way to do this that we've found is to start an HDMV
title with no navigation commands in the Movie Object.

Cheers,
Joe

On Jul 12, 2009, at 5:13 PM, bd-j-dev@mobileandembedded.org wrote:

> Hello,
>
> In my Xlet, the Stop button is being captured for internal use. I am
> trying to create a function that achieves effect similar pressing
> the Stop button, i.e., the disk is stopped and subsequent pressing
> of Play restarts the disk and Xlets.
>
> To remove unnecessary complexities, I am using "hello world" Xlet
> generated automatically by NetBeans. Only addition to it is add
> UserEventListener to look for any keystroke to terminate the Xlet. I
> have tried the following to achieve this functionality
> unsuccessfully (on TMT and on Sony BDPS 360)
>
> 1. Cleanup and notifyDestroyed() - makes the screen blank but the BD
> player is left in some state where the Play key does not start Xlet
> again. Ejecting and reinserting starts Xlet just fine.
>
> 2. destroyXlet(true) - Called it from an independent thread - has
> exactly the same effect as notifyDestroyed().
>
> 3. System.exit(1) - results in security exception.
>
> 4. Tried to throw exceptions - tried RuntimeException,
> IndexOutOfBoundsException, and DivideByZeroException - seem to have
> no effect on Xlet.
>
> I would appreciate any guidance. Thanks in advance.
> [Message sent by forum member 'vinaykagarwal' (vinaykagarwal)]
>
> http://forums.java.net/jive/thread.jspa?messageID=355331
>
> ---------------------------------------------------------------------
> 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
>

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

vinaykagarwal
Offline
Joined: 2006-01-14

Joe,

Thanks for responding so quickly. Could you please elaborate a bit more on your solution (possibly with code fragments)?

Thanks again.
Vinay