Mercurial > libdvdnav.hg
annotate dvdnav_events.h @ 150:593b267a963a src
elaborate the comments
| author | mroi |
|---|---|
| date | Fri, 04 Apr 2003 14:21:00 +0000 |
| parents | d9d75a22a061 |
| children | 81b9602f780c |
| 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 | |
| 31 #include <dvdread/ifo_types.h> | |
| 32 #include <dvdread/dvd_reader.h> | |
| 119 | 33 #include <dvdread/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 */ | |
| 0 | 154 } dvdnav_cell_change_event_t; |
| 155 | |
| 150 | 156 |
| 157 /* | |
| 158 * DVDNAV_NAV_PACKET | |
| 159 * | |
| 160 * NAV packets are useful for various purposes. They define the button | |
| 161 * highlight areas and VM commands of DVD menus, so they should in any | |
| 162 * case be sent to the SPU decoder/overlaying engine for the menus to work. | |
| 163 * NAV packets also provide a way to detect PTS discontinuities, because | |
| 164 * they carry the start and end PTS values for the current VOBU. | |
| 165 * (pci.vobu_s_ptm and pci.vobu_e_ptm) Whenever the start PTS of the | |
| 166 * current NAV does not match the end PTS of the previous NAV, a PTS | |
| 167 * discontinuity has occured. | |
| 168 * NAV packets can also be used for time display, because they are | |
| 169 * 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
|
170 */ |
| 150 | 171 #define DVDNAV_NAV_PACKET 7 |
| 172 | |
| 173 | |
| 174 /* | |
| 175 * DVDNAV_STOP | |
| 176 * | |
| 177 * Applications should end playback here. A subsequent dvdnav_get_next_block() | |
| 178 * call will restart the VM from the beginning of the DVD. | |
| 179 */ | |
| 180 #define DVDNAV_STOP 8 | |
| 0 | 181 |
| 150 | 182 |
| 183 /* | |
| 184 * DVDNAV_HIGHLIGHT | |
| 185 * | |
| 186 * The current button highlight changed. Inform the overlaying engine to | |
| 187 * highlight a different button. Please note, that at the moment only mode 1 | |
| 188 * highlights are reported this way. That means, when the button highlight | |
| 189 * has been moved around by some function call, you will receive an event | |
| 190 * telling you the new button. But when a button gets activated, you have | |
| 191 * to handle the mode 2 highlighting (that is some different colour the | |
| 192 * 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
|
193 */ |
| 150 | 194 #define DVDNAV_HIGHLIGHT 9 |
| 195 | |
| 0 | 196 typedef struct { |
| 150 | 197 /* highlight mode: 0 - hide, 1 - show, 2 - activate, currently always 1 */ |
| 198 int display; | |
| 199 | |
| 200 /* FIXME: these fields are currently not set */ | |
| 201 uint32_t palette; /* The CLUT entries for the highlight palette | |
| 202 (4-bits per entry -> 4 entries) */ | |
| 203 uint16_t sx,sy,ex,ey; /* The start/end x,y positions */ | |
| 204 uint32_t pts; /* Highlight PTS to match with SPU */ | |
| 205 | |
| 206 /* button number for the SPU decoder/overlaying engine */ | |
| 207 uint32_t buttonN; | |
| 0 | 208 } dvdnav_highlight_event_t; |
| 209 | |
| 150 | 210 |
| 211 /* | |
| 212 * DVDNAV_SPU_CLUT_CHANGE | |
| 213 * | |
| 214 * Inform the SPU decoder/overlaying engine to update its colour lookup table. | |
| 215 * The CLUT is given as 16 uint32_t's in the buffer. | |
| 216 */ | |
| 217 #define DVDNAV_SPU_CLUT_CHANGE 10 | |
| 218 | |
| 219 | |
| 220 /* | |
| 221 * DVDNAV_HOP_CHANNEL | |
| 222 * | |
| 223 * A non-seamless operation has been performed. Applications can drop all | |
| 224 * their internal fifo's content, which will speed up the response. | |
| 225 */ | |
| 226 #define DVDNAV_HOP_CHANNEL 12 | |
| 227 | |
| 228 | |
| 229 /* | |
| 230 * DVDNAV_WAIT | |
| 231 * | |
| 232 * We have reached a point in DVD playback, where timing is critical. | |
| 233 * Player application with internal fifos can introduce state | |
| 234 * inconsistencies, because libdvdnav is always the fifo's length | |
| 235 * ahead in the stream compared to what the application sees. | |
| 236 * Such applications should wait until their fifos are empty | |
| 237 * when they receive this type of event. | |
| 238 * Once this is achieved, call dvdnav_skip_wait(). | |
| 239 */ | |
| 240 #define DVDNAV_WAIT 13 | |
| 241 | |
| 242 | |
| 0 | 243 #endif /* DVDNAV_EVENTS_H_INCLUDED */ |
