libbluray
 All Classes Files Functions Macros
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-2014 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 
22 #ifndef BLURAY_H_
23 #define BLURAY_H_
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
34 #include <stdint.h>
35 
36 #define TITLES_ALL 0
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;
45 
46 /*
47  * Disc info
48  */
49 
50 /* AACS error codes */
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
57 
58 /* HDMV / BD-J title */
59 typedef struct {
60  const char *name; /* optional title name in preferred language */
61  uint8_t interactive; /* 1 if title is interactive (title length and playback position should not be shown in UI) */
62  uint8_t accessible; /* 1 if it is allowed to jump into this title */
63  uint8_t hidden; /* 1 if title number should not be shown during playback */
64 
65  uint8_t bdj; /* 0 - HDMV title. 1 - BD-J title */
66  uint32_t id_ref; /* Movie Object number / bdjo file number */
67 } BLURAY_TITLE;
68 
69 typedef struct {
70  uint8_t bluray_detected;
71 
72  uint8_t first_play_supported;
73  uint8_t top_menu_supported;
74 
75  uint32_t num_hdmv_titles;
76  uint32_t num_bdj_titles;
77  uint32_t num_unsupported_titles;
78 
79  uint8_t aacs_detected;
80  uint8_t libaacs_detected;
81  uint8_t aacs_handled;
82 
83  uint8_t bdplus_detected;
84  uint8_t libbdplus_detected;
85  uint8_t bdplus_handled;
86 
87  /* aacs error code */
88  int aacs_error_code;
89  /* aacs MKB version */
90  int aacs_mkbv;
91 
92  /* Disc ID */
93  uint8_t disc_id[20];
94 
95  uint8_t bdj_detected; /* 1 if disc uses BD-J */
96  uint8_t bdj_supported; /* 1 if BD-J support was compiled in */
97  uint8_t libjvm_detected; /* 1 if usable Java VM was found */
98  uint8_t bdj_handled; /* 1 if usable Java VM + libbluray.jar was found */
99 
100  /* BD+ content code generation */
101  uint8_t bdplus_gen;
102  /* BD+ content code relese date */
103  uint32_t bdplus_date; /* (year << 16) | (month << 8) | day */
104 
105  /* disc application info */
106  uint8_t video_format; /* bd_video_format_e */
107  uint8_t frame_rate; /* bd_frame_rate_e */
108  uint8_t content_exist_3D;
109  uint8_t initial_output_mode_preference; /* 0 - 2D, 1 - 3D */
110  uint8_t provider_data[32];
111 
112  /* HDMV / BD-J titles */
113  uint32_t num_titles;
114  const BLURAY_TITLE *const *titles; /* index is title number 1 ... N */
115  const BLURAY_TITLE *first_play; /* titles[N+1]. NULL if not present on the disc. */
116  const BLURAY_TITLE *top_menu; /* titles[0]. NULL if not present on the disc. */
117 
118  char bdj_org_id[9]; /* (BD-J) disc organization ID */
119  char bdj_disc_id[33]; /* (BD-J) disc ID */
120 
121  const char *udf_volume_id; /* optional UDF volume identifier */
123 
124 /*
125  * Playlist info
126  */
127 
128 typedef enum {
129  BLURAY_STREAM_TYPE_VIDEO_MPEG1 = 0x01,
130  BLURAY_STREAM_TYPE_VIDEO_MPEG2 = 0x02,
131  BLURAY_STREAM_TYPE_AUDIO_MPEG1 = 0x03,
132  BLURAY_STREAM_TYPE_AUDIO_MPEG2 = 0x04,
133  BLURAY_STREAM_TYPE_AUDIO_LPCM = 0x80,
134  BLURAY_STREAM_TYPE_AUDIO_AC3 = 0x81,
135  BLURAY_STREAM_TYPE_AUDIO_DTS = 0x82,
136  BLURAY_STREAM_TYPE_AUDIO_TRUHD = 0x83,
137  BLURAY_STREAM_TYPE_AUDIO_AC3PLUS = 0x84,
138  BLURAY_STREAM_TYPE_AUDIO_DTSHD = 0x85,
139  BLURAY_STREAM_TYPE_AUDIO_DTSHD_MASTER = 0x86,
140  BLURAY_STREAM_TYPE_VIDEO_VC1 = 0xea,
141  BLURAY_STREAM_TYPE_VIDEO_H264 = 0x1b,
142  BLURAY_STREAM_TYPE_SUB_PG = 0x90,
143  BLURAY_STREAM_TYPE_SUB_IG = 0x91,
144  BLURAY_STREAM_TYPE_SUB_TEXT = 0x92,
145  BLURAY_STREAM_TYPE_AUDIO_AC3PLUS_SECONDARY = 0xa1,
146  BLURAY_STREAM_TYPE_AUDIO_DTSHD_SECONDARY = 0xa2
147 } bd_stream_type_e;
148 
149 typedef enum {
150  BLURAY_VIDEO_FORMAT_480I = 1, // ITU-R BT.601-5
151  BLURAY_VIDEO_FORMAT_576I = 2, // ITU-R BT.601-4
152  BLURAY_VIDEO_FORMAT_480P = 3, // SMPTE 293M
153  BLURAY_VIDEO_FORMAT_1080I = 4, // SMPTE 274M
154  BLURAY_VIDEO_FORMAT_720P = 5, // SMPTE 296M
155  BLURAY_VIDEO_FORMAT_1080P = 6, // SMPTE 274M
156  BLURAY_VIDEO_FORMAT_576P = 7 // ITU-R BT.1358
157 } bd_video_format_e;
158 
159 typedef enum {
160  BLURAY_VIDEO_RATE_24000_1001 = 1, // 23.976
161  BLURAY_VIDEO_RATE_24 = 2,
162  BLURAY_VIDEO_RATE_25 = 3,
163  BLURAY_VIDEO_RATE_30000_1001 = 4, // 29.97
164  BLURAY_VIDEO_RATE_50 = 6,
165  BLURAY_VIDEO_RATE_60000_1001 = 7 // 59.94
166 } bd_video_rate_e;
167 
168 typedef enum {
169  BLURAY_ASPECT_RATIO_4_3 = 2,
170  BLURAY_ASPECT_RATIO_16_9 = 3
171 } bd_video_aspect_e;
172 
173 typedef enum {
174  BLURAY_AUDIO_FORMAT_MONO = 1,
175  BLURAY_AUDIO_FORMAT_STEREO = 3,
176  BLURAY_AUDIO_FORMAT_MULTI_CHAN = 6,
177  BLURAY_AUDIO_FORMAT_COMBO = 12 // Stereo ac3/dts,
178 } bd_audio_format_e;
179  // multi mlp/dts-hd
180 
181 typedef enum {
182  BLURAY_AUDIO_RATE_48 = 1,
183  BLURAY_AUDIO_RATE_96 = 4,
184  BLURAY_AUDIO_RATE_192 = 5,
185  BLURAY_AUDIO_RATE_192_COMBO = 12, // 48 or 96 ac3/dts
186  // 192 mpl/dts-hd
187  BLURAY_AUDIO_RATE_96_COMBO = 14 // 48 ac3/dts
188  // 96 mpl/dts-hd
189 } bd_audio_rate_e;
190 
191 typedef enum {
192  BLURAY_TEXT_CHAR_CODE_UTF8 = 0x01,
193  BLURAY_TEXT_CHAR_CODE_UTF16BE = 0x02,
194  BLURAY_TEXT_CHAR_CODE_SHIFT_JIS = 0x03,
195  BLURAY_TEXT_CHAR_CODE_EUC_KR = 0x04,
196  BLURAY_TEXT_CHAR_CODE_GB18030_20001 = 0x05,
197  BLURAY_TEXT_CHAR_CODE_CN_GB = 0x06,
198  BLURAY_TEXT_CHAR_CODE_BIG5 = 0x07
199 } bd_char_code_e;
200 
201 typedef enum {
202  BLURAY_STILL_NONE = 0x00,
203  BLURAY_STILL_TIME = 0x01,
204  BLURAY_STILL_INFINITE = 0x02,
205 } bd_still_mode_e;
206 
207 typedef struct bd_stream_info {
208  uint8_t coding_type;
209  uint8_t format;
210  uint8_t rate;
211  uint8_t char_code;
212  uint8_t lang[4];
213  uint16_t pid;
214  uint8_t aspect;
215  uint8_t subpath_id;
217 
218 typedef struct bd_clip {
219  uint32_t pkt_count;
220  uint8_t still_mode;
221  uint16_t still_time; /* seconds */
222  uint8_t video_stream_count;
223  uint8_t audio_stream_count;
224  uint8_t pg_stream_count;
225  uint8_t ig_stream_count;
226  uint8_t sec_audio_stream_count;
227  uint8_t sec_video_stream_count;
228  BLURAY_STREAM_INFO *video_streams;
229  BLURAY_STREAM_INFO *audio_streams;
230  BLURAY_STREAM_INFO *pg_streams;
231  BLURAY_STREAM_INFO *ig_streams;
232  BLURAY_STREAM_INFO *sec_audio_streams;
233  BLURAY_STREAM_INFO *sec_video_streams;
234 
235  uint64_t start_time;
236  uint64_t in_time;
237  uint64_t out_time;
239 
240 typedef struct bd_chapter {
241  uint32_t idx;
242  uint64_t start;
243  uint64_t duration;
244  uint64_t offset;
245  unsigned clip_ref;
247 
248 typedef struct bd_mark {
249  uint32_t idx;
250  int type;
251  uint64_t start;
252  uint64_t duration;
253  uint64_t offset;
254  unsigned clip_ref;
256 
257 typedef struct bd_title_info {
258  uint32_t idx;
259  uint32_t playlist;
260  uint64_t duration;
261  uint32_t clip_count;
262  uint8_t angle_count;
263  uint32_t chapter_count;
264  BLURAY_CLIP_INFO *clips;
265  BLURAY_TITLE_CHAPTER *chapters;
266 
267  uint32_t mark_count;
268  BLURAY_TITLE_MARK *marks;
270 
271 /*
272  * Sound effect data
273  */
274 
275 typedef struct bd_sound_effect {
276  uint8_t num_channels; /* 1 - mono, 2 - stereo */
277  uint32_t num_frames;
278  const int16_t *samples; /* 48000 Hz, 16 bit LPCM. interleaved if stereo */
280 
281 
286 void bd_get_version(int *major, int *minor, int *micro);
287 
288 /*
289  * Disc functions
290  */
291 
301 BLURAY *bd_open(const char *device_path, const char *keyfile_path);
302 
310 BLURAY *bd_init(void);
311 
320 int bd_open_disc(BLURAY *bd, const char *device_path, const char *keyfile_path);
321 
330 int bd_open_stream(BLURAY *bd,
331  void *read_blocks_handle,
332  int (*read_blocks)(void *handle, void *buf, int lba, int num_blocks));
333 
339 void bd_close(BLURAY *bd);
340 
348 const BLURAY_DISC_INFO *bd_get_disc_info(BLURAY *bd);
349 
363 struct meta_dl;
364 const struct meta_dl *bd_get_meta(BLURAY *bd);
365 
379 int bd_get_meta_file(BLURAY *bd, const char *file_name, void **data, int64_t *size);
380 
381 
382 /*
383  * Title selection without on-disc menus
384  */
385 
399 uint32_t bd_get_titles(BLURAY *bd, uint8_t flags, uint32_t min_title_length);
400 
409 int bd_get_main_title(BLURAY *bd);
410 
420 BLURAY_TITLE_INFO* bd_get_title_info(BLURAY *bd, uint32_t title_idx, unsigned angle);
421 
428 void bd_free_title_info(BLURAY_TITLE_INFO *title_info);
429 
438 int bd_select_title(BLURAY *bd, uint32_t title);
439 
448 int bd_select_playlist(BLURAY *bd, uint32_t playlist);
449 
457 uint32_t bd_get_current_title(BLURAY *bd);
458 
468 int bd_read(BLURAY *bd, unsigned char *buf, int len);
469 
470 
471 /*
472  * Playback control functions
473  */
474 
482 int64_t bd_seek(BLURAY *bd, uint64_t pos);
483 
492 int64_t bd_seek_time(BLURAY *bd, uint64_t tick);
493 
502 int64_t bd_seek_chapter(BLURAY *bd, unsigned chapter);
503 
512 int64_t bd_seek_mark(BLURAY *bd, unsigned mark);
513 
522 int64_t bd_seek_playitem(BLURAY *bd, unsigned clip_ref);
523 
532 int bd_select_angle(BLURAY *bd, unsigned angle);
533 
541 void bd_seamless_angle_change(BLURAY *bd, unsigned angle);
542 
556 #define BLURAY_PG_TEXTST_STREAM 1
557 
558 void bd_select_stream(BLURAY *bd, uint32_t stream_type, uint32_t stream_id, uint32_t enable_flag);
559 
560 
561 /*
562  * Playback status functions
563  */
564 
573 int64_t bd_chapter_pos(BLURAY *bd, unsigned chapter);
574 
582 uint32_t bd_get_current_chapter(BLURAY *bd);
583 
593 uint64_t bd_get_title_size(BLURAY *bd);
594 
602 unsigned bd_get_current_angle(BLURAY *bd);
603 
611 uint64_t bd_tell(BLURAY *bd);
612 
620 uint64_t bd_tell_time(BLURAY *bd);
621 
622 
623 /*
624  * player settings
625  */
626 
627 typedef enum {
628  BLURAY_PLAYER_SETTING_AUDIO_LANG = 16, /* Initial audio language. String (ISO 639-2/T). */
629  BLURAY_PLAYER_SETTING_PG_LANG = 17, /* Initial PG/SPU language. String (ISO 639-2/T). */
630  BLURAY_PLAYER_SETTING_MENU_LANG = 18, /* Initial menu language. String (ISO 639-2/T). */
631  BLURAY_PLAYER_SETTING_COUNTRY_CODE = 19, /* Player country code. String (ISO 3166-1/alpha-2). */
632  BLURAY_PLAYER_SETTING_REGION_CODE = 20, /* Player region code. Integer. */
633  BLURAY_PLAYER_SETTING_OUTPUT_PREFER = 21, /* Output mode preference. Integer. */
634  BLURAY_PLAYER_SETTING_PARENTAL = 13, /* Age for parental control. Integer. */
635  BLURAY_PLAYER_SETTING_AUDIO_CAP = 15, /* Audio capability. Bit mask. */
636  BLURAY_PLAYER_SETTING_VIDEO_CAP = 29, /* Video capability. Bit mask. */
637  BLURAY_PLAYER_SETTING_DISPLAY_CAP = 23, /* Display capability. Bit mask. */
638  BLURAY_PLAYER_SETTING_3D_CAP = 24, /* 3D capability. Bit mask. */
639  BLURAY_PLAYER_SETTING_TEXT_CAP = 30, /* Text Subtitle capability. Bit mask. */
640  BLURAY_PLAYER_SETTING_PLAYER_PROFILE = 31, /* Player profile and version. */
641 
642  BLURAY_PLAYER_SETTING_DECODE_PG = 0x100, /* Enable/disable PG (subtitle) decoder. Integer. */
643  BLURAY_PLAYER_PERSISTENT_ROOT = 400, /* Root path to the BD_J persistent storage location. String. */
644  BLURAY_PLAYER_CACHE_ROOT = 401, /* Root path to the BD_J cache storage location. String. */
645 } bd_player_setting;
646 
659 int bd_set_player_setting(BLURAY *bd, uint32_t idx, uint32_t value);
660 int bd_set_player_setting_str(BLURAY *bd, uint32_t idx, const char *value);
661 
662 
663 /*
664  * events
665  */
666 
667 typedef enum {
668 
669  BD_EVENT_NONE = 0, /* no pending events */
670 
671  /*
672  * errors
673  */
674 
675  BD_EVENT_ERROR = 1, /* Fatal error. Playback can't be continued. */
676  BD_EVENT_READ_ERROR = 2, /* Reading of .m2ts aligned unit failed. Next call to read will try next block. */
677  BD_EVENT_ENCRYPTED = 3, /* .m2ts file is encrypted and can't be played */
678 
679  /*
680  * current playback position
681  */
682 
683  BD_EVENT_ANGLE = 4, /* current angle, 1...N */
684  BD_EVENT_TITLE = 5, /* current title, 1...N (0 = top menu) */
685  BD_EVENT_PLAYLIST = 6, /* current playlist (xxxxx.mpls) */
686  BD_EVENT_PLAYITEM = 7, /* current play item, 0...N-1 */
687  BD_EVENT_CHAPTER = 8, /* current chapter, 1...N */
688  BD_EVENT_PLAYMARK = 30, /* playmark reached */
689  BD_EVENT_END_OF_TITLE = 9,
690 
691  /*
692  * stream selection
693  */
694 
695  BD_EVENT_AUDIO_STREAM = 10, /* 1..32, 0xff = none */
696  BD_EVENT_IG_STREAM = 11, /* 1..32 */
697  BD_EVENT_PG_TEXTST_STREAM = 12, /* 1..255, 0xfff = none */
698  BD_EVENT_PIP_PG_TEXTST_STREAM = 13, /* 1..255, 0xfff = none */
699  BD_EVENT_SECONDARY_AUDIO_STREAM = 14, /* 1..32, 0xff = none */
700  BD_EVENT_SECONDARY_VIDEO_STREAM = 15, /* 1..32, 0xff = none */
701 
702  BD_EVENT_PG_TEXTST = 16, /* 0 - disable, 1 - enable */
703  BD_EVENT_PIP_PG_TEXTST = 17, /* 0 - disable, 1 - enable */
704  BD_EVENT_SECONDARY_AUDIO = 18, /* 0 - disable, 1 - enable */
705  BD_EVENT_SECONDARY_VIDEO = 19, /* 0 - disable, 1 - enable */
706  BD_EVENT_SECONDARY_VIDEO_SIZE = 20, /* 0 - PIP, 0xf - fullscreen */
707 
708  /*
709  * playback control
710  */
711 
712  /* HDMV VM or JVM stopped playlist playback. Flush all buffers. */
713  BD_EVENT_PLAYLIST_STOP = 31,
714 
715  /* discontinuity in the stream (non-seamless connection). Reset demuxer PES buffers. */
716  BD_EVENT_DISCONTINUITY = 28, /* new timestamp (45 kHz) */
717 
718  /* HDMV VM or JVM seeked the stream. Next read() will return data from new position. Flush all buffers. */
719  BD_EVENT_SEEK = 21,
720 
721  /* still playback (pause) */
722  BD_EVENT_STILL = 22, /* 0 - off, 1 - on */
723 
724  /* Still playback for n seconds (reached end of still mode play item).
725  * Playback continues by calling bd_read_skip_still(). */
726  BD_EVENT_STILL_TIME = 23, /* 0 = infinite ; 1...300 = seconds */
727 
728  /* Play sound effect */
729  BD_EVENT_SOUND_EFFECT = 24, /* effect ID */
730 
731  /*
732  * status
733  */
734 
735  /* Nothing to do. Playlist is not playing, but title applet is running. */
736  BD_EVENT_IDLE = 29,
737 
738  /* Pop-Up menu available */
739  BD_EVENT_POPUP = 25, /* 0 - no, 1 - yes */
740 
741  /* Interactive menu visible */
742  BD_EVENT_MENU = 26, /* 0 - no, 1 - yes */
743 
744  /* 3D */
745  BD_EVENT_STEREOSCOPIC_STATUS = 27, /* 0 - 2D, 1 - 3D */
746 
747  /* BD-J key interest table changed */
748  BD_EVENT_KEY_INTEREST_TABLE = 32, /* bitmask, BLURAY_KIT_* */
749 
750  /* UO mask changed */
751  BD_EVENT_UO_MASK_CHANGED = 33, /* bitmask, BLURAY_UO_* */
752 
753  /*BD_EVENT_LAST = 33, */
754 
755 } bd_event_e;
756 
757 typedef struct {
758  uint32_t event; /* bd_event_e */
759  uint32_t param;
760 } BD_EVENT;
761 
762 /* BD_EVENT_ERROR param values */
763 #define BD_ERROR_HDMV 1
764 #define BD_ERROR_BDJ 2
765 
766 /* BD_EVENT_ENCRYPTED param vlues */
767 #define BD_ERROR_AACS 3
768 #define BD_ERROR_BDPLUS 4
769 
770 /* BD_EVENT_TITLE special titles */
771 #define BLURAY_TITLE_FIRST_PLAY 0xffff
772 #define BLURAY_TITLE_TOP_MENU 0
773 
774 /* BD_EVENT_KEY_INTEREST flags */
775 #define BLURAY_KIT_PLAY 0x1
776 #define BLURAY_KIT_STOP 0x2
777 #define BLURAY_KIT_FFW 0x4
778 #define BLURAY_KIT_REW 0x8
779 #define BLURAY_KIT_TRACK_NEXT 0x10
780 #define BLURAY_KIT_TRACK_PREV 0x20
781 #define BLURAY_KIT_PAUSE 0x40
782 #define BLURAY_KIT_STILL_OFF 0x80
783 #define BLURAY_KIT_SEC_AUDIO 0x100
784 #define BLURAY_KIT_SEC_VIDEO 0x200
785 #define BLURAY_KIT_PG_TEXTST 0x400
786 
787 /* BD_EVENT_UO_MASK flags */
788 #define BLURAY_UO_MENU_CALL 0x1
789 #define BLURAY_UO_TITLE_SEARCH 0x2
790 
799 int bd_get_event(BLURAY *bd, BD_EVENT *event);
800 
801 
802 /*
803  * On-screen display
804  */
805 
806 struct bd_overlay_s; /* defined in overlay.h */
807 struct bd_argb_overlay_s; /* defined in overlay.h */
808 struct bd_argb_buffer_s; /* defined in overlay.h */
809 typedef void (*bd_overlay_proc_f)(void *, const struct bd_overlay_s * const);
810 typedef void (*bd_argb_overlay_proc_f)(void *, const struct bd_argb_overlay_s * const);
811 
831 void bd_register_overlay_proc(BLURAY *bd, void *handle, bd_overlay_proc_f func);
832 
848 void bd_register_argb_overlay_proc(BLURAY *bd, void *handle, bd_argb_overlay_proc_f func, struct bd_argb_buffer_s *buf);
849 
850 
851 /*
852  * Playback with on-disc menus
853  */
854 
864 int bd_play(BLURAY *bd);
865 
878 int bd_play_title(BLURAY *bd, unsigned title);
879 
890 int bd_menu_call(BLURAY *bd, int64_t pts);
891 
904 int bd_read_ext(BLURAY *bd, unsigned char *buf, int len, BD_EVENT *event);
905 
913 int bd_read_skip_still(BLURAY *bd);
914 
924 BLURAY_TITLE_INFO* bd_get_playlist_info(BLURAY *bd, uint32_t playlist, unsigned angle);
925 
935 int bd_get_sound_effect(BLURAY *bd, unsigned sound_id, struct bd_sound_effect *effect);
936 
937 
938 /*
939  * User interaction
940  */
941 
949 void bd_set_scr(BLURAY *bd, int64_t pts);
950 
962 int bd_user_input(BLURAY *bd, int64_t pts, uint32_t key);
963 
974 int bd_mouse_select(BLURAY *bd, int64_t pts, uint16_t x, uint16_t y);
975 
976 
977 /*
978  * Testing and debugging
979  */
980 
981 /* access to internal information */
982 
983 struct clpi_cl;
992 struct clpi_cl *bd_get_clpi(BLURAY *bd, unsigned clip_ref);
993 struct clpi_cl *bd_read_clpi(const char *clpi_file);
994 
1001 void bd_free_clpi(struct clpi_cl *cl);
1002 
1003 
1004 struct mpls_pl;
1005 struct mpls_pl *bd_read_mpls(const char *mpls_file);
1006 void bd_free_mpls(struct mpls_pl *);
1007 
1008 struct mobj_objects;
1009 struct mobj_objects *bd_read_mobj(const char *mobj_file);
1010 void bd_free_mobj(struct mobj_objects *);
1011 
1012 struct bdjo_data;
1013 struct bdjo_data *bd_read_bdjo(const char *bdjo_file);
1014 void bd_free_bdjo(struct bdjo_data *);
1015 
1016 /* BD-J testing */
1017 
1018 int bd_start_bdj(BLURAY *bd, const char* start_object); // start BD-J from the specified BD-J object (should be a 5 character string)
1019 void bd_stop_bdj(BLURAY *bd); // shutdown BD-J and clean up resources
1020 
1034 int bd_read_file(BLURAY *, const char *path, void **data, int64_t *size);
1035 
1036 
1037 #ifdef __cplusplus
1038 }
1039 #endif
1040 
1041 #endif /* BLURAY_H_ */
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)
Definition: bluray.h:259
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)
Definition: bluray.h:250
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)
Definition: bluray.h:220
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)
Definition: bluray.h:277
Definition: bluray.h:71
int bd_set_player_setting(BLURAY *bd, uint32_t idx, uint32_t value)
int bd_menu_call(BLURAY *bd, int64_t pts)
Definition: bluray.h:209
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_play(BLURAY *bd)
int bd_read_file(BLURAY *, const char *path, void **data, int64_t *size)
Definition: bluray.h:242
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)
Definition: bluray.h:61
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)
Definition: bluray.h:759
int64_t bd_seek_chapter(BLURAY *bd, unsigned chapter)
int64_t bd_seek_time(BLURAY *bd, uint64_t tick)
BLURAY * bd_init(void)