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 
361 struct meta_dl;
362 const struct meta_dl *bd_get_meta(BLURAY *bd);
363 
364 
365 /*
366  * Title selection without on-disc menus
367  */
368 
382 uint32_t bd_get_titles(BLURAY *bd, uint8_t flags, uint32_t min_title_length);
383 
392 int bd_get_main_title(BLURAY *bd);
393 
403 BLURAY_TITLE_INFO* bd_get_title_info(BLURAY *bd, uint32_t title_idx, unsigned angle);
404 
411 void bd_free_title_info(BLURAY_TITLE_INFO *title_info);
412 
421 int bd_select_title(BLURAY *bd, uint32_t title);
422 
431 int bd_select_playlist(BLURAY *bd, uint32_t playlist);
432 
440 uint32_t bd_get_current_title(BLURAY *bd);
441 
451 int bd_read(BLURAY *bd, unsigned char *buf, int len);
452 
453 
454 /*
455  * Playback control functions
456  */
457 
465 int64_t bd_seek(BLURAY *bd, uint64_t pos);
466 
475 int64_t bd_seek_time(BLURAY *bd, uint64_t tick);
476 
485 int64_t bd_seek_chapter(BLURAY *bd, unsigned chapter);
486 
495 int64_t bd_seek_mark(BLURAY *bd, unsigned mark);
496 
505 int64_t bd_seek_playitem(BLURAY *bd, unsigned clip_ref);
506 
515 int bd_select_angle(BLURAY *bd, unsigned angle);
516 
524 void bd_seamless_angle_change(BLURAY *bd, unsigned angle);
525 
539 #define BLURAY_PG_TEXTST_STREAM 1
540 
541 void bd_select_stream(BLURAY *bd, uint32_t stream_type, uint32_t stream_id, uint32_t enable_flag);
542 
543 
544 /*
545  * Playback status functions
546  */
547 
556 int64_t bd_chapter_pos(BLURAY *bd, unsigned chapter);
557 
565 uint32_t bd_get_current_chapter(BLURAY *bd);
566 
576 uint64_t bd_get_title_size(BLURAY *bd);
577 
585 unsigned bd_get_current_angle(BLURAY *bd);
586 
594 uint64_t bd_tell(BLURAY *bd);
595 
603 uint64_t bd_tell_time(BLURAY *bd);
604 
605 
606 /*
607  * player settings
608  */
609 
610 typedef enum {
611  BLURAY_PLAYER_SETTING_AUDIO_LANG = 16, /* Initial audio language. String (ISO 639-2/T). */
612  BLURAY_PLAYER_SETTING_PG_LANG = 17, /* Initial PG/SPU language. String (ISO 639-2/T). */
613  BLURAY_PLAYER_SETTING_MENU_LANG = 18, /* Initial menu language. String (ISO 639-2/T). */
614  BLURAY_PLAYER_SETTING_COUNTRY_CODE = 19, /* Player country code. String (ISO 3166-1/alpha-2). */
615  BLURAY_PLAYER_SETTING_REGION_CODE = 20, /* Player region code. Integer. */
616  BLURAY_PLAYER_SETTING_OUTPUT_PREFER = 21, /* Output mode preference. Integer. */
617  BLURAY_PLAYER_SETTING_PARENTAL = 13, /* Age for parental control. Integer. */
618  BLURAY_PLAYER_SETTING_AUDIO_CAP = 15, /* Audio capability. Bit mask. */
619  BLURAY_PLAYER_SETTING_VIDEO_CAP = 29, /* Video capability. Bit mask. */
620  BLURAY_PLAYER_SETTING_DISPLAY_CAP = 23, /* Display capability. Bit mask. */
621  BLURAY_PLAYER_SETTING_3D_CAP = 24, /* 3D capability. Bit mask. */
622  BLURAY_PLAYER_SETTING_TEXT_CAP = 30, /* Text Subtitle capability. Bit mask. */
623  BLURAY_PLAYER_SETTING_PLAYER_PROFILE = 31, /* Player profile and version. */
624 
625  BLURAY_PLAYER_SETTING_DECODE_PG = 0x100, /* Enable/disable PG (subtitle) decoder. Integer. */
626  BLURAY_PLAYER_PERSISTENT_ROOT = 400, /* Root path to the BD_J persistent storage location. String. */
627  BLURAY_PLAYER_CACHE_ROOT = 401, /* Root path to the BD_J cache storage location. String. */
628 } bd_player_setting;
629 
642 int bd_set_player_setting(BLURAY *bd, uint32_t idx, uint32_t value);
643 int bd_set_player_setting_str(BLURAY *bd, uint32_t idx, const char *value);
644 
645 
646 /*
647  * events
648  */
649 
650 typedef enum {
651 
652  BD_EVENT_NONE = 0, /* no pending events */
653 
654  /*
655  * errors
656  */
657 
658  BD_EVENT_ERROR = 1, /* Fatal error. Playback can't be continued. */
659  BD_EVENT_READ_ERROR = 2, /* Reading of .m2ts aligned unit failed. Next call to read will try next block. */
660  BD_EVENT_ENCRYPTED = 3, /* .m2ts file is encrypted and can't be played */
661 
662  /*
663  * current playback position
664  */
665 
666  BD_EVENT_ANGLE = 4, /* current angle, 1...N */
667  BD_EVENT_TITLE = 5, /* current title, 1...N (0 = top menu) */
668  BD_EVENT_PLAYLIST = 6, /* current playlist (xxxxx.mpls) */
669  BD_EVENT_PLAYITEM = 7, /* current play item, 0...N-1 */
670  BD_EVENT_CHAPTER = 8, /* current chapter, 1...N */
671  BD_EVENT_PLAYMARK = 30, /* playmark reached */
672  BD_EVENT_END_OF_TITLE = 9,
673 
674  /*
675  * stream selection
676  */
677 
678  BD_EVENT_AUDIO_STREAM = 10, /* 1..32, 0xff = none */
679  BD_EVENT_IG_STREAM = 11, /* 1..32 */
680  BD_EVENT_PG_TEXTST_STREAM = 12, /* 1..255, 0xfff = none */
681  BD_EVENT_PIP_PG_TEXTST_STREAM = 13, /* 1..255, 0xfff = none */
682  BD_EVENT_SECONDARY_AUDIO_STREAM = 14, /* 1..32, 0xff = none */
683  BD_EVENT_SECONDARY_VIDEO_STREAM = 15, /* 1..32, 0xff = none */
684 
685  BD_EVENT_PG_TEXTST = 16, /* 0 - disable, 1 - enable */
686  BD_EVENT_PIP_PG_TEXTST = 17, /* 0 - disable, 1 - enable */
687  BD_EVENT_SECONDARY_AUDIO = 18, /* 0 - disable, 1 - enable */
688  BD_EVENT_SECONDARY_VIDEO = 19, /* 0 - disable, 1 - enable */
689  BD_EVENT_SECONDARY_VIDEO_SIZE = 20, /* 0 - PIP, 0xf - fullscreen */
690 
691  /*
692  * playback control
693  */
694 
695  /* HDMV VM or JVM stopped playlist playback. Flush all buffers. */
696  BD_EVENT_PLAYLIST_STOP = 31,
697 
698  /* discontinuity in the stream (non-seamless connection). Reset demuxer PES buffers. */
699  BD_EVENT_DISCONTINUITY = 28, /* new timestamp (45 kHz) */
700 
701  /* HDMV VM or JVM seeked the stream. Next read() will return data from new position. Flush all buffers. */
702  BD_EVENT_SEEK = 21,
703 
704  /* still playback (pause) */
705  BD_EVENT_STILL = 22, /* 0 - off, 1 - on */
706 
707  /* Still playback for n seconds (reached end of still mode play item).
708  * Playback continues by calling bd_read_skip_still(). */
709  BD_EVENT_STILL_TIME = 23, /* 0 = infinite ; 1...300 = seconds */
710 
711  /* Play sound effect */
712  BD_EVENT_SOUND_EFFECT = 24, /* effect ID */
713 
714  /*
715  * status
716  */
717 
718  /* Nothing to do. Playlist is not playing, but title applet is running. */
719  BD_EVENT_IDLE = 29,
720 
721  /* Pop-Up menu available */
722  BD_EVENT_POPUP = 25, /* 0 - no, 1 - yes */
723 
724  /* Interactive menu visible */
725  BD_EVENT_MENU = 26, /* 0 - no, 1 - yes */
726 
727  /* 3D */
728  BD_EVENT_STEREOSCOPIC_STATUS = 27, /* 0 - 2D, 1 - 3D */
729 
730  /* BD-J key interest table changed */
731  BD_EVENT_KEY_INTEREST_TABLE = 32, /* bitmask, BLURAY_KIT_* */
732 
733  /* UO mask changed */
734  BD_EVENT_UO_MASK_CHANGED = 33, /* bitmask, BLURAY_UO_* */
735 
736  /*BD_EVENT_LAST = 33, */
737 
738 } bd_event_e;
739 
740 typedef struct {
741  uint32_t event; /* bd_event_e */
742  uint32_t param;
743 } BD_EVENT;
744 
745 /* BD_EVENT_ERROR param values */
746 #define BD_ERROR_HDMV 1
747 #define BD_ERROR_BDJ 2
748 
749 /* BD_EVENT_ENCRYPTED param vlues */
750 #define BD_ERROR_AACS 3
751 #define BD_ERROR_BDPLUS 4
752 
753 /* BD_EVENT_TITLE special titles */
754 #define BLURAY_TITLE_FIRST_PLAY 0xffff
755 #define BLURAY_TITLE_TOP_MENU 0
756 
757 /* BD_EVENT_KEY_INTEREST flags */
758 #define BLURAY_KIT_PLAY 0x1
759 #define BLURAY_KIT_STOP 0x2
760 #define BLURAY_KIT_FFW 0x4
761 #define BLURAY_KIT_REW 0x8
762 #define BLURAY_KIT_TRACK_NEXT 0x10
763 #define BLURAY_KIT_TRACK_PREV 0x20
764 #define BLURAY_KIT_PAUSE 0x40
765 #define BLURAY_KIT_STILL_OFF 0x80
766 #define BLURAY_KIT_SEC_AUDIO 0x100
767 #define BLURAY_KIT_SEC_VIDEO 0x200
768 #define BLURAY_KIT_PG_TEXTST 0x400
769 
770 /* BD_EVENT_UO_MASK flags */
771 #define BLURAY_UO_MENU_CALL 0x1
772 #define BLURAY_UO_TITLE_SEARCH 0x2
773 
782 int bd_get_event(BLURAY *bd, BD_EVENT *event);
783 
784 
785 /*
786  * On-screen display
787  */
788 
789 struct bd_overlay_s; /* defined in overlay.h */
790 struct bd_argb_overlay_s; /* defined in overlay.h */
791 struct bd_argb_buffer_s; /* defined in overlay.h */
792 typedef void (*bd_overlay_proc_f)(void *, const struct bd_overlay_s * const);
793 typedef void (*bd_argb_overlay_proc_f)(void *, const struct bd_argb_overlay_s * const);
794 
814 void bd_register_overlay_proc(BLURAY *bd, void *handle, bd_overlay_proc_f func);
815 
831 void bd_register_argb_overlay_proc(BLURAY *bd, void *handle, bd_argb_overlay_proc_f func, struct bd_argb_buffer_s *buf);
832 
833 
834 /*
835  * Playback with on-disc menus
836  */
837 
847 int bd_play(BLURAY *bd);
848 
861 int bd_play_title(BLURAY *bd, unsigned title);
862 
873 int bd_menu_call(BLURAY *bd, int64_t pts);
874 
887 int bd_read_ext(BLURAY *bd, unsigned char *buf, int len, BD_EVENT *event);
888 
896 int bd_read_skip_still(BLURAY *bd);
897 
907 BLURAY_TITLE_INFO* bd_get_playlist_info(BLURAY *bd, uint32_t playlist, unsigned angle);
908 
918 int bd_get_sound_effect(BLURAY *bd, unsigned sound_id, struct bd_sound_effect *effect);
919 
920 
921 /*
922  * User interaction
923  */
924 
932 void bd_set_scr(BLURAY *bd, int64_t pts);
933 
945 int bd_user_input(BLURAY *bd, int64_t pts, uint32_t key);
946 
957 int bd_mouse_select(BLURAY *bd, int64_t pts, uint16_t x, uint16_t y);
958 
959 
960 /*
961  * Testing and debugging
962  */
963 
964 /* access to internal information */
965 
966 struct clpi_cl;
975 struct clpi_cl *bd_get_clpi(BLURAY *bd, unsigned clip_ref);
976 struct clpi_cl *bd_read_clpi(const char *clpi_file);
977 
984 void bd_free_clpi(struct clpi_cl *cl);
985 
986 
987 struct mpls_pl;
988 struct mpls_pl *bd_read_mpls(const char *mpls_file);
989 void bd_free_mpls(struct mpls_pl *);
990 
991 struct mobj_objects;
992 struct mobj_objects *bd_read_mobj(const char *mobj_file);
993 void bd_free_mobj(struct mobj_objects *);
994 
995 struct bdjo_data;
996 struct bdjo_data *bd_read_bdjo(const char *bdjo_file);
997 void bd_free_bdjo(struct bdjo_data *);
998 
999 /* BD-J testing */
1000 
1001 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)
1002 void bd_stop_bdj(BLURAY *bd); // shutdown BD-J and clean up resources
1003 
1004 
1005 #ifdef __cplusplus
1006 }
1007 #endif
1008 
1009 #endif /* BLURAY_H_ */