mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
stream_bluray: add STREAM_CTRL_GET_TITLE_PLAYLIST
This commit is contained in:
@@ -276,6 +276,16 @@ static int bluray_stream_control(stream_t *s, int cmd, void *arg)
|
||||
*(double *)arg = BD_TIME_TO_MP(ti->duration);
|
||||
return STREAM_OK;
|
||||
}
|
||||
case STREAM_CTRL_GET_TITLE_PLAYLIST: {
|
||||
int title = *(double *)arg;
|
||||
if (!b->bd || title < 0 || title >= b->num_titles)
|
||||
return STREAM_UNSUPPORTED;
|
||||
const BLURAY_TITLE_INFO *ti = bd_get_title_info(b->bd, title, 0);
|
||||
if (!ti)
|
||||
return STREAM_UNSUPPORTED;
|
||||
*(double *)arg = ti->playlist;
|
||||
return STREAM_OK;
|
||||
}
|
||||
case STREAM_CTRL_GET_LANG: {
|
||||
const BLURAY_TITLE_INFO *ti = b->title_info;
|
||||
if (ti && ti->clip_count) {
|
||||
|
||||
Reference in New Issue
Block a user