[libbluray-devel] Move bdjo java object creation to native/
hpi1
git at videolan.org
Tue Oct 28 12:09:44 CET 2014
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Tue Oct 28 12:14:55 2014 +0200| [2814df1dd36f4639d22a80c522390e044f5a04a7] | committer: hpi1
Move bdjo java object creation to native/
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=2814df1dd36f4639d22a80c522390e044f5a04a7
---
src/Makefile.am | 4 ++--
src/libbluray/bdj/{bdjo_parser.c => native/bdjo.c} | 15 +++++++--------
src/libbluray/bdj/{bdjo_parser.h => native/bdjo.h} | 8 ++++----
src/libbluray/bdj/native/org_videolan_Libbluray.c | 8 ++++----
4 files changed, 17 insertions(+), 18 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index 6dab8dd..6c8db27 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -148,8 +148,8 @@ libbluray_la_SOURCES += \
libbluray/bdj/bdjo_data.h \
libbluray/bdj/bdjo_parse.h \
libbluray/bdj/bdjo_parse.c \
- libbluray/bdj/bdjo_parser.h \
- libbluray/bdj/bdjo_parser.c \
+ libbluray/bdj/native/bdjo.h \
+ libbluray/bdj/native/bdjo.c \
libbluray/bdj/native/java_awt_BDGraphics.h \
libbluray/bdj/native/java_awt_BDGraphics.c \
libbluray/bdj/native/java_awt_BDFontMetrics.h \
diff --git a/src/libbluray/bdj/bdjo_parser.c b/src/libbluray/bdj/native/bdjo.c
similarity index 97%
rename from src/libbluray/bdj/bdjo_parser.c
rename to src/libbluray/bdj/native/bdjo.c
index 16ee2ac..dcfbf16 100644
--- a/src/libbluray/bdj/bdjo_parser.c
+++ b/src/libbluray/bdj/native/bdjo.c
@@ -17,12 +17,11 @@
* <http://www.gnu.org/licenses/>.
*/
-#include "bdjo_parser.h"
+#include "bdjo.h"
-#include "bdjo_data.h"
-#include "bdjo_parse.h"
-
-#include "bdj_util.h"
+#include "libbluray/bdj/bdjo_data.h"
+#include "libbluray/bdj/bdjo_parse.h"
+#include "libbluray/bdj/bdj_util.h"
#include "util/logging.h"
@@ -226,13 +225,13 @@ static jobject _make_bdjo(JNIEnv* env, BDJO *p)
return result;
}
-jobject bdjo_read(JNIEnv* env, const char* file)
+jobject bdjo_get(JNIEnv* env, const char* bdjo_path)
{
jobject result = NULL;
- BDJO *bdjo = bdjo_parse(file);
+ BDJO *bdjo = bdjo_parse(bdjo_path);
if (!bdjo) {
- BD_DEBUG(DBG_BDJ | DBG_CRIT, "Failed to read bdjo file (%s)\n", file);
+ BD_DEBUG(DBG_BDJ | DBG_CRIT, "Failed to read bdjo file (%s)\n", bdjo_path);
return NULL;
}
diff --git a/src/libbluray/bdj/bdjo_parser.h b/src/libbluray/bdj/native/bdjo.h
similarity index 85%
rename from src/libbluray/bdj/bdjo_parser.h
rename to src/libbluray/bdj/native/bdjo.h
index d57ce7c..43cb596 100644
--- a/src/libbluray/bdj/bdjo_parser.h
+++ b/src/libbluray/bdj/native/bdjo.h
@@ -17,13 +17,13 @@
* <http://www.gnu.org/licenses/>.
*/
-#ifndef BDJO_PARSER_H_
-#define BDJO_PARSER_H_
+#ifndef BDJO_H_
+#define BDJO_H_
#include "util/attributes.h"
#include <jni.h>
-BD_PRIVATE jobject bdjo_read(JNIEnv* env, const char* file);
+BD_PRIVATE jobject bdjo_get(JNIEnv* env, const char *bdjo_path);
-#endif /* BDJO_PARSER_H_ */
+#endif /* BDJO_H_ */
diff --git a/src/libbluray/bdj/native/org_videolan_Libbluray.c b/src/libbluray/bdj/native/org_videolan_Libbluray.c
index 4154b16..ad51bdd 100644
--- a/src/libbluray/bdj/native/org_videolan_Libbluray.c
+++ b/src/libbluray/bdj/native/org_videolan_Libbluray.c
@@ -22,15 +22,15 @@
#include "config.h"
#endif
+#include "bdjo.h"
+
#include "libbluray/bdj/bdj.h"
#include "libbluray/bdj/bdj_private.h"
#include "libbluray/bdj/bdj_util.h"
-#include "libbluray/bdj/bdjo_parser.h"
+
#include "libbluray/bluray.h"
#include "libbluray/bluray_internal.h"
-#include "util/strutl.h"
-#include "util/macro.h"
#include "util/logging.h"
#include <string.h>
@@ -436,7 +436,7 @@ JNIEXPORT jobject JNICALL Java_org_videolan_Libbluray_getBdjoN(JNIEnv * env,
(void)np;
const char *path = (*env)->GetStringUTFChars(env, jpath, NULL);
- jobject bdjo = bdjo_read(env, path);
+ jobject bdjo = bdjo_get(env, path);
(*env)->ReleaseStringUTFChars(env, jpath, path);
return bdjo;
More information about the libbluray-devel
mailing list