23 #include <libbluray/bluray.h>
30 #define BLURAY_PROTO_PREFIX "bluray:"
31 #define MIN_PLAYLIST_LENGTH 180
44 #define OFFSET(x) offsetof(BlurayContext, x)
64 const BLURAY_DISC_INFO *disc_info;
66 disc_info = bd_get_disc_info(bd->
bd);
72 if (!disc_info->bluray_detected) {
78 if (disc_info->aacs_detected && !disc_info->aacs_handled) {
79 if (!disc_info->libaacs_detected) {
81 "Media stream encrypted with AACS, install and configure libaacs\n");
89 if (disc_info->bdplus_detected && !disc_info->bdplus_handled) {
118 const char *diskname = path;
122 bd->
bd = bd_open(diskname,
NULL);
144 if (num_title_idx < 1) {
152 for (i = 0; i < num_title_idx; i++) {
153 BLURAY_TITLE_INFO *info = bd_get_title_info(bd->
bd, i, 0);
157 ((
int)(info->duration / 90000) / 3600),
158 ((
int)(info->duration / 90000) % 3600) / 60,
159 ((
int)(info->duration / 90000) % 60));
161 if (info->duration > duration) {
163 duration = info->duration;
166 bd_free_title_info(info);
172 if (bd_select_playlist(bd->
bd, bd->
playlist) <= 0) {
178 if (bd->
angle >= 0) {
179 bd_select_angle(bd->
bd, bd->
angle);
184 bd_seek_chapter(bd->
bd, bd->
chapter - 1);
195 if (!bd || !bd->
bd) {
199 len = bd_read(bd->
bd, buf, size);
208 if (!bd || !bd->
bd) {
216 return bd_seek(bd->
bd, pos);
219 return bd_get_title_size(bd->
bd);
234 .priv_data_class = &bluray_context_class,