mirror of
https://github.com/mpv-player/mpv
synced 2025-03-23 11:47:45 +00:00
player: expose hearing/visual impaired flags on audio tracks
Signed-off-by: Aman Gupta <aman@tmm1.net>
This commit is contained in:
parent
c5d03d338e
commit
d5cad85625
@ -715,6 +715,10 @@ static void handle_new_stream(demuxer_t *demuxer, int i)
|
|||||||
sh->forced_track = true;
|
sh->forced_track = true;
|
||||||
if (st->disposition & AV_DISPOSITION_DEPENDENT)
|
if (st->disposition & AV_DISPOSITION_DEPENDENT)
|
||||||
sh->dependent_track = true;
|
sh->dependent_track = true;
|
||||||
|
if (st->disposition & AV_DISPOSITION_VISUAL_IMPAIRED)
|
||||||
|
sh->visual_impaired_track = true;
|
||||||
|
if (st->disposition & AV_DISPOSITION_HEARING_IMPAIRED)
|
||||||
|
sh->hearing_impaired_track = true;
|
||||||
if (st->disposition & AV_DISPOSITION_STILL_IMAGE)
|
if (st->disposition & AV_DISPOSITION_STILL_IMAGE)
|
||||||
sh->still_image = true;
|
sh->still_image = true;
|
||||||
if (priv->format_hack.use_stream_ids)
|
if (priv->format_hack.use_stream_ids)
|
||||||
|
@ -46,6 +46,8 @@ struct sh_stream {
|
|||||||
bool default_track; // container default track flag
|
bool default_track; // container default track flag
|
||||||
bool forced_track; // container forced track flag
|
bool forced_track; // container forced track flag
|
||||||
bool dependent_track; // container dependent track flag
|
bool dependent_track; // container dependent track flag
|
||||||
|
bool visual_impaired_track; // container flag
|
||||||
|
bool hearing_impaired_track;// container flag
|
||||||
bool still_image; // video stream contains still images
|
bool still_image; // video stream contains still images
|
||||||
int hls_bitrate;
|
int hls_bitrate;
|
||||||
|
|
||||||
|
@ -2250,6 +2250,8 @@ static int get_track_entry(int item, int action, void *arg, void *ctx)
|
|||||||
{"default", SUB_PROP_FLAG(track->default_track)},
|
{"default", SUB_PROP_FLAG(track->default_track)},
|
||||||
{"forced", SUB_PROP_FLAG(track->forced_track)},
|
{"forced", SUB_PROP_FLAG(track->forced_track)},
|
||||||
{"dependent", SUB_PROP_FLAG(track->dependent_track)},
|
{"dependent", SUB_PROP_FLAG(track->dependent_track)},
|
||||||
|
{"visual-impaired", SUB_PROP_FLAG(track->visual_impaired_track)},
|
||||||
|
{"hearing-impaired", SUB_PROP_FLAG(track->hearing_impaired_track)},
|
||||||
{"external", SUB_PROP_FLAG(track->is_external)},
|
{"external", SUB_PROP_FLAG(track->is_external)},
|
||||||
{"selected", SUB_PROP_FLAG(track->selected)},
|
{"selected", SUB_PROP_FLAG(track->selected)},
|
||||||
{"external-filename", SUB_PROP_STR(track->external_filename),
|
{"external-filename", SUB_PROP_STR(track->external_filename),
|
||||||
|
@ -134,6 +134,7 @@ struct track {
|
|||||||
|
|
||||||
char *title;
|
char *title;
|
||||||
bool default_track, forced_track, dependent_track;
|
bool default_track, forced_track, dependent_track;
|
||||||
|
bool visual_impaired_track, hearing_impaired_track;
|
||||||
bool attached_picture;
|
bool attached_picture;
|
||||||
char *lang;
|
char *lang;
|
||||||
|
|
||||||
|
@ -279,6 +279,9 @@ static struct track *add_stream_track(struct MPContext *mpctx,
|
|||||||
.title = stream->title,
|
.title = stream->title,
|
||||||
.default_track = stream->default_track,
|
.default_track = stream->default_track,
|
||||||
.forced_track = stream->forced_track,
|
.forced_track = stream->forced_track,
|
||||||
|
.dependent_track = stream->dependent_track,
|
||||||
|
.visual_impaired_track = stream->visual_impaired_track,
|
||||||
|
.hearing_impaired_track = stream->hearing_impaired_track,
|
||||||
.attached_picture = stream->attached_picture != NULL,
|
.attached_picture = stream->attached_picture != NULL,
|
||||||
.lang = stream->lang,
|
.lang = stream->lang,
|
||||||
.demuxer = demuxer,
|
.demuxer = demuxer,
|
||||||
|
Loading…
Reference in New Issue
Block a user