diff options
author | Michael Roitzsch <mroi@users.sourceforge.net> | 2003-03-29 13:19:08 +0000 |
---|---|---|
committer | Michael Roitzsch <mroi@users.sourceforge.net> | 2003-03-29 13:19:08 +0000 |
commit | d91c6913533151ea29407ff46ebcb5f9e2cdbdb5 (patch) | |
tree | 942a3652f1afa8f4745a2b7535ef68f0b1ad8b78 | |
parent | 343a97eaa67d1bc20856841312a235e2602d723e (diff) | |
download | xine-lib-d91c6913533151ea29407ff46ebcb5f9e2cdbdb5.tar.gz xine-lib-d91c6913533151ea29407ff46ebcb5f9e2cdbdb5.tar.bz2 |
sync to libdvdnav cvs once again
* some changes to mutual header inclusion to make it compile warning-less
when tracing is enabled
* title/part jumping should work much more reliable now
CVS patchset: 4509
CVS date: 2003/03/29 13:19:08
-rw-r--r-- | src/input/input_dvd.c | 12 | ||||
-rw-r--r-- | src/input/libdvdnav/decoder.c | 4 | ||||
-rw-r--r-- | src/input/libdvdnav/decoder.h | 3 | ||||
-rw-r--r-- | src/input/libdvdnav/diff_against_cvs.patch | 28 | ||||
-rw-r--r-- | src/input/libdvdnav/dvdnav_internal.h | 11 | ||||
-rw-r--r-- | src/input/libdvdnav/highlight.c | 8 | ||||
-rw-r--r-- | src/input/libdvdnav/navigation.c | 6 | ||||
-rw-r--r-- | src/input/libdvdnav/searching.c | 5 | ||||
-rw-r--r-- | src/input/libdvdnav/settings.c | 4 | ||||
-rw-r--r-- | src/input/libdvdnav/vm.c | 43 | ||||
-rw-r--r-- | src/input/libdvdnav/vm.h | 5 | ||||
-rw-r--r-- | src/input/libdvdnav/vmcmd.c | 3 | ||||
-rw-r--r-- | src/input/libdvdnav/vmcmd.h | 4 |
13 files changed, 68 insertions, 68 deletions
diff --git a/src/input/input_dvd.c b/src/input/input_dvd.c index e3f6aff52..f5b003cad 100644 --- a/src/input/input_dvd.c +++ b/src/input/input_dvd.c @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_dvd.c,v 1.136 2003/03/27 13:48:03 mroi Exp $ + * $Id: input_dvd.c,v 1.137 2003/03/29 13:19:08 mroi Exp $ * */ @@ -1357,13 +1357,13 @@ static input_plugin_t *open_plugin (input_class_t *class_gen, xine_stream_t *str return 0; } - /* If there was a program specified, get that too. */ + /* If there was a part specified, get that too. */ pr = -1; if(found != -1) { pr = strtol(locator+found+1, NULL,10); } #ifdef INPUT_DEBUG - printf("input_dvd: Jumping to VTS >%i<, prog >%i<\n", tt, pr); + printf("input_dvd: Jumping to TT >%i<, PTT >%i<\n", tt, pr); #endif if(pr != -1) { dvdnav_part_play(this->dvdnav, tt, pr); @@ -1617,6 +1617,12 @@ static void *init_class (xine_t *xine, void *data) { /* * $Log: input_dvd.c,v $ + * Revision 1.137 2003/03/29 13:19:08 mroi + * sync to libdvdnav cvs once again + * * some changes to mutual header inclusion to make it compile warning-less + * when tracing is enabled + * * title/part jumping should work much more reliable now + * * Revision 1.136 2003/03/27 13:48:03 mroi * use timing information provided by libdvdnav to get more accurate position * diff --git a/src/input/libdvdnav/decoder.c b/src/input/libdvdnav/decoder.c index d10fe154e..ba605bc0b 100644 --- a/src/input/libdvdnav/decoder.c +++ b/src/input/libdvdnav/decoder.c @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: decoder.c,v 1.6 2003/02/20 16:01:58 mroi Exp $ + * $Id: decoder.c,v 1.7 2003/03/29 13:19:08 mroi Exp $ * */ @@ -32,8 +32,6 @@ #include <string.h> /* For memset */ #include "ifo_types.h" /* vm_cmd_t */ #include <assert.h> -#include "vmcmd.h" -#include "decoder.h" #include "dvdnav_internal.h" uint32_t vm_getbits(command_t *command, int start, int count) { diff --git a/src/input/libdvdnav/decoder.h b/src/input/libdvdnav/decoder.h index 6a91323f7..16e2cc8d0 100644 --- a/src/input/libdvdnav/decoder.h +++ b/src/input/libdvdnav/decoder.h @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: decoder.h,v 1.5 2003/02/20 16:01:58 mroi Exp $ + * $Id: decoder.h,v 1.6 2003/03/29 13:19:08 mroi Exp $ * */ @@ -29,6 +29,7 @@ #include <sys/time.h> #include "ifo_types.h" /* vm_cmd_t */ +#include "dvdnav_internal.h" /* link command types */ typedef enum { diff --git a/src/input/libdvdnav/diff_against_cvs.patch b/src/input/libdvdnav/diff_against_cvs.patch index d9d033124..cf3a0ddad 100644 --- a/src/input/libdvdnav/diff_against_cvs.patch +++ b/src/input/libdvdnav/diff_against_cvs.patch @@ -7,8 +7,8 @@ -#include <dvdread/ifo_types.h> /* vm_cmd_t */ +#include "ifo_types.h" /* vm_cmd_t */ #include <assert.h> - #include "vmcmd.h" - #include "decoder.h" + #include "dvdnav_internal.h" + --- src/input/libdvdnav/decoder.h Wed Sep 4 12:50:34 2002 +++ src/input/libdvdnav/decoder.h Wed Sep 4 12:50:42 2002 @@ -28,7 +28,7 @@ @@ -17,9 +17,9 @@ -#include <dvdread/ifo_types.h> /* vm_cmd_t */ +#include "ifo_types.h" /* vm_cmd_t */ + #include "dvdnav_internal.h" /* link command types */ - typedef enum { --- src/input/libdvdnav/dvdnav.c Wed Sep 4 12:50:34 2002 +++ src/input/libdvdnav/dvdnav.c Wed Sep 4 12:50:42 2002 @@ -33,7 +33,7 @@ @@ -75,7 +75,7 @@ /* * Copyright (C) 2001 Rich Wareham <richwareham@users.sourceforge.net> * -@@ -40,9 +41,9 @@ +@@ -37,9 +38,9 @@ #undef WORDS_BIGENDIAN @@ -86,28 +86,28 @@ +#include "ifo_read.h" +#include "ifo_types.h" - /* Uncomment for VM command tracing */ + /* #define TRACE */ --- src/input/libdvdnav/highlight.c Wed Sep 4 12:50:34 2002 +++ src/input/libdvdnav/highlight.c Wed Sep 4 12:55:44 2002 -@@ -30,7 +30,7 @@ - #include "dvdnav_internal.h" +@@ -26,7 +26,7 @@ + #endif - #include "vm.h" + #include <assert.h> -#include <dvdread/nav_types.h> +#include "nav_types.h" + #include "dvdnav_internal.h" /* - #define BUTTON_TESTING -@@ -38,7 +38,7 @@ +@@ -35,7 +35,7 @@ #ifdef BUTTON_TESTING -#include <dvdread/nav_print.h> +#include "nav_print.h" - #include "vmcmd.h" static void print_time(dvd_time_t *dtime) { + const char *rate; --- src/input/libdvdnav/vm.c Sat Jul 6 18:12:09 2002 +++ src/input/libdvdnav/vm.c Fri Aug 9 22:03:48 2002 @@ -37,8 +37,8 @@ @@ -119,8 +119,8 @@ +#include "ifo_types.h" +#include "ifo_read.h" - #include "decoder.h" - #include "vmcmd.h" + #include "dvdnav_internal.h" + --- src/input/libdvdnav/vmcmd.h Sat Jun 1 14:40:50 2002 +++ src/input/libdvdnav/vmcmd.h Fri Aug 9 22:04:13 2002 @@ -26,7 +26,7 @@ @@ -129,6 +129,6 @@ #include <inttypes.h> -#include <dvdread/ifo_types.h> /* Only for vm_cmd_t */ +#include "ifo_types.h" /* Only for vm_cmd_t */ - #include "decoder.h" + #include "dvdnav_internal.h" #ifdef TRACE diff --git a/src/input/libdvdnav/dvdnav_internal.h b/src/input/libdvdnav/dvdnav_internal.h index f4e6a2841..40783a95b 100644 --- a/src/input/libdvdnav/dvdnav_internal.h +++ b/src/input/libdvdnav/dvdnav_internal.h @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: dvdnav_internal.h,v 1.8 2003/03/25 13:17:22 mroi Exp $ + * $Id: dvdnav_internal.h,v 1.9 2003/03/29 13:19:09 mroi Exp $ * */ @@ -29,9 +29,6 @@ #include "config.h" #endif -#include "dvdnav.h" -#include "vm.h" - #include <stdlib.h> #include <stdio.h> #include <unistd.h> @@ -45,10 +42,14 @@ #include "ifo_read.h" #include "ifo_types.h" - /* 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 --git a/src/input/libdvdnav/highlight.c b/src/input/libdvdnav/highlight.c index c9685f089..16c3a509c 100644 --- a/src/input/libdvdnav/highlight.c +++ b/src/input/libdvdnav/highlight.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: highlight.c,v 1.10 2003/03/08 14:36:13 mroi Exp $ + * $Id: highlight.c,v 1.11 2003/03/29 13:19:09 mroi Exp $ * */ @@ -26,11 +26,8 @@ #endif #include <assert.h> - -#include "dvdnav_internal.h" - -#include "vm.h" #include "nav_types.h" +#include "dvdnav_internal.h" /* #define BUTTON_TESTING @@ -39,7 +36,6 @@ #ifdef BUTTON_TESTING #include "nav_print.h" -#include "vmcmd.h" static void print_time(dvd_time_t *dtime) { const char *rate; diff --git a/src/input/libdvdnav/navigation.c b/src/input/libdvdnav/navigation.c index 97b988fc6..07567bd1b 100644 --- a/src/input/libdvdnav/navigation.c +++ b/src/input/libdvdnav/navigation.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: navigation.c,v 1.6 2003/03/25 13:17:22 mroi Exp $ + * $Id: navigation.c,v 1.7 2003/03/29 13:19:09 mroi Exp $ * */ @@ -27,8 +27,6 @@ #include "dvdnav_internal.h" -#include "vm.h" - /* Navigation API calls */ dvdnav_status_t dvdnav_still_skip(dvdnav_t *this) { @@ -140,7 +138,7 @@ dvdnav_status_t dvdnav_part_play(dvdnav_t *this, int title, int part) { } pthread_mutex_lock(&this->vm_lock); - if (!this->vm->vtsi || !this->vm->vmgi) { + if (!this->vm->vmgi) { printerr("Bad VM state."); pthread_mutex_unlock(&this->vm_lock); return S_ERR; diff --git a/src/input/libdvdnav/searching.c b/src/input/libdvdnav/searching.c index 89b5c86e7..a09b7b04f 100644 --- a/src/input/libdvdnav/searching.c +++ b/src/input/libdvdnav/searching.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: searching.c,v 1.12 2003/03/25 13:17:22 mroi Exp $ + * $Id: searching.c,v 1.13 2003/03/29 13:19:09 mroi Exp $ * */ @@ -26,11 +26,8 @@ #endif #include <assert.h> - #include "dvdnav_internal.h" -#include "vm.h" - /* #define LOG_DEBUG */ diff --git a/src/input/libdvdnav/settings.c b/src/input/libdvdnav/settings.c index d091e57e2..d760695bb 100644 --- a/src/input/libdvdnav/settings.c +++ b/src/input/libdvdnav/settings.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: settings.c,v 1.4 2003/03/25 13:17:22 mroi Exp $ + * $Id: settings.c,v 1.5 2003/03/29 13:19:09 mroi Exp $ * */ @@ -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 --git a/src/input/libdvdnav/vm.c b/src/input/libdvdnav/vm.c index c63c0cd1a..a4b42d4bc 100644 --- a/src/input/libdvdnav/vm.c +++ b/src/input/libdvdnav/vm.c @@ -19,7 +19,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: vm.c,v 1.16 2003/03/27 13:46:47 mroi Exp $ + * $Id: vm.c,v 1.17 2003/03/29 13:19:09 mroi Exp $ * */ @@ -40,9 +40,6 @@ #include "ifo_types.h" #include "ifo_read.h" -#include "decoder.h" -#include "vmcmd.h" -#include "vm.h" #include "dvdnav_internal.h" /* @@ -69,6 +66,7 @@ static int process_command(vm_t *vm,link_t link_values); /* 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); @@ -123,7 +121,7 @@ static void vm_print_current_domain_state(vm_t *vm) { } #endif -void dvd_read_name( vm_t *this, const char *devname) { +static void dvd_read_name(char *name, const char *device) { int fd, i; #ifndef __FreeBSD__ off64_t off; @@ -133,7 +131,7 @@ void dvd_read_name( vm_t *this, const char *devname) { uint8_t data[DVD_VIDEO_LB_LEN]; /* Read DVD name */ - fd=open(devname, O_RDONLY); + fd=open(device, O_RDONLY); if (fd > 0) { off = lseek64( fd, 32 * (int64_t) DVD_VIDEO_LB_LEN, SEEK_SET ); if( off == ( 32 * (int64_t) DVD_VIDEO_LB_LEN ) ) { @@ -149,8 +147,8 @@ void dvd_read_name( vm_t *this, const char *devname) { fprintf(MSG_OUT, " "); } } - strncpy(&this->dvd_name[0], &data[25], 48); - this->dvd_name[48]=0; + strncpy(name, &data[25], 48); + name[48] = 0; fprintf(MSG_OUT, "\nlibdvdnav: DVD Serial Number: "); for(i=73; i < 89; i++ ) { if((data[i] == 0)) break; @@ -317,7 +315,7 @@ int vm_reset(vm_t *vm, const char *dvdroot) { fprintf(MSG_OUT, "libdvdnav: vm: faild to open/read the DVD\n"); return 0; } - dvd_read_name(vm, dvdroot); + dvd_read_name(vm->dvd_name, dvdroot); vm->map = remap_loadmap(vm->dvd_name); vm->vmgi = ifoOpenVMGI(vm->dvd); if(!vm->vmgi) { @@ -481,13 +479,13 @@ int vm_jump_cell_block(vm_t *vm, int cell, int block) { } 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 @@ static int process_command(vm_t *vm, link_t link_values) { /* 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,12 @@ void vm_position_print(vm_t *vm, vm_position_t *position) { /* * $Log: vm.c,v $ + * Revision 1.17 2003/03/29 13:19:09 mroi + * sync to libdvdnav cvs once again + * * some changes to mutual header inclusion to make it compile warning-less + * when tracing is enabled + * * title/part jumping should work much more reliable now + * * Revision 1.16 2003/03/27 13:46:47 mroi * sync to libdvdnav cvs * * fix conversion of dvd_time_t (I do know BCD, I just did it wrong...) diff --git a/src/input/libdvdnav/vm.h b/src/input/libdvdnav/vm.h index e56001d2d..72e99b1de 100644 --- a/src/input/libdvdnav/vm.h +++ b/src/input/libdvdnav/vm.h @@ -19,16 +19,15 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: vm.h,v 1.6 2003/03/25 13:17:23 mroi Exp $ + * $Id: vm.h,v 1.7 2003/03/29 13:19:09 mroi Exp $ * */ #ifndef VM_H_INCLUDED #define VM_H_INCLUDED -#include "decoder.h" #include "remap.h" -#include <dvd_types.h> +#include "dvdnav_internal.h" /* DOMAIN enum */ diff --git a/src/input/libdvdnav/vmcmd.c b/src/input/libdvdnav/vmcmd.c index 7dd98fc20..27b443b07 100644 --- a/src/input/libdvdnav/vmcmd.c +++ b/src/input/libdvdnav/vmcmd.c @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: vmcmd.c,v 1.3 2003/02/20 16:02:01 mroi Exp $ + * $Id: vmcmd.c,v 1.4 2003/03/29 13:19:09 mroi Exp $ * */ @@ -31,7 +31,6 @@ #include <inttypes.h> #include <assert.h> -#include "vmcmd.h" #include "dvdnav_internal.h" diff --git a/src/input/libdvdnav/vmcmd.h b/src/input/libdvdnav/vmcmd.h index eb862d421..6d3c2cb96 100644 --- a/src/input/libdvdnav/vmcmd.h +++ b/src/input/libdvdnav/vmcmd.h @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: vmcmd.h,v 1.4 2003/02/20 16:02:01 mroi Exp $ + * $Id: vmcmd.h,v 1.5 2003/03/29 13:19:09 mroi Exp $ * */ @@ -27,7 +27,7 @@ #include <inttypes.h> #include "ifo_types.h" /* Only for vm_cmd_t */ -#include "decoder.h" +#include "dvdnav_internal.h" #ifdef TRACE void vmPrint_mnemonic(vm_cmd_t *command); |