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;
124 uint8_t initial_dynamic_range_type;
133 BLURAY_STREAM_TYPE_VIDEO_MPEG1 = 0x01,
134 BLURAY_STREAM_TYPE_VIDEO_MPEG2 = 0x02,
135 BLURAY_STREAM_TYPE_AUDIO_MPEG1 = 0x03,
136 BLURAY_STREAM_TYPE_AUDIO_MPEG2 = 0x04,
137 BLURAY_STREAM_TYPE_AUDIO_LPCM = 0x80,
138 BLURAY_STREAM_TYPE_AUDIO_AC3 = 0x81,
139 BLURAY_STREAM_TYPE_AUDIO_DTS = 0x82,
140 BLURAY_STREAM_TYPE_AUDIO_TRUHD = 0x83,
141 BLURAY_STREAM_TYPE_AUDIO_AC3PLUS = 0x84,
142 BLURAY_STREAM_TYPE_AUDIO_DTSHD = 0x85,
143 BLURAY_STREAM_TYPE_AUDIO_DTSHD_MASTER = 0x86,
144 BLURAY_STREAM_TYPE_VIDEO_VC1 = 0xea,
145 BLURAY_STREAM_TYPE_VIDEO_H264 = 0x1b,
146 BLURAY_STREAM_TYPE_VIDEO_HEVC = 0x24,
147 BLURAY_STREAM_TYPE_SUB_PG = 0x90,
148 BLURAY_STREAM_TYPE_SUB_IG = 0x91,
149 BLURAY_STREAM_TYPE_SUB_TEXT = 0x92,
150 BLURAY_STREAM_TYPE_AUDIO_AC3PLUS_SECONDARY = 0xa1,
151 BLURAY_STREAM_TYPE_AUDIO_DTSHD_SECONDARY = 0xa2
155 BLURAY_VIDEO_FORMAT_480I = 1,
156 BLURAY_VIDEO_FORMAT_576I = 2,
157 BLURAY_VIDEO_FORMAT_480P = 3,
158 BLURAY_VIDEO_FORMAT_1080I = 4,
159 BLURAY_VIDEO_FORMAT_720P = 5,
160 BLURAY_VIDEO_FORMAT_1080P = 6,
161 BLURAY_VIDEO_FORMAT_576P = 7,
162 BLURAY_VIDEO_FORMAT_2160P = 8,
166 BLURAY_VIDEO_RATE_24000_1001 = 1,
167 BLURAY_VIDEO_RATE_24 = 2,
168 BLURAY_VIDEO_RATE_25 = 3,
169 BLURAY_VIDEO_RATE_30000_1001 = 4,
170 BLURAY_VIDEO_RATE_50 = 6,
171 BLURAY_VIDEO_RATE_60000_1001 = 7
175 BLURAY_ASPECT_RATIO_4_3 = 2,
176 BLURAY_ASPECT_RATIO_16_9 = 3
180 BLURAY_AUDIO_FORMAT_MONO = 1,
181 BLURAY_AUDIO_FORMAT_STEREO = 3,
182 BLURAY_AUDIO_FORMAT_MULTI_CHAN = 6,
183 BLURAY_AUDIO_FORMAT_COMBO = 12
188 BLURAY_AUDIO_RATE_48 = 1,
189 BLURAY_AUDIO_RATE_96 = 4,
190 BLURAY_AUDIO_RATE_192 = 5,
191 BLURAY_AUDIO_RATE_192_COMBO = 12,
193 BLURAY_AUDIO_RATE_96_COMBO = 14
198 BLURAY_TEXT_CHAR_CODE_UTF8 = 0x01,
199 BLURAY_TEXT_CHAR_CODE_UTF16BE = 0x02,
200 BLURAY_TEXT_CHAR_CODE_SHIFT_JIS = 0x03,
201 BLURAY_TEXT_CHAR_CODE_EUC_KR = 0x04,
202 BLURAY_TEXT_CHAR_CODE_GB18030_20001 = 0x05,
203 BLURAY_TEXT_CHAR_CODE_CN_GB = 0x06,
204 BLURAY_TEXT_CHAR_CODE_BIG5 = 0x07
208 BLURAY_STILL_NONE = 0x00,
209 BLURAY_STILL_TIME = 0x01,
210 BLURAY_STILL_INFINITE = 0x02,
214 BLURAY_MARK_ENTRY = 0x01,
215 BLURAY_MARK_LINK = 0x02,
219 BLURAY_DYNAMIC_RANGE_SDR = 0,
220 BLURAY_DYNAMIC_RANGE_HDR10 = 1,
221 BLURAY_DYNAMIC_RANGE_DOLBY_VISION = 2
222 } bd_dynamic_range_type_e;
239 uint8_t video_stream_count;
240 uint8_t audio_stream_count;
241 uint8_t pg_stream_count;
242 uint8_t ig_stream_count;
243 uint8_t sec_audio_stream_count;
244 uint8_t sec_video_stream_count;
281 uint32_t chapter_count;
287 uint8_t mvc_base_view_r_flag;
295 uint8_t num_channels;
297 const int16_t *samples;
320 BLURAY *
bd_open(
const char *device_path,
const char *keyfile_path);
339 int bd_open_disc(BLURAY *bd,
const char *device_path,
const char *keyfile_path);
350 void *read_blocks_handle,
351 int (*read_blocks)(
void *handle,
void *buf,
int lba,
int num_blocks));
364 int bd_open_files(BLURAY *bd,
366 struct bd_dir_s *(*open_dir)(
void *handle,
const char *rel_path),
367 struct bd_file_s *(*open_file)(
void *handle,
const char *rel_path));
399 const struct meta_dl *bd_get_meta(BLURAY *bd);
434 uint32_t
bd_get_titles(BLURAY *bd, uint8_t flags, uint32_t min_title_length);
503 int bd_read(BLURAY *bd,
unsigned char *buf,
int len);
600 #define BLURAY_AUDIO_STREAM 0
601 #define BLURAY_PG_TEXTST_STREAM 1
603 void bd_select_stream(BLURAY *bd, uint32_t stream_type, uint32_t stream_id, uint32_t enable_flag);
673 BLURAY_PLAYER_SETTING_AUDIO_LANG = 16,
674 BLURAY_PLAYER_SETTING_PG_LANG = 17,
675 BLURAY_PLAYER_SETTING_MENU_LANG = 18,
676 BLURAY_PLAYER_SETTING_COUNTRY_CODE = 19,
677 BLURAY_PLAYER_SETTING_REGION_CODE = 20,
678 BLURAY_PLAYER_SETTING_OUTPUT_PREFER = 21,
679 BLURAY_PLAYER_SETTING_PARENTAL = 13,
680 BLURAY_PLAYER_SETTING_AUDIO_CAP = 15,
681 BLURAY_PLAYER_SETTING_VIDEO_CAP = 29,
682 BLURAY_PLAYER_SETTING_DISPLAY_CAP = 23,
683 BLURAY_PLAYER_SETTING_3D_CAP = 24,
684 BLURAY_PLAYER_SETTING_UHD_CAP = 25,
685 BLURAY_PLAYER_SETTING_UHD_DISPLAY_CAP = 26,
686 BLURAY_PLAYER_SETTING_HDR_PREFERENCE = 27,
687 BLURAY_PLAYER_SETTING_SDR_CONV_PREFER = 28,
688 BLURAY_PLAYER_SETTING_TEXT_CAP = 30,
689 BLURAY_PLAYER_SETTING_PLAYER_PROFILE = 31,
691 BLURAY_PLAYER_SETTING_DECODE_PG = 0x100,
692 BLURAY_PLAYER_SETTING_PERSISTENT_STORAGE = 0x101,
694 BLURAY_PLAYER_PERSISTENT_ROOT = 0x200,
695 BLURAY_PLAYER_CACHE_ROOT = 0x201,
696 BLURAY_PLAYER_JAVA_HOME = 0x202,
712 int bd_set_player_setting_str(BLURAY *bd, uint32_t idx,
const char *value);
728 BD_EVENT_READ_ERROR = 2,
729 BD_EVENT_ENCRYPTED = 3,
737 BD_EVENT_PLAYLIST = 6,
738 BD_EVENT_PLAYITEM = 7,
739 BD_EVENT_CHAPTER = 8,
740 BD_EVENT_PLAYMARK = 9,
741 BD_EVENT_END_OF_TITLE = 10,
747 BD_EVENT_AUDIO_STREAM = 11,
748 BD_EVENT_IG_STREAM = 12,
749 BD_EVENT_PG_TEXTST_STREAM = 13,
750 BD_EVENT_PIP_PG_TEXTST_STREAM = 14,
751 BD_EVENT_SECONDARY_AUDIO_STREAM = 15,
752 BD_EVENT_SECONDARY_VIDEO_STREAM = 16,
754 BD_EVENT_PG_TEXTST = 17,
755 BD_EVENT_PIP_PG_TEXTST = 18,
756 BD_EVENT_SECONDARY_AUDIO = 19,
757 BD_EVENT_SECONDARY_VIDEO = 20,
758 BD_EVENT_SECONDARY_VIDEO_SIZE = 21,
765 BD_EVENT_PLAYLIST_STOP = 22,
768 BD_EVENT_DISCONTINUITY = 23,
778 BD_EVENT_STILL_TIME = 26,
781 BD_EVENT_SOUND_EFFECT = 27,
798 BD_EVENT_STEREOSCOPIC_STATUS = 31,
801 BD_EVENT_KEY_INTEREST_TABLE = 32,
804 BD_EVENT_UO_MASK_CHANGED = 33,
816 #define BD_ERROR_HDMV 1
817 #define BD_ERROR_BDJ 2
820 #define BD_ERROR_AACS 3
821 #define BD_ERROR_BDPLUS 4
824 #define BLURAY_TITLE_FIRST_PLAY 0xffff
825 #define BLURAY_TITLE_TOP_MENU 0
828 #define BLURAY_KIT_PLAY 0x1
829 #define BLURAY_KIT_STOP 0x2
830 #define BLURAY_KIT_FFW 0x4
831 #define BLURAY_KIT_REW 0x8
832 #define BLURAY_KIT_TRACK_NEXT 0x10
833 #define BLURAY_KIT_TRACK_PREV 0x20
834 #define BLURAY_KIT_PAUSE 0x40
835 #define BLURAY_KIT_STILL_OFF 0x80
836 #define BLURAY_KIT_SEC_AUDIO 0x100
837 #define BLURAY_KIT_SEC_VIDEO 0x200
838 #define BLURAY_KIT_PG_TEXTST 0x400
841 #define BLURAY_UO_MENU_CALL 0x1
842 #define BLURAY_UO_TITLE_SEARCH 0x2
854 const char *bd_event_name(uint32_t event);
861 struct bd_argb_overlay_s;
862 struct bd_argb_buffer_s;
863 typedef void (*bd_overlay_proc_f)(
void *,
const struct bd_overlay_s *
const);
864 typedef void (*bd_argb_overlay_proc_f)(
void *,
const struct bd_argb_overlay_s *
const);
1018 #define BLURAY_RATE_PAUSED 0
1019 #define BLURAY_RATE_NORMAL 90000
1020 int bd_set_rate(BLURAY *bd, uint32_t rate);
1070 struct clpi_cl *bd_read_clpi(
const char *clpi_file);
1082 struct mpls_pl *bd_read_mpls(
const char *mpls_file);
1083 void bd_free_mpls(
struct mpls_pl *);
1085 struct mobj_objects;
1086 struct mobj_objects *bd_read_mobj(
const char *mobj_file);
1087 void bd_free_mobj(
struct mobj_objects *);
1090 struct bdjo_data *bd_read_bdjo(
const char *bdjo_file);
1091 void bd_free_bdjo(
struct bdjo_data *);
1095 int bd_start_bdj(BLURAY *bd,
const char* start_object);
1096 void bd_stop_bdj(BLURAY *bd);
1131 struct bd_file_s *bd_open_file_dec(BLURAY *,
const char *path);
int64_t bd_chapter_pos(BLURAY *bd, unsigned chapter)
void bd_set_scr(BLURAY *bd, int64_t pts)
int64_t bd_seek_mark(BLURAY *bd, unsigned mark)
const BLURAY_DISC_INFO * bd_get_disc_info(BLURAY *bd)
int bd_read_file(BLURAY *, const char *path, void **data, int64_t *size)
BLURAY_TITLE_INFO * bd_get_title_info(BLURAY *bd, uint32_t title_idx, unsigned angle)
uint64_t bd_get_title_size(BLURAY *bd)
struct bd_dir_s * bd_open_dir(BLURAY *, const char *dir)
int64_t bd_seek_playitem(BLURAY *bd, unsigned clip_ref)
int64_t bd_seek_time(BLURAY *bd, uint64_t tick)
uint32_t bd_get_current_title(BLURAY *bd)
void bd_free_clpi(struct clpi_cl *cl)
int bd_get_event(BLURAY *bd, BD_EVENT *event)
int bd_read_skip_still(BLURAY *bd)
void bd_free_title_info(BLURAY_TITLE_INFO *title_info)
BLURAY_TITLE_INFO * bd_get_playlist_info(BLURAY *bd, uint32_t playlist, unsigned angle)
int bd_get_main_title(BLURAY *bd)
BLURAY * bd_open(const char *device_path, const char *keyfile_path)
int bd_read_ext(BLURAY *bd, unsigned char *buf, int len, BD_EVENT *event)
int bd_read(BLURAY *bd, unsigned char *buf, int len)
struct clpi_cl * bd_get_clpi(BLURAY *bd, unsigned clip_ref)
uint32_t bd_get_titles(BLURAY *bd, uint8_t flags, uint32_t min_title_length)
unsigned bd_get_current_angle(BLURAY *bd)
void bd_close(BLURAY *bd)
void bd_seamless_angle_change(BLURAY *bd, unsigned angle)
int bd_select_angle(BLURAY *bd, unsigned angle)
int bd_set_player_setting(BLURAY *bd, uint32_t idx, uint32_t value)
int64_t bd_seek_chapter(BLURAY *bd, unsigned chapter)
int bd_open_disc(BLURAY *bd, const char *device_path, const char *keyfile_path)
uint32_t bd_get_current_chapter(BLURAY *bd)
void bd_register_overlay_proc(BLURAY *bd, void *handle, bd_overlay_proc_f func)
int bd_select_title(BLURAY *bd, uint32_t title)
uint64_t bd_tell(BLURAY *bd)
int bd_get_meta_file(BLURAY *bd, const char *file_name, void **data, int64_t *size)
int64_t bd_seek(BLURAY *bd, uint64_t pos)
void bd_get_version(int *major, int *minor, int *micro)
int bd_user_input(BLURAY *bd, int64_t pts, uint32_t key)
int bd_select_playlist(BLURAY *bd, uint32_t playlist)
int bd_open_stream(BLURAY *bd, void *read_blocks_handle, int(*read_blocks)(void *handle, void *buf, int lba, int num_blocks))
void bd_register_argb_overlay_proc(BLURAY *bd, void *handle, bd_argb_overlay_proc_f func, struct bd_argb_buffer_s *buf)
uint64_t bd_tell_time(BLURAY *bd)
int bd_menu_call(BLURAY *bd, int64_t pts)
int bd_play_title(BLURAY *bd, unsigned title)
int bd_mouse_select(BLURAY *bd, int64_t pts, uint16_t x, uint16_t y)
int bd_get_sound_effect(BLURAY *bd, unsigned sound_id, struct bd_sound_effect *effect)