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