[libbluray-devel] Add primary audio stream to bd_select_stream()

hpi1 git at videolan.org
Tue Nov 10 12:18:48 CET 2015


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Tue Nov 10 13:15:26 2015 +0200| [43e6735684858c4693ec3566de01220a96c9d6cc] | committer: hpi1

Add primary audio stream to bd_select_stream()

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=43e6735684858c4693ec3566de01220a96c9d6cc
---

 src/libbluray/bluray.c |    3 +++
 src/libbluray/bluray.h |    1 +
 2 files changed, 4 insertions(+)

diff --git a/src/libbluray/bluray.c b/src/libbluray/bluray.c
index 5a4ffe6..b4d91a8 100644
--- a/src/libbluray/bluray.c
+++ b/src/libbluray/bluray.c
@@ -2788,6 +2788,9 @@ void bd_select_stream(BLURAY *bd, uint32_t stream_type, uint32_t stream_id, uint
     bd_mutex_lock(&bd->mutex);
 
     switch (stream_type) {
+        case BLURAY_AUDIO_STREAM:
+            bd_psr_write(bd->regs, PSR_PRIMARY_AUDIO_ID, stream_id & 0xff);
+            break;
         case BLURAY_PG_TEXTST_STREAM:
             bd_psr_write_bits(bd->regs, PSR_PG_STREAM,
                               ((!!enable_flag)<<31) | (stream_id & 0xfff),
diff --git a/src/libbluray/bluray.h b/src/libbluray/bluray.h
index 50e7e00..ae9f412 100644
--- a/src/libbluray/bluray.h
+++ b/src/libbluray/bluray.h
@@ -553,6 +553,7 @@ void bd_seamless_angle_change(BLURAY *bd, unsigned angle);
  * @param stream_id  stream number (1..N)
  * @param enable_flag  set to 0 to disable streams of this type
  */
+#define BLURAY_AUDIO_STREAM      0
 #define BLURAY_PG_TEXTST_STREAM  1
 
 void bd_select_stream(BLURAY *bd, uint32_t stream_type, uint32_t stream_id, uint32_t enable_flag);



More information about the libbluray-devel mailing list