[MPlayer-dev-eng] [PATCH] stream_bluray: switch to new libbluray API

Diego Biurrun diego at biurrun.de
Sun Sep 11 19:36:00 CEST 2011


From: Rico Tzschichholz <ricotz at ubuntu.com>

Switch to new libbluray API with three parameters to bd_get_title_info().
libbluray versions using the old API are no longer supported.

Signed-off-by: Diego Biurrun <diego at biurrun.de>
---
 configure              |    2 +-
 stream/stream_bluray.c |   14 +++++++-------
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/configure b/configure
index cbc5702..8ca5fbf 100755
--- a/configure
+++ b/configure
@@ -5738,7 +5738,7 @@ echores "$_vcd"
 echocheck "Blu-ray support"
 if test "$_bluray" = auto ; then
   _bluray=no
-  statement_check libbluray/bluray.h 'bd_get_title_info(0, 0)' -lbluray && _bluray=yes
+  statement_check libbluray/bluray.h 'bd_get_title_info(0, 0, 0)' -lbluray && _bluray=yes
 fi
 if test "$_bluray" = yes ; then
   def_bluray='#define CONFIG_LIBBLURAY 1'
diff --git a/stream/stream_bluray.c b/stream/stream_bluray.c
index 2ce6255..f46ea69 100644
--- a/stream/stream_bluray.c
+++ b/stream/stream_bluray.c
@@ -116,7 +116,7 @@ static int bluray_stream_control(stream_t *s, int cmd, void *arg)
     case STREAM_CTRL_GET_NUM_CHAPTERS: {
         BLURAY_TITLE_INFO *ti;
 
-        ti = bd_get_title_info(b->bd, b->current_title);
+        ti = bd_get_title_info(b->bd, b->current_title, b->current_angle);
         if (!ti)
             return STREAM_UNSUPPORTED;
 
@@ -137,7 +137,7 @@ static int bluray_stream_control(stream_t *s, int cmd, void *arg)
         int64_t pos;
         int r;
 
-        ti = bd_get_title_info(b->bd, b->current_title);
+        ti = bd_get_title_info(b->bd, b->current_title, b->current_angle);
         if (!ti)
             return STREAM_UNSUPPORTED;
 
@@ -156,7 +156,7 @@ static int bluray_stream_control(stream_t *s, int cmd, void *arg)
     case STREAM_CTRL_GET_NUM_ANGLES: {
         BLURAY_TITLE_INFO *ti;
 
-        ti = bd_get_title_info(b->bd, b->current_title);
+        ti = bd_get_title_info(b->bd, b->current_title, b->current_angle);
         if (!ti)
             return STREAM_UNSUPPORTED;
 
@@ -175,7 +175,7 @@ static int bluray_stream_control(stream_t *s, int cmd, void *arg)
         BLURAY_TITLE_INFO *ti;
         int angle = *((int *) arg);
 
-        ti = bd_get_title_info(b->bd, b->current_title);
+        ti = bd_get_title_info(b->bd, b->current_title, b->current_angle);
         if (!ti)
             return STREAM_UNSUPPORTED;
 
@@ -236,7 +236,7 @@ static int bluray_stream_open(stream_t *s, int mode,
     }
 
     /* check for available titles on disc */
-    title_count = bd_get_titles(bd, TITLES_RELEVANT);
+    title_count = bd_get_titles(bd, TITLES_RELEVANT, angle);
     mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_BLURAY_TITLES=%d\n", title_count);
     if (!title_count) {
         mp_msg(MSGT_OPEN, MSGL_ERR, MSGTR_BlurayNoTitles);
@@ -250,7 +250,7 @@ static int bluray_stream_open(stream_t *s, int mode,
         BLURAY_TITLE_INFO *ti;
         int sec, msec;
 
-        ti = bd_get_title_info(bd, i);
+        ti = bd_get_title_info(bd, i, angle);
         if (!ti)
             continue;
 
@@ -284,7 +284,7 @@ static int bluray_stream_open(stream_t *s, int mode,
            "ID_BLURAY_CURRENT_TITLE=%d\n", title + 1);
 
     /* Get current title information */
-    info = bd_get_title_info(bd, title);
+    info = bd_get_title_info(bd, title, angle);
     if (!info)
         goto err_no_info;
 
-- 
1.7.1



More information about the MPlayer-dev-eng mailing list