mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-26 21:00:21 +00:00
stream_bluray: add STREAM_CTRL_GET_TITLE_PLAYLIST
This commit is contained in:
@@ -86,7 +86,8 @@ enum stream_ctrl {
|
||||
STREAM_CTRL_GET_ANGLE,
|
||||
STREAM_CTRL_SET_ANGLE,
|
||||
STREAM_CTRL_GET_NUM_TITLES,
|
||||
STREAM_CTRL_GET_TITLE_LENGTH, // double* (in: title number, out: len)
|
||||
STREAM_CTRL_GET_TITLE_LENGTH, // double* (in: title number, out: len)
|
||||
STREAM_CTRL_GET_TITLE_PLAYLIST, // double* (in: title number, out: playlist)
|
||||
STREAM_CTRL_GET_LANG,
|
||||
STREAM_CTRL_GET_CURRENT_TITLE,
|
||||
STREAM_CTRL_SET_CURRENT_TITLE,
|
||||
|
||||
@@ -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