# HG changeset patch # User mroi # Date 1048777946 0 # Node ID 5897ff629f7c2dfa395286c56f1408430b33c066 # Parent 5204d4e4cd3b97dc628752dde2859f4c4eae9cac reorganize mutual header inclusion to fix warnings when compiling with TRACE defined fix vm_jump_title_part to use correct title number (up to now the number was considered to be VTS-relative, which it is not) diff -r 5204d4e4cd3b -r 5897ff629f7c decoder.c --- a/decoder.c Wed Mar 26 14:37:23 2003 +0000 +++ b/decoder.c Thu Mar 27 15:12:26 2003 +0000 @@ -32,8 +32,6 @@ #include /* For memset */ #include /* vm_cmd_t */ #include -#include "vmcmd.h" -#include "decoder.h" #include "dvdnav_internal.h" uint32_t vm_getbits(command_t *command, int start, int count) { diff -r 5204d4e4cd3b -r 5897ff629f7c decoder.h --- a/decoder.h Wed Mar 26 14:37:23 2003 +0000 +++ b/decoder.h Thu Mar 27 15:12:26 2003 +0000 @@ -29,6 +29,7 @@ #include #include /* vm_cmd_t */ +#include "dvdnav_internal.h" /* link command types */ typedef enum { diff -r 5204d4e4cd3b -r 5897ff629f7c dvdnav_internal.h.in --- a/dvdnav_internal.h.in Wed Mar 26 14:37:23 2003 +0000 +++ b/dvdnav_internal.h.in Thu Mar 27 15:12:26 2003 +0000 @@ -28,9 +28,6 @@ #include "config.h" #endif -#include "dvdnav.h" -#include "vm.h" - #include #include #include @@ -44,10 +41,14 @@ #include #include - /* Uncomment for VM command tracing */ /* #define TRACE */ +#include "decoder.h" +#include "dvdnav.h" +#include "vm.h" +#include "vmcmd.h" + /* where should libdvdnav write its messages (stdout/stderr) */ #define MSG_OUT stdout diff -r 5204d4e4cd3b -r 5897ff629f7c highlight.c --- a/highlight.c Wed Mar 26 14:37:23 2003 +0000 +++ b/highlight.c Thu Mar 27 15:12:26 2003 +0000 @@ -26,12 +26,9 @@ #endif #include - +#include #include "dvdnav_internal.h" -#include "vm.h" -#include - /* #define BUTTON_TESTING */ @@ -39,7 +36,6 @@ #ifdef BUTTON_TESTING #include -#include "vmcmd.h" static void print_time(dvd_time_t *dtime) { const char *rate; diff -r 5204d4e4cd3b -r 5897ff629f7c navigation.c --- a/navigation.c Wed Mar 26 14:37:23 2003 +0000 +++ b/navigation.c Thu Mar 27 15:12:26 2003 +0000 @@ -27,8 +27,6 @@ #include "dvdnav_internal.h" -#include "vm.h" - /* Navigation API calls */ dvdnav_status_t dvdnav_still_skip(dvdnav_t *this) { diff -r 5204d4e4cd3b -r 5897ff629f7c searching.c --- a/searching.c Wed Mar 26 14:37:23 2003 +0000 +++ b/searching.c Thu Mar 27 15:12:26 2003 +0000 @@ -26,11 +26,8 @@ #endif #include - #include "dvdnav_internal.h" -#include "vm.h" - /* #define LOG_DEBUG */ diff -r 5204d4e4cd3b -r 5897ff629f7c settings.c --- a/settings.c Wed Mar 26 14:37:23 2003 +0000 +++ b/settings.c Thu Mar 27 15:12:26 2003 +0000 @@ -27,8 +27,6 @@ #include "dvdnav_internal.h" -#include "vm.h" - /* Characteristics/setting API calls */ dvdnav_status_t dvdnav_get_region_mask(dvdnav_t *this, int *region) { diff -r 5204d4e4cd3b -r 5897ff629f7c vm.c --- a/vm.c Wed Mar 26 14:37:23 2003 +0000 +++ b/vm.c Thu Mar 27 15:12:26 2003 +0000 @@ -40,9 +40,6 @@ #include #include -#include "decoder.h" -#include "vmcmd.h" -#include "vm.h" #include "dvdnav_internal.h" /* @@ -69,6 +66,7 @@ /* Set */ static int set_TT(vm_t *vm, int tt); +static int set_PTT(vm_t *vm, int tt, int ptt); static int set_VTS_TT(vm_t *vm, int vtsN, int vts_ttn); static int set_VTS_PTT(vm_t *vm, int vtsN, int vts_ttn, int part); static int set_FP_PGC(vm_t *vm); @@ -481,13 +479,13 @@ } int vm_jump_title_part(vm_t *vm, int title, int part) { - int vtsN; - - vtsN = vm->vmgi->tt_srpt->title[title - 1].title_set_nr; - - if(!set_VTS_PTT(vm, vtsN, title, part)) + if(!set_PTT(vm, title, part)) return 0; - process_command(vm, play_PGC_PG(vm, (vm->state).pgN)); + /* Some DVDs do not want us to jump directly into a title and have + * PGC pre commands taking us back to some menu. Since we do not like that, + * we do not execute PGC pre commands but directly play the PG. */ + /* process_command(vm, play_PGC_PG(vm, (vm->state).pgN)); */ + process_command(vm, play_PG(vm)); return 1; } @@ -1517,10 +1515,13 @@ /* Set functions */ static int set_TT(vm_t *vm, int tt) { + return set_PTT(vm, tt, 1); +} + +static int set_PTT(vm_t *vm, int tt, int ptt) { assert(tt <= vm->vmgi->tt_srpt->nr_of_srpts); - (vm->state).TTN_REG = tt; - return set_VTS_TT(vm, vm->vmgi->tt_srpt->title[tt - 1].title_set_nr, - vm->vmgi->tt_srpt->title[tt - 1].vts_ttn); + return set_VTS_PTT(vm, vm->vmgi->tt_srpt->title[tt - 1].title_set_nr, + vm->vmgi->tt_srpt->title[tt - 1].vts_ttn, ptt); } static int set_VTS_TT(vm_t *vm, int vtsN, int vts_ttn) { @@ -1807,6 +1808,11 @@ /* * $Log$ + * Revision 1.49 2003/03/27 15:12:22 mroi + * reorganize mutual header inclusion to fix warnings when compiling with TRACE defined + * fix vm_jump_title_part to use correct title number (up to now the number was + * considered to be VTS-relative, which it is not) + * * Revision 1.48 2003/03/26 14:37:23 mroi * I should get a brain and learn how to handle BCD... * also fixing a possible mis-jump with angled cells diff -r 5204d4e4cd3b -r 5897ff629f7c vm.h --- a/vm.h Wed Mar 26 14:37:23 2003 +0000 +++ b/vm.h Thu Mar 27 15:12:26 2003 +0000 @@ -26,9 +26,8 @@ #ifndef VM_H_INCLUDED #define VM_H_INCLUDED -#include "decoder.h" #include "remap.h" -#include +#include "dvdnav_internal.h" /* DOMAIN enum */ diff -r 5204d4e4cd3b -r 5897ff629f7c vmcmd.c --- a/vmcmd.c Wed Mar 26 14:37:23 2003 +0000 +++ b/vmcmd.c Thu Mar 27 15:12:26 2003 +0000 @@ -31,7 +31,6 @@ #include #include -#include "vmcmd.h" #include "dvdnav_internal.h" diff -r 5204d4e4cd3b -r 5897ff629f7c vmcmd.h --- a/vmcmd.h Wed Mar 26 14:37:23 2003 +0000 +++ b/vmcmd.h Thu Mar 27 15:12:26 2003 +0000 @@ -27,7 +27,7 @@ #include #include /* Only for vm_cmd_t */ -#include "decoder.h" +#include "dvdnav_internal.h" #ifdef TRACE void vmPrint_mnemonic(vm_cmd_t *command);