libbluray
bluray.h
Go to the documentation of this file.
1 /*
2  * This file is part of libbluray
3  * Copyright (C) 2009-2010 Obliter0n
4  * Copyright (C) 2009-2010 John Stebbins
5  * Copyright (C) 2010-2017 Petri Hintukainen
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library. If not, see
19  * <http://www.gnu.org/licenses/>.
20  */
21 
27 #ifndef BLURAY_H_
28 #define BLURAY_H_
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 #include <stdint.h>
35 
36 #ifdef BLURAY_API_EXPORT
37 #include "util/attributes.h"
38 #elif !defined(BD_PUBLIC)
39 #define BD_PUBLIC
40 #endif
41 
42 #define TITLES_ALL 0
43 #define TITLES_FILTER_DUP_TITLE 0x01
44 #define TITLES_FILTER_DUP_CLIP 0x02
46 #define TITLES_RELEVANT \
47  (TITLES_FILTER_DUP_TITLE | TITLES_FILTER_DUP_CLIP)
51 typedef struct bluray BLURAY;
52 
53 /*
54  * Disc info
55  */
56 
57 /* AACS error codes */
58 #define BD_AACS_CORRUPTED_DISC -1
59 #define BD_AACS_NO_CONFIG -2
60 #define BD_AACS_NO_PK -3
61 #define BD_AACS_NO_CERT -4
62 #define BD_AACS_CERT_REVOKED -5
63 #define BD_AACS_MMC_FAILED -6
66 typedef struct {
67  const char *name;
68  uint8_t interactive;
69  uint8_t accessible;
70  uint8_t hidden;
72  uint8_t bdj;
73  uint32_t id_ref;
75 
77 typedef struct {
78  uint8_t bluray_detected;
80  /* Disc ID */
81  const char *disc_name;
82  const char *udf_volume_id;
83  uint8_t disc_id[20];
86  uint8_t no_menu_support;
87  uint8_t first_play_supported;
88  uint8_t top_menu_supported;
90  uint32_t num_titles;
91  const BLURAY_TITLE *const *titles;
92  const BLURAY_TITLE *first_play;
93  const BLURAY_TITLE *top_menu;
95  uint32_t num_hdmv_titles;
96  uint32_t num_bdj_titles;
97  uint32_t num_unsupported_titles;
100  uint8_t bdj_detected;
101  uint8_t bdj_supported;
102  uint8_t libjvm_detected;
103  uint8_t bdj_handled;
105  char bdj_org_id[9];
106  char bdj_disc_id[33];
108  /* disc application info */
109  uint8_t video_format;
110  uint8_t frame_rate;
111  uint8_t content_exist_3D;
112  uint8_t initial_output_mode_preference;
113  uint8_t provider_data[32];
115  /* AACS info (valid only if disc uses AACS) */
116  uint8_t aacs_detected;
117  uint8_t libaacs_detected;
118  uint8_t aacs_handled;
120  int aacs_error_code;
121  int aacs_mkbv;
123  /* BD+ info (valid only if disc uses BD+) */
124  uint8_t bdplus_detected;
125  uint8_t libbdplus_detected;
126  uint8_t bdplus_handled;
128  uint8_t bdplus_gen;
129  uint32_t bdplus_date;
131  /* disc application info (libbluray > 1.2.0) */
132  uint8_t initial_dynamic_range_type;
135 
136 /*
137  * Playlist info
138  */
139 
141 typedef enum {
142  BLURAY_STREAM_TYPE_VIDEO_MPEG1 = 0x01,
143  BLURAY_STREAM_TYPE_VIDEO_MPEG2 = 0x02,
144  BLURAY_STREAM_TYPE_AUDIO_MPEG1 = 0x03,
145  BLURAY_STREAM_TYPE_AUDIO_MPEG2 = 0x04,
146  BLURAY_STREAM_TYPE_AUDIO_LPCM = 0x80,
147  BLURAY_STREAM_TYPE_AUDIO_AC3 = 0x81,
148  BLURAY_STREAM_TYPE_AUDIO_DTS = 0x82,
149  BLURAY_STREAM_TYPE_AUDIO_TRUHD = 0x83,
150  BLURAY_STREAM_TYPE_AUDIO_AC3PLUS = 0x84,
151  BLURAY_STREAM_TYPE_AUDIO_DTSHD = 0x85,
152  BLURAY_STREAM_TYPE_AUDIO_DTSHD_MASTER = 0x86,
153  BLURAY_STREAM_TYPE_VIDEO_VC1 = 0xea,
154  BLURAY_STREAM_TYPE_VIDEO_H264 = 0x1b,
155  BLURAY_STREAM_TYPE_VIDEO_HEVC = 0x24,
156  BLURAY_STREAM_TYPE_SUB_PG = 0x90,
157  BLURAY_STREAM_TYPE_SUB_IG = 0x91,
158  BLURAY_STREAM_TYPE_SUB_TEXT = 0x92,
159  BLURAY_STREAM_TYPE_AUDIO_AC3PLUS_SECONDARY = 0xa1,
160  BLURAY_STREAM_TYPE_AUDIO_DTSHD_SECONDARY = 0xa2
162 
164 typedef enum {
176 typedef enum {
186 typedef enum {
187  BLURAY_ASPECT_RATIO_4_3 = 2,
188  BLURAY_ASPECT_RATIO_16_9 = 3
190 
192 typedef enum {
193  BLURAY_AUDIO_FORMAT_MONO = 1,
194  BLURAY_AUDIO_FORMAT_STEREO = 3,
195  BLURAY_AUDIO_FORMAT_MULTI_CHAN = 6,
196  BLURAY_AUDIO_FORMAT_COMBO = 12 // Stereo ac3/dts,
198  // multi mlp/dts-hd
200 typedef enum {
201  BLURAY_AUDIO_RATE_48 = 1,
202  BLURAY_AUDIO_RATE_96 = 4,
203  BLURAY_AUDIO_RATE_192 = 5,
204  BLURAY_AUDIO_RATE_192_COMBO = 12, // 48 or 96 ac3/dts
205  // 192 mpl/dts-hd
206  BLURAY_AUDIO_RATE_96_COMBO = 14 // 48 ac3/dts
207  // 96 mpl/dts-hd
209 
211 typedef enum {
212  BLURAY_TEXT_CHAR_CODE_UTF8 = 0x01,
213  BLURAY_TEXT_CHAR_CODE_UTF16BE = 0x02,
214  BLURAY_TEXT_CHAR_CODE_SHIFT_JIS = 0x03,
215  BLURAY_TEXT_CHAR_CODE_EUC_KR = 0x04,
216  BLURAY_TEXT_CHAR_CODE_GB18030_20001 = 0x05,
217  BLURAY_TEXT_CHAR_CODE_CN_GB = 0x06,
218  BLURAY_TEXT_CHAR_CODE_BIG5 = 0x07
220 
222 typedef enum {
223  BLURAY_STILL_NONE = 0x00,
229 typedef enum {
230  BLURAY_MARK_ENTRY = 0x01,
235 typedef enum {
236  BLURAY_DYNAMIC_RANGE_SDR = 0,
237  BLURAY_DYNAMIC_RANGE_HDR10 = 1,
238  BLURAY_DYNAMIC_RANGE_DOLBY_VISION = 2
240 
242 typedef struct bd_stream_info {
243  uint8_t coding_type;
244  uint8_t format;
245  uint8_t rate;
246  uint8_t char_code;
247  uint8_t lang[4];
248  uint16_t pid;
249  uint8_t aspect;
250  uint8_t subpath_id;
254 typedef struct bd_clip {
255  uint32_t pkt_count;
256  uint8_t still_mode;
257  uint16_t still_time;
258  uint8_t video_stream_count;
259  uint8_t audio_stream_count;
260  uint8_t pg_stream_count;
261  uint8_t ig_stream_count;
262  uint8_t sec_audio_stream_count;
263  uint8_t sec_video_stream_count;
264  BLURAY_STREAM_INFO *video_streams;
265  BLURAY_STREAM_INFO *audio_streams;
266  BLURAY_STREAM_INFO *pg_streams;
267  BLURAY_STREAM_INFO *ig_streams;
268  BLURAY_STREAM_INFO *sec_audio_streams;
269  BLURAY_STREAM_INFO *sec_video_streams;
271  uint64_t start_time;
272  uint64_t in_time;
273  uint64_t out_time;
274  char clip_id[6];
278 typedef struct bd_chapter {
279  uint32_t idx;
280  uint64_t start;
281  uint64_t duration;
282  uint64_t offset;
283  unsigned clip_ref;
287 typedef struct bd_mark {
288  uint32_t idx;
289  int type;
290  uint64_t start;
291  uint64_t duration;
292  uint64_t offset;
293  unsigned clip_ref;
297 typedef struct bd_title_info {
298  uint32_t idx;
299  uint32_t playlist;
300  uint64_t duration;
301  uint32_t clip_count;
302  uint8_t angle_count;
303  uint32_t chapter_count;
304  uint32_t mark_count;
309  uint8_t mvc_base_view_r_flag;
313 typedef struct bd_sound_effect {
314  uint8_t num_channels;
315  uint32_t num_frames;
316  const int16_t *samples;
319 
331 BD_PUBLIC void bd_get_version(int *major, int *minor, int *micro);
332 
333 /*
334  * Disc functions
335  */
336 
337 struct bd_dir_s;
338 struct bd_file_s;
339 struct meta_dl;
340 
350 BD_PUBLIC BLURAY *bd_open(const char *device_path, const char *keyfile_path);
351 
359 BD_PUBLIC BLURAY *bd_init(void);
360 
369 BD_PUBLIC int bd_open_disc(BLURAY *bd, const char *device_path, const char *keyfile_path);
370 
379 BD_PUBLIC int bd_open_stream(BLURAY *bd,
380  void *read_blocks_handle,
381  int (*read_blocks)(void *handle, void *buf, int lba, int num_blocks));
382 
392 BD_PUBLIC int bd_open_files(BLURAY *bd,
393  void *handle,
394  struct bd_dir_s *(*open_dir)(void *handle, const char *rel_path),
395  struct bd_file_s *(*open_file)(void *handle, const char *rel_path));
396 
402 BD_PUBLIC void bd_close(BLURAY *bd);
403 
411 BD_PUBLIC const BLURAY_DISC_INFO *bd_get_disc_info(BLURAY *bd);
412 
426 BD_PUBLIC const struct meta_dl *bd_get_meta(BLURAY *bd);
427 
441 BD_PUBLIC int bd_get_meta_file(BLURAY *bd, const char *file_name, void **data, int64_t *size);
442 
443 
444 /*
445  * Title selection without on-disc menus
446  */
447 
461 BD_PUBLIC uint32_t bd_get_titles(BLURAY *bd, uint8_t flags, uint32_t min_title_length);
462 
471 BD_PUBLIC int bd_get_main_title(BLURAY *bd);
472 
482 BD_PUBLIC BLURAY_TITLE_INFO* bd_get_title_info(BLURAY *bd, uint32_t title_idx, unsigned angle);
483 
490 BD_PUBLIC void bd_free_title_info(BLURAY_TITLE_INFO *title_info);
491 
500 BD_PUBLIC int bd_select_title(BLURAY *bd, uint32_t title);
501 
510 BD_PUBLIC int bd_select_playlist(BLURAY *bd, uint32_t playlist);
511 
519 BD_PUBLIC uint32_t bd_get_current_title(BLURAY *bd);
520 
530 BD_PUBLIC int bd_read(BLURAY *bd, unsigned char *buf, int len);
531 
532 
533 /*
534  * Playback control functions
535  */
536 
545 BD_PUBLIC int64_t bd_seek(BLURAY *bd, uint64_t pos);
546 
557 BD_PUBLIC int64_t bd_seek_time(BLURAY *bd, uint64_t tick);
558 
570 BD_PUBLIC int64_t bd_seek_chapter(BLURAY *bd, unsigned chapter);
571 
580 BD_PUBLIC int64_t bd_seek_mark(BLURAY *bd, unsigned mark);
581 
590 BD_PUBLIC int64_t bd_seek_playitem(BLURAY *bd, unsigned clip_ref);
591 
602 BD_PUBLIC int bd_select_angle(BLURAY *bd, unsigned angle);
603 
611 BD_PUBLIC void bd_seamless_angle_change(BLURAY *bd, unsigned angle);
612 
645 BD_PUBLIC int bd_select_stream(BLURAY *bd, uint32_t stream_type, uint32_t stream_id, uint32_t enable_flag);
646 
647 #define BLURAY_AUDIO_STREAM 0
648 #define BLURAY_PG_TEXTST_STREAM 1
651 /*
652  * Playback status functions
653  */
654 
663 BD_PUBLIC int64_t bd_chapter_pos(BLURAY *bd, unsigned chapter);
664 
672 BD_PUBLIC uint32_t bd_get_current_chapter(BLURAY *bd);
673 
683 BD_PUBLIC uint64_t bd_get_title_size(BLURAY *bd);
684 
692 BD_PUBLIC unsigned bd_get_current_angle(BLURAY *bd);
693 
701 BD_PUBLIC uint64_t bd_tell(BLURAY *bd);
702 
710 BD_PUBLIC uint64_t bd_tell_time(BLURAY *bd);
711 
712 
713 /*
714  * player settings
715  */
716 
718 typedef enum {
742  BLURAY_PLAYER_CACHE_ROOT = 0x201,
747 typedef enum {
766 BD_PUBLIC int bd_set_player_setting(BLURAY *bd, uint32_t idx, uint32_t value);
767 
777 BD_PUBLIC int bd_set_player_setting_str(BLURAY *bd, uint32_t idx, const char *value);
778 
779 
780 /*
781  * events
782  */
783 
785 typedef enum {
786 
789  /*
790  * errors
791  */
792 
793  BD_EVENT_ERROR = 1,
794  BD_EVENT_READ_ERROR = 2,
797  /*
798  * current playback position
799  */
800 
801  BD_EVENT_ANGLE = 4,
802  BD_EVENT_TITLE = 5,
809  /*
810  * stream selection
811  */
812 
813  BD_EVENT_AUDIO_STREAM = 11,
814  BD_EVENT_IG_STREAM = 12,
826  /*
827  * playback control
828  */
829 
832 
837  BD_EVENT_SEEK = 24,
840  BD_EVENT_STILL = 25,
844  BD_EVENT_STILL_TIME = 26,
847  BD_EVENT_SOUND_EFFECT = 27,
849  /*
850  * status
851  */
852 
855  BD_EVENT_IDLE = 28,
856 
858  BD_EVENT_POPUP = 29,
861  BD_EVENT_MENU = 30,
872  /*BD_EVENT_LAST = 33, */
873 
874 } bd_event_e;
875 
877 typedef struct {
878  uint32_t event;
879  uint32_t param;
882 /* BD_EVENT_ERROR param values */
883 #define BD_ERROR_HDMV 1
884 #define BD_ERROR_BDJ 2
886 /* BD_EVENT_ENCRYPTED param vlues */
887 #define BD_ERROR_AACS 3
888 #define BD_ERROR_BDPLUS 4
890 /* BD_EVENT_TITLE special titles */
891 #define BLURAY_TITLE_FIRST_PLAY 0xffff
892 #define BLURAY_TITLE_TOP_MENU 0
894 /* BD_EVENT_KEY_INTEREST flags */
895 #define BLURAY_KIT_PLAY 0x1
896 #define BLURAY_KIT_STOP 0x2
897 #define BLURAY_KIT_FFW 0x4
898 #define BLURAY_KIT_REW 0x8
899 #define BLURAY_KIT_TRACK_NEXT 0x10
900 #define BLURAY_KIT_TRACK_PREV 0x20
901 #define BLURAY_KIT_PAUSE 0x40
902 #define BLURAY_KIT_STILL_OFF 0x80
903 #define BLURAY_KIT_SEC_AUDIO 0x100
904 #define BLURAY_KIT_SEC_VIDEO 0x200
905 #define BLURAY_KIT_PG_TEXTST 0x400
907 /* BD_EVENT_UO_MASK_CHANGED flags */
908 #define BLURAY_UO_MENU_CALL 0x1
909 #define BLURAY_UO_TITLE_SEARCH 0x2
910 #define BLURAY_UO_CHAPTER_SEARCH 0x4
911 #define BLURAY_UO_TIME_SEARCH_MASK 0x8
912 #define BLURAY_UO_SKIP_TO_NEXT_POINT_MASK 0x10
913 #define BLURAY_UO_SKIP_BACK_TO_PREVIOUS_POINT_MASK 0x20
914 #define BLURAY_UO_STOP_MASK 0x40
915 #define BLURAY_UO_PAUSE_ON_MASK 0x80
916 #define BLURAY_UO_STILL_OFF_MASK 0x100
917 #define BLURAY_UO_FORWARD_PLAY_MASK 0x200
918 #define BLURAY_UO_BACKWARD_PLAY_MASK 0x400
919 #define BLURAY_UO_RESUME_MASK 0x800
920 #define BLURAY_UO_MOVE_UP_SELECTED_BUTTON_MASK 0x1000
921 #define BLURAY_UO_MOVE_DOWN_SELECTED_BUTTON_MASK 0x2000
922 #define BLURAY_UO_MOVE_LEFT_SELECTED_BUTTON_MASK 0x4000
923 #define BLURAY_UO_MOVE_RIGHT_SELECTED_BUTTON_MASK 0x8000
924 #define BLURAY_UO_SELECT_BUTTON_MASK 0x10000
925 #define BLURAY_UO_ACTIVATE_BUTTON_MASK 0x20000
926 #define BLURAY_UO_SELECT_AND_ACTIVATE_MASK 0x40000
927 #define BLURAY_UO_PRIMARY_AUDIO_CHANGE_MASK 0x80000
928 #define BLURAY_UO_ANGLE_CHANGE_MASK 0x100000
929 #define BLURAY_UO_POPUP_ON_MASK 0x200000
930 #define BLURAY_UO_POPUP_OFF_MASK 0x400000
931 #define BLURAY_UO_PG_TEXTST_ENABLE_DISABLE_MASK 0x800000
932 #define BLURAY_UO_PG_TEXTST_CHANGE_MASK 0x1000000
933 #define BLURAY_UO_SECONDARY_VIDEO_ENABLE_DISABLE_MASK 0x2000000
934 #define BLURAY_UO_SECONDARY_VIDEO_CHANGE_MASK 0x4000000
935 #define BLURAY_UO_SECONDARY_AUDIO_ENABLE_DISABLE_MASK 0x8000000
936 #define BLURAY_UO_SECONDARY_AUDIO_CHANGE_MASK 0x10000000
937 #define BLURAY_UO_PIP_PG_TEXTST_CHANGE_MASK 0x20000000
947 BD_PUBLIC int bd_get_event(BLURAY *bd, BD_EVENT *event);
948 
956 BD_PUBLIC const char *bd_event_name(uint32_t /* bd_event_e */ event);
957 
958 /*
959  * On-screen display
960  */
961 
962 struct bd_overlay_s; /* defined in overlay.h */
963 struct bd_argb_overlay_s; /* defined in overlay.h */
964 struct bd_argb_buffer_s; /* defined in overlay.h */
965 
972 typedef void (*bd_overlay_proc_f)(void *handle, const struct bd_overlay_s * const event);
973 
980 typedef void (*bd_argb_overlay_proc_f)(void *handle, const struct bd_argb_overlay_s * const event);
981 
1001 BD_PUBLIC void bd_register_overlay_proc(BLURAY *bd, void *handle, bd_overlay_proc_f func);
1002 
1018 BD_PUBLIC void bd_register_argb_overlay_proc(BLURAY *bd, void *handle, bd_argb_overlay_proc_f func, struct bd_argb_buffer_s *buf);
1019 
1020 
1021 /*
1022  * Playback with on-disc menus
1023  */
1024 
1034 BD_PUBLIC int bd_play(BLURAY *bd);
1035 
1048 BD_PUBLIC int bd_play_title(BLURAY *bd, unsigned title);
1049 
1061 BD_PUBLIC int bd_menu_call(BLURAY *bd, int64_t pts);
1062 
1075 BD_PUBLIC int bd_read_ext(BLURAY *bd, unsigned char *buf, int len, BD_EVENT *event);
1076 
1084 BD_PUBLIC int bd_read_skip_still(BLURAY *bd);
1085 
1095 BD_PUBLIC BLURAY_TITLE_INFO* bd_get_playlist_info(BLURAY *bd, uint32_t playlist, unsigned angle);
1096 
1106 BD_PUBLIC int bd_get_sound_effect(BLURAY *bd, unsigned sound_id, struct bd_sound_effect *effect);
1107 
1108 
1109 /*
1110  * User interaction
1111  */
1112 
1120 BD_PUBLIC void bd_set_scr(BLURAY *bd, int64_t pts);
1121 
1135 BD_PUBLIC int bd_set_rate(BLURAY *bd, uint32_t rate);
1136 
1137 #define BLURAY_RATE_PAUSED 0
1138 #define BLURAY_RATE_NORMAL 90000
1165 BD_PUBLIC int bd_user_input(BLURAY *bd, int64_t pts, uint32_t key);
1166 
1179 BD_PUBLIC int bd_mouse_select(BLURAY *bd, int64_t pts, uint16_t x, uint16_t y);
1180 
1181 
1182 /*
1183  * Testing and debugging
1184  *
1185  * Note: parsing functions can't be used with UDF images.
1186  */
1187 
1188 /* access to internal information */
1189 
1190 struct clpi_cl;
1191 struct mpls_pl;
1192 struct bdjo_data;
1193 struct mobj_objects;
1194 
1203 BD_PUBLIC struct clpi_cl *bd_get_clpi(BLURAY *bd, unsigned clip_ref);
1204 
1206 BD_PUBLIC struct clpi_cl *bd_read_clpi(const char *clpi_file);
1207 
1214 BD_PUBLIC void bd_free_clpi(struct clpi_cl *cl);
1215 
1216 
1218 BD_PUBLIC struct mpls_pl *bd_read_mpls(const char *mpls_file);
1220 BD_PUBLIC void bd_free_mpls(struct mpls_pl *);
1221 
1223 BD_PUBLIC struct mobj_objects *bd_read_mobj(const char *mobj_file);
1225 BD_PUBLIC void bd_free_mobj(struct mobj_objects *);
1226 
1228 BD_PUBLIC struct bdjo_data *bd_read_bdjo(const char *bdjo_file);
1230 BD_PUBLIC void bd_free_bdjo(struct bdjo_data *);
1231 
1232 /* BD-J testing */
1233 
1235 BD_PUBLIC int bd_start_bdj(BLURAY *bd, const char* start_object);
1237 BD_PUBLIC void bd_stop_bdj(BLURAY *bd);
1238 
1252 BD_PUBLIC int bd_read_file(BLURAY *bd, const char *path, void **data, int64_t *size);
1253 
1264 BD_PUBLIC struct bd_dir_s *bd_open_dir(BLURAY *bd, const char *dir);
1265 
1283 BD_PUBLIC struct bd_file_s *bd_open_file_dec(BLURAY *bd, const char *path);
1284 
1285 #ifdef __cplusplus
1286 }
1287 #endif
1288 
1289 #endif /* BLURAY_H_ */
bd_dynamic_range_type_e
Clip dynamic range.
Definition: bluray.h:237
BD_PUBLIC int bd_play(BLURAY *bd)
Start playing disc with on-disc menus.
Age for parental control.
Definition: bluray.h:727
current angle, 1...N
Definition: bluray.h:803
bd_video_aspect_e
Stream video aspect ratio.
Definition: bluray.h:188
current chapter, 1...N
Definition: bluray.h:807
SMPTE 296M.
Definition: bluray.h:171
BD_PUBLIC int bd_read_file(BLURAY *bd, const char *path, void **data, int64_t *size)
Read a file from BluRay Virtual File System.
Infinite still.
Definition: bluray.h:227
BT.2020.
Definition: bluray.h:174
Fatal error.
Definition: bluray.h:795
BD_PUBLIC int bd_set_rate(BLURAY *bd, uint32_t rate)
Set current playback rate.
BD_PUBLIC struct clpi_cl * bd_read_clpi(const char *clpi_file)
Testing/debugging: Parse clip information (CLPI) file.
1..255, 0xfff = none
Definition: bluray.h:817
discontinuity in the stream (non-seamless connection).
Definition: bluray.h:836
Mostly compliant, however allows some UOs which should not cause playback issues. ...
Definition: bluray.h:752
Nothing to do.
Definition: bluray.h:857
BD_PUBLIC const struct meta_dl * bd_get_meta(BLURAY *bd)
Get meta information about current BluRay disc.
UHD display capability.
Definition: bluray.h:733
24 Hz
Definition: bluray.h:180
SMPTE 274M.
Definition: bluray.h:172
HDR preference.
Definition: bluray.h:734
.m2ts file is encrypted and can't be played
Definition: bluray.h:797
BD_PUBLIC void bd_close(BLURAY *bd)
Close BluRay disc.
BD_PUBLIC int bd_select_angle(BLURAY *bd, unsigned angle)
Set the angle to play.
50 Hz
Definition: bluray.h:183
0 - PIP, 0xf - fullscreen
Definition: bluray.h:826
BD_PUBLIC int bd_select_title(BLURAY *bd, uint32_t title)
Select the title from the list created by bd_get_titles()
no pending events
Definition: bluray.h:789
bd_mark_type_e
Mark type.
Definition: bluray.h:231
Sound effect data.
Definition: bluray.h:315
BD_PUBLIC struct mobj_objects * bd_read_mobj(const char *mobj_file)
Testing/debugging: Parse movie objects (MOBJ) file.
BD_PUBLIC int bd_mouse_select(BLURAY *bd, int64_t pts, uint16_t x, uint16_t y)
Select menu button at location (x,y).
BD_PUBLIC uint32_t bd_get_current_title(BLURAY *bd)
Returns the current title index.
BD_PUBLIC int bd_read(BLURAY *bd, unsigned char *buf, int len)
Read from currently selected title file, decrypt if possible.
Directory access.
Definition: filesystem.h:131
Executes all UOs unconditionally.
Definition: bluray.h:750
0 - disable, 1 - enable
Definition: bluray.h:825
1..32, 0xff = none
Definition: bluray.h:820
Video capability.
Definition: bluray.h:729
current title, 1...N (0 = top menu)
Definition: bluray.h:804
BD_PUBLIC BLURAY * bd_open(const char *device_path, const char *keyfile_path)
Open BluRay disc.
bd_video_format_e
Stream video format.
Definition: bluray.h:166
bd_player_setting_uo_restriction_level
Player User Operation (UO) restriction mask enforcement level.
Definition: bluray.h:749
BD_PUBLIC struct mpls_pl * bd_read_mpls(const char *mpls_file)
Testing/debugging: Parse playlist (MPLS) file.
BD_PUBLIC int bd_set_player_setting(BLURAY *bd, uint32_t idx, uint32_t value)
Update player setting.
SDR conversion preference.
Definition: bluray.h:735
BD_PUBLIC int bd_set_player_setting_str(BLURAY *bd, uint32_t idx, const char *value)
Update player setting (string)
Play sound effect.
Definition: bluray.h:849
UHD capability.
Definition: bluray.h:732
BD_PUBLIC struct clpi_cl * bd_get_clpi(BLURAY *bd, unsigned clip_ref)
Get copy of clip information for requested playitem.
bd_audio_rate_e
Stream audio rate.
Definition: bluray.h:202
void(* bd_overlay_proc_f)(void *handle, const struct bd_overlay_s *const event)
YUV overlay handler function type.
Definition: bluray.h:974
BD_PUBLIC struct bdjo_data * bd_read_bdjo(const char *bdjo_file)
Testing/debugging: Parse BD-J object file (BDJO)
Output mode preference.
Definition: bluray.h:726
BD_PUBLIC void bd_free_mobj(struct mobj_objects *)
Testing/debugging: Free parsed movie objects.
Set User Operations (UO) restriction mask enforcement level.
Definition: bluray.h:741
BD_PUBLIC void bd_free_clpi(struct clpi_cl *cl)
Free CLPI_CL object.
BD_PUBLIC 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) ...
BD_PUBLIC 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.
bd_player_setting
Player setting.
Definition: bluray.h:720
BD_PUBLIC const BLURAY_DISC_INFO * bd_get_disc_info(BLURAY *bd)
Get information about current BluRay disc.
Initial PG/SPU language.
Definition: bluray.h:722
Playlist information.
Definition: bluray.h:299
BD_PUBLIC void bd_register_overlay_proc(BLURAY *bd, void *handle, bd_overlay_proc_f func)
Register handler for compressed YUV overlays.
BD_PUBLIC void bd_stop_bdj(BLURAY *bd)
Testing/debugging: shutdown BD-J and clean up resources.
SMPTE 293M.
Definition: bluray.h:169
BD_PUBLIC int bd_select_playlist(BLURAY *bd, uint32_t playlist)
Select a playlist.
bd_event_e
Event type.
Definition: bluray.h:787
BD_PUBLIC 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.
BD_PUBLIC struct bd_dir_s * bd_open_dir(BLURAY *bd, const char *dir)
Open a directory from BluRay Virtual File System.
current play item, 0...N-1
Definition: bluray.h:806
HDMV VM or JVM stopped playlist playback.
Definition: bluray.h:833
BD_PUBLIC int bd_read_ext(BLURAY *bd, unsigned char *buf, int len, BD_EVENT *event)
Read from currently playing title.
BD_PUBLIC int bd_get_meta_file(BLURAY *bd, const char *file_name, void **data, int64_t *size)
Read metadata file from BluRay disc.
Allows most UOs, performs some sanity checks to reduce playback issues.
Definition: bluray.h:751
Initial audio language.
Definition: bluray.h:721
BD_PUBLIC int64_t bd_seek_chapter(BLURAY *bd, unsigned chapter)
Seek to a chapter.
BD_PUBLIC BLURAY_TITLE_INFO * bd_get_playlist_info(BLURAY *bd, uint32_t playlist, unsigned angle)
Get information about a playlist.
Reading of .m2ts aligned unit failed.
Definition: bluray.h:796
BD_PUBLIC int bd_get_sound_effect(BLURAY *bd, unsigned sound_id, struct bd_sound_effect *effect)
Get sound effect.
Enable/disable BD-J persistent storage.
Definition: bluray.h:740
BD_PUBLIC int bd_select_stream(BLURAY *bd, uint32_t stream_type, uint32_t stream_id, uint32_t enable_flag)
Select stream (PG / TextST track)
BD_PUBLIC uint32_t bd_get_titles(BLURAY *bd, uint8_t flags, uint32_t min_title_length)
Get number of titles (playlists)
Root path to the BD_J persistent storage location.
Definition: bluray.h:743
playmark reached
Definition: bluray.h:808
1..32, 0xff = none
Definition: bluray.h:819
BD_PUBLIC uint32_t bd_get_current_chapter(BLURAY *bd)
Get the current chapter.
59.94 Hz
Definition: bluray.h:184
25 Hz
Definition: bluray.h:181
BD_PUBLIC 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.
BluRay disc information.
Definition: bluray.h:79
3D
Definition: bluray.h:866
1..255, 0xfff = none
Definition: bluray.h:818
BD_PUBLIC uint64_t bd_get_title_size(BLURAY *bd)
Returns file size in bytes of currently selected title, 0 in no title selected.
bd_still_mode_e
Clip still mode type.
Definition: bluray.h:224
BD_PUBLIC unsigned bd_get_current_angle(BLURAY *bd)
Return the current angle.
3D capability.
Definition: bluray.h:731
Display capability.
Definition: bluray.h:730
BD_PUBLIC int bd_read_skip_still(BLURAY *bd)
Continue reading after still mode clip.
BD_PUBLIC BLURAY_TITLE_INFO * bd_get_title_info(BLURAY *bd, uint32_t title_idx, unsigned angle)
Get information about a title.
bd_audio_format_e
Stream audio format.
Definition: bluray.h:194
BD_PUBLIC int bd_get_main_title(BLURAY *bd)
Get main title Returned number is an index to the list created by bd_get_titles() ...
Audio capability.
Definition: bluray.h:728
BD_PUBLIC int64_t bd_seek_time(BLURAY *bd, uint64_t tick)
Seek to specific time in 90Khz ticks.
29.97 Hz
Definition: bluray.h:182
Pop-Up menu available.
Definition: bluray.h:860
BD_PUBLIC const char * bd_event_name(uint32_t event)
Get name of event.
1..32
Definition: bluray.h:816
BD-J key interest table changed.
Definition: bluray.h:869
HDMV VM or JVM seeked the stream.
Definition: bluray.h:839
0 - disable, 1 - enable
Definition: bluray.h:823
File access.
Definition: filesystem.h:48
BD_PUBLIC BLURAY * bd_init(void)
Initialize BLURAY object.
23.976 Hz
Definition: bluray.h:179
bd_char_code_e
Text subtitle charset.
Definition: bluray.h:213
end of title reached
Definition: bluray.h:809
Root path to the BD_J cache storage location.
Definition: bluray.h:744
BD_PUBLIC uint64_t bd_tell(BLURAY *bd)
Return current pos.
Playmark information.
Definition: bluray.h:289
Still playback for fixed time.
Definition: bluray.h:226
Still playback for n seconds (reached end of still mode play item).
Definition: bluray.h:846
bd_stream_type_e
Stream video coding type.
Definition: bluray.h:143
BD_PUBLIC uint64_t bd_tell_time(BLURAY *bd)
Return current time.
Chapter entry.
Definition: bluray.h:280
BD_PUBLIC void bd_free_bdjo(struct bdjo_data *)
Testing/debugging: Free parsed BDJO object.
1..32, 0xff = none
Definition: bluray.h:815
Location of JRE.
Definition: bluray.h:745
BD_PUBLIC int bd_open_disc(BLURAY *bd, const char *device_path, const char *keyfile_path)
Open BluRay disc.
entry mark for chapter search
Definition: bluray.h:232
BD_PUBLIC void bd_free_title_info(BLURAY_TITLE_INFO *title_info)
Free BLURAY_TITLE_INFO object.
SMPTE 274M.
Definition: bluray.h:170
UO mask changed.
Definition: bluray.h:872
ITU-R BT.601-4.
Definition: bluray.h:168
BD_PUBLIC void bd_seamless_angle_change(BLURAY *bd, unsigned angle)
Initiate seamless angle change.
Clip substream information.
Definition: bluray.h:244
0 - disable, 1 - enable
Definition: bluray.h:824
still playback (pause)
Definition: bluray.h:842
Clip information.
Definition: bluray.h:256
Player region code.
Definition: bluray.h:725
BD_PUBLIC void bd_free_mpls(struct mpls_pl *)
Testing/debugging: Free parsed playlist.
HDMV / BD-J title information.
Definition: bluray.h:68
Player profile and version.
Definition: bluray.h:737
BD_PUBLIC void bd_set_scr(BLURAY *bd, int64_t pts)
Update current pts.
No still (normal playback)
Definition: bluray.h:225
void(* bd_argb_overlay_proc_f)(void *handle, const struct bd_argb_overlay_s *const event)
ARGB overlay handler function type.
Definition: bluray.h:982
current playlist (xxxxx.mpls)
Definition: bluray.h:805
0 - disable, 1 - enable
Definition: bluray.h:822
BD_PUBLIC int bd_menu_call(BLURAY *bd, int64_t pts)
Open BluRay disc Top Menu.
BD_PUBLIC int64_t bd_seek(BLURAY *bd, uint64_t pos)
Seek to pos in currently selected title.
ITU-R BT.1358.
Definition: bluray.h:173
bd_video_rate_e
Stream video frame rate.
Definition: bluray.h:178
Player country code.
Definition: bluray.h:724
ITU-R BT.601-5.
Definition: bluray.h:167
link point
Definition: bluray.h:233
Enable/disable PG (subtitle) decoder.
Definition: bluray.h:739
Compliant UO restriction enforcement.
Definition: bluray.h:753
BD_PUBLIC int bd_play_title(BLURAY *bd, unsigned title)
Play a title (from disc index).
BD_PUBLIC int64_t bd_chapter_pos(BLURAY *bd, unsigned chapter)
Find the byte position of a chapter.
BD_PUBLIC void bd_get_version(int *major, int *minor, int *micro)
Get libbluray version.
struct bluray BLURAY
This structure is opaque.
Definition: bluray.h:53
Initial menu language.
Definition: bluray.h:723
BD_PUBLIC struct bd_file_s * bd_open_file_dec(BLURAY *bd, const char *path)
Open a file from BluRay Virtual File System.
BD_PUBLIC int64_t bd_seek_playitem(BLURAY *bd, unsigned clip_ref)
Seek to a playitem.
Event.
Definition: bluray.h:879
BD_PUBLIC int64_t bd_seek_mark(BLURAY *bd, unsigned mark)
Seek to a playmark.
Interactive menu visible.
Definition: bluray.h:863
Text Subtitle capability.
Definition: bluray.h:736