Permalink
Browse files

[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
  • Loading branch information...
1 parent 9b1dd39 commit 226c8504e78ff56e98318f9beb475d66a94bea95 @elupus elupus committed Oct 8, 2011
View
@@ -30,6 +30,8 @@ extern "C"
#include <libbluray/bluray.h>
#include <libbluray/filesystem.h>
#include <libbluray/log_control.h>
+#include <libbluray/keys.h>
+#include <libbluray/overlay.h>
}
class DllLibblurayInterface
@@ -65,6 +67,16 @@ class DllLibblurayInterface
virtual void bd_set_debug_mask(uint32_t mask)=0;
virtual uint32_t bd_get_debug_mask(void)=0;
virtual const BLURAY_DISC_INFO *bd_get_disc_info(BLURAY *bd)=0;
+
+ virtual int bd_get_event (BLURAY *bd, BD_EVENT *event)=0;
+ virtual int bd_play (BLURAY *bd)=0;
+ virtual int bd_read_ext (BLURAY *bd, unsigned char *buf, int len, BD_EVENT *event)=0;
+ virtual int bd_read_skip_still (BLURAY *bd)=0;
+ virtual int bd_user_input (BLURAY *bd, int64_t pts, uint32_t key)=0;
+ virtual int bd_set_player_setting (BLURAY *bd, uint32_t idx, uint32_t value)=0;
+ virtual int bd_set_player_setting_str (BLURAY *bd, uint32_t idx, const char *s)=0;
+ virtual void bd_register_overlay_proc (BLURAY *bd, void *handle, bd_overlay_proc_f func)=0;
+ virtual int bd_menu_call (BLURAY *bd, int64_t pts)=0;
};
class DllLibbluray : public DllDynamic, DllLibblurayInterface
@@ -100,6 +112,16 @@ class DllLibbluray : public DllDynamic, DllLibblurayInterface
DEFINE_METHOD0(uint32_t, bd_get_debug_mask)
DEFINE_METHOD1(const BLURAY_DISC_INFO*, bd_get_disc_info, (BLURAY *p1))
+ DEFINE_METHOD2(int, bd_get_event, (BLURAY *p1, BD_EVENT *p2))
+ DEFINE_METHOD1(int, bd_play, (BLURAY *p1))
+ DEFINE_METHOD4(int, bd_read_ext, (BLURAY *p1, unsigned char *p2, int p3, BD_EVENT *p4))
+ DEFINE_METHOD1(int, bd_read_skip_still, (BLURAY *p1))
+ DEFINE_METHOD3(int, bd_user_input, (BLURAY *p1, int64_t p2, uint32_t p3))
+ DEFINE_METHOD3(int, bd_set_player_setting, (BLURAY *p1, uint32_t p2, uint32_t p3))
+ DEFINE_METHOD3(int, bd_set_player_setting_str, (BLURAY *p1, uint32_t p2, const char *p3))
+ DEFINE_METHOD3(void, bd_register_overlay_proc, (BLURAY *p1, void *p2, bd_overlay_proc_f p3))
+ DEFINE_METHOD2(int, bd_menu_call, (BLURAY *p1, int64_t p2))
+
BEGIN_METHOD_RESOLVE()
RESOLVE_METHOD(bd_get_titles)
RESOLVE_METHOD(bd_get_title_info)
@@ -129,6 +151,16 @@ class DllLibbluray : public DllDynamic, DllLibblurayInterface
RESOLVE_METHOD(bd_set_debug_mask)
RESOLVE_METHOD(bd_get_debug_mask)
RESOLVE_METHOD(bd_get_disc_info)
+
+ RESOLVE_METHOD(bd_get_event)
+ RESOLVE_METHOD(bd_play)
+ RESOLVE_METHOD(bd_read_ext)
+ RESOLVE_METHOD(bd_read_skip_still)
+ RESOLVE_METHOD(bd_user_input)
+ RESOLVE_METHOD(bd_set_player_setting)
+ RESOLVE_METHOD(bd_set_player_setting_str)
+ RESOLVE_METHOD(bd_register_overlay_proc)
+ RESOLVE_METHOD(bd_menu_call)
END_METHOD_RESOLVE()
public:
@@ -54,7 +54,7 @@ CDVDInputStream* CDVDFactoryInputStream::CreateInputStream(IDVDPlayer* pPlayer,
}
#ifdef HAVE_LIBBLURAY
else if (item.IsType(".bdmv") || item.IsType(".mpls") || content == "bluray/iso")
- return new CDVDInputStreamBluray();
+ return new CDVDInputStreamBluray(pPlayer);
#endif
else if(file.substr(0, 6) == "rtp://"
|| file.substr(0, 7) == "rtsp://"
Oops, something went wrong.

0 comments on commit 226c850

Please sign in to comment.