diff options
author | wm4 <wm4@nowhere> | 2013-12-24 17:46:08 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-12-24 17:46:08 +0100 |
commit | 9292f537d661af16321fd35eb0016e830594863b (patch) | |
tree | 452a7e854860c50a15e5893c4602430ef42076a6 /player/core.h | |
parent | 2b87415f6f38e93358b9d3034dcf5af6a70f43cc (diff) | |
download | mpv-9292f537d661af16321fd35eb0016e830594863b.tar.bz2 mpv-9292f537d661af16321fd35eb0016e830594863b.tar.xz |
player: add infrastructure to select multiple tracks at once
Of course this does not allow decoding multiple tracks at once; it just
adds some minor infrastructure, which could be used to achieve this.
Diffstat (limited to 'player/core.h')
-rw-r--r-- | player/core.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/player/core.h b/player/core.h index 2f0622de7c..cad18a6b36 100644 --- a/player/core.h +++ b/player/core.h @@ -147,6 +147,8 @@ enum { MAX_NUM_VO_PTS = 100, }; +#define NUM_PTRACKS 2 + typedef struct MPContext { struct mpv_global *global; struct MPOpts *opts; @@ -200,7 +202,9 @@ typedef struct MPContext { char *track_layout_hash; // Selected tracks. NULL if no track selected. - struct track *current_track[STREAM_TYPE_COUNT]; + // There can be NUM_PTRACKS of the same STREAM_TYPE selected at once. + // Currently, this is used for the secondary subtitle track only. + struct track *current_track[NUM_PTRACKS][STREAM_TYPE_COUNT]; struct dec_video *d_video; struct dec_audio *d_audio; @@ -369,6 +373,8 @@ void uninit_player(struct MPContext *mpctx, unsigned int mask); struct track *mp_add_subtitles(struct MPContext *mpctx, char *filename); void mp_switch_track(struct MPContext *mpctx, enum stream_type type, struct track *track); +void mp_switch_track_n(struct MPContext *mpctx, int order, + enum stream_type type, struct track *track); void mp_deselect_track(struct MPContext *mpctx, struct track *track); struct track *mp_track_by_tid(struct MPContext *mpctx, enum stream_type type, int tid); |