[vlc-commits] Bluray: fix compatibility with older libbluray version
Jean-Baptiste Kempf
git at videolan.org
Wed Jan 20 17:41:48 CET 2016
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Wed Jan 20 17:28:40 2016 +0100| [e2409ee46c95592106adc484b06446ad9e06bd8b] | committer: Thomas Guillem
Bluray: fix compatibility with older libbluray version
Signed-off-by: Thomas Guillem <thomas at gllm.fr>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e2409ee46c95592106adc484b06446ad9e06bd8b
---
modules/access/bluray.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/modules/access/bluray.c b/modules/access/bluray.c
index 07032fb..282aae2 100644
--- a/modules/access/bluray.c
+++ b/modules/access/bluray.c
@@ -81,6 +81,10 @@ static const char *const ppsz_region_code_text[] = {
#define REGION_DEFAULT 1 /* Index to region list. Actual region code is (1<<REGION_DEFAULT) */
#define LANGUAGE_DEFAULT ("eng")
+#if BLURAY_VERSION >= BLURAY_VERSION_CODE(0,8,0)
+# define BLURAY_DEMUX
+#endif
+
/* Callbacks */
static int blurayOpen (vlc_object_t *);
static void blurayClose(vlc_object_t *);
@@ -100,6 +104,7 @@ vlc_module_begin ()
set_callbacks(blurayOpen, blurayClose)
+#ifdef BLURAY_DEMUX
/* demux module */
add_submodule()
set_description( "BluRay demuxer" )
@@ -107,6 +112,7 @@ vlc_module_begin ()
set_subcategory( SUBCAT_INPUT_DEMUX )
set_capability( "demux", 5 )
set_callbacks( blurayOpen, blurayClose )
+#endif
vlc_module_end ()
@@ -503,6 +509,7 @@ static int probeStream(demux_t *p_demux)
return VLC_SUCCESS;
}
+#ifdef BLURAY_DEMUX
static int blurayReadBlock(void *object, void *buf, int lba, int num_blocks)
{
demux_t *p_demux = (demux_t*)object;
@@ -531,6 +538,7 @@ static int blurayReadBlock(void *object, void *buf, int lba, int num_blocks)
return result;
}
+#endif
/*****************************************************************************
* probing of local files
@@ -664,6 +672,7 @@ static int blurayOpen(vlc_object_t *object)
var_AddCallback( p_demux->p_input, "intf-event", onIntfEvent, p_demux );
/* Open BluRay */
+#ifdef BLURAY_DEMUX
if (p_demux->s) {
i_init_pos = stream_Tell(p_demux->s);
@@ -672,8 +681,9 @@ static int blurayOpen(vlc_object_t *object)
bd_close(p_sys->bluray);
p_sys->bluray = NULL;
}
- } else {
-
+ } else
+#endif
+ {
if (!p_demux->psz_file) {
/* no path provided (bluray://). use default DVD device. */
p_sys->psz_bd_path = var_InheritString(object, "dvd");
More information about the vlc-commits
mailing list