Mercurial > libdvdnav.hg
annotate dvdnav_events.h @ 194:0ee10bd2292a src
Oops! We like still menus really.
author | jcdutton |
---|---|
date | Sun, 11 May 2003 00:53:28 +0000 |
parents | 90b1f6f0520e |
children | 52877d182e96 |
rev | line source |
---|---|
0 | 1 /* |
2 * Copyright (C) 2001 Rich Wareham <richwareham@users.sourceforge.net> | |
3 * | |
4 * This file is part of libdvdnav, a DVD navigation library. | |
5 * | |
6 * libdvdnav is free software; you can redistribute it and/or modify | |
7 * it under the terms of the GNU General Public License as published by | |
8 * the Free Software Foundation; either version 2 of the License, or | |
9 * (at your option) any later version. | |
10 * | |
11 * libdvdnav is distributed in the hope that it will be useful, | |
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 * GNU General Public License for more details. | |
15 * | |
16 * You should have received a copy of the GNU General Public License | |
17 * along with this program; if not, write to the Free Software | |
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA | |
19 * | |
20 * $Id$ | |
21 * | |
22 */ | |
23 | |
150 | 24 /* |
25 * This header defines events and event types | |
26 */ | |
27 | |
0 | 28 #ifndef DVDNAV_EVENTS_H_INCLUDED |
29 #define DVDNAV_EVENTS_H_INCLUDED | |
30 | |
169 | 31 #include "ifo_types.h" |
32 #include "dvd_reader.h" | |
33 #include "nav_types.h" | |
0 | 34 |
35 | |
150 | 36 /* |
37 * DVDNAV_BLOCK_OK | |
38 * | |
39 * A regular data block from the DVD has been returned. | |
40 * This one should be demuxed and decoded for playback. | |
41 */ | |
42 #define DVDNAV_BLOCK_OK 0 | |
43 | |
44 | |
45 /* | |
46 * DVDNAV_NOP | |
47 * | |
48 * Just ignore this. | |
49 */ | |
50 #define DVDNAV_NOP 1 | |
114 | 51 |
0 | 52 |
150 | 53 /* |
54 * DVDNAV_STILL_FRAME | |
55 * | |
56 * We have reached a still frame. The player application should wait | |
57 * the amount of time specified by the still's length while still handling | |
58 * user input to make menus and other interactive stills work. | |
59 * The last delivered frame should be kept showing. | |
60 * Once the still has timed out, call dvdnav_skip_still(). | |
61 * A length of 0xff means an infinite still which has to be skipped | |
62 * indirectly by some user interaction. | |
43
0ba15bf3dc25
Biiiiiiig change to let doxygen generate some docs for the library. Note that I'm in no way sure that the autoconf stuff plays nice.
richwareham
parents:
22
diff
changeset
|
63 */ |
150 | 64 #define DVDNAV_STILL_FRAME 2 |
65 | |
0 | 66 typedef struct { |
150 | 67 /* The length (in seconds) the still frame should be displayed for, |
68 * or 0xff if infinite. */ | |
69 int length; | |
0 | 70 } dvdnav_still_event_t; |
71 | |
150 | 72 |
73 /* | |
74 * DVDNAV_SPU_STREAM_CHANGE | |
75 * | |
76 * Inform the SPU decoding/overlaying engine to switch SPU channels. | |
55
5674fbd44f26
report all spu types (widescreen, letterbox and pan&scan), not widescreen
mroi
parents:
43
diff
changeset
|
77 */ |
150 | 78 #define DVDNAV_SPU_STREAM_CHANGE 3 |
79 | |
55
5674fbd44f26
report all spu types (widescreen, letterbox and pan&scan), not widescreen
mroi
parents:
43
diff
changeset
|
80 typedef struct { |
150 | 81 /* The physical (MPEG) stream number for widescreen SPU display. |
82 * Use this, if you blend the SPU on an anamorphic image before | |
83 * unsqueezing it. */ | |
84 int physical_wide; | |
85 | |
86 /* The physical (MPEG) stream number for letterboxed display. | |
87 * Use this, if you blend the SPU on an anamorphic image after | |
88 * unsqueezing it. */ | |
89 int physical_letterbox; | |
90 | |
91 /* The physical (MPEG) stream number for pan&scan display. | |
92 * Use this, if you blend the SPU on an anamorphic image after | |
93 * unsqueezing it the pan&scan way. */ | |
94 int physical_pan_scan; | |
95 | |
96 /* The logical (DVD) stream number. */ | |
97 int logical; | |
55
5674fbd44f26
report all spu types (widescreen, letterbox and pan&scan), not widescreen
mroi
parents:
43
diff
changeset
|
98 } dvdnav_spu_stream_change_event_t; |
5674fbd44f26
report all spu types (widescreen, letterbox and pan&scan), not widescreen
mroi
parents:
43
diff
changeset
|
99 |
150 | 100 |
101 /* | |
102 * DVDNAV_AUDIO_STREAM_CHANGE | |
103 * | |
104 * Inform the audio decoder to switch channels. | |
43
0ba15bf3dc25
Biiiiiiig change to let doxygen generate some docs for the library. Note that I'm in no way sure that the autoconf stuff plays nice.
richwareham
parents:
22
diff
changeset
|
105 */ |
150 | 106 #define DVDNAV_AUDIO_STREAM_CHANGE 4 |
107 | |
0 | 108 typedef struct { |
150 | 109 /* The physical (MPEG) stream number. */ |
110 int physical; | |
111 | |
112 /* The logical (DVD) stream number. */ | |
113 int logical; | |
55
5674fbd44f26
report all spu types (widescreen, letterbox and pan&scan), not widescreen
mroi
parents:
43
diff
changeset
|
114 } dvdnav_audio_stream_change_event_t; |
0 | 115 |
150 | 116 |
117 /* | |
118 * DVDNAV_VTS_CHANGE | |
119 * | |
120 * Some status information like video aspect and video scale permissions do | |
121 * not change inside a VTS. Therefore this event can be used to query such | |
122 * information only when necessary and update the decoding/displaying | |
123 * accordingly. | |
43
0ba15bf3dc25
Biiiiiiig change to let doxygen generate some docs for the library. Note that I'm in no way sure that the autoconf stuff plays nice.
richwareham
parents:
22
diff
changeset
|
124 */ |
150 | 125 #define DVDNAV_VTS_CHANGE 5 |
126 | |
0 | 127 typedef struct { |
150 | 128 int old_vtsN; /* the old VTS number */ |
129 dvd_read_domain_t old_domain; /* the old domain */ | |
130 int new_vtsN; /* the new VTS number */ | |
131 dvd_read_domain_t new_domain; /* the new domain */ | |
0 | 132 } dvdnav_vts_change_event_t; |
133 | |
150 | 134 |
135 /* | |
136 * DVDNAV_CELL_CHANGE | |
137 * | |
138 * Some status information like the current Title and Part numbers do not | |
139 * change inside a cell. Therefore this event can be used to query such | |
140 * information only when necessary and update the decoding/displaying | |
141 * accordingly. | |
142 * Some useful information for accurate time display is also reported | |
143 * together with this event. | |
43
0ba15bf3dc25
Biiiiiiig change to let doxygen generate some docs for the library. Note that I'm in no way sure that the autoconf stuff plays nice.
richwareham
parents:
22
diff
changeset
|
144 */ |
150 | 145 #define DVDNAV_CELL_CHANGE 6 |
146 | |
0 | 147 typedef struct { |
150 | 148 int cellN; /* the new cell number */ |
149 int pgN; /* the current program number */ | |
150 int64_t cell_length; /* the length of the current cell in PTS ticks */ | |
151 int64_t pg_length; /* the length of the current program in PTS ticks */ | |
152 int64_t pgc_length; /* the length of the current program chain in PTS ticks */ | |
153 int64_t cell_start; /* the start time of the current cell relatively to the PGC in PTS ticks */ | |
161 | 154 int64_t pg_start; /* the start time of the current PG relatively to the PGC in PTS ticks */ |
0 | 155 } dvdnav_cell_change_event_t; |
156 | |
150 | 157 |
158 /* | |
159 * DVDNAV_NAV_PACKET | |
160 * | |
161 * NAV packets are useful for various purposes. They define the button | |
162 * highlight areas and VM commands of DVD menus, so they should in any | |
163 * case be sent to the SPU decoder/overlaying engine for the menus to work. | |
164 * NAV packets also provide a way to detect PTS discontinuities, because | |
165 * they carry the start and end PTS values for the current VOBU. | |
166 * (pci.vobu_s_ptm and pci.vobu_e_ptm) Whenever the start PTS of the | |
167 * current NAV does not match the end PTS of the previous NAV, a PTS | |
168 * discontinuity has occured. | |
169 * NAV packets can also be used for time display, because they are | |
170 * timestamped relatively to the current Cell. | |
43
0ba15bf3dc25
Biiiiiiig change to let doxygen generate some docs for the library. Note that I'm in no way sure that the autoconf stuff plays nice.
richwareham
parents:
22
diff
changeset
|
171 */ |
150 | 172 #define DVDNAV_NAV_PACKET 7 |
173 | |
174 | |
175 /* | |
176 * DVDNAV_STOP | |
177 * | |
178 * Applications should end playback here. A subsequent dvdnav_get_next_block() | |
179 * call will restart the VM from the beginning of the DVD. | |
180 */ | |
181 #define DVDNAV_STOP 8 | |
0 | 182 |
150 | 183 |
184 /* | |
185 * DVDNAV_HIGHLIGHT | |
186 * | |
187 * The current button highlight changed. Inform the overlaying engine to | |
188 * highlight a different button. Please note, that at the moment only mode 1 | |
189 * highlights are reported this way. That means, when the button highlight | |
190 * has been moved around by some function call, you will receive an event | |
191 * telling you the new button. But when a button gets activated, you have | |
192 * to handle the mode 2 highlighting (that is some different colour the | |
193 * button turns to on activation) in your application. | |
43
0ba15bf3dc25
Biiiiiiig change to let doxygen generate some docs for the library. Note that I'm in no way sure that the autoconf stuff plays nice.
richwareham
parents:
22
diff
changeset
|
194 */ |
150 | 195 #define DVDNAV_HIGHLIGHT 9 |
196 | |
0 | 197 typedef struct { |
150 | 198 /* highlight mode: 0 - hide, 1 - show, 2 - activate, currently always 1 */ |
199 int display; | |
200 | |
201 /* FIXME: these fields are currently not set */ | |
202 uint32_t palette; /* The CLUT entries for the highlight palette | |
203 (4-bits per entry -> 4 entries) */ | |
204 uint16_t sx,sy,ex,ey; /* The start/end x,y positions */ | |
205 uint32_t pts; /* Highlight PTS to match with SPU */ | |
206 | |
207 /* button number for the SPU decoder/overlaying engine */ | |
208 uint32_t buttonN; | |
0 | 209 } dvdnav_highlight_event_t; |
210 | |
150 | 211 |
212 /* | |
213 * DVDNAV_SPU_CLUT_CHANGE | |
214 * | |
215 * Inform the SPU decoder/overlaying engine to update its colour lookup table. | |
216 * The CLUT is given as 16 uint32_t's in the buffer. | |
217 */ | |
218 #define DVDNAV_SPU_CLUT_CHANGE 10 | |
219 | |
220 | |
221 /* | |
222 * DVDNAV_HOP_CHANNEL | |
223 * | |
224 * A non-seamless operation has been performed. Applications can drop all | |
225 * their internal fifo's content, which will speed up the response. | |
226 */ | |
227 #define DVDNAV_HOP_CHANNEL 12 | |
228 | |
229 | |
230 /* | |
231 * DVDNAV_WAIT | |
232 * | |
233 * We have reached a point in DVD playback, where timing is critical. | |
234 * Player application with internal fifos can introduce state | |
235 * inconsistencies, because libdvdnav is always the fifo's length | |
236 * ahead in the stream compared to what the application sees. | |
237 * Such applications should wait until their fifos are empty | |
238 * when they receive this type of event. | |
239 * Once this is achieved, call dvdnav_skip_wait(). | |
240 */ | |
241 #define DVDNAV_WAIT 13 | |
242 | |
243 | |
0 | 244 #endif /* DVDNAV_EVENTS_H_INCLUDED */ |