[libbluray-devel] Cosmetics

hpi1 git at videolan.org
Fri Sep 14 14:46:08 CEST 2012


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Fri Sep 14 12:01:45 2012 +0300| [f552f3dfe1fff76ee48df21cccd656d4217f584d] | committer: hpi1

Cosmetics

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

 src/libbluray/bdj/bdj.c |   56 +++++++++++++++++++++++------------------------
 1 file changed, 28 insertions(+), 28 deletions(-)

diff --git a/src/libbluray/bdj/bdj.c b/src/libbluray/bdj/bdj.c
index 077116b..f091b6a 100644
--- a/src/libbluray/bdj/bdj.c
+++ b/src/libbluray/bdj/bdj.c
@@ -36,7 +36,7 @@
 
 typedef jint (JNICALL * fptr_JNI_CreateJavaVM) (JavaVM **pvm, void **penv,void *args);
 
-int start_xlet(JNIEnv* env, const char* path, jobject bdjo, BDJAVA* bdjava);
+int bdj_start(JNIEnv* env, const char* path, jobject bdjo, BDJAVA* bdjava);
 void* load_jvm();
 
 BDJAVA* bdj_open(const char *path, const char *start,
@@ -107,7 +107,7 @@ BDJAVA* bdj_open(const char *path, const char *start,
         return NULL;
     }
 
-    if (start_xlet(bdjava->env, path, bdjo, bdjava) == BDJ_ERROR) {
+    if (bdj_start(bdjava->env, path, bdjo, bdjava) == BDJ_ERROR) {
         free(bdjava);
         BD_DEBUG(DBG_BDJ | DBG_CRIT, "Failed to start BDJ program.\n");
         return NULL;
@@ -116,32 +116,7 @@ BDJAVA* bdj_open(const char *path, const char *start,
     return bdjava;
 }
 
-void bdj_close(BDJAVA *bdjava)
-{
-    JNIEnv* env = bdjava->env;
-    JavaVM* jvm = bdjava->jvm;
-
-    jclass init_class = (*env)->FindClass(env, "org/videolan/BDJLoader");
-    jmethodID shutdown_id = (*env)->GetStaticMethodID(env, init_class,
-            "Shutdown", "()V");
-    (*env)->CallStaticVoidMethod(env, init_class, shutdown_id);
-
-    (*jvm)->DestroyJavaVM(jvm);
-
-    free(bdjava);
-}
-
-void bdj_send_event(BDJAVA *bdjava, int type, int keyCode)
-{
-	JNIEnv* env = bdjava->env;
-
-	jclass init_class = (*env)->FindClass(env, "org/videolan/BDJLoader");
-	jmethodID send_key_event_id = (*env)->GetStaticMethodID(env, init_class,
-	            "SendKeyEvent", "(II)V");
-	(*env)->CallStaticVoidMethod(env, init_class, send_key_event_id, type, keyCode);
-}
-
-int start_xlet(JNIEnv* env, const char* path, jobject bdjo, BDJAVA* bdjava)
+int bdj_start(JNIEnv* env, const char* path, jobject bdjo, BDJAVA* bdjava)
 {
     jclass init_class = (*env)->FindClass(env, "org/videolan/BDJLoader");
 
@@ -167,6 +142,31 @@ int start_xlet(JNIEnv* env, const char* path, jobject bdjo, BDJAVA* bdjava)
     return BDJ_SUCCESS;
 }
 
+void bdj_close(BDJAVA *bdjava)
+{
+    JNIEnv* env = bdjava->env;
+    JavaVM* jvm = bdjava->jvm;
+
+    jclass init_class = (*env)->FindClass(env, "org/videolan/BDJLoader");
+    jmethodID shutdown_id = (*env)->GetStaticMethodID(env, init_class,
+            "Shutdown", "()V");
+    (*env)->CallStaticVoidMethod(env, init_class, shutdown_id);
+
+    (*jvm)->DestroyJavaVM(jvm);
+
+    free(bdjava);
+}
+
+void bdj_send_event(BDJAVA *bdjava, int type, int keyCode)
+{
+	JNIEnv* env = bdjava->env;
+
+	jclass init_class = (*env)->FindClass(env, "org/videolan/BDJLoader");
+	jmethodID send_key_event_id = (*env)->GetStaticMethodID(env, init_class,
+	            "SendKeyEvent", "(II)V");
+	(*env)->CallStaticVoidMethod(env, init_class, send_key_event_id, type, keyCode);
+}
+
 void* load_jvm()
 {
     const char* java_home = getenv("JAVA_HOME"); // FIXME: should probably search multiple directories



More information about the libbluray-devel mailing list