[libbluray-devel] Fixed resuming movie object when IG object stops playlist playback

hpi1 git at videolan.org
Sat Feb 2 21:02:51 CET 2013


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Sat Feb  2 21:54:11 2013 +0200| [604f0e6cf4bd3e198e70b548a3e604e232729dd9] | committer: hpi1

Fixed resuming movie object when IG object stops playlist playback

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

 src/libbluray/bluray.c       |    2 ++
 src/libbluray/hdmv/hdmv_vm.c |   10 +++++++++-
 src/libbluray/hdmv/hdmv_vm.h |    7 +++++++
 3 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/src/libbluray/bluray.c b/src/libbluray/bluray.c
index ff16c38..6cb5600 100644
--- a/src/libbluray/bluray.c
+++ b/src/libbluray/bluray.c
@@ -2692,6 +2692,8 @@ static void _process_hdmv_vm_event(BLURAY *bd, HDMV_EVENT *hev)
         case HDMV_EVENT_PLAY_STOP:
             // stop current playlist
             _close_playlist(bd);
+
+            bd->hdmv_suspended = !hdmv_vm_running(bd->hdmv_vm);
             break;
 
         case HDMV_EVENT_STILL:
diff --git a/src/libbluray/hdmv/hdmv_vm.c b/src/libbluray/hdmv/hdmv_vm.c
index 8babf66..b6291c2 100644
--- a/src/libbluray/hdmv/hdmv_vm.c
+++ b/src/libbluray/hdmv/hdmv_vm.c
@@ -548,7 +548,13 @@ static int _play_stop(HDMV_VM *p)
     }
 
     BD_DEBUG(DBG_HDMV, "_play_stop()\n");
-    _queue_event(p, HDMV_EVENT_PLAY_STOP, 0);
+    _queue_event(p, HDMV_EVENT_PLAY_STOP, 1);
+
+    /* terminate IG object. Continue executing movie object.  */
+    if (_resume_from_play_pl(p) < 0) {
+        BD_DEBUG(DBG_HDMV|DBG_CRIT, "_play_stop(): resuming movie object failed !\n");
+        return -1;
+    }
 
     return 0;
 }
@@ -778,6 +784,8 @@ static void _set_nv_timer(HDMV_VM *p, uint32_t dst, uint32_t src)
       return;
   }
 
+  BD_DEBUG(DBG_HDMV | DBG_CRIT, "_set_nv_timer(): navigation timer not implemented !\n");
+
   /* set expiration time */
   p->nv_timer.time = time(NULL);
   p->nv_timer.time += timeout;
diff --git a/src/libbluray/hdmv/hdmv_vm.h b/src/libbluray/hdmv/hdmv_vm.h
index be4ae08..102a22e 100644
--- a/src/libbluray/hdmv/hdmv_vm.h
+++ b/src/libbluray/hdmv/hdmv_vm.h
@@ -33,6 +33,10 @@ typedef enum {
     HDMV_EVENT_END,            /* end of program (movie object) */
     HDMV_EVENT_IG_END,         /* end of program (interactive) */
 
+    /*
+     * playback control
+     */
+
     HDMV_EVENT_TITLE,          /* play title (from disc index) */
     HDMV_EVENT_PLAY_PL,        /* select playlist */
     HDMV_EVENT_PLAY_PI,        /* seek to playitem */
@@ -41,6 +45,9 @@ typedef enum {
 
     HDMV_EVENT_STILL,          /* param: boolean */
 
+    /*
+     * -> graphics controller
+     */
     HDMV_EVENT_SET_BUTTON_PAGE,
     HDMV_EVENT_ENABLE_BUTTON,
     HDMV_EVENT_DISABLE_BUTTON,



More information about the libbluray-devel mailing list