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;
72 uint8_t first_play_supported;
73 uint8_t top_menu_supported;
75 uint32_t num_hdmv_titles;
76 uint32_t num_bdj_titles;
77 uint32_t num_unsupported_titles;
79 uint8_t aacs_detected;
80 uint8_t libaacs_detected;
83 uint8_t bdplus_detected;
84 uint8_t libbdplus_detected;
85 uint8_t bdplus_handled;
96 uint8_t bdj_supported;
97 uint8_t libjvm_detected;
103 uint32_t bdplus_date;
106 uint8_t video_format;
108 uint8_t content_exist_3D;
109 uint8_t initial_output_mode_preference;
110 uint8_t provider_data[32];
119 char bdj_disc_id[33];
128 BLURAY_STREAM_TYPE_VIDEO_MPEG1 = 0x01,
129 BLURAY_STREAM_TYPE_VIDEO_MPEG2 = 0x02,
130 BLURAY_STREAM_TYPE_AUDIO_MPEG1 = 0x03,
131 BLURAY_STREAM_TYPE_AUDIO_MPEG2 = 0x04,
132 BLURAY_STREAM_TYPE_AUDIO_LPCM = 0x80,
133 BLURAY_STREAM_TYPE_AUDIO_AC3 = 0x81,
134 BLURAY_STREAM_TYPE_AUDIO_DTS = 0x82,
135 BLURAY_STREAM_TYPE_AUDIO_TRUHD = 0x83,
136 BLURAY_STREAM_TYPE_AUDIO_AC3PLUS = 0x84,
137 BLURAY_STREAM_TYPE_AUDIO_DTSHD = 0x85,
138 BLURAY_STREAM_TYPE_AUDIO_DTSHD_MASTER = 0x86,
139 BLURAY_STREAM_TYPE_VIDEO_VC1 = 0xea,
140 BLURAY_STREAM_TYPE_VIDEO_H264 = 0x1b,
141 BLURAY_STREAM_TYPE_SUB_PG = 0x90,
142 BLURAY_STREAM_TYPE_SUB_IG = 0x91,
143 BLURAY_STREAM_TYPE_SUB_TEXT = 0x92,
144 BLURAY_STREAM_TYPE_AUDIO_AC3PLUS_SECONDARY = 0xa1,
145 BLURAY_STREAM_TYPE_AUDIO_DTSHD_SECONDARY = 0xa2
149 BLURAY_VIDEO_FORMAT_480I = 1,
150 BLURAY_VIDEO_FORMAT_576I = 2,
151 BLURAY_VIDEO_FORMAT_480P = 3,
152 BLURAY_VIDEO_FORMAT_1080I = 4,
153 BLURAY_VIDEO_FORMAT_720P = 5,
154 BLURAY_VIDEO_FORMAT_1080P = 6,
155 BLURAY_VIDEO_FORMAT_576P = 7
159 BLURAY_VIDEO_RATE_24000_1001 = 1,
160 BLURAY_VIDEO_RATE_24 = 2,
161 BLURAY_VIDEO_RATE_25 = 3,
162 BLURAY_VIDEO_RATE_30000_1001 = 4,
163 BLURAY_VIDEO_RATE_50 = 6,
164 BLURAY_VIDEO_RATE_60000_1001 = 7
168 BLURAY_ASPECT_RATIO_4_3 = 2,
169 BLURAY_ASPECT_RATIO_16_9 = 3
173 BLURAY_AUDIO_FORMAT_MONO = 1,
174 BLURAY_AUDIO_FORMAT_STEREO = 3,
175 BLURAY_AUDIO_FORMAT_MULTI_CHAN = 6,
176 BLURAY_AUDIO_FORMAT_COMBO = 12
181 BLURAY_AUDIO_RATE_48 = 1,
182 BLURAY_AUDIO_RATE_96 = 4,
183 BLURAY_AUDIO_RATE_192 = 5,
184 BLURAY_AUDIO_RATE_192_COMBO = 12,
186 BLURAY_AUDIO_RATE_96_COMBO = 14
191 BLURAY_TEXT_CHAR_CODE_UTF8 = 0x01,
192 BLURAY_TEXT_CHAR_CODE_UTF16BE = 0x02,
193 BLURAY_TEXT_CHAR_CODE_SHIFT_JIS = 0x03,
194 BLURAY_TEXT_CHAR_CODE_EUC_KR = 0x04,
195 BLURAY_TEXT_CHAR_CODE_GB18030_20001 = 0x05,
196 BLURAY_TEXT_CHAR_CODE_CN_GB = 0x06,
197 BLURAY_TEXT_CHAR_CODE_BIG5 = 0x07
201 BLURAY_STILL_NONE = 0x00,
202 BLURAY_STILL_TIME = 0x01,
203 BLURAY_STILL_INFINITE = 0x02,
221 uint8_t video_stream_count;
222 uint8_t audio_stream_count;
223 uint8_t pg_stream_count;
224 uint8_t ig_stream_count;
225 uint8_t sec_audio_stream_count;
226 uint8_t sec_video_stream_count;
262 uint32_t chapter_count;
275 uint8_t num_channels;
277 const int16_t *samples;
299 BLURAY *
bd_open(
const char *device_path,
const char *keyfile_path);
329 const struct meta_dl *bd_get_meta(BLURAY *bd);
349 uint32_t
bd_get_titles(BLURAY *bd, uint8_t flags, uint32_t min_title_length);
418 int bd_read(BLURAY *bd,
unsigned char *buf,
int len);
432 int64_t
bd_seek(BLURAY *bd, uint64_t pos);
506 #define BLURAY_PG_TEXTST_STREAM 1
508 void bd_select_stream(BLURAY *bd, uint32_t stream_type, uint32_t stream_id, uint32_t enable_flag);
578 BLURAY_PLAYER_SETTING_AUDIO_LANG = 16,
579 BLURAY_PLAYER_SETTING_PG_LANG = 17,
580 BLURAY_PLAYER_SETTING_MENU_LANG = 18,
581 BLURAY_PLAYER_SETTING_COUNTRY_CODE = 19,
582 BLURAY_PLAYER_SETTING_REGION_CODE = 20,
583 BLURAY_PLAYER_SETTING_OUTPUT_PREFER = 21,
584 BLURAY_PLAYER_SETTING_PARENTAL = 13,
585 BLURAY_PLAYER_SETTING_AUDIO_CAP = 15,
586 BLURAY_PLAYER_SETTING_VIDEO_CAP = 29,
587 BLURAY_PLAYER_SETTING_DISPLAY_CAP = 23,
588 BLURAY_PLAYER_SETTING_3D_CAP = 24,
589 BLURAY_PLAYER_SETTING_TEXT_CAP = 30,
590 BLURAY_PLAYER_SETTING_PLAYER_PROFILE = 31,
592 BLURAY_PLAYER_SETTING_DECODE_PG = 0x100,
593 BLURAY_PLAYER_PERSISTENT_ROOT = 400,
594 BLURAY_PLAYER_CACHE_ROOT = 401,
610 int bd_set_player_setting_str(BLURAY *bd, uint32_t idx,
const char *value);
626 BD_EVENT_READ_ERROR = 2,
627 BD_EVENT_ENCRYPTED = 3,
635 BD_EVENT_PLAYLIST = 6,
636 BD_EVENT_PLAYITEM = 7,
637 BD_EVENT_CHAPTER = 8,
638 BD_EVENT_PLAYMARK = 30,
639 BD_EVENT_END_OF_TITLE = 9,
645 BD_EVENT_AUDIO_STREAM = 10,
646 BD_EVENT_IG_STREAM = 11,
647 BD_EVENT_PG_TEXTST_STREAM = 12,
648 BD_EVENT_PIP_PG_TEXTST_STREAM = 13,
649 BD_EVENT_SECONDARY_AUDIO_STREAM = 14,
650 BD_EVENT_SECONDARY_VIDEO_STREAM = 15,
652 BD_EVENT_PG_TEXTST = 16,
653 BD_EVENT_PIP_PG_TEXTST = 17,
654 BD_EVENT_SECONDARY_AUDIO = 18,
655 BD_EVENT_SECONDARY_VIDEO = 19,
656 BD_EVENT_SECONDARY_VIDEO_SIZE = 20,
663 BD_EVENT_DISCONTINUITY = 28,
673 BD_EVENT_STILL_TIME = 23,
676 BD_EVENT_SOUND_EFFECT = 24,
692 BD_EVENT_STEREOSCOPIC_STATUS = 27,
704 #define BD_ERROR_HDMV 1
705 #define BD_ERROR_BDJ 2
708 #define BD_ERROR_AACS 3
709 #define BD_ERROR_BDPLUS 4
712 #define BLURAY_TITLE_FIRST_PLAY 0xffff
713 #define BLURAY_TITLE_TOP_MENU 0
731 struct bd_argb_overlay_s;
732 struct bd_argb_buffer_s;
733 typedef void (*bd_overlay_proc_f)(
void *,
const struct bd_overlay_s *
const);
734 typedef void (*bd_argb_overlay_proc_f)(
void *,
const struct bd_argb_overlay_s *
const);
916 struct clpi_cl *
bd_get_clpi(BLURAY *bd,
unsigned clip_ref);
917 struct clpi_cl *bd_read_clpi(
const char *clpi_file);
929 struct mpls_pl *bd_read_mpls(
const char *mpls_file);
930 void bd_free_mpls(
struct mpls_pl *);
933 struct mobj_objects *bd_read_mobj(
const char *mobj_file);
934 void bd_free_mobj(
struct mobj_objects *);
937 struct bdjo_data *bd_read_bdjo(
const char *bdjo_file);
938 void bd_free_bdjo(
struct bdjo_data *);
942 int bd_start_bdj(BLURAY *bd,
const char* start_object);
943 void bd_stop_bdj(BLURAY *bd);
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_select_angle(BLURAY *bd, unsigned angle)
void bd_close(BLURAY *bd)
uint64_t bd_get_title_size(BLURAY *bd)
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)
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)
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)