diff options
author | wm4 <wm4@nowhere> | 2013-11-23 21:22:17 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-11-23 21:22:17 +0100 |
commit | 0f5ec05d8f4ae02262dc79a895bce3b465b376f2 (patch) | |
tree | ba5fc3f640eeefa44a28695f8cd3f63ba2eec2c9 /mpvcore/player/mp_core.h | |
parent | 705a7310e6c823a72c961720f8ae416962f1398a (diff) | |
download | mpv-0f5ec05d8f4ae02262dc79a895bce3b465b376f2.tar.bz2 mpv-0f5ec05d8f4ae02262dc79a895bce3b465b376f2.tar.xz |
audio: move decoder context from sh_audio into new struct
Move all state that basically changes during decoding or is needed in
order to manage decoding itself into a new struct (dec_audio).
sh_audio (defined in stheader.h) is supposed to be the audio stream
header. This should reflect the file headers for the stream. Putting the
decoder context there is strange design, to say the least.
Diffstat (limited to 'mpvcore/player/mp_core.h')
-rw-r--r-- | mpvcore/player/mp_core.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mpvcore/player/mp_core.h b/mpvcore/player/mp_core.h index 4e15f49c49..aa0728d10f 100644 --- a/mpvcore/player/mp_core.h +++ b/mpvcore/player/mp_core.h @@ -199,10 +199,11 @@ typedef struct MPContext { struct track *current_track[STREAM_TYPE_COUNT]; struct sh_stream *sh[STREAM_TYPE_COUNT]; - struct sh_audio *sh_audio; // same as sh[STREAM_AUDIO]->audio struct sh_video *sh_video; // same as sh[STREAM_VIDEO]->video struct sh_sub *sh_sub; // same as sh[STREAM_SUB]->sub + struct dec_audio *d_audio; + // Uses: accessing metadata (consider ordered chapters case, where the main // demuxer defines metadata), or special purpose demuxers like TV. struct demuxer *master_demuxer; @@ -357,7 +358,8 @@ struct track *mp_track_by_tid(struct MPContext *mpctx, enum stream_type type, int tid); bool timeline_set_part(struct MPContext *mpctx, int i, bool force); double timeline_set_from_time(struct MPContext *mpctx, double pts, bool *need_reset); -void init_demux_stream(struct MPContext *mpctx, enum stream_type type); +struct sh_stream *init_demux_stream(struct MPContext *mpctx, + enum stream_type type); void cleanup_demux_stream(struct MPContext *mpctx, enum stream_type type); void add_demuxer_tracks(struct MPContext *mpctx, struct demuxer *demuxer); bool mp_remove_track(struct MPContext *mpctx, struct track *track); |