[libbluray-devel] [Git][videolan/libbluray][master] 3 commits: Split function

Petri Hintukainen (@hpi) gitlab at videolan.org
Tue Oct 18 16:58:50 UTC 2022



Petri Hintukainen pushed to branch master at VideoLAN / libbluray


Commits:
90d518eb by Petri Hintukainen at 2022-10-18T19:31:13+03:00
Split function

- - - - -
b07aff53 by Petri Hintukainen at 2022-10-18T19:34:46+03:00
Use LT_INIT instead of deprecated AC_PROG_LIBTOOL

- - - - -
88f9d05d by Petri Hintukainen at 2022-10-18T19:34:59+03:00
Check color space when comparing streams

- - - - -


3 changed files:

- configure.ac
- src/libbluray/bdnav/navigation.c
- src/libbluray/hdmv/hdmv_vm.c


Changes:

=====================================
configure.ac
=====================================
@@ -136,7 +136,7 @@ dnl required programs
 AC_PROG_CC
 AM_PROG_CC_C_O
 m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
-AC_PROG_LIBTOOL
+LT_INIT
 
 dnl required headers
 AC_CHECK_HEADERS([stdarg.h sys/types.h dirent.h errno.h libgen.h malloc.h])


=====================================
src/libbluray/bdnav/navigation.c
=====================================
@@ -106,6 +106,7 @@ static int _stream_cmp(const MPLS_STREAM *a, const MPLS_STREAM *b)
         a->format      == b->format      &&
         a->rate        == b->rate        &&
         a->char_code   == b->char_code   &&
+        a->color_space == b->color_space &&
         memcmp(a->lang, b->lang, 4) == 0) {
         return 0;
     }


=====================================
src/libbluray/hdmv/hdmv_vm.c
=====================================
@@ -634,29 +634,20 @@ static int _call_title(HDMV_VM *p, uint32_t title)
  * playback control
  */
 
-static int _play_at(HDMV_VM *p, int playlist, int playitem, int playmark)
+static int _play_at(HDMV_VM *p, unsigned playlist, int playitem, int playmark)
 {
-    if (p->ig_object && playlist >= 0) {
-        BD_DEBUG(DBG_HDMV | DBG_CRIT, "play_at(list %d, item %d, mark %d): "
+    if (p->ig_object) {
+        BD_DEBUG(DBG_HDMV | DBG_CRIT, "play_at(list %u, item %d, mark %d): "
               "playlist change not allowed in interactive composition\n",
               playlist, playitem, playmark);
         return -1;
     }
 
-    if (!p->ig_object && playlist < 0) {
-        BD_DEBUG(DBG_HDMV | DBG_CRIT, "play_at(list %d, item %d, mark %d): "
-              "playlist not given in movie object (link commands not allowed)\n",
-              playlist, playitem, playmark);
-        return -1;
-    }
-
-    BD_DEBUG(DBG_HDMV, "play_at(list %d, item %d, mark %d)\n",
+    BD_DEBUG(DBG_HDMV, "play_at(list %u, item %d, mark %d)\n",
           playlist, playitem, playmark);
 
-    if (playlist >= 0) {
-        _queue_event(p, HDMV_EVENT_PLAY_PL, playlist);
-        _suspend_for_play_pl(p);
-    }
+    _queue_event(p, HDMV_EVENT_PLAY_PL, playlist);
+    _suspend_for_play_pl(p);
 
     if (playitem >= 0) {
         _queue_event(p, HDMV_EVENT_PLAY_PI, playitem);
@@ -669,6 +660,27 @@ static int _play_at(HDMV_VM *p, int playlist, int playitem, int playmark)
     return 0;
 }
 
+static int _link_at(HDMV_VM *p, int playitem, int playmark)
+{
+    if (!p->ig_object) {
+        BD_DEBUG(DBG_HDMV | DBG_CRIT, "link_at(item %d, mark %d): "
+              "link commands not allowed in movie objects\n",
+              playitem, playmark);
+        return -1;
+    }
+
+    if (playitem >= 0) {
+        BD_DEBUG(DBG_HDMV, "link_at(playitem %d)\n", playitem);
+        _queue_event(p, HDMV_EVENT_PLAY_PI, playitem);
+    }
+    else if (playmark >= 0) {
+        BD_DEBUG(DBG_HDMV, "link_at(mark %d)\n", playmark);
+        _queue_event(p, HDMV_EVENT_PLAY_PM, playmark);
+    }
+
+    return 0;
+}
+
 static int _play_stop(HDMV_VM *p)
 {
     if (!p->ig_object) {
@@ -1093,8 +1105,8 @@ static int _hdmv_step(HDMV_VM *p)
                         case INSN_PLAY_PL:      _play_at(p, dst,  -1,  -1); break;
                         case INSN_PLAY_PL_PI:   _play_at(p, dst, src,  -1); break;
                         case INSN_PLAY_PL_PM:   _play_at(p, dst,  -1, src); break;
-                        case INSN_LINK_PI:      _play_at(p,  -1, dst,  -1); break;
-                        case INSN_LINK_MK:      _play_at(p,  -1,  -1, dst); break;
+                        case INSN_LINK_PI:      _link_at(p,      dst,  -1); break;
+                        case INSN_LINK_MK:      _link_at(p,       -1, dst); break;
                         case INSN_TERMINATE_PL: if (!_play_stop(p)) { inc_pc = 0; } break;
                         default:
                             BD_DEBUG(DBG_HDMV|DBG_CRIT, "unknown BRANCH/PLAY option %d in opcode 0x%08x\n",



View it on GitLab: https://code.videolan.org/videolan/libbluray/-/compare/be4024642b23d7eaa0fd600765af8073d7b9012b...88f9d05d41aea76f5dc25444a8d752818eefca0b

-- 
View it on GitLab: https://code.videolan.org/videolan/libbluray/-/compare/be4024642b23d7eaa0fd600765af8073d7b9012b...88f9d05d41aea76f5dc25444a8d752818eefca0b
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the libbluray-devel mailing list