[libbluray-devel] Use correct type for BDJAVA*. Simplify ifdef BDJAVA usage.
hpi1
git at videolan.org
Wed Sep 12 22:03:46 CEST 2012
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Wed Sep 12 22:02:40 2012 +0300| [ac0ef333353309377ff31c18cf61317477618e86] | committer: hpi1
Use correct type for BDJAVA*. Simplify ifdef BDJAVA usage.
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=ac0ef333353309377ff31c18cf61317477618e86
---
src/libbluray/bluray.c | 18 +++++-------------
1 file changed, 5 insertions(+), 13 deletions(-)
diff --git a/src/libbluray/bluray.c b/src/libbluray/bluray.c
index d5cb4a2..7237c54 100644
--- a/src/libbluray/bluray.c
+++ b/src/libbluray/bluray.c
@@ -150,8 +150,9 @@ struct bluray {
HDMV_VM *hdmv_vm;
uint8_t hdmv_suspended;
-
- void *bdjava;
+#ifdef USING_BDJAVA
+ BDJAVA *bdjava;
+#endif
/* graphics */
GRAPHICS_CONTROLLER *graphics_controller;
@@ -1951,14 +1952,12 @@ int bd_start_bdj(BLURAY *bd, const char *start_object)
void bd_stop_bdj(BLURAY *bd)
{
- if (bd->bdjava != NULL) {
#ifdef USING_BDJAVA
+ if (bd->bdjava != NULL) {
bdj_close((BDJAVA*)bd->bdjava);
-#else
- BD_DEBUG(DBG_BLURAY, "BD-J not compiled in (%p)\n", bd);
-#endif
bd->bdjava = NULL;
}
+#endif
}
/*
@@ -2142,22 +2141,15 @@ static int _play_bdj(BLURAY *bd, const char *name)
{
bd->title_type = title_bdj;
-#ifdef USING_BDJAVA
bd_stop_bdj(bd);
return bd_start_bdj(bd, name);
-#else
- BD_DEBUG(DBG_BLURAY|DBG_CRIT, "_bdj_play(BDMV/BDJ/%s.jar) not implemented (%p)\n", name, bd);
- return 0;
-#endif
}
static int _play_hdmv(BLURAY *bd, unsigned id_ref)
{
int result = 1;
-#ifdef USING_BDJAVA
bd_stop_bdj(bd);
-#endif
bd->title_type = title_hdmv;
More information about the libbluray-devel
mailing list