summaryrefslogtreecommitdiffstats
path: root/stream/stream_dvd.c
diff options
context:
space:
mode:
authorxylosper <darklin20@gmail.com>2014-02-24 00:43:04 +0900
committerwm4 <wm4@nowhere>2014-02-23 18:16:24 +0100
commit5cbef87c17ce4944893b53796370a1ffeb7a24f0 (patch)
tree38239784f3dbb5925ed604b1f7f1718960b7846c /stream/stream_dvd.c
parent8906e409250da939e40c57783ef349cfdecc99d8 (diff)
downloadmpv-5cbef87c17ce4944893b53796370a1ffeb7a24f0.tar.bz2
mpv-5cbef87c17ce4944893b53796370a1ffeb7a24f0.tar.xz
command: use DVD volume ID for media-title property
Signed-off-by: wm4 <wm4@nowhere> Closes #582.
Diffstat (limited to 'stream/stream_dvd.c')
-rw-r--r--stream/stream_dvd.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/stream/stream_dvd.c b/stream/stream_dvd.c
index 27b539901d..7e3c9c1cc3 100644
--- a/stream/stream_dvd.c
+++ b/stream/stream_dvd.c
@@ -727,6 +727,15 @@ static int control(stream_t *stream,int cmd,void* arg)
memcpy(req->palette, d->cur_pgc->palette, sizeof(req->palette));
return STREAM_OK;
}
+ case STREAM_CTRL_GET_DVD_VOLUME_ID:
+ {
+ char buffer[128];
+ if (DVDUDFVolumeInfo(d->dvd, buffer, sizeof(buffer), NULL, 0) < 0
+ && DVDISOVolumeInfo(d->dvd, buffer, sizeof(buffer), NULL, 0) < 0)
+ return STREAM_ERROR;
+ *(char**)arg = talloc_strdup(NULL, buffer);
+ return STREAM_OK;
+ }
}
return STREAM_UNSUPPORTED;
}