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