[libbluray-devel] [Git][videolan/libbluray][master] 4 commits: Log BD-J resource URL lookups
Petri Hintukainen
gitlab at videolan.org
Sat Apr 13 15:45:33 CEST 2019
Petri Hintukainen pushed to branch master at VideoLAN / libbluray
Commits:
050c6041 by hpi1 at 2019-04-08T14:39:32Z
Log BD-J resource URL lookups
- - - - -
5c732b2a by hpi1 at 2019-04-09T07:09:38Z
Add missing libxml version to required packages
- - - - -
2bf35f7c by hpi1 at 2019-04-13T13:14:26Z
Move function
- - - - -
6c0e42b8 by hpi1 at 2019-04-13T13:41:17Z
BD-J: Filter out some duplicate mark events
Chapters are also marks, separate chapter events should be removed when mark tracking is fixed.
- - - - -
5 changed files:
- ChangeLog
- configure.ac
- src/libbluray/bdj/java/org/videolan/BDJClassLoader.java
- src/libbluray/bdj/java/org/videolan/media/content/playlist/Handler.java
- src/libbluray/bdj/java/org/videolan/media/content/playlist/PlaybackControlImpl.java
Changes:
=====================================
ChangeLog
=====================================
@@ -1,3 +1,6 @@
+2019-??-??: Version 1.1.2
+- Add libxml version to pkg-config Requires.private.
+
2019-04-05: Version 1.1.1
- Enable playback without menus when index.bdmv is missing.
- Improve error resilience and stability.
=====================================
configure.ac
=====================================
@@ -157,7 +157,7 @@ AS_IF([test "x$with_libxml2" != "xno"], [
PKG_CHECK_MODULES([LIBXML2], [libxml-2.0 >= 2.6],
[with_libxml2=yes; AC_DEFINE([HAVE_LIBXML2], [1],
[Define to 1 if libxml2 is to be used for metadata parsing])])
- PACKAGES="$PACKAGES libxml-2.0"
+ PACKAGES="$PACKAGES libxml-2.0 >= 2.6"
])
dnl FreeType2
=====================================
src/libbluray/bdj/java/org/videolan/BDJClassLoader.java
=====================================
@@ -280,8 +280,11 @@ public class BDJClassLoader extends URLClassLoader {
}
public URL getResource(String name) {
+ URL url;
name = name.replace('\\', '/');
- return super.getResource(name);
+ url = super.getResource(name);
+ logger.info("getResource(" + name + ") --> " + url);
+ return url;
}
/* final in J2ME
@@ -292,8 +295,11 @@ public class BDJClassLoader extends URLClassLoader {
*/
public URL findResource(String name) {
+ URL url;
name = name.replace('\\', '/');
- return super.findResource(name);
+ url = super.findResource(name);
+ logger.info("findResource(" + name + ") --> " + url);
+ return url;
}
public Enumeration findResources(String name) throws IOException {
@@ -302,8 +308,13 @@ public class BDJClassLoader extends URLClassLoader {
}
public InputStream getResourceAsStream(String name) {
+ InputStream is;
name = name.replace('\\', '/');
- return super.getResourceAsStream(name);
+ is = super.getResourceAsStream(name);
+ if (is == null) {
+ logger.info("getResourceAsStream(" + name + ") failed");
+ }
+ return is;
}
private String xletClass;
=====================================
src/libbluray/bdj/java/org/videolan/media/content/playlist/Handler.java
=====================================
@@ -253,15 +253,40 @@ public class Handler extends BDHandler {
}
}
- protected void doChapterReached(int param) {
- ((PlaybackControlImpl)controls[9]).onChapterReach(param);
+ BDLocator lastMarkLocator = null;
+ protected void doChapterReached(int chapter) {
+ if (chapter <= 0)
+ return;
+ chapter--;
+ synchronized (this) {
+ if (pi == null)
+ return;
+ org.videolan.TIMark[] marks = pi.getMarks();
+ if (marks == null)
+ return;
+ for (int i = 0, j = 0; i < marks.length; i++) {
+ if (marks[i].getType() == org.videolan.TIMark.MARK_TYPE_ENTRY) {
+ if (j == chapter) {
+ if (currentLocator == null || lastMarkLocator != currentLocator || i != currentLocator.getMarkId()) {
+ ((PlaybackControlImpl)controls[9]).onMarkReach(i);
+ }
+ return;
+ }
+ j++;
+ }
+ }
+ }
}
protected void doMarkReached(int param) {
+ synchronized (this) {
((PlaybackControlImpl)controls[9]).onMarkReach(param);
if (currentLocator != null)
currentLocator.setMarkId(param);
+
+ lastMarkLocator = currentLocator;
+ }
}
protected void doPlaylistStarted(int param) {
=====================================
src/libbluray/bdj/java/org/videolan/media/content/playlist/PlaybackControlImpl.java
=====================================
@@ -95,27 +95,6 @@ public class PlaybackControlImpl implements PlaybackControl {
player.seekPlayItem(item);
}
- protected void onChapterReach(int chapter) {
- if (chapter <= 0)
- return;
- chapter--;
- PlaylistInfo pi = player.getPlaylistInfo();
- if (pi == null)
- return;
- TIMark[] marks = pi.getMarks();
- if (marks == null)
- return;
- for (int i = 0, j = 0; i < marks.length; i++) {
- if (marks[i].getType() == TIMark.MARK_TYPE_ENTRY) {
- if (j == chapter) {
- notifyListeners(new PlaybackMarkEvent(this, i));
- return;
- }
- j++;
- }
- }
- }
-
protected void onMarkReach(int mark) {
if (mark < 0) {
return;
View it on GitLab: https://code.videolan.org/videolan/libbluray/compare/ea51aa4841878de6cc32f1a044b5d44e5f067599...6c0e42b88ee167e052944757b57537a72b3ddcda
--
View it on GitLab: https://code.videolan.org/videolan/libbluray/compare/ea51aa4841878de6cc32f1a044b5d44e5f067599...6c0e42b88ee167e052944757b57537a72b3ddcda
You're receiving this email because of your account on code.videolan.org.
More information about the libbluray-devel
mailing list