[libbluray-devel] [Git][videolan/libbluray][master] Simplify
Petri Hintukainen
gitlab at videolan.org
Sat Aug 15 23:07:11 CEST 2020
Petri Hintukainen pushed to branch master at VideoLAN / libbluray
Commits:
898b36bf by hpi1 at 2020-08-16T00:05:44+03:00
Simplify
- - - - -
1 changed file:
- src/libbluray/bdj/java/org/videolan/Libbluray.java
Changes:
=====================================
src/libbluray/bdj/java/org/videolan/Libbluray.java
=====================================
@@ -38,7 +38,7 @@ import org.bluray.bdplus.Status;
import org.bluray.net.BDLocator;
import org.bluray.system.RegisterAccess;
import org.bluray.ti.DiscManager;
-import org.bluray.ti.TitleImpl;
+import org.bluray.ti.Title;
import org.bluray.ti.selection.TitleContext;
import org.bluray.ui.event.HRcEvent;
import org.dvb.event.EventManager;
@@ -629,17 +629,15 @@ public class Libbluray {
*/
private static boolean startTitle(int titleNumber) {
-
- TitleContext titleContext = null;
try {
BDLocator locator = new BDLocator(null, titleNumber, -1);
- TitleImpl title = (TitleImpl)SIManager.createInstance().getService(locator);
+ Title title = (Title)SIManager.createInstance().getService(locator);
if (title == null) {
System.err.println("startTitle() failed: title " + titleNumber + " not found");
return false;
}
- titleContext = (TitleContext)ServiceContextFactory.getInstance().getServiceContext(null);
+ TitleContext titleContext = (TitleContext)ServiceContextFactory.getInstance().getServiceContext(null);
titleContext.start(title, true);
return true;
@@ -650,9 +648,8 @@ public class Libbluray {
}
private static boolean stopTitle(boolean shutdown) {
- TitleContext titleContext = null;
try {
- titleContext = (TitleContext)ServiceContextFactory.getInstance().getServiceContext(null);
+ TitleContext titleContext = (TitleContext)ServiceContextFactory.getInstance().getServiceContext(null);
if (shutdown) {
titleContext.destroy();
} else {
View it on GitLab: https://code.videolan.org/videolan/libbluray/-/commit/898b36bff9b2c2c97a068e771aa47cef1a09dc8a
--
View it on GitLab: https://code.videolan.org/videolan/libbluray/-/commit/898b36bff9b2c2c97a068e771aa47cef1a09dc8a
You're receiving this email because of your account on code.videolan.org.
More information about the libbluray-devel
mailing list