summaryrefslogtreecommitdiffstats
path: root/libmpcodecs/vd.h
diff options
context:
space:
mode:
authorUoti Urpala <uau@mplayer2.org>2011-06-26 00:46:40 +0300
committerUoti Urpala <uau@mplayer2.org>2011-06-26 06:27:50 +0300
commitd3bef0286bc0688da91452f6e07429052d324b51 (patch)
treeb64a16aa7754a5299fbee3e71018ab5d3a5a7f3c /libmpcodecs/vd.h
parentaba8a1838aa882dace748a7402caf3087dc1f25f (diff)
downloadmpv-d3bef0286bc0688da91452f6e07429052d324b51.tar.bz2
mpv-d3bef0286bc0688da91452f6e07429052d324b51.tar.xz
vd_ffmpeg: autoselect output colorspaces without codecs.conf
Selecting the colorspace to output from a decoder is done in the function mpcodecs_config_vo(). Add a new version of this function, mpcodecs_config_vo2(), that allows the decoder to specify a list of candidate colorspaces instead of always using a hardcoded list specified in the codecs.conf entry. If the codecs.conf entry has any "out" lines then those still take priority and the decoder-provided list (if any) is ignored. Make vd_ffmpeg provide a list of the colorspaces it's willing to output. Remove "out" lines from most entries for libavcodec video decoders in codecs.conf, so that the automatic values are now used instead.
Diffstat (limited to 'libmpcodecs/vd.h')
-rw-r--r--libmpcodecs/vd.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/libmpcodecs/vd.h b/libmpcodecs/vd.h
index 4615a9dc6e..76f3d00553 100644
--- a/libmpcodecs/vd.h
+++ b/libmpcodecs/vd.h
@@ -49,7 +49,15 @@ extern const vd_functions_t * const mpcodecs_vd_drivers[];
#define VDCTRL_QUERY_UNSEEN_FRAMES 9 /* current decoder lag */
// callbacks:
-int mpcodecs_config_vo(sh_video_t *sh, int w, int h, unsigned int preferred_outfmt);
+int mpcodecs_config_vo2(sh_video_t *sh, int w, int h,
+ const unsigned int *outfmts,
+ unsigned int preferred_outfmt);
+static inline int mpcodecs_config_vo(sh_video_t *sh, int w, int h,
+ unsigned int preferred_outfmt)
+{
+ return mpcodecs_config_vo2(sh, w, h, NULL, preferred_outfmt);
+}
+
mp_image_t* mpcodecs_get_image(sh_video_t *sh, int mp_imgtype, int mp_imgflag, int w, int h);
void mpcodecs_draw_slice(sh_video_t *sh, unsigned char** src, int* stride, int w,int h, int x, int y);