37 #define TITLES_FILTER_DUP_TITLE 0x01 38 #define TITLES_FILTER_DUP_CLIP 0x02 40 #define TITLES_RELEVANT \ 41 (TITLES_FILTER_DUP_TITLE | TITLES_FILTER_DUP_CLIP) 44 typedef struct bluray BLURAY; 51 #define BD_AACS_CORRUPTED_DISC -1 52 #define BD_AACS_NO_CONFIG -2 53 #define BD_AACS_NO_PK -3 54 #define BD_AACS_NO_CERT -4 55 #define BD_AACS_CERT_REVOKED -5 56 #define BD_AACS_MMC_FAILED -6 70 uint8_t bluray_detected;
73 const char *disc_name;
74 const char *udf_volume_id;
78 uint8_t no_menu_support;
79 uint8_t first_play_supported;
80 uint8_t top_menu_supported;
87 uint32_t num_hdmv_titles;
88 uint32_t num_bdj_titles;
89 uint32_t num_unsupported_titles;
93 uint8_t bdj_supported;
94 uint8_t libjvm_detected;
101 uint8_t video_format;
103 uint8_t content_exist_3D;
104 uint8_t initial_output_mode_preference;
105 uint8_t provider_data[32];
108 uint8_t aacs_detected;
109 uint8_t libaacs_detected;
110 uint8_t aacs_handled;
116 uint8_t bdplus_detected;
117 uint8_t libbdplus_detected;
118 uint8_t bdplus_handled;
121 uint32_t bdplus_date;
130 BLURAY_STREAM_TYPE_VIDEO_MPEG1 = 0x01,
131 BLURAY_STREAM_TYPE_VIDEO_MPEG2 = 0x02,
132 BLURAY_STREAM_TYPE_AUDIO_MPEG1 = 0x03,
133 BLURAY_STREAM_TYPE_AUDIO_MPEG2 = 0x04,
134 BLURAY_STREAM_TYPE_AUDIO_LPCM = 0x80,
135 BLURAY_STREAM_TYPE_AUDIO_AC3 = 0x81,
136 BLURAY_STREAM_TYPE_AUDIO_DTS = 0x82,
137 BLURAY_STREAM_TYPE_AUDIO_TRUHD = 0x83,
138 BLURAY_STREAM_TYPE_AUDIO_AC3PLUS = 0x84,
139 BLURAY_STREAM_TYPE_AUDIO_DTSHD = 0x85,
140 BLURAY_STREAM_TYPE_AUDIO_DTSHD_MASTER = 0x86,
141 BLURAY_STREAM_TYPE_VIDEO_VC1 = 0xea,
142 BLURAY_STREAM_TYPE_VIDEO_H264 = 0x1b,
143 BLURAY_STREAM_TYPE_VIDEO_HEVC = 0x24,
144 BLURAY_STREAM_TYPE_SUB_PG = 0x90,
145 BLURAY_STREAM_TYPE_SUB_IG = 0x91,
146 BLURAY_STREAM_TYPE_SUB_TEXT = 0x92,
147 BLURAY_STREAM_TYPE_AUDIO_AC3PLUS_SECONDARY = 0xa1,
148 BLURAY_STREAM_TYPE_AUDIO_DTSHD_SECONDARY = 0xa2
152 BLURAY_VIDEO_FORMAT_480I = 1,
153 BLURAY_VIDEO_FORMAT_576I = 2,
154 BLURAY_VIDEO_FORMAT_480P = 3,
155 BLURAY_VIDEO_FORMAT_1080I = 4,
156 BLURAY_VIDEO_FORMAT_720P = 5,
157 BLURAY_VIDEO_FORMAT_1080P = 6,
158 BLURAY_VIDEO_FORMAT_576P = 7,
159 BLURAY_VIDEO_FORMAT_2160P = 8,
163 BLURAY_VIDEO_RATE_24000_1001 = 1,
164 BLURAY_VIDEO_RATE_24 = 2,
165 BLURAY_VIDEO_RATE_25 = 3,
166 BLURAY_VIDEO_RATE_30000_1001 = 4,
167 BLURAY_VIDEO_RATE_50 = 6,
168 BLURAY_VIDEO_RATE_60000_1001 = 7
172 BLURAY_ASPECT_RATIO_4_3 = 2,
173 BLURAY_ASPECT_RATIO_16_9 = 3
177 BLURAY_AUDIO_FORMAT_MONO = 1,
178 BLURAY_AUDIO_FORMAT_STEREO = 3,
179 BLURAY_AUDIO_FORMAT_MULTI_CHAN = 6,
180 BLURAY_AUDIO_FORMAT_COMBO = 12
185 BLURAY_AUDIO_RATE_48 = 1,
186 BLURAY_AUDIO_RATE_96 = 4,
187 BLURAY_AUDIO_RATE_192 = 5,
188 BLURAY_AUDIO_RATE_192_COMBO = 12,
190 BLURAY_AUDIO_RATE_96_COMBO = 14
195 BLURAY_TEXT_CHAR_CODE_UTF8 = 0x01,
196 BLURAY_TEXT_CHAR_CODE_UTF16BE = 0x02,
197 BLURAY_TEXT_CHAR_CODE_SHIFT_JIS = 0x03,
198 BLURAY_TEXT_CHAR_CODE_EUC_KR = 0x04,
199 BLURAY_TEXT_CHAR_CODE_GB18030_20001 = 0x05,
200 BLURAY_TEXT_CHAR_CODE_CN_GB = 0x06,
201 BLURAY_TEXT_CHAR_CODE_BIG5 = 0x07
205 BLURAY_STILL_NONE = 0x00,
206 BLURAY_STILL_TIME = 0x01,
207 BLURAY_STILL_INFINITE = 0x02,
211 BLURAY_MARK_ENTRY = 0x01,
212 BLURAY_MARK_LINK = 0x02,
230 uint8_t video_stream_count;
231 uint8_t audio_stream_count;
232 uint8_t pg_stream_count;
233 uint8_t ig_stream_count;
234 uint8_t sec_audio_stream_count;
235 uint8_t sec_video_stream_count;
272 uint32_t chapter_count;
278 uint8_t mvc_base_view_r_flag;
286 uint8_t num_channels;
288 const int16_t *samples;
311 BLURAY *
bd_open(
const char *device_path,
const char *keyfile_path);
330 int bd_open_disc(BLURAY *bd,
const char *device_path,
const char *keyfile_path);
341 void *read_blocks_handle,
342 int (*read_blocks)(
void *handle,
void *buf,
int lba,
int num_blocks));
355 int bd_open_files(BLURAY *bd,
357 struct bd_dir_s *(*open_dir)(
void *handle,
const char *rel_path),
358 struct bd_file_s *(*open_file)(
void *handle,
const char *rel_path));
390 const struct meta_dl *bd_get_meta(BLURAY *bd);
405 int bd_get_meta_file(BLURAY *bd,
const char *file_name,
void **data, int64_t *size);
425 uint32_t
bd_get_titles(BLURAY *bd, uint8_t flags, uint32_t min_title_length);
494 int bd_read(BLURAY *bd,
unsigned char *buf,
int len);
508 int64_t
bd_seek(BLURAY *bd, uint64_t pos);
591 #define BLURAY_AUDIO_STREAM 0 592 #define BLURAY_PG_TEXTST_STREAM 1 594 void bd_select_stream(BLURAY *bd, uint32_t stream_type, uint32_t stream_id, uint32_t enable_flag);
664 BLURAY_PLAYER_SETTING_AUDIO_LANG = 16,
665 BLURAY_PLAYER_SETTING_PG_LANG = 17,
666 BLURAY_PLAYER_SETTING_MENU_LANG = 18,
667 BLURAY_PLAYER_SETTING_COUNTRY_CODE = 19,
668 BLURAY_PLAYER_SETTING_REGION_CODE = 20,
669 BLURAY_PLAYER_SETTING_OUTPUT_PREFER = 21,
670 BLURAY_PLAYER_SETTING_PARENTAL = 13,
671 BLURAY_PLAYER_SETTING_AUDIO_CAP = 15,
672 BLURAY_PLAYER_SETTING_VIDEO_CAP = 29,
673 BLURAY_PLAYER_SETTING_DISPLAY_CAP = 23,
674 BLURAY_PLAYER_SETTING_3D_CAP = 24,
675 BLURAY_PLAYER_SETTING_UHD_CAP = 25,
676 BLURAY_PLAYER_SETTING_UHD_DISPLAY_CAP = 26,
677 BLURAY_PLAYER_SETTING_HDR_PREFERENCE = 27,
678 BLURAY_PLAYER_SETTING_SDR_CONV_PREFER = 28,
679 BLURAY_PLAYER_SETTING_TEXT_CAP = 30,
680 BLURAY_PLAYER_SETTING_PLAYER_PROFILE = 31,
682 BLURAY_PLAYER_SETTING_DECODE_PG = 0x100,
683 BLURAY_PLAYER_SETTING_PERSISTENT_STORAGE = 0x101,
685 BLURAY_PLAYER_PERSISTENT_ROOT = 0x200,
686 BLURAY_PLAYER_CACHE_ROOT = 0x201,
702 int bd_set_player_setting_str(BLURAY *bd, uint32_t idx,
const char *value);
718 BD_EVENT_READ_ERROR = 2,
719 BD_EVENT_ENCRYPTED = 3,
727 BD_EVENT_PLAYLIST = 6,
728 BD_EVENT_PLAYITEM = 7,
729 BD_EVENT_CHAPTER = 8,
730 BD_EVENT_PLAYMARK = 9,
731 BD_EVENT_END_OF_TITLE = 10,
737 BD_EVENT_AUDIO_STREAM = 11,
738 BD_EVENT_IG_STREAM = 12,
739 BD_EVENT_PG_TEXTST_STREAM = 13,
740 BD_EVENT_PIP_PG_TEXTST_STREAM = 14,
741 BD_EVENT_SECONDARY_AUDIO_STREAM = 15,
742 BD_EVENT_SECONDARY_VIDEO_STREAM = 16,
744 BD_EVENT_PG_TEXTST = 17,
745 BD_EVENT_PIP_PG_TEXTST = 18,
746 BD_EVENT_SECONDARY_AUDIO = 19,
747 BD_EVENT_SECONDARY_VIDEO = 20,
748 BD_EVENT_SECONDARY_VIDEO_SIZE = 21,
755 BD_EVENT_PLAYLIST_STOP = 22,
758 BD_EVENT_DISCONTINUITY = 23,
768 BD_EVENT_STILL_TIME = 26,
771 BD_EVENT_SOUND_EFFECT = 27,
788 BD_EVENT_STEREOSCOPIC_STATUS = 31,
791 BD_EVENT_KEY_INTEREST_TABLE = 32,
794 BD_EVENT_UO_MASK_CHANGED = 33,
806 #define BD_ERROR_HDMV 1 807 #define BD_ERROR_BDJ 2 810 #define BD_ERROR_AACS 3 811 #define BD_ERROR_BDPLUS 4 814 #define BLURAY_TITLE_FIRST_PLAY 0xffff 815 #define BLURAY_TITLE_TOP_MENU 0 818 #define BLURAY_KIT_PLAY 0x1 819 #define BLURAY_KIT_STOP 0x2 820 #define BLURAY_KIT_FFW 0x4 821 #define BLURAY_KIT_REW 0x8 822 #define BLURAY_KIT_TRACK_NEXT 0x10 823 #define BLURAY_KIT_TRACK_PREV 0x20 824 #define BLURAY_KIT_PAUSE 0x40 825 #define BLURAY_KIT_STILL_OFF 0x80 826 #define BLURAY_KIT_SEC_AUDIO 0x100 827 #define BLURAY_KIT_SEC_VIDEO 0x200 828 #define BLURAY_KIT_PG_TEXTST 0x400 831 #define BLURAY_UO_MENU_CALL 0x1 832 #define BLURAY_UO_TITLE_SEARCH 0x2 850 struct bd_argb_overlay_s;
851 struct bd_argb_buffer_s;
852 typedef void (*bd_overlay_proc_f)(
void *,
const struct bd_overlay_s *
const);
853 typedef void (*bd_argb_overlay_proc_f)(
void *,
const struct bd_argb_overlay_s *
const);
1007 #define BLURAY_RATE_PAUSED 0 1008 #define BLURAY_RATE_NORMAL 90000 1009 int bd_set_rate(BLURAY *bd, uint32_t rate);
1053 struct clpi_cl *
bd_get_clpi(BLURAY *bd,
unsigned clip_ref);
1054 struct clpi_cl *bd_read_clpi(
const char *clpi_file);
1066 struct mpls_pl *bd_read_mpls(
const char *mpls_file);
1067 void bd_free_mpls(
struct mpls_pl *);
1069 struct mobj_objects;
1070 struct mobj_objects *bd_read_mobj(
const char *mobj_file);
1071 void bd_free_mobj(
struct mobj_objects *);
1074 struct bdjo_data *bd_read_bdjo(
const char *bdjo_file);
1075 void bd_free_bdjo(
struct bdjo_data *);
1079 int bd_start_bdj(BLURAY *bd,
const char* start_object);
1080 void bd_stop_bdj(BLURAY *bd);
1095 int bd_read_file(BLURAY *,
const char *path,
void **data, int64_t *size);
uint32_t bd_get_current_chapter(BLURAY *bd)
void bd_set_scr(BLURAY *bd, int64_t pts)
void bd_register_overlay_proc(BLURAY *bd, void *handle, bd_overlay_proc_f func)
int bd_user_input(BLURAY *bd, int64_t pts, uint32_t key)
int64_t bd_chapter_pos(BLURAY *bd, unsigned chapter)
int bd_read_ext(BLURAY *bd, unsigned char *buf, int len, BD_EVENT *event)
BLURAY * bd_open(const char *device_path, const char *keyfile_path)
int bd_select_title(BLURAY *bd, uint32_t title)
int bd_get_main_title(BLURAY *bd)
int64_t bd_seek_mark(BLURAY *bd, unsigned mark)
unsigned bd_get_current_angle(BLURAY *bd)
uint32_t bd_get_current_title(BLURAY *bd)
void bd_register_argb_overlay_proc(BLURAY *bd, void *handle, bd_argb_overlay_proc_f func, struct bd_argb_buffer_s *buf)
int bd_play_title(BLURAY *bd, unsigned title)
int bd_open_disc(BLURAY *bd, const char *device_path, const char *keyfile_path)
int bd_select_angle(BLURAY *bd, unsigned angle)
void bd_close(BLURAY *bd)
uint64_t bd_get_title_size(BLURAY *bd)
int bd_get_meta_file(BLURAY *bd, const char *file_name, void **data, int64_t *size)
struct clpi_cl * bd_get_clpi(BLURAY *bd, unsigned clip_ref)
int bd_set_player_setting(BLURAY *bd, uint32_t idx, uint32_t value)
int bd_menu_call(BLURAY *bd, int64_t pts)
int bd_open_stream(BLURAY *bd, void *read_blocks_handle, int(*read_blocks)(void *handle, void *buf, int lba, int num_blocks))
const BLURAY_DISC_INFO * bd_get_disc_info(BLURAY *bd)
BLURAY_TITLE_INFO * bd_get_title_info(BLURAY *bd, uint32_t title_idx, unsigned angle)
uint64_t bd_tell(BLURAY *bd)
int bd_read_skip_still(BLURAY *bd)
int bd_read(BLURAY *bd, unsigned char *buf, int len)
int64_t bd_seek_playitem(BLURAY *bd, unsigned clip_ref)
uint32_t bd_get_titles(BLURAY *bd, uint8_t flags, uint32_t min_title_length)
BLURAY_TITLE_INFO * bd_get_playlist_info(BLURAY *bd, uint32_t playlist, unsigned angle)
int bd_read_file(BLURAY *, const char *path, void **data, int64_t *size)
uint64_t bd_tell_time(BLURAY *bd)
void bd_seamless_angle_change(BLURAY *bd, unsigned angle)
int bd_get_sound_effect(BLURAY *bd, unsigned sound_id, struct bd_sound_effect *effect)
int64_t bd_seek(BLURAY *bd, uint64_t pos)
void bd_get_version(int *major, int *minor, int *micro)
int bd_select_playlist(BLURAY *bd, uint32_t playlist)
int bd_get_event(BLURAY *bd, BD_EVENT *event)
void bd_free_title_info(BLURAY_TITLE_INFO *title_info)
void bd_free_clpi(struct clpi_cl *cl)
int bd_mouse_select(BLURAY *bd, int64_t pts, uint16_t x, uint16_t y)
int64_t bd_seek_chapter(BLURAY *bd, unsigned chapter)
int64_t bd_seek_time(BLURAY *bd, uint64_t tick)