[DVDnav-discuss] r972 - in trunk/libdvdnav/src/vm: vm.c vm.h
nicodvb
subversion at mplayerhq.hu
Thu Nov 29 00:13:51 CET 2007
Author: nicodvb
Date: Thu Nov 29 00:13:50 2007
New Revision: 972
Log:
added utility functions vm_get_title_ifo() and vm_ifo_close()
to proxy dvdread functions to dvdnav proper. These functions
are used in upcoming patch to describe the chapters of a title
Modified:
trunk/libdvdnav/src/vm/vm.c
trunk/libdvdnav/src/vm/vm.h
Modified: trunk/libdvdnav/src/vm/vm.c
==============================================================================
--- trunk/libdvdnav/src/vm/vm.c (original)
+++ trunk/libdvdnav/src/vm/vm.c Thu Nov 29 00:13:50 2007
@@ -1844,6 +1844,23 @@ static pgcit_t* get_PGCIT(vm_t *vm) {
return pgcit;
}
+//return the ifo_handle_t describing required title, used to
+//identify chapters
+ifo_handle_t *vm_get_title_ifo(vm_t *vm, uint32_t title)
+{
+ ifo_handle_t *ifo = NULL;
+ uint8_t titleset_nr;
+ if((title < 1) || (title > vm->vmgi->tt_srpt->nr_of_srpts))
+ return NULL;
+ titleset_nr = vm->vmgi->tt_srpt->title[title-1].title_set_nr;
+ ifo = ifoOpen(vm->dvd, titleset_nr);
+ return ifo;
+}
+
+void vm_ifo_close(ifo_handle_t *ifo)
+{
+ ifoClose(ifo);
+}
/* Debug functions */
Modified: trunk/libdvdnav/src/vm/vm.h
==============================================================================
--- trunk/libdvdnav/src/vm/vm.h (original)
+++ trunk/libdvdnav/src/vm/vm.h Thu Nov 29 00:13:50 2007
@@ -168,6 +168,8 @@ int vm_get_video_scale_permission(vm_t
video_attr_t vm_get_video_attr(vm_t *vm);
audio_attr_t vm_get_audio_attr(vm_t *vm, int streamN);
subp_attr_t vm_get_subp_attr(vm_t *vm, int streamN);
+ifo_handle_t *vm_get_title_ifo(vm_t *vm, uint32_t title);
+void vm_ifo_close(ifo_handle_t *ifo);
/* Uncomment for VM command tracing */
/* #define TRACE */
More information about the DVDnav-discuss
mailing list