00001 /* 00002 * Copyright (C) 2001 Rich Wareham <richwareham@users.sourceforge.net> 00003 * 00004 * This file is part of libdvdnav, a DVD navigation library. 00005 * 00006 * libdvdnav is free software; you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation; either version 2 of the License, or 00009 * (at your option) any later version. 00010 * 00011 * libdvdnav is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License along 00017 * with libdvdnav; if not, write to the Free Software Foundation, Inc., 00018 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 00019 */ 00020 00021 /* 00022 * This header defines events and event types 00023 */ 00024 00025 #ifndef LIBDVDNAV_DVDNAV_EVENTS_H 00026 #define LIBDVDNAV_DVDNAV_EVENTS_H 00027 00028 /* 00029 * DVDNAV_BLOCK_OK 00030 * 00031 * A regular data block from the DVD has been returned. 00032 * This one should be demuxed and decoded for playback. 00033 */ 00034 #define DVDNAV_BLOCK_OK 0 00035 00036 00037 /* 00038 * DVDNAV_NOP 00039 * 00040 * Just ignore this. 00041 */ 00042 #define DVDNAV_NOP 1 00043 00044 00045 /* 00046 * DVDNAV_STILL_FRAME 00047 * 00048 * We have reached a still frame. The player application should wait 00049 * the amount of time specified by the still's length while still handling 00050 * user input to make menus and other interactive stills work. 00051 * The last delivered frame should be kept showing. 00052 * Once the still has timed out, call dvdnav_skip_still(). 00053 * A length of 0xff means an infinite still which has to be skipped 00054 * indirectly by some user interaction. 00055 */ 00056 #define DVDNAV_STILL_FRAME 2 00057 00058 typedef struct { 00059 /* The length (in seconds) the still frame should be displayed for, 00060 * or 0xff if infinite. */ 00061 int length; 00062 } dvdnav_still_event_t; 00063 00064 00065 /* 00066 * DVDNAV_SPU_STREAM_CHANGE 00067 * 00068 * Inform the SPU decoding/overlaying engine to switch SPU channels. 00069 */ 00070 #define DVDNAV_SPU_STREAM_CHANGE 3 00071 00072 typedef struct { 00073 /* The physical (MPEG) stream number for widescreen SPU display. 00074 * Use this, if you blend the SPU on an anamorphic image before 00075 * unsqueezing it. */ 00076 int physical_wide; 00077 00078 /* The physical (MPEG) stream number for letterboxed display. 00079 * Use this, if you blend the SPU on an anamorphic image after 00080 * unsqueezing it. */ 00081 int physical_letterbox; 00082 00083 /* The physical (MPEG) stream number for pan&scan display. 00084 * Use this, if you blend the SPU on an anamorphic image after 00085 * unsqueezing it the pan&scan way. */ 00086 int physical_pan_scan; 00087 00088 /* The logical (DVD) stream number. */ 00089 int logical; 00090 } dvdnav_spu_stream_change_event_t; 00091 00092 00093 /* 00094 * DVDNAV_AUDIO_STREAM_CHANGE 00095 * 00096 * Inform the audio decoder to switch channels. 00097 */ 00098 #define DVDNAV_AUDIO_STREAM_CHANGE 4 00099 00100 typedef struct { 00101 /* The physical (MPEG) stream number. */ 00102 int physical; 00103 00104 /* The logical (DVD) stream number. */ 00105 int logical; 00106 } dvdnav_audio_stream_change_event_t; 00107 00108 00109 /* 00110 * DVDNAV_VTS_CHANGE 00111 * 00112 * Some status information like video aspect and video scale permissions do 00113 * not change inside a VTS. Therefore this event can be used to query such 00114 * information only when necessary and update the decoding/displaying 00115 * accordingly. 00116 */ 00117 #define DVDNAV_VTS_CHANGE 5 00118 00119 typedef struct { 00120 int old_vtsN; /* the old VTS number */ 00121 dvd_read_domain_t old_domain; /* the old domain */ 00122 int new_vtsN; /* the new VTS number */ 00123 dvd_read_domain_t new_domain; /* the new domain */ 00124 } dvdnav_vts_change_event_t; 00125 00126 00127 /* 00128 * DVDNAV_CELL_CHANGE 00129 * 00130 * Some status information like the current Title and Part numbers do not 00131 * change inside a cell. Therefore this event can be used to query such 00132 * information only when necessary and update the decoding/displaying 00133 * accordingly. 00134 * Some useful information for accurate time display is also reported 00135 * together with this event. 00136 */ 00137 #define DVDNAV_CELL_CHANGE 6 00138 00139 typedef struct { 00140 int cellN; /* the new cell number */ 00141 int pgN; /* the current program number */ 00142 int64_t cell_length; /* the length of the current cell in PTS ticks */ 00143 int64_t pg_length; /* the length of the current program in PTS ticks */ 00144 int64_t pgc_length; /* the length of the current program chain in PTS ticks */ 00145 int64_t cell_start; /* the start time of the current cell relatively to the PGC in PTS ticks */ 00146 int64_t pg_start; /* the start time of the current PG relatively to the PGC in PTS ticks */ 00147 } dvdnav_cell_change_event_t; 00148 00149 00150 /* 00151 * DVDNAV_NAV_PACKET 00152 * 00153 * NAV packets are useful for various purposes. They define the button 00154 * highlight areas and VM commands of DVD menus, so they should in any 00155 * case be sent to the SPU decoder/overlaying engine for the menus to work. 00156 * NAV packets also provide a way to detect PTS discontinuities, because 00157 * they carry the start and end PTS values for the current VOBU. 00158 * (pci.vobu_s_ptm and pci.vobu_e_ptm) Whenever the start PTS of the 00159 * current NAV does not match the end PTS of the previous NAV, a PTS 00160 * discontinuity has occured. 00161 * NAV packets can also be used for time display, because they are 00162 * timestamped relatively to the current Cell. 00163 */ 00164 #define DVDNAV_NAV_PACKET 7 00165 00166 00167 /* 00168 * DVDNAV_STOP 00169 * 00170 * Applications should end playback here. A subsequent dvdnav_get_next_block() 00171 * call will restart the VM from the beginning of the DVD. 00172 */ 00173 #define DVDNAV_STOP 8 00174 00175 00176 /* 00177 * DVDNAV_HIGHLIGHT 00178 * 00179 * The current button highlight changed. Inform the overlaying engine to 00180 * highlight a different button. Please note, that at the moment only mode 1 00181 * highlights are reported this way. That means, when the button highlight 00182 * has been moved around by some function call, you will receive an event 00183 * telling you the new button. But when a button gets activated, you have 00184 * to handle the mode 2 highlighting (that is some different colour the 00185 * button turns to on activation) in your application. 00186 */ 00187 #define DVDNAV_HIGHLIGHT 9 00188 00189 typedef struct { 00190 /* highlight mode: 0 - hide, 1 - show, 2 - activate, currently always 1 */ 00191 int display; 00192 00193 /* FIXME: these fields are currently not set */ 00194 uint32_t palette; /* The CLUT entries for the highlight palette 00195 (4-bits per entry -> 4 entries) */ 00196 uint16_t sx,sy,ex,ey; /* The start/end x,y positions */ 00197 uint32_t pts; /* Highlight PTS to match with SPU */ 00198 00199 /* button number for the SPU decoder/overlaying engine */ 00200 uint32_t buttonN; 00201 } dvdnav_highlight_event_t; 00202 00203 00204 /* 00205 * DVDNAV_SPU_CLUT_CHANGE 00206 * 00207 * Inform the SPU decoder/overlaying engine to update its colour lookup table. 00208 * The CLUT is given as 16 uint32_t's in the buffer. 00209 */ 00210 #define DVDNAV_SPU_CLUT_CHANGE 10 00211 00212 00213 /* 00214 * DVDNAV_HOP_CHANNEL 00215 * 00216 * A non-seamless operation has been performed. Applications can drop all 00217 * their internal fifo's content, which will speed up the response. 00218 */ 00219 #define DVDNAV_HOP_CHANNEL 12 00220 00221 00222 /* 00223 * DVDNAV_WAIT 00224 * 00225 * We have reached a point in DVD playback, where timing is critical. 00226 * Player application with internal fifos can introduce state 00227 * inconsistencies, because libdvdnav is always the fifo's length 00228 * ahead in the stream compared to what the application sees. 00229 * Such applications should wait until their fifos are empty 00230 * when they receive this type of event. 00231 * Once this is achieved, call dvdnav_skip_wait(). 00232 */ 00233 #define DVDNAV_WAIT 13 00234 00235 00236 #endif /* LIBDVDNAV_DVDNAV_EVENTS_H */
1.6.3