Mercurial > libdvdnav.hg
annotate decoder.h @ 19:7e8628911b4f src
Implement General Register Counters or GPRM counters.
Navigation timers are not supported yet. SPRM[9] and SPRM[10].
| author | jcdutton |
|---|---|
| date | Fri, 12 Apr 2002 20:06:41 +0000 |
| parents | 74aee0b81da0 |
| children | 8b08ee66cbff |
| rev | line source |
|---|---|
| 0 | 1 /* |
| 2 * Copyright (C) 2000, 2001 Martin Norbäck, Håkan Hjort | |
| 3 * | |
| 4 * This file is part of libdvdnav, a DVD navigation library. It is modified | |
| 5 * from a file originally part of the Ogle DVD player. | |
| 6 * | |
| 7 * libdvdnav is free software; you can redistribute it and/or modify | |
| 8 * it under the terms of the GNU General Public License as published by | |
| 9 * the Free Software Foundation; either version 2 of the License, or | |
| 10 * (at your option) any later version. | |
| 11 * | |
| 12 * libdvdnav is distributed in the hope that it will be useful, | |
| 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 15 * GNU General Public License for more details. | |
| 16 * | |
| 17 * You should have received a copy of the GNU General Public License | |
| 18 * along with this program; if not, write to the Free Software | |
| 19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA | |
| 20 * | |
| 21 * $Id$ | |
| 22 * | |
| 23 */ | |
| 24 | |
| 25 #ifndef DECODER_H_INCLUDED | |
| 26 #define DECODER_H_INCLUDED | |
| 27 | |
| 28 #include "config.h" | |
| 29 #include <inttypes.h> | |
|
19
7e8628911b4f
Implement General Register Counters or GPRM counters.
jcdutton
parents:
15
diff
changeset
|
30 #include <sys/time.h> |
|
7e8628911b4f
Implement General Register Counters or GPRM counters.
jcdutton
parents:
15
diff
changeset
|
31 |
| 0 | 32 #include <dvdread/ifo_types.h> /* vm_cmd_t */ |
| 33 | |
| 34 /* Uncomment for tracing */ | |
| 35 #define TRACE | |
| 36 | |
| 37 typedef enum { | |
| 38 LinkNoLink = 0, | |
| 39 | |
| 40 LinkTopC = 1, | |
| 41 LinkNextC = 2, | |
| 42 LinkPrevC = 3, | |
| 43 | |
| 44 LinkTopPG = 5, | |
| 45 LinkNextPG = 6, | |
| 46 LinkPrevPG = 7, | |
| 47 | |
| 48 LinkTopPGC = 9, | |
| 49 LinkNextPGC = 10, | |
| 50 LinkPrevPGC = 11, | |
| 51 LinkGoUpPGC = 12, | |
| 52 LinkTailPGC = 13, | |
| 53 | |
| 54 LinkRSM = 16, | |
| 55 | |
| 56 LinkPGCN, | |
| 57 LinkPTTN, | |
| 58 LinkPGN, | |
| 59 LinkCN, | |
| 60 | |
| 61 Exit, | |
| 62 | |
| 63 JumpTT, /* 22 */ | |
| 64 JumpVTS_TT, | |
| 65 JumpVTS_PTT, | |
| 66 | |
| 67 JumpSS_FP, | |
| 68 JumpSS_VMGM_MENU, | |
| 69 JumpSS_VTSM, | |
| 70 JumpSS_VMGM_PGC, | |
| 71 | |
| 72 CallSS_FP, /* 29 */ | |
| 73 CallSS_VMGM_MENU, | |
| 74 CallSS_VTSM, | |
| 75 CallSS_VMGM_PGC, | |
| 76 | |
| 77 PlayThis | |
| 78 } link_cmd_t; | |
| 79 | |
| 80 typedef struct { | |
| 81 link_cmd_t command; | |
| 82 uint16_t data1; | |
| 83 uint16_t data2; | |
| 84 uint16_t data3; | |
| 85 } link_t; | |
| 86 | |
| 87 typedef struct { | |
| 88 uint16_t SPRM[24]; | |
| 89 uint16_t GPRM[16]; | |
|
10
6f0fb88d1463
Added some debug info, to hopefully help in tracking bugs in libdvdnav.
jcdutton
parents:
0
diff
changeset
|
90 uint8_t GPRM_mode[16]; /* Need to have some thing to indicate normal/counter mode for every GPRM */ |
|
19
7e8628911b4f
Implement General Register Counters or GPRM counters.
jcdutton
parents:
15
diff
changeset
|
91 struct timeval GPRM_time[16]; /* For counter mode */ |
| 0 | 92 } registers_t; |
| 93 | |
| 15 | 94 typedef struct |
| 95 { | |
| 96 uint64_t instruction; | |
| 97 uint64_t examined; | |
| 98 registers_t *registers; | |
| 99 } command_t; | |
| 100 | |
| 0 | 101 int vmEval_CMD(vm_cmd_t commands[], int num_commands, |
| 102 registers_t *registers, link_t *return_values); | |
| 103 | |
| 104 void vmPrint_LINK(link_t value); | |
|
10
6f0fb88d1463
Added some debug info, to hopefully help in tracking bugs in libdvdnav.
jcdutton
parents:
0
diff
changeset
|
105 void vmPrint_registers( registers_t *registers ); |
| 15 | 106 uint32_t vm_getbits(command_t* command, int start, int count); |
| 0 | 107 |
| 108 #endif /* DECODER_H_INCLUDED */ |
