[MPlayer-cvslog] r34737 - trunk/stream/stream_bluray.c

reimar subversion at mplayerhq.hu
Sun Feb 19 14:39:16 CET 2012


Author: reimar
Date: Sun Feb 19 14:39:16 2012
New Revision: 34737

Log:
Support showing the stream language with br:// playback.

Modified:
   trunk/stream/stream_bluray.c

Modified: trunk/stream/stream_bluray.c
==============================================================================
--- trunk/stream/stream_bluray.c	Sun Feb 19 14:15:41 2012	(r34736)
+++ trunk/stream/stream_bluray.c	Sun Feb 19 14:39:16 2012	(r34737)
@@ -191,6 +191,36 @@ static int bluray_stream_control(stream_
         return 1;
     }
 
+    case STREAM_CTRL_GET_LANG: {
+        struct stream_lang_req *req = arg;
+        BLURAY_TITLE_INFO *ti = bd_get_title_info(b->bd, b->current_title, b->current_angle);
+        if (ti->clip_count) {
+            BLURAY_STREAM_INFO *si = NULL;
+            int count = 0;
+            switch (req->type) {
+            case stream_ctrl_audio:
+                count = ti->clips[0].audio_stream_count;
+                si = ti->clips[0].audio_streams;
+                break;
+            case stream_ctrl_sub:
+                count = ti->clips[0].pg_stream_count;
+                si = ti->clips[0].pg_streams;
+                break;
+            }
+            while (count-- > 0) {
+                if (si->pid == req->id) {
+                    memcpy(req->buf, si->lang, 4);
+                    req->buf[4] = 0;
+                    bd_free_title_info(ti);
+                    return STREAM_OK;
+                }
+                si++;
+            }
+        }
+        bd_free_title_info(ti);
+        return STREAM_ERROR;
+    }
+
     default:
         break;
     }


More information about the MPlayer-cvslog mailing list