libbluray
|
libbluray API More...
#include <stdint.h>
Go to the source code of this file.
Data Structures | |
struct | BLURAY_TITLE |
HDMV / BD-J title information. More... | |
struct | BLURAY_DISC_INFO |
BluRay disc information. More... | |
struct | BLURAY_STREAM_INFO |
Clip substream information. More... | |
struct | BLURAY_CLIP_INFO |
Clip information. More... | |
struct | BLURAY_TITLE_CHAPTER |
Chapter entry. More... | |
struct | BLURAY_TITLE_MARK |
Playmark information. More... | |
struct | BLURAY_TITLE_INFO |
Playlist information. More... | |
struct | BLURAY_SOUND_EFFECT |
Sound effect data. More... | |
struct | BD_EVENT |
Event. More... | |
Macros | |
#define | TITLES_ALL 0 |
all titles. | |
#define | TITLES_FILTER_DUP_TITLE 0x01 |
remove duplicate titles. | |
#define | TITLES_FILTER_DUP_CLIP 0x02 |
remove titles that have duplicate clips. | |
#define | TITLES_RELEVANT (TITLES_FILTER_DUP_TITLE | TITLES_FILTER_DUP_CLIP) |
remove duplicate titles and clips | |
#define | BD_AACS_CORRUPTED_DISC -1 |
Corrupt disc (missing/invalid files) | |
#define | BD_AACS_NO_CONFIG -2 |
AACS configuration file missing | |
#define | BD_AACS_NO_PK -3 |
No valid processing key found | |
#define | BD_AACS_NO_CERT -4 |
No valid certificate found | |
#define | BD_AACS_CERT_REVOKED -5 |
All certificates have been revoked | |
#define | BD_AACS_MMC_FAILED -6 |
MMC (disc drive interaction) failed | |
#define | BLURAY_AUDIO_STREAM 0 |
Select audio stream | |
#define | BLURAY_PG_TEXTST_STREAM 1 |
Select subtitle stream | |
#define | BD_ERROR_HDMV 1 |
HDMV VM failed to play the title | |
#define | BD_ERROR_BDJ 2 |
BD-J failed to play the title | |
#define | BD_ERROR_AACS 3 |
AACS failed or not supported | |
#define | BD_ERROR_BDPLUS 4 |
BD+ failed or not supported | |
#define | BLURAY_TITLE_FIRST_PLAY 0xffff |
"First Play" title started | |
#define | BLURAY_TITLE_TOP_MENU 0 |
"Top Menu" title started | |
#define | BLURAY_KIT_PLAY 0x1 |
BD-J requests to handle "Play" UO | |
#define | BLURAY_KIT_STOP 0x2 |
BD-J requests to handle "Stop" UO | |
#define | BLURAY_KIT_FFW 0x4 |
BD-J requests to handle "Fast Forward" UO | |
#define | BLURAY_KIT_REW 0x8 |
BD-J requests to handle "Reverse" UO | |
#define | BLURAY_KIT_TRACK_NEXT 0x10 |
BD-J requests to handle "Next Track" UO | |
#define | BLURAY_KIT_TRACK_PREV 0x20 |
BD-J requests to handle "Prev Track" UO | |
#define | BLURAY_KIT_PAUSE 0x40 |
BD-J requests to handle "Pause" UO | |
#define | BLURAY_KIT_STILL_OFF 0x80 |
BD-J requests to handle "Still Off" UO | |
#define | BLURAY_KIT_SEC_AUDIO 0x100 |
BD-J requests to handle "Sec. Audio" UO | |
#define | BLURAY_KIT_SEC_VIDEO 0x200 |
BD-J requests to handle "Sec. Video" UO | |
#define | BLURAY_KIT_PG_TEXTST 0x400 |
BD-J requests to handle "Subtitle" UO | |
#define | BLURAY_UO_MENU_CALL 0x1 |
"Menu Call" masked (not allowed) | |
#define | BLURAY_UO_TITLE_SEARCH 0x2 |
"Title Search" masked (not allowed) | |
#define | BLURAY_RATE_PAUSED 0 |
Set playback rate to PAUSED | |
#define | BLURAY_RATE_NORMAL 90000 |
Set playback rate to NORMAL | |
Typedefs | |
typedef struct bluray | BLURAY |
This structure is opaque. More... | |
typedef void(* | bd_overlay_proc_f) (void *handle, const struct bd_overlay_s *const event) |
YUV overlay handler function type. More... | |
typedef void(* | bd_argb_overlay_proc_f) (void *handle, const struct bd_argb_overlay_s *const event) |
ARGB overlay handler function type. More... | |
Enumerations | |
enum | bd_stream_type_e { BLURAY_STREAM_TYPE_VIDEO_MPEG1 = 0x01 , BLURAY_STREAM_TYPE_VIDEO_MPEG2 = 0x02 , BLURAY_STREAM_TYPE_AUDIO_MPEG1 = 0x03 , BLURAY_STREAM_TYPE_AUDIO_MPEG2 = 0x04 , BLURAY_STREAM_TYPE_AUDIO_LPCM = 0x80 , BLURAY_STREAM_TYPE_AUDIO_AC3 = 0x81 , BLURAY_STREAM_TYPE_AUDIO_DTS = 0x82 , BLURAY_STREAM_TYPE_AUDIO_TRUHD = 0x83 , BLURAY_STREAM_TYPE_AUDIO_AC3PLUS = 0x84 , BLURAY_STREAM_TYPE_AUDIO_DTSHD = 0x85 , BLURAY_STREAM_TYPE_AUDIO_DTSHD_MASTER = 0x86 , BLURAY_STREAM_TYPE_VIDEO_VC1 = 0xea , BLURAY_STREAM_TYPE_VIDEO_H264 = 0x1b , BLURAY_STREAM_TYPE_VIDEO_HEVC = 0x24 , BLURAY_STREAM_TYPE_SUB_PG = 0x90 , BLURAY_STREAM_TYPE_SUB_IG = 0x91 , BLURAY_STREAM_TYPE_SUB_TEXT = 0x92 , BLURAY_STREAM_TYPE_AUDIO_AC3PLUS_SECONDARY = 0xa1 , BLURAY_STREAM_TYPE_AUDIO_DTSHD_SECONDARY = 0xa2 } |
Stream video coding type. | |
enum | bd_video_format_e { BLURAY_VIDEO_FORMAT_480I = 1 , BLURAY_VIDEO_FORMAT_576I = 2 , BLURAY_VIDEO_FORMAT_480P = 3 , BLURAY_VIDEO_FORMAT_1080I = 4 , BLURAY_VIDEO_FORMAT_720P = 5 , BLURAY_VIDEO_FORMAT_1080P = 6 , BLURAY_VIDEO_FORMAT_576P = 7 , BLURAY_VIDEO_FORMAT_2160P = 8 } |
Stream video format. More... | |
enum | bd_video_rate_e { BLURAY_VIDEO_RATE_24000_1001 = 1 , BLURAY_VIDEO_RATE_24 = 2 , BLURAY_VIDEO_RATE_25 = 3 , BLURAY_VIDEO_RATE_30000_1001 = 4 , BLURAY_VIDEO_RATE_50 = 6 , BLURAY_VIDEO_RATE_60000_1001 = 7 } |
Stream video frame rate. More... | |
enum | bd_video_aspect_e { BLURAY_ASPECT_RATIO_4_3 = 2 , BLURAY_ASPECT_RATIO_16_9 = 3 } |
Stream video aspect ratio. | |
enum | bd_audio_format_e { BLURAY_AUDIO_FORMAT_MONO = 1 , BLURAY_AUDIO_FORMAT_STEREO = 3 , BLURAY_AUDIO_FORMAT_MULTI_CHAN = 6 , BLURAY_AUDIO_FORMAT_COMBO = 12 } |
Stream audio format. | |
enum | bd_audio_rate_e { BLURAY_AUDIO_RATE_48 = 1 , BLURAY_AUDIO_RATE_96 = 4 , BLURAY_AUDIO_RATE_192 = 5 , BLURAY_AUDIO_RATE_192_COMBO = 12 , BLURAY_AUDIO_RATE_96_COMBO = 14 } |
Stream audio rate. | |
enum | bd_char_code_e { BLURAY_TEXT_CHAR_CODE_UTF8 = 0x01 , BLURAY_TEXT_CHAR_CODE_UTF16BE = 0x02 , BLURAY_TEXT_CHAR_CODE_SHIFT_JIS = 0x03 , BLURAY_TEXT_CHAR_CODE_EUC_KR = 0x04 , BLURAY_TEXT_CHAR_CODE_GB18030_20001 = 0x05 , BLURAY_TEXT_CHAR_CODE_CN_GB = 0x06 , BLURAY_TEXT_CHAR_CODE_BIG5 = 0x07 } |
Text subtitle charset. | |
enum | bd_still_mode_e { BLURAY_STILL_NONE = 0x00 , BLURAY_STILL_TIME = 0x01 , BLURAY_STILL_INFINITE = 0x02 } |
Clip still mode type. More... | |
enum | bd_mark_type_e { BLURAY_MARK_ENTRY = 0x01 , BLURAY_MARK_LINK = 0x02 } |
Mark type. More... | |
enum | bd_dynamic_range_type_e { BLURAY_DYNAMIC_RANGE_SDR = 0 , BLURAY_DYNAMIC_RANGE_HDR10 = 1 , BLURAY_DYNAMIC_RANGE_DOLBY_VISION = 2 } |
Clip dynamic range. | |
enum | bd_player_setting { BLURAY_PLAYER_SETTING_AUDIO_LANG = 16 , BLURAY_PLAYER_SETTING_PG_LANG = 17 , BLURAY_PLAYER_SETTING_MENU_LANG = 18 , BLURAY_PLAYER_SETTING_COUNTRY_CODE = 19 , BLURAY_PLAYER_SETTING_REGION_CODE = 20 , BLURAY_PLAYER_SETTING_OUTPUT_PREFER = 21 , BLURAY_PLAYER_SETTING_PARENTAL = 13 , BLURAY_PLAYER_SETTING_AUDIO_CAP = 15 , BLURAY_PLAYER_SETTING_VIDEO_CAP = 29 , BLURAY_PLAYER_SETTING_DISPLAY_CAP = 23 , BLURAY_PLAYER_SETTING_3D_CAP = 24 , BLURAY_PLAYER_SETTING_UHD_CAP = 25 , BLURAY_PLAYER_SETTING_UHD_DISPLAY_CAP = 26 , BLURAY_PLAYER_SETTING_HDR_PREFERENCE = 27 , BLURAY_PLAYER_SETTING_SDR_CONV_PREFER = 28 , BLURAY_PLAYER_SETTING_TEXT_CAP = 30 , BLURAY_PLAYER_SETTING_PLAYER_PROFILE = 31 , BLURAY_PLAYER_SETTING_DECODE_PG = 0x100 , BLURAY_PLAYER_SETTING_PERSISTENT_STORAGE = 0x101 , BLURAY_PLAYER_PERSISTENT_ROOT = 0x200 , BLURAY_PLAYER_CACHE_ROOT = 0x201 , BLURAY_PLAYER_JAVA_HOME = 0x202 } |
Player setting. More... | |
enum | bd_event_e { BD_EVENT_NONE = 0 , BD_EVENT_ERROR = 1 , BD_EVENT_READ_ERROR = 2 , BD_EVENT_ENCRYPTED = 3 , BD_EVENT_ANGLE = 4 , BD_EVENT_TITLE = 5 , BD_EVENT_PLAYLIST = 6 , BD_EVENT_PLAYITEM = 7 , BD_EVENT_CHAPTER = 8 , BD_EVENT_PLAYMARK = 9 , BD_EVENT_END_OF_TITLE = 10 , BD_EVENT_AUDIO_STREAM = 11 , BD_EVENT_IG_STREAM = 12 , BD_EVENT_PG_TEXTST_STREAM = 13 , BD_EVENT_PIP_PG_TEXTST_STREAM = 14 , BD_EVENT_SECONDARY_AUDIO_STREAM = 15 , BD_EVENT_SECONDARY_VIDEO_STREAM = 16 , BD_EVENT_PG_TEXTST = 17 , BD_EVENT_PIP_PG_TEXTST = 18 , BD_EVENT_SECONDARY_AUDIO = 19 , BD_EVENT_SECONDARY_VIDEO = 20 , BD_EVENT_SECONDARY_VIDEO_SIZE = 21 , BD_EVENT_PLAYLIST_STOP = 22 , BD_EVENT_DISCONTINUITY = 23 , BD_EVENT_SEEK = 24 , BD_EVENT_STILL = 25 , BD_EVENT_STILL_TIME = 26 , BD_EVENT_SOUND_EFFECT = 27 , BD_EVENT_IDLE = 28 , BD_EVENT_POPUP = 29 , BD_EVENT_MENU = 30 , BD_EVENT_STEREOSCOPIC_STATUS = 31 , BD_EVENT_KEY_INTEREST_TABLE = 32 , BD_EVENT_UO_MASK_CHANGED = 33 } |
Event type. More... | |
Functions | |
void | bd_get_version (int *major, int *minor, int *micro) |
Get libbluray version. More... | |
BLURAY * | bd_open (const char *device_path, const char *keyfile_path) |
Open BluRay disc. More... | |
BLURAY * | bd_init (void) |
Initialize BLURAY object. More... | |
int | bd_open_disc (BLURAY *bd, const char *device_path, const char *keyfile_path) |
Open BluRay disc. More... | |
int | bd_open_stream (BLURAY *bd, void *read_blocks_handle, int(*read_blocks)(void *handle, void *buf, int lba, int num_blocks)) |
Open BluRay disc. More... | |
int | bd_open_files (BLURAY *bd, void *handle, struct bd_dir_s *(*open_dir)(void *handle, const char *rel_path), struct bd_file_s *(*open_file)(void *handle, const char *rel_path)) |
Open BluRay disc. More... | |
void | bd_close (BLURAY *bd) |
Close BluRay disc. More... | |
const BLURAY_DISC_INFO * | bd_get_disc_info (BLURAY *bd) |
Get information about current BluRay disc. More... | |
const struct meta_dl * | bd_get_meta (BLURAY *bd) |
Get meta information about current BluRay disc. More... | |
int | bd_get_meta_file (BLURAY *bd, const char *file_name, void **data, int64_t *size) |
Read metadata file from BluRay disc. More... | |
uint32_t | bd_get_titles (BLURAY *bd, uint8_t flags, uint32_t min_title_length) |
Get number of titles (playlists) More... | |
int | bd_get_main_title (BLURAY *bd) |
Get main title Returned number is an index to the list created by bd_get_titles() More... | |
BLURAY_TITLE_INFO * | bd_get_title_info (BLURAY *bd, uint32_t title_idx, unsigned angle) |
Get information about a title. More... | |
void | bd_free_title_info (BLURAY_TITLE_INFO *title_info) |
Free BLURAY_TITLE_INFO object. More... | |
int | bd_select_title (BLURAY *bd, uint32_t title) |
Select the title from the list created by bd_get_titles() More... | |
int | bd_select_playlist (BLURAY *bd, uint32_t playlist) |
Select a playlist. More... | |
uint32_t | bd_get_current_title (BLURAY *bd) |
Returns the current title index. More... | |
int | bd_read (BLURAY *bd, unsigned char *buf, int len) |
Read from currently selected title file, decrypt if possible. More... | |
int64_t | bd_seek (BLURAY *bd, uint64_t pos) |
Seek to pos in currently selected title. More... | |
int64_t | bd_seek_time (BLURAY *bd, uint64_t tick) |
Seek to specific time in 90Khz ticks. More... | |
int64_t | bd_seek_chapter (BLURAY *bd, unsigned chapter) |
Seek to a chapter. More... | |
int64_t | bd_seek_mark (BLURAY *bd, unsigned mark) |
Seek to a playmark. More... | |
int64_t | bd_seek_playitem (BLURAY *bd, unsigned clip_ref) |
Seek to a playitem. More... | |
int | bd_select_angle (BLURAY *bd, unsigned angle) |
Set the angle to play. More... | |
void | bd_seamless_angle_change (BLURAY *bd, unsigned angle) |
Initiate seamless angle change. More... | |
void | bd_select_stream (BLURAY *bd, uint32_t stream_type, uint32_t stream_id, uint32_t enable_flag) |
Select stream (PG / TextST track) More... | |
int64_t | bd_chapter_pos (BLURAY *bd, unsigned chapter) |
Find the byte position of a chapter. More... | |
uint32_t | bd_get_current_chapter (BLURAY *bd) |
Get the current chapter. More... | |
uint64_t | bd_get_title_size (BLURAY *bd) |
Returns file size in bytes of currently selected title, 0 in no title selected. More... | |
unsigned | bd_get_current_angle (BLURAY *bd) |
Return the current angle. More... | |
uint64_t | bd_tell (BLURAY *bd) |
Return current pos. More... | |
uint64_t | bd_tell_time (BLURAY *bd) |
Return current time. More... | |
int | bd_set_player_setting (BLURAY *bd, uint32_t idx, uint32_t value) |
Update player setting. More... | |
int | bd_set_player_setting_str (BLURAY *bd, uint32_t idx, const char *value) |
Update player setting (string) More... | |
int | bd_get_event (BLURAY *bd, BD_EVENT *event) |
Get event from libbluray event queue. More... | |
const char * | bd_event_name (uint32_t event) |
Get name of event. More... | |
void | bd_register_overlay_proc (BLURAY *bd, void *handle, bd_overlay_proc_f func) |
Register handler for compressed YUV overlays. More... | |
void | bd_register_argb_overlay_proc (BLURAY *bd, void *handle, bd_argb_overlay_proc_f func, struct bd_argb_buffer_s *buf) |
Register handler for ARGB overlays. More... | |
int | bd_play (BLURAY *bd) |
Start playing disc with on-disc menus. More... | |
int | bd_play_title (BLURAY *bd, unsigned title) |
Play a title (from disc index). More... | |
int | bd_menu_call (BLURAY *bd, int64_t pts) |
Open BluRay disc Top Menu. More... | |
int | bd_read_ext (BLURAY *bd, unsigned char *buf, int len, BD_EVENT *event) |
Read from currently playing title. More... | |
int | bd_read_skip_still (BLURAY *bd) |
Continue reading after still mode clip. More... | |
BLURAY_TITLE_INFO * | bd_get_playlist_info (BLURAY *bd, uint32_t playlist, unsigned angle) |
Get information about a playlist. More... | |
int | bd_get_sound_effect (BLURAY *bd, unsigned sound_id, struct bd_sound_effect *effect) |
Get sound effect. More... | |
void | bd_set_scr (BLURAY *bd, int64_t pts) |
Update current pts. More... | |
int | bd_set_rate (BLURAY *bd, uint32_t rate) |
Set current playback rate. More... | |
int | bd_user_input (BLURAY *bd, int64_t pts, uint32_t key) |
Pass user input to graphics controller or BD-J. More... | |
int | bd_mouse_select (BLURAY *bd, int64_t pts, uint16_t x, uint16_t y) |
Select menu button at location (x,y). More... | |
struct clpi_cl * | bd_get_clpi (BLURAY *bd, unsigned clip_ref) |
Get copy of clip information for requested playitem. More... | |
struct clpi_cl * | bd_read_clpi (const char *clpi_file) |
Testing/debugging: Parse clip information (CLPI) file. | |
void | bd_free_clpi (struct clpi_cl *cl) |
Free CLPI_CL object. More... | |
struct mpls_pl * | bd_read_mpls (const char *mpls_file) |
Testing/debugging: Parse playlist (MPLS) file. | |
void | bd_free_mpls (struct mpls_pl *) |
Testing/debugging: Free parsed playlist. | |
struct mobj_objects * | bd_read_mobj (const char *mobj_file) |
Testing/debugging: Parse movie objects (MOBJ) file. | |
void | bd_free_mobj (struct mobj_objects *) |
Testing/debugging: Free parsed movie objects. | |
struct bdjo_data * | bd_read_bdjo (const char *bdjo_file) |
Testing/debugging: Parse BD-J object file (BDJO) | |
void | bd_free_bdjo (struct bdjo_data *) |
Testing/debugging: Free parsed BDJO object. | |
int | bd_start_bdj (BLURAY *bd, const char *start_object) |
Testing/debugging: start BD-J from the specified BD-J object (should be a 5 character string) | |
void | bd_stop_bdj (BLURAY *bd) |
Testing/debugging: shutdown BD-J and clean up resources. | |
int | bd_read_file (BLURAY *bd, const char *path, void **data, int64_t *size) |
Read a file from BluRay Virtual File System. More... | |
struct bd_dir_s * | bd_open_dir (BLURAY *bd, const char *dir) |
Open a directory from BluRay Virtual File System. More... | |
struct bd_file_s * | bd_open_file_dec (BLURAY *bd, const char *path) |
Open a file from BluRay Virtual File System. More... | |
libbluray API
typedef void(* bd_argb_overlay_proc_f) (void *handle, const struct bd_argb_overlay_s *const event) |
ARGB overlay handler function type.
handle | opaque handle that was given to bd_register_argb_overlay_proc() |
event | BD_ARGB_OVERLAY event |
typedef void(* bd_overlay_proc_f) (void *handle, const struct bd_overlay_s *const event) |
YUV overlay handler function type.
handle | opaque handle that was given to bd_register_overlay_proc() |
event | BD_OVERLAY event |
typedef struct bluray BLURAY |
This structure is opaque.
It represents a libbluray instance.
enum bd_event_e |
Event type.
Enumerator | |
---|---|
BD_EVENT_NONE | no pending events |
BD_EVENT_ERROR | Fatal error. Playback can't be continued. |
BD_EVENT_READ_ERROR | Reading of .m2ts aligned unit failed. Next call to read will try next block. |
BD_EVENT_ENCRYPTED | .m2ts file is encrypted and can't be played |
BD_EVENT_ANGLE | current angle, 1...N |
BD_EVENT_TITLE | current title, 1...N (0 = top menu) |
BD_EVENT_PLAYLIST | current playlist (xxxxx.mpls) |
BD_EVENT_PLAYITEM | current play item, 0...N-1 |
BD_EVENT_CHAPTER | current chapter, 1...N |
BD_EVENT_PLAYMARK | playmark reached |
BD_EVENT_END_OF_TITLE | end of title reached |
BD_EVENT_AUDIO_STREAM | 1..32, 0xff = none |
BD_EVENT_IG_STREAM | 1..32 |
BD_EVENT_PG_TEXTST_STREAM | 1..255, 0xfff = none |
BD_EVENT_PIP_PG_TEXTST_STREAM | 1..255, 0xfff = none |
BD_EVENT_SECONDARY_AUDIO_STREAM | 1..32, 0xff = none |
BD_EVENT_SECONDARY_VIDEO_STREAM | 1..32, 0xff = none |
BD_EVENT_PG_TEXTST | 0 - disable, 1 - enable |
BD_EVENT_PIP_PG_TEXTST | 0 - disable, 1 - enable |
BD_EVENT_SECONDARY_AUDIO | 0 - disable, 1 - enable |
BD_EVENT_SECONDARY_VIDEO | 0 - disable, 1 - enable |
BD_EVENT_SECONDARY_VIDEO_SIZE | 0 - PIP, 0xf - fullscreen |
BD_EVENT_PLAYLIST_STOP | HDMV VM or JVM stopped playlist playback. Flush all buffers. |
BD_EVENT_DISCONTINUITY | discontinuity in the stream (non-seamless connection). Reset demuxer PES buffers. new timestamp (45 kHz) |
BD_EVENT_SEEK | HDMV VM or JVM seeked the stream. Next read() will return data from new position. Flush all buffers. new media time (45 kHz) |
BD_EVENT_STILL | still playback (pause) 0 - off, 1 - on |
BD_EVENT_STILL_TIME | Still playback for n seconds (reached end of still mode play item). Playback continues by calling bd_read_skip_still(). 0 = infinite ; 1...300 = seconds |
BD_EVENT_SOUND_EFFECT | Play sound effect. effect ID |
BD_EVENT_IDLE | Nothing to do. Playlist is not playing, but title applet is running. Application should not call bd_read*() immediately again to avoid busy loop. |
BD_EVENT_POPUP | Pop-Up menu available. 0 - no, 1 - yes |
BD_EVENT_MENU | Interactive menu visible. 0 - no, 1 - yes |
BD_EVENT_STEREOSCOPIC_STATUS | 3D 0 - 2D, 1 - 3D |
BD_EVENT_KEY_INTEREST_TABLE | BD-J key interest table changed. bitmask, BLURAY_KIT_* |
BD_EVENT_UO_MASK_CHANGED | UO mask changed. bitmask, BLURAY_UO_* |
enum bd_mark_type_e |
enum bd_player_setting |
Player setting.
enum bd_still_mode_e |
enum bd_video_format_e |
Stream video format.
enum bd_video_rate_e |
int64_t bd_chapter_pos | ( | BLURAY * | bd, |
unsigned | chapter | ||
) |
Find the byte position of a chapter.
bd | BLURAY object |
chapter | chapter to find position of |
void bd_close | ( | BLURAY * | bd | ) |
Close BluRay disc.
bd | BLURAY object |
const char* bd_event_name | ( | uint32_t | event | ) |
void bd_free_clpi | ( | struct clpi_cl * | cl | ) |
Free CLPI_CL object.
cl | CLPI_CL objects |
void bd_free_title_info | ( | BLURAY_TITLE_INFO * | title_info | ) |
Free BLURAY_TITLE_INFO object.
title_info | BLURAY_TITLE_INFO object |
struct clpi_cl* bd_get_clpi | ( | BLURAY * | bd, |
unsigned | clip_ref | ||
) |
Get copy of clip information for requested playitem.
bd | BLURAY objects |
clip_ref | requested playitem number |
unsigned bd_get_current_angle | ( | BLURAY * | bd | ) |
Return the current angle.
bd | BLURAY object |
uint32_t bd_get_current_chapter | ( | BLURAY * | bd | ) |
Get the current chapter.
bd | BLURAY object |
uint32_t bd_get_current_title | ( | BLURAY * | bd | ) |
Returns the current title index.
bd | BLURAY object |
const BLURAY_DISC_INFO* bd_get_disc_info | ( | BLURAY * | bd | ) |
Get information about current BluRay disc.
bd | BLURAY object |
Get event from libbluray event queue.
bd | BLURAY object |
event | next BD_EVENT from event queue, NULL to initialize event queue |
int bd_get_main_title | ( | BLURAY * | bd | ) |
Get main title Returned number is an index to the list created by bd_get_titles()
bd | BLURAY object |
const struct meta_dl* bd_get_meta | ( | BLURAY * | bd | ) |
Get meta information about current BluRay disc.
Meta information is optional in BluRay discs. If information is provided in multiple languages, currently selected language (BLURAY_PLAYER_SETTING_MENU_LANG) is used.
Referenced thumbnail images should be read with bd_get_meta_file().
bd | BLURAY object |
int bd_get_meta_file | ( | BLURAY * | bd, |
const char * | file_name, | ||
void ** | data, | ||
int64_t * | size | ||
) |
Read metadata file from BluRay disc.
Allocate large enough memory block and read file contents. Caller must free the memory block with free().
bd | BLURAY object |
file_name | name of metadata file |
data | where to store pointer to file data |
size | where to store file size |
BLURAY_TITLE_INFO* bd_get_playlist_info | ( | BLURAY * | bd, |
uint32_t | playlist, | ||
unsigned | angle | ||
) |
Get information about a playlist.
bd | BLURAY object |
playlist | playlist number |
angle | angle number (chapter offsets and clip size depend on selected angle) |
int bd_get_sound_effect | ( | BLURAY * | bd, |
unsigned | sound_id, | ||
struct bd_sound_effect * | effect | ||
) |
Get sound effect.
bd | BLURAY object |
sound_id | sound effect id (0...N) |
effect | sound effect data |
BLURAY_TITLE_INFO* bd_get_title_info | ( | BLURAY * | bd, |
uint32_t | title_idx, | ||
unsigned | angle | ||
) |
Get information about a title.
bd | BLURAY object |
title_idx | title index number |
angle | angle number (chapter offsets and clip size depend on selected angle) |
uint64_t bd_get_title_size | ( | BLURAY * | bd | ) |
Returns file size in bytes of currently selected title, 0 in no title selected.
bd | BLURAY object |
uint32_t bd_get_titles | ( | BLURAY * | bd, |
uint8_t | flags, | ||
uint32_t | min_title_length | ||
) |
Get number of titles (playlists)
This must be called after bd_open() and before bd_select_title(). Populates the title list in BLURAY. Filtering of the returned list is controled through title flags
bd | BLURAY object |
flags | title flags |
min_title_length | filter out titles shorter than min_title_length seconds |
void bd_get_version | ( | int * | major, |
int * | minor, | ||
int * | micro | ||
) |
Get libbluray version.
Get the version of libbluray (runtime)
See also bluray-version.h
major | where to store major version |
minor | where to store minor version |
micro | where to store micro version |
BLURAY* bd_init | ( | void | ) |
Initialize BLURAY object.
Resulting object can be passed to following bd_open_??? functions.
int bd_menu_call | ( | BLURAY * | bd, |
int64_t | pts | ||
) |
Open BluRay disc Top Menu.
Current pts is needed for resuming playback when menu is closed.
bd | BLURAY object |
pts | current playback position (1/90000s) or -1 |
int bd_mouse_select | ( | BLURAY * | bd, |
int64_t | pts, | ||
uint16_t | x, | ||
uint16_t | y | ||
) |
Select menu button at location (x,y).
This function has no effect with BD-J menus.
bd | BLURAY object |
pts | current playback position (1/90000s) or -1 |
x | mouse pointer x-position |
y | mouse pointer y-position |
BLURAY* bd_open | ( | const char * | device_path, |
const char * | keyfile_path | ||
) |
Open BluRay disc.
Shortcut for bd_open_disc(bd_init(), device_path, keyfile_path)
device_path | path to mounted Blu-ray disc, device or image file |
keyfile_path | path to KEYDB.cfg (may be NULL) |
Open a directory from BluRay Virtual File System.
Caller must close with dir->close().
bd | BLURAY object |
dir | target directory (relative to disc root) |
int bd_open_disc | ( | BLURAY * | bd, |
const char * | device_path, | ||
const char * | keyfile_path | ||
) |
Open BluRay disc.
bd | BLURAY object |
device_path | path to mounted Blu-ray disc, device or image file |
keyfile_path | path to KEYDB.cfg (may be NULL) |
Open a file from BluRay Virtual File System.
encrypted streams are decrypted, and because of how decryption works, it can only seek to (N*6144) bytes, and read 6144 bytes at a time. DO NOT mix any play functionalities with these functions. It might cause broken stream. In general, accessing mutiple file on disk at the same time is a bad idea.
Caller must close with file->close().
bd | BLURAY object |
path | path to the file (relative to disc root) |
int bd_open_files | ( | BLURAY * | bd, |
void * | handle, | ||
struct bd_dir_s *(*)(void *handle, const char *rel_path) | open_dir, | ||
struct bd_file_s *(*)(void *handle, const char *rel_path) | open_file | ||
) |
Open BluRay disc.
bd | BLURAY object |
handle | opaque handle for open_dir and open_file |
open_dir | function used to open a directory |
open_file | function used to open a file |
int bd_open_stream | ( | BLURAY * | bd, |
void * | read_blocks_handle, | ||
int(*)(void *handle, void *buf, int lba, int num_blocks) | read_blocks | ||
) |
Open BluRay disc.
bd | BLURAY object |
read_blocks_handle | opaque handle for read_blocks |
read_blocks | function used to read disc blocks |
int bd_play | ( | BLURAY * | bd | ) |
Start playing disc with on-disc menus.
Playback is started from "First Play" title.
bd | BLURAY object |
int bd_play_title | ( | BLURAY * | bd, |
unsigned | title | ||
) |
Play a title (from disc index).
Title 0 = Top Menu Title 0xffff = First Play title Number of titles can be found from BLURAY_DISC_INFO.
bd | BLURAY object |
title | title number from disc index |
int bd_read | ( | BLURAY * | bd, |
unsigned char * | buf, | ||
int | len | ||
) |
Read from currently selected title file, decrypt if possible.
bd | BLURAY object |
buf | buffer to read data into |
len | size of data to be read |
Read from currently playing title.
When playing disc in navigation mode this function must be used instead of bd_read().
bd | BLURAY object |
buf | buffer to read data into |
len | size of data to be read |
event | next BD_EVENT from event queue (BD_EVENT_NONE if no events) |
int bd_read_file | ( | BLURAY * | bd, |
const char * | path, | ||
void ** | data, | ||
int64_t * | size | ||
) |
Read a file from BluRay Virtual File System.
Allocate large enough memory block and read file contents. Caller must free the memory block with free().
bd | BLURAY object |
path | path to the file (relative to disc root) |
data | where to store pointer to allocated data |
size | where to store file size |
int bd_read_skip_still | ( | BLURAY * | bd | ) |
Continue reading after still mode clip.
bd | BLURAY object |
void bd_register_argb_overlay_proc | ( | BLURAY * | bd, |
void * | handle, | ||
bd_argb_overlay_proc_f | func, | ||
struct bd_argb_buffer_s * | buf | ||
) |
Register handler for ARGB overlays.
ARGB overlays are used with BD-J (Java) menus.
Callback function can be called at any time by a thread created by Java VM. No more than single call for each overlay plane are executed in paraller.
bd | BLURAY object |
handle | application-specific handle that will be passed to handler function |
func | handler function pointer |
buf | optional application-allocated frame buffer |
void bd_register_overlay_proc | ( | BLURAY * | bd, |
void * | handle, | ||
bd_overlay_proc_f | func | ||
) |
Register handler for compressed YUV overlays.
Compressed YUV overlays are used with presentation graphics (subtitles) and HDMV mode menus. This function can be used when player does not support full-screen ARGB overlays or player can optimize drawing of compressed overlays, color space conversion etc.
Callback function is called from application thread context while bd_*() functions are called.
Note that BD-J mode outputs only ARGB graphics.
bd | BLURAY object |
handle | application-specific handle that will be passed to handler function |
func | handler function pointer |
void bd_seamless_angle_change | ( | BLURAY * | bd, |
unsigned | angle | ||
) |
Initiate seamless angle change.
bd | BLURAY object |
angle | angle to change to |
int64_t bd_seek | ( | BLURAY * | bd, |
uint64_t | pos | ||
) |
Seek to pos in currently selected title.
bd | BLURAY object |
pos | position to seek to |
int64_t bd_seek_chapter | ( | BLURAY * | bd, |
unsigned | chapter | ||
) |
Seek to a chapter.
First chapter is 0
bd | BLURAY object |
chapter | chapter to seek to |
int64_t bd_seek_mark | ( | BLURAY * | bd, |
unsigned | mark | ||
) |
Seek to a playmark.
First mark is 0
bd | BLURAY object |
mark | playmark to seek to |
int64_t bd_seek_playitem | ( | BLURAY * | bd, |
unsigned | clip_ref | ||
) |
Seek to a playitem.
bd | BLURAY object |
clip_ref | playitem to seek to |
int64_t bd_seek_time | ( | BLURAY * | bd, |
uint64_t | tick | ||
) |
Seek to specific time in 90Khz ticks.
bd | BLURAY ojbect |
tick | tick count |
int bd_select_angle | ( | BLURAY * | bd, |
unsigned | angle | ||
) |
Set the angle to play.
bd | BLURAY object |
angle | angle to play |
int bd_select_playlist | ( | BLURAY * | bd, |
uint32_t | playlist | ||
) |
Select a playlist.
bd | BLURAY object |
playlist | playlist to select |
void bd_select_stream | ( | BLURAY * | bd, |
uint32_t | stream_type, | ||
uint32_t | stream_id, | ||
uint32_t | enable_flag | ||
) |
Select stream (PG / TextST track)
When playing with on-disc menus:
Stream selection is controlled by on-disc menus. If user can change stream selection also in player GUI, this function should be used to keep on-disc menus in sync with player GUI.
When playing the disc without on-disc menus:
Initial stream selection is done using preferred language settings. This function can be used to override automatic stream selection. Without on-disc menus selecting the stream is useful only when using libbluray internal decoders or the stream is stored in a sub-path.
bd | BLURAY object |
stream_type | BLURAY_AUDIO_STREAM or BLURAY_PG_TEXTST_STREAM |
stream_id | stream number (1..N) |
enable_flag | set to 0 to disable streams of this type |
int bd_select_title | ( | BLURAY * | bd, |
uint32_t | title | ||
) |
Select the title from the list created by bd_get_titles()
bd | BLURAY object |
title | title to select |
int bd_set_player_setting | ( | BLURAY * | bd, |
uint32_t | idx, | ||
uint32_t | value | ||
) |
Update player setting.
Bit masks and enumeration values are defined in player_settings.h.
bd | BLURAY object |
idx | Player setting to update |
value | New value for player setting |
int bd_set_player_setting_str | ( | BLURAY * | bd, |
uint32_t | idx, | ||
const char * | value | ||
) |
Update player setting (string)
bd | BLURAY object |
idx | Player setting to update |
value | New value for player setting |
int bd_set_rate | ( | BLURAY * | bd, |
uint32_t | rate | ||
) |
Set current playback rate.
Notify BD-J media player when user changes playback rate (ex. pauses playback). Changing rate may fail if corresponding UO is masked or playlist is not playing.
bd | BLURAY object |
rate | current playback rate * 90000 (0 = paused, 90000 = normal) |
void bd_set_scr | ( | BLURAY * | bd, |
int64_t | pts | ||
) |
Update current pts.
bd | BLURAY object |
pts | current playback position (1/90000s) or -1 |
uint64_t bd_tell | ( | BLURAY * | bd | ) |
Return current pos.
bd | BLURAY object |
uint64_t bd_tell_time | ( | BLURAY * | bd | ) |
Return current time.
bd | BLURAY object |
int bd_user_input | ( | BLURAY * | bd, |
int64_t | pts, | ||
uint32_t | key | ||
) |
Pass user input to graphics controller or BD-J.
Keys are defined in libbluray/keys.h.
Two user input models are supported:
bd | BLURAY object |
pts | current playback position (1/90000s) or -1 |
key | input key ( |