Mercurial > libdvdnav.hg
annotate dvdnav.h @ 249:5d643668f1e3 src
I added this code myself a long time ago, but now I am quite convinced that
it is wrong: Why would we filter out SPU stream change events that switch
SPUs off? This breaks watching the trailer on the RC2 of "Girl, interrupted",
because you always get unwanted subtitles.
When I added this code, it fixed a problem with the RC2 of "Terminator", but
I cannot reproduce this problem any more. Back then, the menu highlights would
not show up, but they do now. I assume the problem really got fixed with proper
support for forced subtitles in xine, so this crappy workaround here can go
away.
After all, this way it is more symmetric to audio stream change events,
because these are not filtered.
author | mroi |
---|---|
date | Sun, 12 Sep 2004 15:12:43 +0000 |
parents | a2eb1afa1af8 |
children | 7708d2fc1745 |
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 | |
147 | 24 /* |
25 * This is the main header file applications should include if they want | |
26 * to access dvdnav functionality. | |
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
|
27 */ |
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
|
28 |
0 | 29 #ifndef DVDNAV_H_INCLUDED |
30 #define DVDNAV_H_INCLUDED | |
31 | |
5
c1b55dc1bfed
Add API call to get number of programmes in current title.
richwareham
parents:
4
diff
changeset
|
32 #ifdef __cplusplus |
c1b55dc1bfed
Add API call to get number of programmes in current title.
richwareham
parents:
4
diff
changeset
|
33 extern "C" { |
c1b55dc1bfed
Add API call to get number of programmes in current title.
richwareham
parents:
4
diff
changeset
|
34 #endif |
c1b55dc1bfed
Add API call to get number of programmes in current title.
richwareham
parents:
4
diff
changeset
|
35 |
139
f7a26cd00c93
* only install the headers that really are intended for public use
mroi
parents:
132
diff
changeset
|
36 #ifdef DVDNAV_COMPILE |
f7a26cd00c93
* only install the headers that really are intended for public use
mroi
parents:
132
diff
changeset
|
37 # include "dvdnav_events.h" |
f7a26cd00c93
* only install the headers that really are intended for public use
mroi
parents:
132
diff
changeset
|
38 # include "dvd_types.h" |
169 | 39 # include "dvd_reader.h" |
40 # include "ifo_types.h" /* For vm_cmd_t */ | |
139
f7a26cd00c93
* only install the headers that really are intended for public use
mroi
parents:
132
diff
changeset
|
41 #else |
f7a26cd00c93
* only install the headers that really are intended for public use
mroi
parents:
132
diff
changeset
|
42 # include <dvdnav/dvdnav_events.h> |
f7a26cd00c93
* only install the headers that really are intended for public use
mroi
parents:
132
diff
changeset
|
43 # include <dvdnav/dvd_types.h> |
169 | 44 # include <dvdnav/dvd_reader.h> |
45 # include <dvdnav/ifo_types.h> /* For vm_cmd_t */ | |
139
f7a26cd00c93
* only install the headers that really are intended for public use
mroi
parents:
132
diff
changeset
|
46 #endif |
0 | 47 |
48 | |
147 | 49 |
50 /********************************************************************* | |
51 * dvdnav data types * | |
52 *********************************************************************/ | |
53 | |
54 /* | |
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 * Opaque data-type can be viewed as a 'DVD handle'. You should get |
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
|
56 * a pointer to a dvdnav_t from the dvdnav_open() function. |
147 | 57 * Never call free() on the pointer, you have to give it back with |
58 * dvdnav_close(). | |
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
|
59 */ |
0 | 60 typedef struct dvdnav_s dvdnav_t; |
61 | |
147 | 62 /* Status as reported by most of libdvdnav's functions */ |
195 | 63 typedef int32_t dvdnav_status_t; |
0 | 64 |
147 | 65 /* |
66 * Unless otherwise stated, all functions return DVDNAV_STATUS_OK if | |
67 * they succeeded, otherwise DVDNAV_STATUS_ERR is returned and the error may | |
68 * be obtained by calling dvdnav_err_to_string(). | |
69 */ | |
193 | 70 #define DVDNAV_STATUS_ERR 0 |
71 #define DVDNAV_STATUS_OK 1 | |
0 | 72 |
147 | 73 |
74 /********************************************************************* | |
75 * initialisation & housekeeping functions * | |
76 *********************************************************************/ | |
77 | |
78 /* | |
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
|
79 * These functions allow you to open a DVD device and associate it |
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
|
80 * with a dvdnav_t. |
0 | 81 */ |
82 | |
147 | 83 /* |
84 * Attempts to open the DVD drive at the specified path and pre-cache | |
85 * the CSS-keys. libdvdread is used to access the DVD, so any source | |
86 * supported by libdvdread can be given with "path". Currently, | |
87 * libdvdread can access: DVD drives, DVD image files, DVD file-by-file | |
88 * copies. | |
0 | 89 * |
147 | 90 * The resulting dvdnav_t handle will be written to *dest. |
0 | 91 */ |
147 | 92 dvdnav_status_t dvdnav_open(dvdnav_t **dest, const char *path); |
0 | 93 |
147 | 94 /* |
0 | 95 * Closes a dvdnav_t previously opened with dvdnav_open(), freeing any |
96 * memory associated with it. | |
97 */ | |
98 dvdnav_status_t dvdnav_close(dvdnav_t *self); | |
99 | |
147 | 100 /* |
101 * Resets the DVD virtual machine and cache buffers. | |
4
99bed5d6db2f
Added reset patch from Kees Cook <kees@outflux.net>
richwareham
parents:
0
diff
changeset
|
102 */ |
99bed5d6db2f
Added reset patch from Kees Cook <kees@outflux.net>
richwareham
parents:
0
diff
changeset
|
103 dvdnav_status_t dvdnav_reset(dvdnav_t *self); |
99bed5d6db2f
Added reset patch from Kees Cook <kees@outflux.net>
richwareham
parents:
0
diff
changeset
|
104 |
147 | 105 /* |
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
|
106 * Fills a pointer with a value pointing to a string describing |
147 | 107 * the path associated with an open dvdnav_t. It assigns *path to NULL |
0 | 108 * on error. |
109 */ | |
147 | 110 dvdnav_status_t dvdnav_path(dvdnav_t *self, const char **path); |
0 | 111 |
147 | 112 /* |
0 | 113 * Returns a human-readable string describing the last error. |
114 */ | |
114 | 115 const char* dvdnav_err_to_string(dvdnav_t *self); |
0 | 116 |
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
|
117 |
147 | 118 /********************************************************************* |
119 * changing and reading DVD player characteristics * | |
120 *********************************************************************/ | |
121 | |
122 /* | |
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
|
123 * These functions allow you to manipulate the various global characteristics |
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 * of the DVD playback engine. |
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
|
125 */ |
0 | 126 |
147 | 127 /* |
128 * Sets the region mask (bit 0 set implies region 1, bit 1 set implies | |
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
|
129 * region 2, etc) of the virtual machine. Generally you will only need to set |
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
|
130 * this if you are playing RCE discs which query the virtual machine as to its |
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
|
131 * region setting. |
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
|
132 * |
147 | 133 * This has _nothing_ to do with the region setting of the DVD drive. |
0 | 134 */ |
195 | 135 dvdnav_status_t dvdnav_set_region_mask(dvdnav_t *self, int32_t region_mask); |
0 | 136 |
147 | 137 /* |
138 * Returns the region mask (bit 0 set implies region 1, bit 1 set implies | |
139 * region 2, etc) of the virtual machine. | |
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
|
140 * |
147 | 141 * This has _nothing_ to do with the region setting of the DVD drive. |
0 | 142 */ |
195 | 143 dvdnav_status_t dvdnav_get_region_mask(dvdnav_t *self, int32_t *region_mask); |
0 | 144 |
147 | 145 /* |
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
|
146 * Specify whether read-ahead caching should be used. You may not want this if your |
114 | 147 * decoding engine does its own buffering. |
147 | 148 * |
149 * The default read-ahead cache does not use an additional thread for the reading | |
150 * (see read_cache.c for a threaded cache, but note that this code is currently | |
151 * unmaintained). It prebuffers on VOBU level by reading ahead several buffers | |
152 * on every read request. The speed of this prebuffering has been optimized to | |
153 * also work on slow DVD drives. | |
0 | 154 * |
147 | 155 * If in addition you want to prevent memcpy's to improve performance, have a look |
156 * at dvdnav_get_next_cache_block(). | |
0 | 157 */ |
195 | 158 dvdnav_status_t dvdnav_set_readahead_flag(dvdnav_t *self, int32_t read_ahead_flag); |
0 | 159 |
147 | 160 /* |
161 * Query whether read-ahead caching/buffering will be used. | |
162 */ | |
195 | 163 dvdnav_status_t dvdnav_get_readahead_flag(dvdnav_t *self, int32_t *read_ahead_flag); |
147 | 164 |
165 /* | |
132 | 166 * Specify whether the positioning works PGC or PG based. |
147 | 167 * Programs (PGs) on DVDs are similar to Chapters and a program chain (PGC) |
132 | 168 * usually covers a whole feature. This affects the behaviour of the |
147 | 169 * functions dvdnav_get_position() and dvdnav_sector_search(). See there. |
132 | 170 * Default is PG based positioning. |
171 */ | |
195 | 172 dvdnav_status_t dvdnav_set_PGC_positioning_flag(dvdnav_t *self, int32_t pgc_based_flag); |
132 | 173 |
147 | 174 /* |
132 | 175 * Query whether positioning is PG or PGC based. |
176 */ | |
195 | 177 dvdnav_status_t dvdnav_get_PGC_positioning_flag(dvdnav_t *self, int32_t *pgc_based_flag); |
147 | 178 |
132 | 179 |
147 | 180 /********************************************************************* |
181 * reading data * | |
182 *********************************************************************/ | |
183 | |
184 /* | |
185 * These functions are used to poll the playback enginge and actually get data | |
186 * off the DVD. | |
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
|
187 */ |
0 | 188 |
147 | 189 /* |
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
|
190 * Attempts to get the next block off the DVD and copies it into the buffer 'buf'. |
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
|
191 * If there is any special actions that may need to be performed, the value |
147 | 192 * pointed to by 'event' gets set accordingly. |
0 | 193 * |
194 * If 'event' is DVDNAV_BLOCK_OK then 'buf' is filled with the next block | |
195 * (note that means it has to be at /least/ 2048 bytes big). 'len' is | |
196 * then set to 2048. | |
197 * | |
198 * Otherwise, buf is filled with an appropriate event structure and | |
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
|
199 * len is set to the length of that structure. |
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
|
200 * |
147 | 201 * See the dvdnav_events.h header for information on the various events. |
0 | 202 */ |
195 | 203 dvdnav_status_t dvdnav_get_next_block(dvdnav_t *self, uint8_t *buf, |
204 int32_t *event, int32_t *len); | |
0 | 205 |
147 | 206 /* |
60 | 207 * This basically does the same as dvdnav_get_next_block. The only difference is |
208 * that it avoids a memcopy, when the requested block was found in the cache. | |
209 * I such a case (cache hit) this function will return a different pointer than | |
210 * the one handed in, pointing directly into the relevant block in the cache. | |
147 | 211 * Those pointers must _never_ be freed but instead returned to the library via |
114 | 212 * dvdnav_free_cache_block(). |
60 | 213 */ |
195 | 214 dvdnav_status_t dvdnav_get_next_cache_block(dvdnav_t *self, uint8_t **buf, |
215 int32_t *event, int32_t *len); | |
60 | 216 |
147 | 217 /* |
114 | 218 * All buffers which came from the internal cache (when dvdnav_get_next_cache_block() |
60 | 219 * returned a buffer different from the one handed in) have to be freed with this |
220 * function. Although handing in other buffers not from the cache doesn't cause any harm. | |
221 */ | |
222 dvdnav_status_t dvdnav_free_cache_block(dvdnav_t *self, unsigned char *buf); | |
223 | |
147 | 224 /* |
225 * If we are currently in a still-frame this function skips it. | |
55
5674fbd44f26
report all spu types (widescreen, letterbox and pan&scan), not widescreen
mroi
parents:
44
diff
changeset
|
226 * |
147 | 227 * See also the DVDNAV_STILL_FRAME event. |
0 | 228 */ |
229 dvdnav_status_t dvdnav_still_skip(dvdnav_t *self); | |
230 | |
147 | 231 /* |
116 | 232 * If we are currently in WAIT state, that is: the application is required to |
233 * wait for its fifos to become empty, calling this signals libdvdnav that this | |
234 * is achieved and that it can continue. | |
235 * | |
147 | 236 * See also the DVDNAV_WAIT event. |
116 | 237 */ |
238 dvdnav_status_t dvdnav_wait_skip(dvdnav_t *self); | |
239 | |
147 | 240 /* |
241 * Returns the still time from the currently playing cell. | |
242 * The still time is given in seconds with 0xff meaning an indefinite still. | |
114 | 243 * |
147 | 244 * This function can be used to detect still frames before they are reached. |
245 * Some players might need this to prepare for a frame to be shown for a | |
246 * longer time than usual. | |
114 | 247 */ |
248 uint32_t dvdnav_get_next_still_flag(dvdnav_t *self); | |
249 | |
147 | 250 /* |
251 * Stops playback. The next event obtained with one of the get_next_block | |
252 * functions will be a DVDNAV_STOP event. | |
0 | 253 * |
147 | 254 * It is not required to call this before dvdnav_close(). |
255 */ | |
256 dvdnav_status_t dvdnav_stop(dvdnav_t *self); | |
257 | |
258 | |
259 /********************************************************************* | |
260 * title/part navigation * | |
261 *********************************************************************/ | |
262 | |
263 /* | |
264 * Returns the number of titles on the disk. | |
265 */ | |
195 | 266 dvdnav_status_t dvdnav_get_number_of_titles(dvdnav_t *self, int32_t *titles); |
147 | 267 |
268 /* | |
269 * Returns the number of parts within the given title. | |
270 */ | |
195 | 271 dvdnav_status_t dvdnav_get_number_of_parts(dvdnav_t *self, int32_t title, int32_t *parts); |
147 | 272 |
273 /* | |
274 * Plays the specified title of the DVD from its beginning (that is: part 1). | |
0 | 275 */ |
195 | 276 dvdnav_status_t dvdnav_title_play(dvdnav_t *self, int32_t title); |
0 | 277 |
147 | 278 /* |
279 * Plays the specified title, starting from the specified part. | |
0 | 280 */ |
195 | 281 dvdnav_status_t dvdnav_part_play(dvdnav_t *self, int32_t title, int32_t part); |
0 | 282 |
147 | 283 /* |
0 | 284 * Play the specified amount of parts of the specified title of |
285 * the DVD then STOP. | |
286 * | |
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
|
287 * Currently unimplemented! |
0 | 288 */ |
195 | 289 dvdnav_status_t dvdnav_part_play_auto_stop(dvdnav_t *self, int32_t title, |
290 int32_t part, int32_t parts_to_play); | |
0 | 291 |
147 | 292 /* |
293 * Play the specified title starting from the specified time. | |
0 | 294 * |
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
|
295 * Currently unimplemented! |
0 | 296 */ |
195 | 297 dvdnav_status_t dvdnav_time_play(dvdnav_t *self, int32_t title, |
298 uint64_t time); | |
0 | 299 |
147 | 300 /* |
123 | 301 * Stop playing the current position and jump to the specified menu. |
114 | 302 * |
147 | 303 * See also DVDMenuID_t from libdvdread |
114 | 304 */ |
305 dvdnav_status_t dvdnav_menu_call(dvdnav_t *self, DVDMenuID_t menu); | |
306 | |
147 | 307 /* |
164 | 308 * Return the title number and part currently being played. |
309 * A title of 0 indicates, we are in a menu. In this case, part | |
310 * is set to the current menu's ID. | |
114 | 311 */ |
195 | 312 dvdnav_status_t dvdnav_current_title_info(dvdnav_t *self, int32_t *title, |
313 int32_t *part); | |
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
|
314 |
147 | 315 /* |
316 * Return the current position (in blocks) within the current | |
317 * title and the length (in blocks) of said title. | |
318 * | |
319 * Current implementation is wrong and likely to behave unpredictably! | |
320 * Use is discouraged! | |
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
|
321 */ |
147 | 322 dvdnav_status_t dvdnav_get_position_in_title(dvdnav_t *self, |
195 | 323 uint32_t *pos, |
324 uint32_t *len); | |
0 | 325 |
147 | 326 /* |
327 * This function is only available for compatibility reasons. | |
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
|
328 * |
147 | 329 * Stop playing the current position and start playback of the current title |
330 * from the specified part. | |
0 | 331 */ |
195 | 332 dvdnav_status_t dvdnav_part_search(dvdnav_t *self, int32_t part); |
147 | 333 |
0 | 334 |
147 | 335 /********************************************************************* |
336 * program chain/program navigation * | |
337 *********************************************************************/ | |
338 | |
339 /* | |
123 | 340 * Stop playing the current position and start playback from the last |
341 * VOBU boundary before the given sector. The sector number is not | |
342 * meant to be an absolute physical DVD sector, but a relative sector | |
343 * in the current program. This function cannot leave the current | |
344 * program and will fail, if asked to do so. | |
0 | 345 * |
147 | 346 * If program chain based positioning is enabled |
347 * (see dvdnav_set_PGC_positioning_flag()), this will seek to the relative | |
348 * sector inside the current program chain. | |
349 * | |
350 * 'origin' can be one of SEEK_SET, SEEK_CUR, SEEK_END as defined in | |
351 * fcntl.h. | |
0 | 352 */ |
353 dvdnav_status_t dvdnav_sector_search(dvdnav_t *self, | |
195 | 354 uint64_t offset, int32_t origin); |
0 | 355 |
147 | 356 /* |
357 * Stop playing the current position and start playback of the title | |
358 * from the specified timecode. | |
0 | 359 * |
147 | 360 * Currently unimplemented! |
0 | 361 */ |
147 | 362 dvdnav_status_t dvdnav_time_search(dvdnav_t *self, |
195 | 363 uint64_t time); |
0 | 364 |
147 | 365 /* |
366 * Stop playing current position and play the "GoUp"-program chain. | |
367 * (which generally leads to the title menu or a higer-level menu). | |
368 */ | |
369 dvdnav_status_t dvdnav_go_up(dvdnav_t *self); | |
370 | |
371 /* | |
123 | 372 * Stop playing the current position and start playback at the |
373 * previous program (if it exists). | |
0 | 374 */ |
375 dvdnav_status_t dvdnav_prev_pg_search(dvdnav_t *self); | |
376 | |
147 | 377 /* |
123 | 378 * Stop playing the current position and start playback at the |
379 * first program. | |
0 | 380 */ |
381 dvdnav_status_t dvdnav_top_pg_search(dvdnav_t *self); | |
382 | |
147 | 383 /* |
123 | 384 * Stop playing the current position and start playback at the |
385 * next program (if it exists). | |
0 | 386 */ |
387 dvdnav_status_t dvdnav_next_pg_search(dvdnav_t *self); | |
388 | |
147 | 389 /* |
0 | 390 * Return the current position (in blocks) within the current |
123 | 391 * program and the length (in blocks) of current program. |
147 | 392 * |
393 * If program chain based positioning is enabled | |
394 * (see dvdnav_set_PGC_positioning_flag()), this will return the | |
395 * relative position in and the length of the current program chain. | |
0 | 396 */ |
195 | 397 dvdnav_status_t dvdnav_get_position(dvdnav_t *self, uint32_t *pos, |
398 uint32_t *len); | |
8
66708b4a1b5e
Stop C++ bitching about some things and extend the menus example
richwareham
parents:
5
diff
changeset
|
399 |
0 | 400 |
147 | 401 /********************************************************************* |
402 * menu highlights * | |
403 *********************************************************************/ | |
0 | 404 |
147 | 405 /* |
114 | 406 * Most functions related to highlights take a NAV PCI packet as a parameter. |
407 * While you can get the such a packet from libdvdnav, for players with internal | |
408 * FIFOs, this will result in errors, because due to the FIFO length, libdvdnav will | |
409 * be ahead in the stream compared to what the user is seeing on screen. | |
410 * Therefore, player applications who have a NAV packet available, which is | |
411 * better in sync with the actual playback should always pass this one to these | |
412 * functions. | |
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
|
413 */ |
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
|
414 |
147 | 415 /* |
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
|
416 * Get the currently highlighted button |
147 | 417 * number (1..36) or 0 if no button is highlighted. |
0 | 418 */ |
195 | 419 dvdnav_status_t dvdnav_get_current_highlight(dvdnav_t *self, int32_t *button); |
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
|
420 |
147 | 421 /* |
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
|
422 * Returns the Presentation Control Information (PCI) structure associated |
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
|
423 * with the current position. |
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
|
424 * |
147 | 425 * Read the general notes above. |
426 * See also libdvdreads nav_types.h for definition of pci_t. | |
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
|
427 */ |
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
428 pci_t* dvdnav_get_current_nav_pci(dvdnav_t *self); |
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
|
429 |
147 | 430 /* |
431 * Returns the DSI (data search information) structure associated | |
66
2bd4a78eefce
Patch from aschultz@cs.uni-magdeburg.de to allow for still-frame 'peek-ahead'
richwareham
parents:
60
diff
changeset
|
432 * with the current position. |
2bd4a78eefce
Patch from aschultz@cs.uni-magdeburg.de to allow for still-frame 'peek-ahead'
richwareham
parents:
60
diff
changeset
|
433 * |
147 | 434 * Read the general notes above. |
435 * See also libdvdreads nav_types.h for definition of dsi_t. | |
66
2bd4a78eefce
Patch from aschultz@cs.uni-magdeburg.de to allow for still-frame 'peek-ahead'
richwareham
parents:
60
diff
changeset
|
436 */ |
2bd4a78eefce
Patch from aschultz@cs.uni-magdeburg.de to allow for still-frame 'peek-ahead'
richwareham
parents:
60
diff
changeset
|
437 dsi_t* dvdnav_get_current_nav_dsi(dvdnav_t *self); |
2bd4a78eefce
Patch from aschultz@cs.uni-magdeburg.de to allow for still-frame 'peek-ahead'
richwareham
parents:
60
diff
changeset
|
438 |
147 | 439 /* |
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
|
440 * Get the area associated with a certain button. |
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
|
441 */ |
147 | 442 dvdnav_status_t dvdnav_get_highlight_area(pci_t *nav_pci , int32_t button, int32_t mode, |
443 dvdnav_highlight_area_t *highlight); | |
0 | 444 |
147 | 445 /* |
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
|
446 * Move button highlight around as suggested by function name (e.g. with arrow keys). |
0 | 447 */ |
98 | 448 dvdnav_status_t dvdnav_upper_button_select(dvdnav_t *self, pci_t *pci); |
449 dvdnav_status_t dvdnav_lower_button_select(dvdnav_t *self, pci_t *pci); | |
450 dvdnav_status_t dvdnav_right_button_select(dvdnav_t *self, pci_t *pci); | |
451 dvdnav_status_t dvdnav_left_button_select(dvdnav_t *self, pci_t *pci); | |
0 | 452 |
147 | 453 /* |
454 * Activate ("press") the currently highlighted button. | |
0 | 455 */ |
98 | 456 dvdnav_status_t dvdnav_button_activate(dvdnav_t *self, pci_t *pci); |
0 | 457 |
147 | 458 /* |
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
|
459 * Highlight a specific button. |
0 | 460 */ |
195 | 461 dvdnav_status_t dvdnav_button_select(dvdnav_t *self, pci_t *pci, int32_t button); |
0 | 462 |
147 | 463 /* |
464 * Activate ("press") specified button. | |
0 | 465 */ |
195 | 466 dvdnav_status_t dvdnav_button_select_and_activate(dvdnav_t *self, pci_t *pci, int32_t button); |
0 | 467 |
147 | 468 /* |
91
df9712507b30
Add a new API function, to allow for more flexible menu button control.
jcdutton
parents:
90
diff
changeset
|
469 * Activate (press) a button and execute specified command. |
df9712507b30
Add a new API function, to allow for more flexible menu button control.
jcdutton
parents:
90
diff
changeset
|
470 */ |
df9712507b30
Add a new API function, to allow for more flexible menu button control.
jcdutton
parents:
90
diff
changeset
|
471 dvdnav_status_t dvdnav_button_activate_cmd(dvdnav_t *self, int32_t button, vm_cmd_t *cmd); |
df9712507b30
Add a new API function, to allow for more flexible menu button control.
jcdutton
parents:
90
diff
changeset
|
472 |
147 | 473 /* |
474 * Select button at specified video frame coordinates. | |
0 | 475 */ |
195 | 476 dvdnav_status_t dvdnav_mouse_select(dvdnav_t *self, pci_t *pci, int32_t x, int32_t y); |
0 | 477 |
147 | 478 /* |
479 * Activate ("press") button at specified video frame coordinates. | |
0 | 480 */ |
195 | 481 dvdnav_status_t dvdnav_mouse_activate(dvdnav_t *self, pci_t *pci, int32_t x, int32_t y); |
0 | 482 |
147 | 483 |
484 /********************************************************************* | |
485 * languages * | |
486 *********************************************************************/ | |
487 | |
488 /* | |
489 * The language codes expected by these functions are two character | |
490 * codes as defined in ISO639. | |
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
|
491 */ |
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
|
492 |
147 | 493 /* |
207 | 494 * Set which menu language we should use per default. |
0 | 495 */ |
44 | 496 dvdnav_status_t dvdnav_menu_language_select(dvdnav_t *self, |
497 char *code); | |
498 | |
147 | 499 /* |
207 | 500 * Set which audio language we should use per default. |
44 | 501 */ |
502 dvdnav_status_t dvdnav_audio_language_select(dvdnav_t *self, | |
503 char *code); | |
504 | |
147 | 505 /* |
207 | 506 * Set which spu language we should use per default. |
44 | 507 */ |
508 dvdnav_status_t dvdnav_spu_language_select(dvdnav_t *self, | |
0 | 509 char *code); |
510 | |
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
|
511 |
147 | 512 /********************************************************************* |
513 * obtaining stream attributes * | |
514 *********************************************************************/ | |
0 | 515 |
147 | 516 /* |
517 * Return a string describing the title of the DVD. | |
518 * This is an ID string encoded on the disc by the author. In many cases | |
519 * this is a descriptive string such as `THE_MATRIX' but sometimes is sigularly | |
520 * uninformative such as `PDVD-011421'. Some DVD authors even forget to set this, | |
521 * so you may also read the default of the authoring software they used, like | |
522 * `DVDVolume'. | |
0 | 523 */ |
147 | 524 dvdnav_status_t dvdnav_get_title_string(dvdnav_t *self, const char **title_str); |
0 | 525 |
147 | 526 /* |
527 * Get video aspect code. | |
528 * The aspect code does only change on VTS boundaries. | |
529 * See the DVDNAV_VTS_CHANGE event. | |
530 * | |
531 * 0 -- 4:3, 2 -- 16:9 | |
0 | 532 */ |
147 | 533 uint8_t dvdnav_get_video_aspect(dvdnav_t *self); |
0 | 534 |
147 | 535 /* |
536 * Get video scaling permissions. | |
537 * The scaling permission does only change on VTS boundaries. | |
538 * See the DVDNAV_VTS_CHANGE event. | |
0 | 539 * |
147 | 540 * bit0 set = deny letterboxing, bit1 set = deny pan&scan |
0 | 541 */ |
147 | 542 uint8_t dvdnav_get_video_scale_permission(dvdnav_t *self); |
0 | 543 |
147 | 544 /* |
545 * Converts a *logical* audio stream id into language code | |
546 * (returns 0xffff if no such stream). | |
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
|
547 */ |
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
|
548 uint16_t dvdnav_audio_stream_to_lang(dvdnav_t *self, uint8_t stream); |
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
|
549 |
147 | 550 /* |
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
|
551 * Converts a *logical* subpicture stream id into country code |
147 | 552 * (returns 0xffff if no such stream). |
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
|
553 */ |
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
|
554 uint16_t dvdnav_spu_stream_to_lang(dvdnav_t *self, uint8_t stream); |
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
|
555 |
147 | 556 /* |
557 * Converts a *physical* (MPEG) audio stream id into a logical stream number. | |
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
|
558 */ |
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
|
559 int8_t dvdnav_get_audio_logical_stream(dvdnav_t *self, uint8_t audio_num); |
0 | 560 |
147 | 561 /* |
562 * Converts a *physical* (MPEG) subpicture stream id into a logical stream number. | |
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
|
563 */ |
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
|
564 int8_t dvdnav_get_spu_logical_stream(dvdnav_t *self, uint8_t subp_num); |
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
|
565 |
147 | 566 /* |
114 | 567 * Get active audio stream. |
568 */ | |
569 int8_t dvdnav_get_active_audio_stream(dvdnav_t *self); | |
570 | |
147 | 571 /* |
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
|
572 * Get active spu stream. |
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
|
573 */ |
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
|
574 int8_t dvdnav_get_active_spu_stream(dvdnav_t *self); |
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
|
575 |
147 | 576 |
577 /********************************************************************* | |
578 * multiple angles * | |
579 *********************************************************************/ | |
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
|
580 |
147 | 581 /* |
582 * The libdvdnav library abstracts away the difference between seamless and | |
583 * non-seamless angles. From the point of view of the programmer you just set the | |
584 * angle number and all is well in the world. You will always see only the | |
585 * selected angle coming from the get_next_block functions. | |
0 | 586 * |
147 | 587 * Note: |
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
|
588 * It is quite possible that some tremendously strange DVD feature might change the |
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
|
589 * angle number from under you. Generally you should always view the results from |
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
|
590 * dvdnav_get_angle_info() as definitive only up to the next time you call |
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
|
591 * dvdnav_get_next_block(). |
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
|
592 */ |
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
|
593 |
147 | 594 /* |
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
|
595 * Sets the current angle. If you try to follow a non existant angle |
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
|
596 * the call fails. |
0 | 597 */ |
195 | 598 dvdnav_status_t dvdnav_angle_change(dvdnav_t *self, int32_t angle); |
0 | 599 |
147 | 600 /* |
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
|
601 * Returns the current angle and number of angles present. |
0 | 602 */ |
195 | 603 dvdnav_status_t dvdnav_get_angle_info(dvdnav_t *self, int32_t *current_angle, |
604 int32_t *number_of_angles); | |
66
2bd4a78eefce
Patch from aschultz@cs.uni-magdeburg.de to allow for still-frame 'peek-ahead'
richwareham
parents:
60
diff
changeset
|
605 |
147 | 606 /********************************************************************* |
607 * domain queries * | |
608 *********************************************************************/ | |
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
|
609 |
147 | 610 /* |
611 * Are we in the First Play domain? | |
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
|
612 */ |
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
|
613 int8_t dvdnav_is_domain_fp(dvdnav_t *self); |
114 | 614 |
147 | 615 /* |
616 * Are we in the Video management Menu domain? | |
0 | 617 */ |
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
|
618 int8_t dvdnav_is_domain_vmgm(dvdnav_t *self); |
114 | 619 |
147 | 620 /* |
621 * Are we in the Video Title Menu domain? | |
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
|
622 */ |
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
|
623 int8_t dvdnav_is_domain_vtsm(dvdnav_t *self); |
114 | 624 |
147 | 625 /* |
626 * Are we in the Video Title Set domain? | |
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
|
627 */ |
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
|
628 int8_t dvdnav_is_domain_vts(dvdnav_t *self); |
0 | 629 |
630 | |
5
c1b55dc1bfed
Add API call to get number of programmes in current title.
richwareham
parents:
4
diff
changeset
|
631 #ifdef __cplusplus |
c1b55dc1bfed
Add API call to get number of programmes in current title.
richwareham
parents:
4
diff
changeset
|
632 } |
c1b55dc1bfed
Add API call to get number of programmes in current title.
richwareham
parents:
4
diff
changeset
|
633 #endif |
c1b55dc1bfed
Add API call to get number of programmes in current title.
richwareham
parents:
4
diff
changeset
|
634 |
0 | 635 #endif /* DVDNAV_H_INCLUDED */ |