[libbluray-devel] commit: Added suspend/resume to HDMV VM API (hpi1 )

git at videolan.org git at videolan.org
Fri Oct 8 12:20:28 CEST 2010


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Thu Oct  7 14:02:54 2010 +0300| [514b02ec23b73b741b31c56a0b503c14188ed121] | committer: hpi1 

Added suspend/resume to HDMV VM API

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

 src/libbluray/hdmv/hdmv_vm.c |   18 ++++++++++++++++++
 src/libbluray/hdmv/hdmv_vm.h |    4 ++++
 2 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/src/libbluray/hdmv/hdmv_vm.c b/src/libbluray/hdmv/hdmv_vm.c
index b0986e5..9c98cdb 100644
--- a/src/libbluray/hdmv/hdmv_vm.c
+++ b/src/libbluray/hdmv/hdmv_vm.c
@@ -900,6 +900,24 @@ int hdmv_vm_get_event(HDMV_VM *p, HDMV_EVENT *ev)
     return _get_event(p, ev);
 }
 
+int hdmv_vm_running(HDMV_VM *p)
+{
+    return !!p->object;
+}
+
+int hdmv_vm_resume(HDMV_VM *p)
+{
+    return _resume_object(p);
+}
+
+int hdmv_vm_suspend(HDMV_VM *p)
+{
+    if (p->object && !p-ig_object) {
+        return _suspend_object(p);
+    }
+    return -1;
+}
+
 /* terminate program after MAX_LOOP instructions */
 #define MAX_LOOP 1000000
 
diff --git a/src/libbluray/hdmv/hdmv_vm.h b/src/libbluray/hdmv/hdmv_vm.h
index 16b6942..83a2b58 100644
--- a/src/libbluray/hdmv/hdmv_vm.h
+++ b/src/libbluray/hdmv/hdmv_vm.h
@@ -72,4 +72,8 @@ BD_PRIVATE int      hdmv_vm_set_object(HDMV_VM *p, int num_nav_cmds, void *nav_c
 BD_PRIVATE int      hdmv_vm_run(HDMV_VM *p, HDMV_EVENT *ev);
 BD_PRIVATE int      hdmv_vm_get_event(HDMV_VM *p, HDMV_EVENT *ev);
 
+BD_PRIVATE int      hdmv_vm_running(HDMV_VM *p);
+BD_PRIVATE int      hdmv_vm_suspend(HDMV_VM *p);
+BD_PRIVATE int      hdmv_vm_resume(HDMV_VM *p);
+
 #endif // _HDMV_VM_H_



More information about the libbluray-devel mailing list