summaryrefslogtreecommitdiffstats
path: root/video/decode/dec_video.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-11-23 21:36:20 +0100
committerwm4 <wm4@nowhere>2013-11-23 21:36:20 +0100
commit3486302514db31b8086f46226d9b46d53810d1e7 (patch)
treea5b35e0a67d4cee1b5ec8bb0d489f38495d66b3c /video/decode/dec_video.h
parent057af4697cf65709012f41ff2f0d97b918c51d79 (diff)
downloadmpv-3486302514db31b8086f46226d9b46d53810d1e7.tar.bz2
mpv-3486302514db31b8086f46226d9b46d53810d1e7.tar.xz
video: move decoder context from sh_video into new struct
This is similar to the sh_audio commit. This is mostly cosmetic in nature, except that it also adds automatical freeing of the decoder driver's state struct (which was in sh_video->context, now in dec_video->priv). Also remove all the stheader.h fields that are not needed anymore.
Diffstat (limited to 'video/decode/dec_video.h')
-rw-r--r--video/decode/dec_video.h53
1 files changed, 43 insertions, 10 deletions
diff --git a/video/decode/dec_video.h b/video/decode/dec_video.h
index 3f163bb1f7..b706910e5b 100644
--- a/video/decode/dec_video.h
+++ b/video/decode/dec_video.h
@@ -20,24 +20,57 @@
#define MPLAYER_DEC_VIDEO_H
#include "demux/stheader.h"
+#include "video/hwdec.h"
+#include "video/mp_image.h"
struct osd_state;
struct mp_decoder_list;
-struct mp_decoder_list *mp_video_decoder_list(void);
+struct dec_video {
+ struct MPOpts *opts;
+ struct vf_instance *vfilter; // video filter chain
+ const struct vd_functions *vd_driver;
+ int vf_initialized; // -1 failed, 0 not done, 1 done
+ 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
+ int initialized;
+ struct sh_stream *header;
-int init_best_video_codec(sh_video_t *sh_video, char* video_decoders);
-void uninit_video(sh_video_t *sh_video);
+ char *decoder_desc;
+
+ void *priv;
+
+ float next_frame_time;
+ double last_pts;
+ double buffered_pts[32];
+ int num_buffered_pts;
+ double codec_reordered_pts;
+ double prev_codec_reordered_pts;
+ int num_reordered_pts_problems;
+ double sorted_pts;
+ double prev_sorted_pts;
+ int num_sorted_pts_problems;
+ int pts_assoc_mode;
+ double pts;
+
+ float stream_aspect; // aspect ratio in media headers (DVD IFO files)
+ int i_bps; // == bitrate (compressed bytes/sec)
+};
+
+struct mp_decoder_list *video_decoder_list(void);
+
+int video_init_best_codec(struct dec_video *d_video, char* video_decoders);
+void video_uninit(struct dec_video *d_video);
struct demux_packet;
-void *decode_video(sh_video_t *sh_video, struct demux_packet *packet,
+void *video_decode(struct dec_video *d_video, struct demux_packet *packet,
int drop_frame, double pts);
-int get_video_colors(sh_video_t *sh_video, const char *item, int *value);
-int set_video_colors(sh_video_t *sh_video, const char *item, int value);
-void resync_video_stream(sh_video_t *sh_video);
-void video_reinit_vo(struct sh_video *sh_video);
-int get_current_video_decoder_lag(sh_video_t *sh_video);
-int vd_control(struct sh_video *sh_video, int cmd, void *arg);
+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_resync_stream(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);
#endif /* MPLAYER_DEC_VIDEO_H */