Skip to main content

how to jump to next title on disc

2 replies [Last post]
veritastr
Offline
Joined: 2008-11-24
Points: 0

i'm using these lines of code to jump to a title on disc. but how can i jump to the next title on disc, or how can i get the title number currently playing?

<br />
	public static void selectTitle() {<br />
		try {<br />
			TitleContext tc = (TitleContext) Main.scf.getServiceContext(Main.xc);<br />
			SIManager manager = SIManager.createInstance();<br />
			BDLocator loc = new BDLocator(null, 1, -1);<br />
			Title title = (Title) manager.getService(loc);<br />
			if (title != null) tc.start(title, true);<br />
		} catch (ServiceContextException e) {<br />
			// TODO Auto-generated catch block<br />
			e.printStackTrace();<br />
		} catch (InvalidLocatorException e) {<br />
			// TODO Auto-generated catch block<br />
			e.printStackTrace();<br />
		} catch (SecurityException e) {<br />
			// TODO Auto-generated catch block<br />
			e.printStackTrace();<br />
		} catch (javax.tv.locator.InvalidLocatorException e) {<br />
			// TODO Auto-generated catch block<br />
			e.printStackTrace();<br />
		}<br />
	}<br />

Reply viewing options

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

RegisterAccess.getInstance().getPSR(RegisterAccess.PSR_TITLE_NR)
should give you the current title number

Gunnar

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

veritastr
Offline
Joined: 2008-11-24
Points: 0

thanks a lot Gunnar, it works like charm.

cagdas