Mercurial > libdvdnav.hg
annotate vm/decoder.h @ 420:d7720a050e67 src
Restore C++ compatibility by renaming the parameter to 'self' like in
the other functions.
Revision 1208 ("Add dvdnav_program_play & dvdnav_current_title_program")
added dvdnav_program_play function to dvdnav.h. However, unlike the
other API functions, its first parameter is named 'this' instead of
'self'. 'this' is a C++ keyword and prevents compilation of C++ projects
using libdvdnav.
Patch by Anssi Hannula \anssi.hannula%iki.fi/
author | rathann |
---|---|
date | Sun, 09 Dec 2012 21:39:37 +0000 |
parents | 0a5a6f03b029 |
children |
rev | line source |
---|---|
225 | 1 /* |
390 | 2 * Copyright (C) 2000, 2001 Martin Norbäck, Håkan Hjort |
388 | 3 * |
225 | 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. | |
388 | 6 * |
225 | 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. | |
388 | 11 * |
225 | 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. | |
388 | 16 * |
389
d3c273ced49c
Use consistent license headers everywhere: Fix wrong FSF address.
diego
parents:
388
diff
changeset
|
17 * You should have received a copy of the GNU General Public License along |
d3c273ced49c
Use consistent license headers everywhere: Fix wrong FSF address.
diego
parents:
388
diff
changeset
|
18 * with libdvdnav; if not, write to the Free Software Foundation, Inc., |
d3c273ced49c
Use consistent license headers everywhere: Fix wrong FSF address.
diego
parents:
388
diff
changeset
|
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
225 | 20 */ |
21 | |
391 | 22 #ifndef LIBDVDNAV_DECODER_H |
23 #define LIBDVDNAV_DECODER_H | |
225 | 24 |
25 /* link command types */ | |
26 typedef enum { | |
27 LinkNoLink = 0, | |
28 | |
29 LinkTopC = 1, | |
30 LinkNextC = 2, | |
31 LinkPrevC = 3, | |
32 | |
33 LinkTopPG = 5, | |
34 LinkNextPG = 6, | |
35 LinkPrevPG = 7, | |
36 | |
37 LinkTopPGC = 9, | |
38 LinkNextPGC = 10, | |
39 LinkPrevPGC = 11, | |
40 LinkGoUpPGC = 12, | |
41 LinkTailPGC = 13, | |
42 | |
43 LinkRSM = 16, | |
44 | |
45 LinkPGCN, | |
46 LinkPTTN, | |
47 LinkPGN, | |
48 LinkCN, | |
49 | |
50 Exit, | |
51 | |
52 JumpTT, /* 22 */ | |
53 JumpVTS_TT, | |
54 JumpVTS_PTT, | |
55 | |
56 JumpSS_FP, | |
57 JumpSS_VMGM_MENU, | |
58 JumpSS_VTSM, | |
59 JumpSS_VMGM_PGC, | |
60 | |
61 CallSS_FP, /* 29 */ | |
62 CallSS_VMGM_MENU, | |
63 CallSS_VTSM, | |
64 CallSS_VMGM_PGC, | |
65 | |
66 PlayThis | |
67 } link_cmd_t; | |
68 | |
69 /* a link's data set */ | |
70 typedef struct { | |
71 link_cmd_t command; | |
72 uint16_t data1; | |
73 uint16_t data2; | |
74 uint16_t data3; | |
75 } link_t; | |
76 | |
77 /* the VM registers */ | |
78 typedef struct { | |
79 uint16_t SPRM[24]; | |
80 uint16_t GPRM[16]; | |
81 uint8_t GPRM_mode[16]; /* Need to have some thing to indicate normal/counter mode for every GPRM */ | |
82 struct timeval GPRM_time[16]; /* For counter mode */ | |
83 } registers_t; | |
84 | |
85 /* a VM command data set */ | |
86 typedef struct { | |
87 uint64_t instruction; | |
88 uint64_t examined; | |
89 registers_t *registers; | |
90 } command_t; | |
91 | |
92 /* the big VM function, executing the given commands and writing | |
93 * the link where to continue, the return value indicates if a jump | |
94 * has been performed */ | |
388 | 95 int32_t vmEval_CMD(vm_cmd_t commands[], int32_t num_commands, |
225 | 96 registers_t *registers, link_t *return_values); |
97 | |
98 /* extracts some bits from the command */ | |
99 uint32_t vm_getbits(command_t* command, int32_t start, int32_t count); | |
100 | |
101 #ifdef TRACE | |
102 /* for debugging: prints a link in readable form */ | |
103 void vm_print_link(link_t value); | |
104 | |
105 /* for debugging: dumps VM registers */ | |
106 void vm_print_registers( registers_t *registers ); | |
107 #endif | |
108 | |
391 | 109 #endif /* LIBDVDNAV_DECODER_H */ |