libbluray | branch: master | hpi1 <[email protected]> | Thu Nov 6 12:46:35 2014 +0200| [5251198a3880305aac99fe2a3aa55442a64f9848] | committer: hpi1
Remove function pointer > http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=5251198a3880305aac99fe2a3aa55442a64f9848 --- src/libbluray/bdj/bdj.c | 3 +-- src/libbluray/bdj/bdj.h | 5 +---- src/libbluray/bdj/bdj_private.h | 1 - src/libbluray/bdj/native/org_videolan_Libbluray.c | 12 ++++++------ src/libbluray/bluray.c | 6 +++--- src/libbluray/bluray_internal.h | 5 +++++ 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/libbluray/bdj/bdj.c b/src/libbluray/bdj/bdj.c index 8c969de..1b147e4 100644 --- a/src/libbluray/bdj/bdj.c +++ b/src/libbluray/bdj/bdj.c @@ -485,7 +485,7 @@ static int _create_jvm(void *jvm_lib, const char *java_home, JNIEnv **env, JavaV } BDJAVA* bdj_open(const char *path, struct bluray *bd, - bdj_overlay_cb osd_cb, struct bd_argb_buffer_s *buf, + struct bd_argb_buffer_s *buf, const char *bdj_disc_id, BDJ_STORAGE *storage) { BD_DEBUG(DBG_BDJ, "bdj_open()\n"); @@ -509,7 +509,6 @@ BDJAVA* bdj_open(const char *path, struct bluray *bd, BDJAVA* bdjava = calloc(1, sizeof(BDJAVA)); bdjava->bd = bd; bdjava->h_libjvm = jvm_lib; - bdjava->osd_cb = osd_cb; bdjava->buf = buf; bdjava->jvm = jvm; diff --git a/src/libbluray/bdj/bdj.h b/src/libbluray/bdj/bdj.h index 0c6b134..6a20808 100644 --- a/src/libbluray/bdj/bdj.h +++ b/src/libbluray/bdj/bdj.h @@ -56,11 +56,8 @@ typedef struct bdjava_s BDJAVA; struct bluray; struct bd_argb_buffer_s; -typedef void (*bdj_overlay_cb)(struct bluray *, const unsigned *, int, int, - int, int, int, int); - BD_PRIVATE BDJAVA* bdj_open(const char *path, struct bluray *bd, - bdj_overlay_cb osd_cb, struct bd_argb_buffer_s *buf, + struct bd_argb_buffer_s *buf, const char *bdj_disc_id, BDJ_STORAGE *storage); BD_PRIVATE void bdj_close(BDJAVA *bdjava); BD_PRIVATE int bdj_process_event(BDJAVA *bdjava, unsigned ev, unsigned param); diff --git a/src/libbluray/bdj/bdj_private.h b/src/libbluray/bdj/bdj_private.h index e1c301c..e8730c1 100644 --- a/src/libbluray/bdj/bdj_private.h +++ b/src/libbluray/bdj/bdj_private.h @@ -30,7 +30,6 @@ struct bd_argb_buffer_s; struct bdjava_s { struct bluray *bd; - bdj_overlay_cb osd_cb; struct bd_argb_buffer_s *buf; // JVM library diff --git a/src/libbluray/bdj/native/org_videolan_Libbluray.c b/src/libbluray/bdj/native/org_videolan_Libbluray.c index 56452d6..1b1e16e 100644 --- a/src/libbluray/bdj/native/org_videolan_Libbluray.c +++ b/src/libbluray/bdj/native/org_videolan_Libbluray.c @@ -404,13 +404,13 @@ JNIEXPORT void JNICALL Java_org_videolan_Libbluray_updateGraphicN(JNIEnv * env, BD_DEBUG(DBG_JNI, "updateGraphicN(%ld,%ld-%ld,%ld)\n", (long)x0, (long)y0, (long)x1, (long)y1); /* app callback not initialized ? */ - if (!bdj || !bdj->osd_cb) { + if (!bdj) { return; } /* close ? */ if (!rgbArray) { - bdj->osd_cb(bdj->bd, NULL, (int)width, (int)height, 0, 0, 0, 0); + bd_bdj_osd_cb(bdj->bd, NULL, (int)width, (int)height, 0, 0, 0, 0); return; } @@ -497,8 +497,8 @@ JNIEXPORT void JNICALL Java_org_videolan_Libbluray_updateGraphicN(JNIEnv * env, bdj->buf->unlock(bdj->buf); } - bdj->osd_cb(bdj->bd, bdj->buf->buf[BD_OVERLAY_IG], (int)width, (int)height, - x0, y0, x1, y1); + bd_bdj_osd_cb(bdj->bd, bdj->buf->buf[BD_OVERLAY_IG], (int)width, (int)height, + x0, y0, x1, y1); } else { @@ -506,8 +506,8 @@ JNIEXPORT void JNICALL Java_org_videolan_Libbluray_updateGraphicN(JNIEnv * env, jint *image = (jint *)(*env)->GetPrimitiveArrayCritical(env, rgbArray, NULL); if (image) { - bdj->osd_cb(bdj->bd, (const unsigned *)image, (int)width, (int)height, - x0, y0, x1, y1); + bd_bdj_osd_cb(bdj->bd, (const unsigned *)image, (int)width, (int)height, + x0, y0, x1, y1); (*env)->ReleasePrimitiveArrayCritical(env, rgbArray, image, JNI_ABORT); } else { BD_DEBUG(DBG_BDJ | DBG_CRIT, "GetPrimitiveArrayCritical() failed\n"); diff --git a/src/libbluray/bluray.c b/src/libbluray/bluray.c index d2f84bd..6af9add 100644 --- a/src/libbluray/bluray.c +++ b/src/libbluray/bluray.c @@ -1181,8 +1181,8 @@ int bd_reg_write(BLURAY *bd, int psr, int reg, uint32_t value, uint32_t psr_valu /* * handle graphics updates from BD-J layer */ -static void _bdj_osd_cb(BLURAY *bd, const unsigned *img, int w, int h, - int x0, int y0, int x1, int y1) +void bd_bdj_osd_cb(BLURAY *bd, const unsigned *img, int w, int h, + int x0, int y0, int x1, int y1) { BD_ARGB_OVERLAY aov; @@ -1258,7 +1258,7 @@ static int _start_bdj(BLURAY *bd, unsigned title) { #ifdef USING_BDJAVA if (bd->bdjava == NULL) { - bd->bdjava = bdj_open(bd->device_path, bd, _bdj_osd_cb, bd->argb_buffer, bd->disc_info.bdj_disc_id, bd->bdjstorage); + bd->bdjava = bdj_open(bd->device_path, bd, bd->argb_buffer, bd->disc_info.bdj_disc_id, bd->bdjstorage); if (!bd->bdjava) { return 0; } diff --git a/src/libbluray/bluray_internal.h b/src/libbluray/bluray_internal.h index 3887741..ca89031 100644 --- a/src/libbluray/bluray_internal.h +++ b/src/libbluray/bluray_internal.h @@ -43,4 +43,9 @@ BD_PRIVATE void bd_select_rate(BLURAY *bd, float rate, int reason); BD_PRIVATE int bd_play_playlist_at(BLURAY *bd, int playlist, int playitem, int playmark, int64_t time); +/* BD-J overlay */ + +BD_PRIVATE void bd_bdj_osd_cb(struct bluray *bd, const unsigned *img, int w, int h, + int x0, int y0, int x1, int y1); + #endif /* _BLURAY_INTERNAL_H_ */ _______________________________________________ libbluray-devel mailing list [email protected] https://mailman.videolan.org/listinfo/libbluray-devel
