diff options
author | Uoti Urpala <uau@symbol.nonexistent.invalid> | 2008-04-24 08:43:56 +0300 |
---|---|---|
committer | Uoti Urpala <uau@symbol.nonexistent.invalid> | 2008-04-25 07:16:32 +0300 |
commit | 31db39d8ec9cd2b8df0123e2f2142a187733ecad (patch) | |
tree | d550915eb5339500161fb58ff30c991d97cc3171 /libmpcodecs/dec_video.c | |
parent | 7dc42263486bd45d2ba830f065a8556c02aaf7c8 (diff) | |
download | mpv-31db39d8ec9cd2b8df0123e2f2142a187733ecad.tar.bz2 mpv-31db39d8ec9cd2b8df0123e2f2142a187733ecad.tar.xz |
Make video decoder description structs const
This makes the per-decoder struct vd_functions and its ->info
struct constants. Same for the mpcodecs_vd_drivers[] table of
pointers to those structs.
Diffstat (limited to 'libmpcodecs/dec_video.c')
-rw-r--r-- | libmpcodecs/dec_video.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libmpcodecs/dec_video.c b/libmpcodecs/dec_video.c index a52580393b..b2c4b518ba 100644 --- a/libmpcodecs/dec_video.c +++ b/libmpcodecs/dec_video.c @@ -53,7 +53,7 @@ int get_video_quality_max(sh_video_t *sh_video) return ret; } } - struct vd_functions *vd = sh_video->vd_driver; + const struct vd_functions *vd = sh_video->vd_driver; if (vd) { int ret = vd->control(sh_video, VDCTRL_QUERY_MAX_PP_LEVEL, NULL); if (ret > 0) { @@ -72,7 +72,7 @@ void set_video_quality(sh_video_t *sh_video, int quality) if (ret == CONTROL_TRUE) return; // success } - struct vd_functions *vd = sh_video->vd_driver; + const struct vd_functions *vd = sh_video->vd_driver; if (vd) vd->control(sh_video, VDCTRL_SET_PP_LEVEL, (void *) (&quality)); } @@ -92,7 +92,7 @@ int set_video_colors(sh_video_t *sh_video, const char *item, int value) return (1); } /* try software control */ - struct vd_functions *vd = sh_video->vd_driver; + const struct vd_functions *vd = sh_video->vd_driver; if (vd && vd->control(sh_video, VDCTRL_SET_EQUALIZER, item, (int *) value) == CONTROL_OK) @@ -118,7 +118,7 @@ int get_video_colors(sh_video_t *sh_video, const char *item, int *value) } } /* try software control */ - struct vd_functions *vd = sh_video->vd_driver; + const struct vd_functions *vd = sh_video->vd_driver; if (vd) return vd->control(sh_video, VDCTRL_GET_EQUALIZER, item, value); return 0; @@ -140,14 +140,14 @@ int set_rectangle(sh_video_t *sh_video, int param, int value) void resync_video_stream(sh_video_t *sh_video) { - struct vd_functions *vd = sh_video->vd_driver; + const struct vd_functions *vd = sh_video->vd_driver; if (vd) vd->control(sh_video, VDCTRL_RESYNC_STREAM, NULL); } int get_current_video_decoder_lag(sh_video_t *sh_video) { - struct vd_functions *vd = sh_video->vd_driver; + const struct vd_functions *vd = sh_video->vd_driver; if (!vd) return -1; int ret = vd->control(sh_video, VDCTRL_QUERY_UNSEEN_FRAMES, NULL); @@ -283,7 +283,7 @@ static int init_video(sh_video_t *sh_video, char *codecname, char *vfm, } // init() - struct vd_functions *vd = sh_video->vd_driver; + const struct vd_functions *vd = sh_video->vd_driver; mp_msg(MSGT_DECVIDEO, MSGL_INFO, MSGTR_OpeningVideoDecoder, vd->info->short_name, vd->info->name); // clear vf init error, it is no longer relevant |