From 9838bf55657c3944150afec44668c3c3b559c1ff Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 10 Dec 2013 19:07:29 +0100 Subject: 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. --- video/decode/dec_video.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'video/decode/dec_video.h') 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 */ -- cgit v1.2.3