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