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 is the main header file applications should include if they want 00023 * to access dvdnav functionality. 00024 */ 00025 00026 #ifndef LIBDVDNAV_DVDNAV_H 00027 #define LIBDVDNAV_DVDNAV_H 00028 00029 #define MP_DVDNAV 1 00030 00031 // Change this only when syncing to mplayer dvdnav trunk 00032 #define DVDNAV_SVN_REV "svnR1215" 00033 00034 #ifdef __cplusplus 00035 extern "C" { 00036 #endif 00037 00038 #include <dvdnav/dvd_types.h> 00039 #include <dvdread/dvd_reader.h> 00040 #include <dvdread/nav_types.h> 00041 #include <dvdread/ifo_types.h> /* For vm_cmd_t */ 00042 #include <dvdnav/dvdnav_events.h> 00043 00044 #include "compat.h" 00045 00046 /********************************************************************* 00047 * dvdnav data types * 00048 *********************************************************************/ 00049 00050 /* 00051 * Opaque data-type can be viewed as a 'DVD handle'. You should get 00052 * a pointer to a dvdnav_t from the dvdnav_open() function. 00053 * Never call free() on the pointer, you have to give it back with 00054 * dvdnav_close(). 00055 */ 00056 typedef struct dvdnav_s dvdnav_t; 00057 00058 /* Status as reported by most of libdvdnav's functions */ 00059 typedef int32_t dvdnav_status_t; 00060 00061 /* 00062 * Unless otherwise stated, all functions return DVDNAV_STATUS_OK if 00063 * they succeeded, otherwise DVDNAV_STATUS_ERR is returned and the error may 00064 * be obtained by calling dvdnav_err_to_string(). 00065 */ 00066 #define DVDNAV_STATUS_ERR 0 00067 #define DVDNAV_STATUS_OK 1 00068 00069 #define DVDNAV_FORMAT_AC3 0 00070 #define DVDNAV_FORMAT_MPEGAUDIO 3 00071 #define DVDNAV_FORMAT_LPCM 4 00072 #define DVDNAV_FORMAT_DTS 5 00073 #define DVDNAV_FORMAT_SDDS 6 00074 00075 /********************************************************************* 00076 * initialisation & housekeeping functions * 00077 *********************************************************************/ 00078 00079 /* 00080 * These functions allow you to open a DVD device and associate it 00081 * with a dvdnav_t. 00082 */ 00083 00084 /* 00085 * Attempts to open the DVD drive at the specified path and pre-cache 00086 * the CSS-keys. libdvdread is used to access the DVD, so any source 00087 * supported by libdvdread can be given with "path". Currently, 00088 * libdvdread can access: DVD drives, DVD image files, DVD file-by-file 00089 * copies. 00090 * 00091 * The resulting dvdnav_t handle will be written to *dest. 00092 */ 00093 dvdnav_status_t dvdnav_open(dvdnav_t **dest, const char *path); 00094 00095 /* 00096 * Closes a dvdnav_t previously opened with dvdnav_open(), freeing any 00097 * memory associated with it. 00098 */ 00099 dvdnav_status_t dvdnav_close(dvdnav_t *self); 00100 00101 /* 00102 * Resets the DVD virtual machine and cache buffers. 00103 */ 00104 dvdnav_status_t dvdnav_reset(dvdnav_t *self); 00105 00106 /* 00107 * Fills a pointer with a value pointing to a string describing 00108 * the path associated with an open dvdnav_t. It assigns *path to NULL 00109 * on error. 00110 */ 00111 dvdnav_status_t dvdnav_path(dvdnav_t *self, const char **path); 00112 00113 /* 00114 * Returns a human-readable string describing the last error. 00115 */ 00116 const char* dvdnav_err_to_string(dvdnav_t *self); 00117 00118 00119 /********************************************************************* 00120 * changing and reading DVD player characteristics * 00121 *********************************************************************/ 00122 00123 /* 00124 * These functions allow you to manipulate the various global characteristics 00125 * of the DVD playback engine. 00126 */ 00127 00128 /* 00129 * Sets the region mask (bit 0 set implies region 1, bit 1 set implies 00130 * region 2, etc) of the virtual machine. Generally you will only need to set 00131 * this if you are playing RCE discs which query the virtual machine as to its 00132 * region setting. 00133 * 00134 * This has _nothing_ to do with the region setting of the DVD drive. 00135 */ 00136 dvdnav_status_t dvdnav_set_region_mask(dvdnav_t *self, int32_t region_mask); 00137 00138 /* 00139 * Returns the region mask (bit 0 set implies region 1, bit 1 set implies 00140 * region 2, etc) of the virtual machine. 00141 * 00142 * This has _nothing_ to do with the region setting of the DVD drive. 00143 */ 00144 dvdnav_status_t dvdnav_get_region_mask(dvdnav_t *self, int32_t *region_mask); 00145 00146 /* 00147 * Specify whether read-ahead caching should be used. You may not want this if your 00148 * decoding engine does its own buffering. 00149 * 00150 * The default read-ahead cache does not use an additional thread for the reading 00151 * (see read_cache.c for a threaded cache, but note that this code is currently 00152 * unmaintained). It prebuffers on VOBU level by reading ahead several buffers 00153 * on every read request. The speed of this prebuffering has been optimized to 00154 * also work on slow DVD drives. 00155 * 00156 * If in addition you want to prevent memcpy's to improve performance, have a look 00157 * at dvdnav_get_next_cache_block(). 00158 */ 00159 dvdnav_status_t dvdnav_set_readahead_flag(dvdnav_t *self, int32_t read_ahead_flag); 00160 00161 /* 00162 * Query whether read-ahead caching/buffering will be used. 00163 */ 00164 dvdnav_status_t dvdnav_get_readahead_flag(dvdnav_t *self, int32_t *read_ahead_flag); 00165 00166 /* 00167 * Specify whether the positioning works PGC or PG based. 00168 * Programs (PGs) on DVDs are similar to Chapters and a program chain (PGC) 00169 * usually covers a whole feature. This affects the behaviour of the 00170 * functions dvdnav_get_position() and dvdnav_sector_search(). See there. 00171 * Default is PG based positioning. 00172 */ 00173 dvdnav_status_t dvdnav_set_PGC_positioning_flag(dvdnav_t *self, int32_t pgc_based_flag); 00174 00175 /* 00176 * Query whether positioning is PG or PGC based. 00177 */ 00178 dvdnav_status_t dvdnav_get_PGC_positioning_flag(dvdnav_t *self, int32_t *pgc_based_flag); 00179 00180 00181 /********************************************************************* 00182 * reading data * 00183 *********************************************************************/ 00184 00185 /* 00186 * These functions are used to poll the playback engine and actually get data 00187 * off the DVD. 00188 */ 00189 00190 /* 00191 * Attempts to get the next block off the DVD and copies it into the buffer 'buf'. 00192 * If there is any special actions that may need to be performed, the value 00193 * pointed to by 'event' gets set accordingly. 00194 * 00195 * If 'event' is DVDNAV_BLOCK_OK then 'buf' is filled with the next block 00196 * (note that means it has to be at /least/ 2048 bytes big). 'len' is 00197 * then set to 2048. 00198 * 00199 * Otherwise, buf is filled with an appropriate event structure and 00200 * len is set to the length of that structure. 00201 * 00202 * See the dvdnav_events.h header for information on the various events. 00203 */ 00204 dvdnav_status_t dvdnav_get_next_block(dvdnav_t *self, uint8_t *buf, 00205 int32_t *event, int32_t *len); 00206 00207 /* 00208 * This basically does the same as dvdnav_get_next_block. The only difference is 00209 * that it avoids a memcopy, when the requested block was found in the cache. 00210 * In such a case (cache hit) this function will return a different pointer than 00211 * the one handed in, pointing directly into the relevant block in the cache. 00212 * Those pointers must _never_ be freed but instead returned to the library via 00213 * dvdnav_free_cache_block(). 00214 */ 00215 dvdnav_status_t dvdnav_get_next_cache_block(dvdnav_t *self, uint8_t **buf, 00216 int32_t *event, int32_t *len); 00217 00218 /* 00219 * All buffers which came from the internal cache (when dvdnav_get_next_cache_block() 00220 * returned a buffer different from the one handed in) have to be freed with this 00221 * function. Although handing in other buffers not from the cache doesn't cause any harm. 00222 */ 00223 dvdnav_status_t dvdnav_free_cache_block(dvdnav_t *self, unsigned char *buf); 00224 00225 /* 00226 * If we are currently in a still-frame this function skips it. 00227 * 00228 * See also the DVDNAV_STILL_FRAME event. 00229 */ 00230 dvdnav_status_t dvdnav_still_skip(dvdnav_t *self); 00231 00232 /* 00233 * If we are currently in WAIT state, that is: the application is required to 00234 * wait for its fifos to become empty, calling this signals libdvdnav that this 00235 * is achieved and that it can continue. 00236 * 00237 * See also the DVDNAV_WAIT event. 00238 */ 00239 dvdnav_status_t dvdnav_wait_skip(dvdnav_t *self); 00240 00241 /* 00242 * Returns the still time from the currently playing cell. 00243 * The still time is given in seconds with 0xff meaning an indefinite still. 00244 * 00245 * This function can be used to detect still frames before they are reached. 00246 * Some players might need this to prepare for a frame to be shown for a 00247 * longer time than usual. 00248 */ 00249 uint32_t dvdnav_get_next_still_flag(dvdnav_t *self); 00250 00251 /* 00252 * Stops playback. The next event obtained with one of the get_next_block 00253 * functions will be a DVDNAV_STOP event. 00254 * 00255 * It is not required to call this before dvdnav_close(). 00256 */ 00257 dvdnav_status_t dvdnav_stop(dvdnav_t *self); 00258 00259 00260 /********************************************************************* 00261 * title/part navigation * 00262 *********************************************************************/ 00263 00264 /* 00265 * Play DVD from the Beginning 00266 */ 00267 void dvdnav_first_play(dvdnav_t *self); 00268 00269 /* 00270 * Returns the number of titles on the disk. 00271 */ 00272 dvdnav_status_t dvdnav_get_number_of_titles(dvdnav_t *self, int32_t *titles); 00273 00274 /* 00275 * Returns the number of parts within the given title. 00276 */ 00277 dvdnav_status_t dvdnav_get_number_of_parts(dvdnav_t *self, int32_t title, int32_t *parts); 00278 00279 /* 00280 * Plays the specified title of the DVD from its beginning (that is: part 1). 00281 */ 00282 dvdnav_status_t dvdnav_title_play(dvdnav_t *self, int32_t title); 00283 00284 /* 00285 * Plays the specified title, starting from the specified part. 00286 */ 00287 dvdnav_status_t dvdnav_part_play(dvdnav_t *self, int32_t title, int32_t part); 00288 00289 /* 00290 * Plays the specified title, starting from the specified program 00291 */ 00292 dvdnav_status_t dvdnav_program_play(dvdnav_t *self, int32_t title, int32_t pgcn, int32_t pgn); 00293 00294 /* 00295 * Stores in *times an array (that the application *must* free) of 00296 * dvdtimes corresponding to the chapter times for the chosen title. 00297 * *duration will have the duration of the title 00298 * The number of entries in *times is the result of the function. 00299 * On error *times is NULL and the output is 0 00300 */ 00301 uint32_t dvdnav_describe_title_chapters(dvdnav_t *self, int32_t title, uint64_t **times, uint64_t *duration); 00302 00303 /* 00304 * Play the specified amount of parts of the specified title of 00305 * the DVD then STOP. 00306 * 00307 * Currently unimplemented! 00308 */ 00309 dvdnav_status_t dvdnav_part_play_auto_stop(dvdnav_t *self, int32_t title, 00310 int32_t part, int32_t parts_to_play); 00311 00312 /* 00313 * Play the specified title starting from the specified time. 00314 * 00315 * Currently unimplemented! 00316 */ 00317 dvdnav_status_t dvdnav_time_play(dvdnav_t *self, int32_t title, 00318 uint64_t time); 00319 00320 /* 00321 * Stop playing the current position and jump to the specified menu. 00322 * 00323 * See also DVDMenuID_t from libdvdread 00324 */ 00325 dvdnav_status_t dvdnav_menu_call(dvdnav_t *self, DVDMenuID_t menu); 00326 00327 /* 00328 * Return the title number and part currently being played. 00329 * A title of 0 indicates we are in a menu. In this case, part 00330 * is set to the current menu's ID. 00331 */ 00332 dvdnav_status_t dvdnav_current_title_info(dvdnav_t *self, int32_t *title, 00333 int32_t *part); 00334 00335 /* 00336 * Return the title number, pgcn and pgn currently being played. 00337 * A title of 0 indicates, we are in a menu. 00338 */ 00339 dvdnav_status_t dvdnav_current_title_program(dvdnav_t *self, int32_t *title, 00340 int32_t *pgcn, int32_t *pgn); 00341 00342 /* 00343 * Return the current position (in blocks) within the current 00344 * title and the length (in blocks) of said title. 00345 * 00346 * Current implementation is wrong and likely to behave unpredictably! 00347 * Use is discouraged! 00348 */ 00349 dvdnav_status_t dvdnav_get_position_in_title(dvdnav_t *self, 00350 uint32_t *pos, 00351 uint32_t *len); 00352 00353 /* 00354 * This function is only available for compatibility reasons. 00355 * 00356 * Stop playing the current position and start playback of the current title 00357 * from the specified part. 00358 */ 00359 dvdnav_status_t dvdnav_part_search(dvdnav_t *self, int32_t part); 00360 00361 00362 /********************************************************************* 00363 * program chain/program navigation * 00364 *********************************************************************/ 00365 00366 /* 00367 * Stop playing the current position and start playback from the last 00368 * VOBU boundary before the given sector. The sector number is not 00369 * meant to be an absolute physical DVD sector, but a relative sector 00370 * in the current program. This function cannot leave the current 00371 * program and will fail if asked to do so. 00372 * 00373 * If program chain based positioning is enabled 00374 * (see dvdnav_set_PGC_positioning_flag()), this will seek to the relative 00375 * sector inside the current program chain. 00376 * 00377 * 'origin' can be one of SEEK_SET, SEEK_CUR, SEEK_END as defined in 00378 * fcntl.h. 00379 */ 00380 dvdnav_status_t dvdnav_sector_search(dvdnav_t *self, 00381 uint64_t offset, int32_t origin); 00382 00383 /* 00384 returns the current stream time in PTS ticks as reported by the IFO structures 00385 divide it by 90000 to get the current play time in seconds 00386 */ 00387 int64_t dvdnav_get_current_time(dvdnav_t *self); 00388 00389 /* 00390 * Stop playing the current position and start playback of the title 00391 * from the specified timecode. 00392 * 00393 * if search_to_nearest_cell is set then search to the nearest Cell. 00394 * and then use dvdnav_relative_time_search for further seeking 00395 * Otherwise tries to guess the nearest VOBU by calculating an offset. 00396 */ 00397 dvdnav_status_t dvdnav_absolute_time_search(dvdnav_t *self, 00398 uint64_t time, uint search_to_nearest_cell); 00399 00400 int dvdnav_relative_time_search(dvdnav_t *self, 00401 int relative_time); 00402 00403 /* 00404 * Stop playing current position and play the "GoUp"-program chain. 00405 * (which generally leads to the title menu or a higher-level menu). 00406 */ 00407 dvdnav_status_t dvdnav_go_up(dvdnav_t *self); 00408 00409 /* 00410 * Stop playing the current position and start playback at the 00411 * previous program (if it exists). 00412 */ 00413 dvdnav_status_t dvdnav_prev_pg_search(dvdnav_t *self); 00414 00415 /* 00416 * Stop playing the current position and start playback at the 00417 * first program. 00418 */ 00419 dvdnav_status_t dvdnav_top_pg_search(dvdnav_t *self); 00420 00421 /* 00422 * Stop playing the current position and start playback at the 00423 * next program (if it exists). 00424 */ 00425 dvdnav_status_t dvdnav_next_pg_search(dvdnav_t *self); 00426 00427 /* 00428 * Return the current position (in blocks) within the current 00429 * program and the length (in blocks) of current program. 00430 * 00431 * If program chain based positioning is enabled 00432 * (see dvdnav_set_PGC_positioning_flag()), this will return the 00433 * relative position in and the length of the current program chain. 00434 */ 00435 dvdnav_status_t dvdnav_get_position(dvdnav_t *self, uint32_t *pos, 00436 uint32_t *len); 00437 00438 00439 /********************************************************************* 00440 * menu highlights * 00441 *********************************************************************/ 00442 00443 /* 00444 * Most functions related to highlights take a NAV PCI packet as a parameter. 00445 * While you can get such a packet from libdvdnav, this will result in 00446 * errors for players with internal FIFOs because due to the FIFO length, 00447 * libdvdnav will be ahead in the stream compared to what the user is 00448 * seeing on screen. Therefore, player applications who have a NAV 00449 * packet available, which is better in sync with the actual playback, 00450 * should always pass this one to these functions. 00451 */ 00452 00453 /* 00454 * Get the currently highlighted button 00455 * number (1..36) or 0 if no button is highlighted. 00456 */ 00457 dvdnav_status_t dvdnav_get_current_highlight(dvdnav_t *self, int32_t *button); 00458 00459 /* 00460 * Returns the Presentation Control Information (PCI) structure associated 00461 * with the current position. 00462 * 00463 * Read the general notes above. 00464 * See also libdvdreads nav_types.h for definition of pci_t. 00465 */ 00466 pci_t* dvdnav_get_current_nav_pci(dvdnav_t *self); 00467 00468 /* 00469 * Returns the DSI (data search information) structure associated 00470 * with the current position. 00471 * 00472 * Read the general notes above. 00473 * See also libdvdreads nav_types.h for definition of dsi_t. 00474 */ 00475 dsi_t* dvdnav_get_current_nav_dsi(dvdnav_t *self); 00476 00477 /* 00478 * Get the area associated with a certain button. 00479 */ 00480 dvdnav_status_t dvdnav_get_highlight_area(pci_t *nav_pci , int32_t button, int32_t mode, 00481 dvdnav_highlight_area_t *highlight); 00482 00483 /* 00484 * Move button highlight around as suggested by function name (e.g. with arrow keys). 00485 */ 00486 dvdnav_status_t dvdnav_upper_button_select(dvdnav_t *self, pci_t *pci); 00487 dvdnav_status_t dvdnav_lower_button_select(dvdnav_t *self, pci_t *pci); 00488 dvdnav_status_t dvdnav_right_button_select(dvdnav_t *self, pci_t *pci); 00489 dvdnav_status_t dvdnav_left_button_select(dvdnav_t *self, pci_t *pci); 00490 00491 /* 00492 * Activate ("press") the currently highlighted button. 00493 */ 00494 dvdnav_status_t dvdnav_button_activate(dvdnav_t *self, pci_t *pci); 00495 00496 /* 00497 * Highlight a specific button. 00498 */ 00499 dvdnav_status_t dvdnav_button_select(dvdnav_t *self, pci_t *pci, int32_t button); 00500 00501 /* 00502 * Activate ("press") specified button. 00503 */ 00504 dvdnav_status_t dvdnav_button_select_and_activate(dvdnav_t *self, pci_t *pci, int32_t button); 00505 00506 /* 00507 * Activate ("press") a button and execute specified command. 00508 */ 00509 dvdnav_status_t dvdnav_button_activate_cmd(dvdnav_t *self, int32_t button, vm_cmd_t *cmd); 00510 00511 /* 00512 * Select button at specified video frame coordinates. 00513 */ 00514 dvdnav_status_t dvdnav_mouse_select(dvdnav_t *self, pci_t *pci, int32_t x, int32_t y); 00515 00516 /* 00517 * Activate ("press") button at specified video frame coordinates. 00518 */ 00519 dvdnav_status_t dvdnav_mouse_activate(dvdnav_t *self, pci_t *pci, int32_t x, int32_t y); 00520 00521 00522 /********************************************************************* 00523 * languages * 00524 *********************************************************************/ 00525 00526 /* 00527 * The language codes expected by these functions are two character 00528 * codes as defined in ISO639. 00529 */ 00530 00531 /* 00532 * Set which menu language we should use per default. 00533 */ 00534 dvdnav_status_t dvdnav_menu_language_select(dvdnav_t *self, 00535 char *code); 00536 00537 /* 00538 * Set which audio language we should use per default. 00539 */ 00540 dvdnav_status_t dvdnav_audio_language_select(dvdnav_t *self, 00541 char *code); 00542 00543 /* 00544 * Set which spu language we should use per default. 00545 */ 00546 dvdnav_status_t dvdnav_spu_language_select(dvdnav_t *self, 00547 char *code); 00548 00549 00550 /********************************************************************* 00551 * obtaining stream attributes * 00552 *********************************************************************/ 00553 00554 /* 00555 * Return a string describing the title of the DVD. 00556 * This is an ID string encoded on the disc by the author. In many cases 00557 * this is a descriptive string such as `THE_MATRIX' but sometimes is singularly 00558 * uninformative such as `PDVD-011421'. Some DVD authors even forget to set this, 00559 * so you may also read the default of the authoring software they used, like 00560 * `DVDVolume'. 00561 */ 00562 dvdnav_status_t dvdnav_get_title_string(dvdnav_t *self, const char **title_str); 00563 00564 /* 00565 * Returns a string containing the serial number of the DVD. 00566 * This has a max of 15 characters and should be more unique than the 00567 * title string. 00568 */ 00569 dvdnav_status_t dvdnav_get_serial_string(dvdnav_t *self, const char **serial_str); 00570 00571 /* 00572 * Get video aspect code. 00573 * The aspect code does only change on VTS boundaries. 00574 * See the DVDNAV_VTS_CHANGE event. 00575 * 00576 * 0 -- 4:3, 2 -- 16:9 00577 */ 00578 uint8_t dvdnav_get_video_aspect(dvdnav_t *self); 00579 00580 /* 00581 * Get video resolution. 00582 */ 00583 int dvdnav_get_video_resolution(dvdnav_t *self, uint32_t *width, uint32_t *height); 00584 00585 /* 00586 * Get video scaling permissions. 00587 * The scaling permission does only change on VTS boundaries. 00588 * See the DVDNAV_VTS_CHANGE event. 00589 * 00590 * bit0 set = deny letterboxing, bit1 set = deny pan&scan 00591 */ 00592 uint8_t dvdnav_get_video_scale_permission(dvdnav_t *self); 00593 00594 /* 00595 * Get video format 00596 * 0 - NTSC , 1 - PAL 00597 */ 00598 uint8_t dvdnav_get_video_format(dvdnav_t *self); 00599 00600 /* 00601 * Converts a *logical* audio stream id into language code 00602 * (returns 0xffff if no such stream). 00603 */ 00604 uint16_t dvdnav_audio_stream_to_lang(dvdnav_t *self, uint8_t stream); 00605 00606 /* 00607 * Returns the format of *logical* audio stream 'stream' 00608 * (returns 0xffff if no such stream). 00609 */ 00610 uint16_t dvdnav_audio_stream_format(dvdnav_t *self, uint8_t stream); 00611 00612 /* 00613 * Returns number of channels in *logical* audio stream 'stream' 00614 * (returns 0xffff if no such stream). 00615 */ 00616 uint16_t dvdnav_audio_stream_channels(dvdnav_t *self, uint8_t stream); 00617 00618 /* 00619 * Converts a *logical* subpicture stream id into country code 00620 * (returns 0xffff if no such stream). 00621 */ 00622 uint16_t dvdnav_spu_stream_to_lang(dvdnav_t *self, uint8_t stream); 00623 00624 /* 00625 * Converts a *physical* (MPEG) audio stream id into a logical stream number. 00626 */ 00627 int8_t dvdnav_get_audio_logical_stream(dvdnav_t *self, uint8_t audio_num); 00628 00629 #define HAVE_GET_AUDIO_ATTR 00630 /* 00631 * Get audio attr 00632 */ 00633 dvdnav_status_t dvdnav_get_audio_attr(dvdnav_t *self, uint8_t audio_mum, audio_attr_t *audio_attr); 00634 00635 /* 00636 * Converts a *physical* (MPEG) subpicture stream id into a logical stream number. 00637 */ 00638 int8_t dvdnav_get_spu_logical_stream(dvdnav_t *self, uint8_t subp_num); 00639 00640 #define HAVE_GET_SPU_ATTR 00641 /* 00642 * Get spu attr 00643 */ 00644 dvdnav_status_t dvdnav_get_spu_attr(dvdnav_t *self, uint8_t audio_mum, subp_attr_t *subp_attr); 00645 00646 /* 00647 * Get active audio stream. 00648 */ 00649 int8_t dvdnav_get_active_audio_stream(dvdnav_t *self); 00650 00651 /* 00652 * Set active audio stream 00653 */ 00654 int8_t dvdnav_set_active_audio_stream(dvdnav_t *self, int8_t stream); 00655 00656 /* 00657 * Get active spu stream. 00658 */ 00659 int8_t dvdnav_get_active_spu_stream(dvdnav_t *self); 00660 00661 /* 00662 * Get the set of user operations that are currently prohibited. 00663 * There are potentially new restrictions right after 00664 * DVDNAV_CHANNEL_HOP and DVDNAV_NAV_PACKET. 00665 */ 00666 user_ops_t dvdnav_get_restrictions(dvdnav_t *self); 00667 00668 00669 /********************************************************************* 00670 * multiple angles * 00671 *********************************************************************/ 00672 00673 /* 00674 * The libdvdnav library abstracts away the difference between seamless and 00675 * non-seamless angles. From the point of view of the programmer you just set the 00676 * angle number and all is well in the world. You will always see only the 00677 * selected angle coming from the get_next_block functions. 00678 * 00679 * Note: 00680 * It is quite possible that some tremendously strange DVD feature might change the 00681 * angle number from under you. Generally you should always view the results from 00682 * dvdnav_get_angle_info() as definitive only up to the next time you call 00683 * dvdnav_get_next_block(). 00684 */ 00685 00686 /* 00687 * Sets the current angle. If you try to follow a non existent angle 00688 * the call fails. 00689 */ 00690 dvdnav_status_t dvdnav_angle_change(dvdnav_t *self, int32_t angle); 00691 00692 /* 00693 * Returns the current angle and number of angles present. 00694 */ 00695 dvdnav_status_t dvdnav_get_angle_info(dvdnav_t *self, int32_t *current_angle, 00696 int32_t *number_of_angles); 00697 00698 /********************************************************************* 00699 * domain queries * 00700 *********************************************************************/ 00701 00702 /* 00703 * Are we in the First Play domain? 00704 */ 00705 int8_t dvdnav_is_domain_fp(dvdnav_t *self); 00706 00707 /* 00708 * Are we in the Video management Menu domain? 00709 */ 00710 int8_t dvdnav_is_domain_vmgm(dvdnav_t *self); 00711 00712 /* 00713 * Are we in the Video Title Menu domain? 00714 */ 00715 int8_t dvdnav_is_domain_vtsm(dvdnav_t *self); 00716 00717 /* 00718 * Are we in the Video Title Set domain? 00719 */ 00720 int8_t dvdnav_is_domain_vts(dvdnav_t *self); 00721 00722 00723 #ifdef __cplusplus 00724 } 00725 #endif 00726 00727 #endif /* LIBDVDNAV_DVDNAV_H */
1.6.3