summaryrefslogtreecommitdiffstats
path: root/stream/stream_bluray.c
diff options
context:
space:
mode:
authorxylosper <darklin20@gmail.com>2014-03-12 14:41:34 +0900
committerwm4 <wm4@nowhere>2014-03-13 14:36:20 +0100
commit2f72eecd890da9c6f460b1351e02b90610dff88c (patch)
treea2d07b06b9700dced4fc707758b96c98c3c433c6 /stream/stream_bluray.c
parentd80dc885c6e0dc1b2d5defa6aeed215a710c0340 (diff)
downloadmpv-2f72eecd890da9c6f460b1351e02b90610dff88c.tar.bz2
mpv-2f72eecd890da9c6f460b1351e02b90610dff88c.tar.xz
command: set 'media-title' property for bluray disc with meta-data
Diffstat (limited to 'stream/stream_bluray.c')
-rw-r--r--stream/stream_bluray.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/stream/stream_bluray.c b/stream/stream_bluray.c
index d7a8d0b0cf..83d26c05fb 100644
--- a/stream/stream_bluray.c
+++ b/stream/stream_bluray.c
@@ -33,6 +33,7 @@
#include <assert.h>
#include <libbluray/bluray.h>
+#include <libbluray/meta_data.h>
#include <libavutil/common.h>
#include "config.h"
@@ -277,7 +278,14 @@ static int bluray_stream_control(stream_t *s, int cmd, void *arg)
}
case STREAM_CTRL_MANAGES_TIMELINE:
return STREAM_OK;
-
+ case STREAM_CTRL_GET_DISC_NAME:
+ {
+ const struct meta_dl *meta = bd_get_meta(b->bd);
+ if (!meta || !meta->di_name || !meta->di_name[0])
+ break;
+ *(char**)arg = talloc_strdup(NULL, meta->di_name);
+ return STREAM_OK;
+ }
default:
break;
}