diff options
author | wm4 <wm4@nowhere> | 2013-12-10 19:07:29 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-12-10 20:07:39 +0100 |
commit | 9838bf55657c3944150afec44668c3c3b559c1ff (patch) | |
tree | 6c4b37bddb6a7594a7abe361f2c5d2bad1280039 /video/decode/dec_video.h | |
parent | 218b9d3737134a9f619c49992a5fb34ad9e3733b (diff) | |
download | mpv-9838bf55657c3944150afec44668c3c3b559c1ff.tar.bz2 mpv-9838bf55657c3944150afec44668c3c3b559c1ff.tar.xz |
video: move video filter chain initialization from decoder to player
This should help fixing some issues (like not draining video frames
correctly on reinit), as well as decoupling the decoder, filter chain,
and VO code.
I also wanted to make the hardware video decoding fallback work properly
if software-only video filters are inserted. This currently has the
issue that the fallback is too violent, and throws away a bunch of
demuxer packets needed to restart software decoding properly. But
keeping "backup" packets turned out as too hacky, so I'm not doing this,
at least not yet.
Diffstat (limited to 'video/decode/dec_video.h')
-rw-r--r-- | video/decode/dec_video.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/video/decode/dec_video.h b/video/decode/dec_video.h index 29e23ff322..7d30e6fd91 100644 --- a/video/decode/dec_video.h +++ b/video/decode/dec_video.h @@ -32,13 +32,14 @@ struct dec_video { struct MPOpts *opts; struct vf_chain *vfilter; // video filter chain const struct vd_functions *vd_driver; - long vf_reconfig_count; // incremented each mpcodecs_reconfig_vo() call - struct mp_image_params vf_input; // video filter input params struct mp_hwdec_info hwdec_info; // video output hwdec handles struct sh_stream *header; char *decoder_desc; + struct mp_image_params decoder_output; // last output of the decoder + struct mp_image_params vf_input; // video filter input params + void *priv; // for free use by vd_driver // Last PTS from decoder (set with each vd_driver->decode() call) @@ -89,7 +90,9 @@ struct mp_image *video_decode(struct dec_video *d_video, 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); void video_reset_decoding(struct dec_video *d_video); -void video_reinit_vo(struct dec_video *d_video); int video_vd_control(struct dec_video *d_video, int cmd, void *arg); +int video_reconfig_filters(struct dec_video *d_video, + const struct mp_image_params *params); + #endif /* MPLAYER_DEC_VIDEO_H */ |