Mercurial > libdvdnav.hg
annotate decoder.h @ 123:da88fc974592 src
update some comments
| author | mroi |
|---|---|
| date | Wed, 12 Mar 2003 11:40:10 +0000 |
| parents | b6834e6359cf |
| children | 5897ff629f7c |
| 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 <inttypes.h> | |
|
19
7e8628911b4f
Implement General Register Counters or GPRM counters.
jcdutton
parents:
15
diff
changeset
|
29 #include <sys/time.h> |
|
7e8628911b4f
Implement General Register Counters or GPRM counters.
jcdutton
parents:
15
diff
changeset
|
30 |
| 0 | 31 #include <dvdread/ifo_types.h> /* vm_cmd_t */ |
| 32 | |
| 114 | 33 /* link command types */ |
| 0 | 34 typedef enum { |
| 35 LinkNoLink = 0, | |
| 36 | |
| 37 LinkTopC = 1, | |
| 38 LinkNextC = 2, | |
| 39 LinkPrevC = 3, | |
| 40 | |
| 41 LinkTopPG = 5, | |
| 42 LinkNextPG = 6, | |
| 43 LinkPrevPG = 7, | |
| 44 | |
| 45 LinkTopPGC = 9, | |
| 46 LinkNextPGC = 10, | |
| 47 LinkPrevPGC = 11, | |
| 48 LinkGoUpPGC = 12, | |
| 49 LinkTailPGC = 13, | |
| 50 | |
| 51 LinkRSM = 16, | |
| 52 | |
| 53 LinkPGCN, | |
| 54 LinkPTTN, | |
| 55 LinkPGN, | |
| 56 LinkCN, | |
| 57 | |
| 58 Exit, | |
| 59 | |
| 60 JumpTT, /* 22 */ | |
| 61 JumpVTS_TT, | |
| 62 JumpVTS_PTT, | |
| 63 | |
| 64 JumpSS_FP, | |
| 65 JumpSS_VMGM_MENU, | |
| 66 JumpSS_VTSM, | |
| 67 JumpSS_VMGM_PGC, | |
| 68 | |
| 69 CallSS_FP, /* 29 */ | |
| 70 CallSS_VMGM_MENU, | |
| 71 CallSS_VTSM, | |
| 72 CallSS_VMGM_PGC, | |
| 73 | |
| 74 PlayThis | |
| 75 } link_cmd_t; | |
| 76 | |
| 114 | 77 /* a link's data set */ |
| 0 | 78 typedef struct { |
| 79 link_cmd_t command; | |
| 80 uint16_t data1; | |
| 81 uint16_t data2; | |
| 82 uint16_t data3; | |
| 83 } link_t; | |
| 84 | |
| 114 | 85 /* the VM registers */ |
| 0 | 86 typedef struct { |
| 87 uint16_t SPRM[24]; | |
| 88 uint16_t GPRM[16]; | |
|
10
6f0fb88d1463
Added some debug info, to hopefully help in tracking bugs in libdvdnav.
jcdutton
parents:
0
diff
changeset
|
89 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
|
90 struct timeval GPRM_time[16]; /* For counter mode */ |
| 0 | 91 } registers_t; |
| 92 | |
| 114 | 93 /* a VM command data set */ |
| 94 typedef struct { | |
| 15 | 95 uint64_t instruction; |
| 96 uint64_t examined; | |
| 97 registers_t *registers; | |
| 98 } command_t; | |
| 99 | |
| 114 | 100 /* the big VM function, executing the given commands and writing |
| 101 * the link where to continue, the return value indicates if a jump | |
| 102 * has been performed */ | |
| 0 | 103 int vmEval_CMD(vm_cmd_t commands[], int num_commands, |
| 104 registers_t *registers, link_t *return_values); | |
| 105 | |
| 114 | 106 /* extracts some bits from the command */ |
| 15 | 107 uint32_t vm_getbits(command_t* command, int start, int count); |
| 0 | 108 |
| 114 | 109 #ifdef TRACE |
| 110 /* for debugging: prints a link in readable form */ | |
| 111 void vmPrint_LINK(link_t value); | |
| 112 | |
| 113 /* for debugging: dumps VM registers */ | |
| 114 void vmPrint_registers( registers_t *registers ); | |
| 115 #endif | |
| 116 | |
| 0 | 117 #endif /* DECODER_H_INCLUDED */ |
