📄 dvdnav.h
字号:
* * Current implementation is wrong and likely to behave unpredictably! * Use is discouraged! */dvdnav_status_t dvdnav_get_position_in_title(dvdnav_t *self, uint32_t *pos, uint32_t *len);/* * This function is only available for compatibility reasons. * * Stop playing the current position and start playback of the current title * from the specified part. */dvdnav_status_t dvdnav_part_search(dvdnav_t *self, int32_t part);/********************************************************************* * program chain/program navigation * *********************************************************************//* * Stop playing the current position and start playback from the last * VOBU boundary before the given sector. The sector number is not * meant to be an absolute physical DVD sector, but a relative sector * in the current program. This function cannot leave the current * program and will fail, if asked to do so. * * If program chain based positioning is enabled * (see dvdnav_set_PGC_positioning_flag()), this will seek to the relative * sector inside the current program chain. * * 'origin' can be one of SEEK_SET, SEEK_CUR, SEEK_END as defined in * fcntl.h. */dvdnav_status_t dvdnav_sector_search(dvdnav_t *self, uint64_t offset, int32_t origin);/* * Stop playing the current position and start playback of the title * from the specified timecode. * * Currently unimplemented! */dvdnav_status_t dvdnav_time_search(dvdnav_t *self, uint64_t time);/* * Stop playing current position and play the "GoUp"-program chain. * (which generally leads to the title menu or a higer-level menu). */dvdnav_status_t dvdnav_go_up(dvdnav_t *self);/* * Stop playing the current position and start playback at the * previous program (if it exists). */dvdnav_status_t dvdnav_prev_pg_search(dvdnav_t *self);/* * Stop playing the current position and start playback at the * first program. */dvdnav_status_t dvdnav_top_pg_search(dvdnav_t *self);/* * Stop playing the current position and start playback at the * next program (if it exists). */dvdnav_status_t dvdnav_next_pg_search(dvdnav_t *self);/* * Return the current position (in blocks) within the current * program and the length (in blocks) of current program. * * If program chain based positioning is enabled * (see dvdnav_set_PGC_positioning_flag()), this will return the * relative position in and the length of the current program chain. */dvdnav_status_t dvdnav_get_position(dvdnav_t *self, uint32_t *pos, uint32_t *len);/********************************************************************* * menu highlights * *********************************************************************//* * Most functions related to highlights take a NAV PCI packet as a parameter. * While you can get the such a packet from libdvdnav, for players with internal * FIFOs, this will result in errors, because due to the FIFO length, libdvdnav will * be ahead in the stream compared to what the user is seeing on screen. * Therefore, player applications who have a NAV packet available, which is * better in sync with the actual playback should always pass this one to these * functions. *//* * Get the currently highlighted button * number (1..36) or 0 if no button is highlighted. */dvdnav_status_t dvdnav_get_current_highlight(dvdnav_t *self, int32_t *button);/* * Returns the Presentation Control Information (PCI) structure associated * with the current position. * * Read the general notes above. * See also libdvdreads nav_types.h for definition of pci_t. */pci_t* dvdnav_get_current_nav_pci(dvdnav_t *self);/* * Returns the DSI (data search information) structure associated * with the current position. * * Read the general notes above. * See also libdvdreads nav_types.h for definition of dsi_t. */dsi_t* dvdnav_get_current_nav_dsi(dvdnav_t *self);/* * Get the area associated with a certain button. */dvdnav_status_t dvdnav_get_highlight_area(pci_t *nav_pci , int32_t button, int32_t mode, dvdnav_highlight_area_t *highlight);/* * Move button highlight around as suggested by function name (e.g. with arrow keys). */dvdnav_status_t dvdnav_upper_button_select(dvdnav_t *self, pci_t *pci);dvdnav_status_t dvdnav_lower_button_select(dvdnav_t *self, pci_t *pci);dvdnav_status_t dvdnav_right_button_select(dvdnav_t *self, pci_t *pci);dvdnav_status_t dvdnav_left_button_select(dvdnav_t *self, pci_t *pci);/* * Activate ("press") the currently highlighted button. */dvdnav_status_t dvdnav_button_activate(dvdnav_t *self, pci_t *pci);/* * Highlight a specific button. */dvdnav_status_t dvdnav_button_select(dvdnav_t *self, pci_t *pci, int32_t button);/* * Activate ("press") specified button. */dvdnav_status_t dvdnav_button_select_and_activate(dvdnav_t *self, pci_t *pci, int32_t button);/* * Activate (press) a button and execute specified command. */dvdnav_status_t dvdnav_button_activate_cmd(dvdnav_t *self, int32_t button, vm_cmd_t *cmd);/* * Select button at specified video frame coordinates. */dvdnav_status_t dvdnav_mouse_select(dvdnav_t *self, pci_t *pci, int32_t x, int32_t y);/* * Activate ("press") button at specified video frame coordinates. */dvdnav_status_t dvdnav_mouse_activate(dvdnav_t *self, pci_t *pci, int32_t x, int32_t y);/********************************************************************* * languages * *********************************************************************//* * The language codes expected by these functions are two character * codes as defined in ISO639. *//* * Set which menu language we should use per default. */dvdnav_status_t dvdnav_menu_language_select(dvdnav_t *self, char *code);/* * Set which audio language we should use per default. */dvdnav_status_t dvdnav_audio_language_select(dvdnav_t *self, char *code);/* * Set which spu language we should use per default. */dvdnav_status_t dvdnav_spu_language_select(dvdnav_t *self, char *code);/********************************************************************* * obtaining stream attributes * *********************************************************************//* * Return a string describing the title of the DVD. * This is an ID string encoded on the disc by the author. In many cases * this is a descriptive string such as `THE_MATRIX' but sometimes is sigularly * uninformative such as `PDVD-011421'. Some DVD authors even forget to set this, * so you may also read the default of the authoring software they used, like * `DVDVolume'. */dvdnav_status_t dvdnav_get_title_string(dvdnav_t *self, const char **title_str);/* * Get video aspect code. * The aspect code does only change on VTS boundaries. * See the DVDNAV_VTS_CHANGE event. * * 0 -- 4:3, 2 -- 16:9 */uint8_t dvdnav_get_video_aspect(dvdnav_t *self);/* * Get video scaling permissions. * The scaling permission does only change on VTS boundaries. * See the DVDNAV_VTS_CHANGE event. * * bit0 set = deny letterboxing, bit1 set = deny pan&scan */uint8_t dvdnav_get_video_scale_permission(dvdnav_t *self);/* * Converts a *logical* audio stream id into language code * (returns 0xffff if no such stream). */uint16_t dvdnav_audio_stream_to_lang(dvdnav_t *self, uint8_t stream);/* * Converts a *logical* subpicture stream id into country code * (returns 0xffff if no such stream). */uint16_t dvdnav_spu_stream_to_lang(dvdnav_t *self, uint8_t stream);/* * Converts a *physical* (MPEG) audio stream id into a logical stream number. */int8_t dvdnav_get_audio_logical_stream(dvdnav_t *self, uint8_t audio_num);/* * Converts a *physical* (MPEG) subpicture stream id into a logical stream number. */int8_t dvdnav_get_spu_logical_stream(dvdnav_t *self, uint8_t subp_num);/* * Get active audio stream. */int8_t dvdnav_get_active_audio_stream(dvdnav_t *self);/* * Get active spu stream. */int8_t dvdnav_get_active_spu_stream(dvdnav_t *self);/********************************************************************* * multiple angles * *********************************************************************//* * The libdvdnav library abstracts away the difference between seamless and * non-seamless angles. From the point of view of the programmer you just set the * angle number and all is well in the world. You will always see only the * selected angle coming from the get_next_block functions. * * Note: * It is quite possible that some tremendously strange DVD feature might change the * angle number from under you. Generally you should always view the results from * dvdnav_get_angle_info() as definitive only up to the next time you call * dvdnav_get_next_block(). *//* * Sets the current angle. If you try to follow a non existant angle * the call fails. */dvdnav_status_t dvdnav_angle_change(dvdnav_t *self, int32_t angle);/* * Returns the current angle and number of angles present. */dvdnav_status_t dvdnav_get_angle_info(dvdnav_t *self, int32_t *current_angle, int32_t *number_of_angles);/********************************************************************* * domain queries * *********************************************************************//* * Are we in the First Play domain? */int8_t dvdnav_is_domain_fp(dvdnav_t *self);/* * Are we in the Video management Menu domain? */int8_t dvdnav_is_domain_vmgm(dvdnav_t *self);/* * Are we in the Video Title Menu domain? */int8_t dvdnav_is_domain_vtsm(dvdnav_t *self);/* * Are we in the Video Title Set domain? */int8_t dvdnav_is_domain_vts(dvdnav_t *self);#ifdef __cplusplus}#endif#endif /* DVDNAV_H_INCLUDED */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -