[libbluray-devel] flag rate change events that were triggered by playlist start or stop

hpi1 git at videolan.org
Sun Mar 23 12:28:02 CET 2014


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Sat Mar 22 22:13:50 2014 +0200| [4053ea9f806f66de5ff163e4ec42e9ca8736db69] | committer: hpi1

flag rate change events that were triggered by playlist start or stop

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=4053ea9f806f66de5ff163e4ec42e9ca8736db69
---

 src/libbluray/bdj/java/org/videolan/Libbluray.java              |    7 +++++--
 .../bdj/java/org/videolan/media/content/playlist/Handler.java   |    4 ++--
 src/libbluray/bdj/native/org_videolan_Libbluray.c               |    4 ++--
 src/libbluray/bdj/native/org_videolan_Libbluray.h               |    4 ++--
 4 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/src/libbluray/bdj/java/org/videolan/Libbluray.java b/src/libbluray/bdj/java/org/videolan/Libbluray.java
index c227b10..92adaff 100644
--- a/src/libbluray/bdj/java/org/videolan/Libbluray.java
+++ b/src/libbluray/bdj/java/org/videolan/Libbluray.java
@@ -266,7 +266,10 @@ public class Libbluray {
     }
 
     public static boolean selectRate(float rate) {
-        return selectRateN(nativePointer, rate) == 1 ? true : false;
+        return selectRateN(nativePointer, rate, 0) == 1 ? true : false;
+    }
+    public static boolean selectRate(float rate, boolean start) {
+        return selectRateN(nativePointer, rate, start ? 1 : 2) == 1 ? true : false;
     }
 
     public static void writeGPR(int num, int value) {
@@ -473,7 +476,7 @@ public class Libbluray {
     private static native int getCurrentAngleN(long np);
     private static native long tellN(long np);
     private static native long tellTimeN(long np);
-    private static native int selectRateN(long np, float rate);
+    private static native int selectRateN(long np, float rate, int reason);
     private static native int writeGPRN(long np, int num, int value);
     private static native int writePSRN(long np, int num, int value);
     private static native int readGPRN(long np, int num);
diff --git a/src/libbluray/bdj/java/org/videolan/media/content/playlist/Handler.java b/src/libbluray/bdj/java/org/videolan/media/content/playlist/Handler.java
index e266074..ee48237 100644
--- a/src/libbluray/bdj/java/org/videolan/media/content/playlist/Handler.java
+++ b/src/libbluray/bdj/java/org/videolan/media/content/playlist/Handler.java
@@ -137,7 +137,7 @@ public class Handler extends BDHandler {
             }
 
             try {
-                Libbluray.selectRate(rate);
+                Libbluray.selectRate(rate, true);
             } catch (Throwable e) {
                 return new ConnectionErrorEvent(this);
             }
@@ -148,7 +148,7 @@ public class Handler extends BDHandler {
     }
 
     protected ControllerErrorEvent doStop() {
-        Libbluray.selectRate(0.0f);
+        Libbluray.selectRate(0.0f, false);
         return super.doStop();
     }
 
diff --git a/src/libbluray/bdj/native/org_videolan_Libbluray.c b/src/libbluray/bdj/native/org_videolan_Libbluray.c
index fbeeaef..3135f18 100644
--- a/src/libbluray/bdj/native/org_videolan_Libbluray.c
+++ b/src/libbluray/bdj/native/org_videolan_Libbluray.c
@@ -329,7 +329,7 @@ JNIEXPORT jlong JNICALL Java_org_videolan_Libbluray_tellTimeN(JNIEnv * env,
 }
 
 JNIEXPORT jint JNICALL Java_org_videolan_Libbluray_selectRateN(JNIEnv * env,
-        jclass cls, jlong np, jfloat rate) {
+        jclass cls, jlong np, jfloat rate, jint reason) {
     return 1;
 }
 
@@ -617,7 +617,7 @@ Java_org_videolan_Libbluray_methods[] =
     },
     {
         CC("selectRateN"),
-        CC("(JF)I"),
+        CC("(JFI)I"),
         VC(Java_org_videolan_Libbluray_selectRateN),
     },
     {
diff --git a/src/libbluray/bdj/native/org_videolan_Libbluray.h b/src/libbluray/bdj/native/org_videolan_Libbluray.h
index dea2ac5..3843266 100644
--- a/src/libbluray/bdj/native/org_videolan_Libbluray.h
+++ b/src/libbluray/bdj/native/org_videolan_Libbluray.h
@@ -263,10 +263,10 @@ JNIEXPORT jlong JNICALL Java_org_videolan_Libbluray_tellTimeN
 /*
  * Class:     org_videolan_Libbluray
  * Method:    selectRateN
- * Signature: (JF)I
+ * Signature: (JFI)I
  */
 JNIEXPORT jint JNICALL Java_org_videolan_Libbluray_selectRateN
-  (JNIEnv *, jclass, jlong, jfloat);
+  (JNIEnv *, jclass, jlong, jfloat, jint);
 
 /*
  * Class:     org_videolan_Libbluray



More information about the libbluray-devel mailing list