summaryrefslogtreecommitdiffstats
path: root/player/core.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-01-14 00:18:48 +0100
committerwm4 <wm4@nowhere>2016-01-14 00:18:48 +0100
commit9a88b118b4ffe22f1747375b42bc57f3b5d33ed0 (patch)
treeaab35e2d42d212e853578f1a1fa734e438810a41 /player/core.h
parent785eacf4f3561085814b3418edbd0fc52a5dc162 (diff)
downloadmpv-9a88b118b4ffe22f1747375b42bc57f3b5d33ed0.tar.bz2
mpv-9a88b118b4ffe22f1747375b42bc57f3b5d33ed0.tar.xz
video: decouple filtering/decoding slightly more
Lots of noise to remove the vfilter/vo fields from dec_video. From now on, video filtering and output will still be done together, summarized under struct vo_chain. There is the question where exactly the vf_chain should go in such a decoupled architecture. The end goal is being able to place a "complex" filter between video decoders and output (which will culminate in natural integration of A->V filters for natural integration of libavfilter audio visualizations). The vf_chain is still useful for "final" processing, such as format conversions and deinterlacing. Also, there's only 1 VO and 1 --vf option. So having 1 vf_chain for a VO seems ideal, since otherwise there would be no natural way to handle all these existing options and mechanisms. There is still some work required to truly decouple decoding.
Diffstat (limited to 'player/core.h')
-rw-r--r--player/core.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/player/core.h b/player/core.h
index fe7f380b2e..6057725983 100644
--- a/player/core.h
+++ b/player/core.h
@@ -148,6 +148,14 @@ struct track {
bool preloaded;
};
+// Summarizes video filtering and output.
+struct vo_chain {
+ struct mp_log *log;
+
+ struct vf_chain *vf;
+ struct vo *vo;
+};
+
/* Note that playback can be paused, stopped, etc. at any time. While paused,
* playback restart is still active, because you want seeking to work even
* if paused.
@@ -258,6 +266,8 @@ typedef struct MPContext {
struct mp_audio *ao_decoder_fmt; // for weak gapless audio check
struct mp_audio_buffer *ao_buffer; // queued audio; passed to ao_play() later
+ struct vo_chain *vo_chain;
+
struct vo *video_out;
// next_frame[0] is the next frame, next_frame[1] the one after that.
// The +1 is for adding 1 additional frame in backstep mode.
@@ -511,9 +521,9 @@ void update_osd_msg(struct MPContext *mpctx);
bool update_subtitles(struct MPContext *mpctx, double video_pts);
// video.c
-int video_get_colors(struct dec_video *d_video, const char *item, int *value);
-int video_set_colors(struct dec_video *d_video, const char *item, int value);
-int video_vf_vo_control(struct dec_video *d_video, int vf_cmd, void *data);
+int video_get_colors(struct vo_chain *vo_c, const char *item, int *value);
+int video_set_colors(struct vo_chain *vo_c, const char *item, int value);
+int video_vf_vo_control(struct vo_chain *vo_c, int vf_cmd, void *data);
void reset_video_state(struct MPContext *mpctx);
int reinit_video_chain(struct MPContext *mpctx);
int reinit_video_filters(struct MPContext *mpctx);