stream_bluray: add STREAM_CTRL_GET_TITLE_PLAYLIST

This commit is contained in:
Kacper Michajłow
2024-12-02 22:26:49 +01:00
parent de951c383b
commit e9b5773bf9
2 changed files with 12 additions and 1 deletions

View File

@@ -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) {