Mercurial > libdvdnav.hg
annotate decoder.h @ 212:6b67914ae021 src
port Daniel's changes to xine-lib cvs to minimize difference
author | mroi |
---|---|
date | Wed, 27 Aug 2003 13:54:19 +0000 |
parents | 6b1bfe8f5283 |
children | c2d0cf87a5ee |
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 |
169 | 31 #include "ifo_types.h" /* vm_cmd_t */ |
136
5897ff629f7c
reorganize mutual header inclusion to fix warnings when compiling with TRACE defined
mroi
parents:
114
diff
changeset
|
32 #include "dvdnav_internal.h" |
0 | 33 |
114 | 34 /* link command types */ |
0 | 35 typedef enum { |
36 LinkNoLink = 0, | |
37 | |
38 LinkTopC = 1, | |
39 LinkNextC = 2, | |
40 LinkPrevC = 3, | |
41 | |
42 LinkTopPG = 5, | |
43 LinkNextPG = 6, | |
44 LinkPrevPG = 7, | |
45 | |
46 LinkTopPGC = 9, | |
47 LinkNextPGC = 10, | |
48 LinkPrevPGC = 11, | |
49 LinkGoUpPGC = 12, | |
50 LinkTailPGC = 13, | |
51 | |
52 LinkRSM = 16, | |
53 | |
54 LinkPGCN, | |
55 LinkPTTN, | |
56 LinkPGN, | |
57 LinkCN, | |
58 | |
59 Exit, | |
60 | |
61 JumpTT, /* 22 */ | |
62 JumpVTS_TT, | |
63 JumpVTS_PTT, | |
64 | |
65 JumpSS_FP, | |
66 JumpSS_VMGM_MENU, | |
67 JumpSS_VTSM, | |
68 JumpSS_VMGM_PGC, | |
69 | |
70 CallSS_FP, /* 29 */ | |
71 CallSS_VMGM_MENU, | |
72 CallSS_VTSM, | |
73 CallSS_VMGM_PGC, | |
74 | |
75 PlayThis | |
76 } link_cmd_t; | |
77 | |
114 | 78 /* a link's data set */ |
0 | 79 typedef struct { |
80 link_cmd_t command; | |
81 uint16_t data1; | |
82 uint16_t data2; | |
83 uint16_t data3; | |
84 } link_t; | |
85 | |
114 | 86 /* the VM registers */ |
0 | 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 | |
114 | 94 /* a VM command data set */ |
95 typedef struct { | |
15 | 96 uint64_t instruction; |
97 uint64_t examined; | |
98 registers_t *registers; | |
99 } command_t; | |
100 | |
114 | 101 /* the big VM function, executing the given commands and writing |
102 * the link where to continue, the return value indicates if a jump | |
103 * has been performed */ | |
195 | 104 int vmEval_CMD(vm_cmd_t commands[], int32_t num_commands, |
0 | 105 registers_t *registers, link_t *return_values); |
106 | |
114 | 107 /* extracts some bits from the command */ |
195 | 108 uint32_t vm_getbits(command_t* command, int32_t start, int32_t count); |
0 | 109 |
114 | 110 #ifdef TRACE |
111 /* for debugging: prints a link in readable form */ | |
153 | 112 void vm_print_link(link_t value); |
114 | 113 |
114 /* for debugging: dumps VM registers */ | |
153 | 115 void vm_print_registers( registers_t *registers ); |
114 | 116 #endif |
117 | |
0 | 118 #endif /* DECODER_H_INCLUDED */ |