Skip to content

Commit 226c850

Browse files
author
elupus
committed
[bluray] Initial support for menu's, no BD-J supported
Code will fall back to longest item if there is not first play hdmv item. However it will still try menu's if there is only some unnsupported BD-J titles. This could possible fail to play if it switches into BD-J mode later in menu's. Starting index.bdmv will still only play longest title, to attempt playback with menu's, start the MovieObject.bdmv
1 parent 9b1dd39 commit 226c850

File tree

5 files changed

+546
-41
lines changed

5 files changed

+546
-41
lines changed

lib/DllLibbluray.h

+32
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ extern "C"
3030
#include <libbluray/bluray.h>
3131
#include <libbluray/filesystem.h>
3232
#include <libbluray/log_control.h>
33+
#include <libbluray/keys.h>
34+
#include <libbluray/overlay.h>
3335
}
3436

3537
class DllLibblurayInterface
@@ -65,6 +67,16 @@ class DllLibblurayInterface
6567
virtual void bd_set_debug_mask(uint32_t mask)=0;
6668
virtual uint32_t bd_get_debug_mask(void)=0;
6769
virtual const BLURAY_DISC_INFO *bd_get_disc_info(BLURAY *bd)=0;
70+
71+
virtual int bd_get_event (BLURAY *bd, BD_EVENT *event)=0;
72+
virtual int bd_play (BLURAY *bd)=0;
73+
virtual int bd_read_ext (BLURAY *bd, unsigned char *buf, int len, BD_EVENT *event)=0;
74+
virtual int bd_read_skip_still (BLURAY *bd)=0;
75+
virtual int bd_user_input (BLURAY *bd, int64_t pts, uint32_t key)=0;
76+
virtual int bd_set_player_setting (BLURAY *bd, uint32_t idx, uint32_t value)=0;
77+
virtual int bd_set_player_setting_str (BLURAY *bd, uint32_t idx, const char *s)=0;
78+
virtual void bd_register_overlay_proc (BLURAY *bd, void *handle, bd_overlay_proc_f func)=0;
79+
virtual int bd_menu_call (BLURAY *bd, int64_t pts)=0;
6880
};
6981

7082
class DllLibbluray : public DllDynamic, DllLibblurayInterface
@@ -100,6 +112,16 @@ class DllLibbluray : public DllDynamic, DllLibblurayInterface
100112
DEFINE_METHOD0(uint32_t, bd_get_debug_mask)
101113
DEFINE_METHOD1(const BLURAY_DISC_INFO*, bd_get_disc_info, (BLURAY *p1))
102114

115+
DEFINE_METHOD2(int, bd_get_event, (BLURAY *p1, BD_EVENT *p2))
116+
DEFINE_METHOD1(int, bd_play, (BLURAY *p1))
117+
DEFINE_METHOD4(int, bd_read_ext, (BLURAY *p1, unsigned char *p2, int p3, BD_EVENT *p4))
118+
DEFINE_METHOD1(int, bd_read_skip_still, (BLURAY *p1))
119+
DEFINE_METHOD3(int, bd_user_input, (BLURAY *p1, int64_t p2, uint32_t p3))
120+
DEFINE_METHOD3(int, bd_set_player_setting, (BLURAY *p1, uint32_t p2, uint32_t p3))
121+
DEFINE_METHOD3(int, bd_set_player_setting_str, (BLURAY *p1, uint32_t p2, const char *p3))
122+
DEFINE_METHOD3(void, bd_register_overlay_proc, (BLURAY *p1, void *p2, bd_overlay_proc_f p3))
123+
DEFINE_METHOD2(int, bd_menu_call, (BLURAY *p1, int64_t p2))
124+
103125
BEGIN_METHOD_RESOLVE()
104126
RESOLVE_METHOD(bd_get_titles)
105127
RESOLVE_METHOD(bd_get_title_info)
@@ -129,6 +151,16 @@ class DllLibbluray : public DllDynamic, DllLibblurayInterface
129151
RESOLVE_METHOD(bd_set_debug_mask)
130152
RESOLVE_METHOD(bd_get_debug_mask)
131153
RESOLVE_METHOD(bd_get_disc_info)
154+
155+
RESOLVE_METHOD(bd_get_event)
156+
RESOLVE_METHOD(bd_play)
157+
RESOLVE_METHOD(bd_read_ext)
158+
RESOLVE_METHOD(bd_read_skip_still)
159+
RESOLVE_METHOD(bd_user_input)
160+
RESOLVE_METHOD(bd_set_player_setting)
161+
RESOLVE_METHOD(bd_set_player_setting_str)
162+
RESOLVE_METHOD(bd_register_overlay_proc)
163+
RESOLVE_METHOD(bd_menu_call)
132164
END_METHOD_RESOLVE()
133165

134166
public:

xbmc/cores/dvdplayer/DVDInputStreams/DVDFactoryInputStream.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ CDVDInputStream* CDVDFactoryInputStream::CreateInputStream(IDVDPlayer* pPlayer,
5454
}
5555
#ifdef HAVE_LIBBLURAY
5656
else if (item.IsType(".bdmv") || item.IsType(".mpls") || content == "bluray/iso")
57-
return new CDVDInputStreamBluray();
57+
return new CDVDInputStreamBluray(pPlayer);
5858
#endif
5959
else if(file.substr(0, 6) == "rtp://"
6060
|| file.substr(0, 7) == "rtsp://"

0 commit comments

Comments
 (0)