summaryrefslogtreecommitdiffstats
path: root/video/decode/dec_video.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-01-14 00:18:36 +0100
committerwm4 <wm4@nowhere>2016-01-14 00:18:36 +0100
commit5722f93a740e841cfe929980c7ac4d4f7896d9dc (patch)
treecf8c438e2a2fcec438d1a1ceb0816b138063e322 /video/decode/dec_video.c
parentbf13bd0d47e5fc6761c51c6ba7056968e60bf4cd (diff)
downloadmpv-5722f93a740e841cfe929980c7ac4d4f7896d9dc.tar.bz2
mpv-5722f93a740e841cfe929980c7ac4d4f7896d9dc.tar.xz
video: refactor: shuffle code around
struct dec_video should have nothing to do with video filters or outputs, and this huge chunk of code was somehow stuck directly in dec_video.c.
Diffstat (limited to 'video/decode/dec_video.c')
-rw-r--r--video/decode/dec_video.c71
1 files changed, 0 insertions, 71 deletions
diff --git a/video/decode/dec_video.c b/video/decode/dec_video.c
index 772bab2f16..b120a69957 100644
--- a/video/decode/dec_video.c
+++ b/video/decode/dec_video.c
@@ -79,41 +79,6 @@ int video_vd_control(struct dec_video *d_video, int cmd, void *arg)
return CONTROL_UNKNOWN;
}
-int video_set_colors(struct dec_video *d_video, const char *item, int value)
-{
- vf_equalizer_t data;
-
- data.item = item;
- data.value = value;
-
- MP_VERBOSE(d_video, "set video colors %s=%d \n", item, value);
- if (d_video->vfilter) {
- int ret = video_vf_vo_control(d_video, VFCTRL_SET_EQUALIZER, &data);
- if (ret == CONTROL_TRUE)
- return 1;
- }
- MP_VERBOSE(d_video, "Video attribute '%s' is not supported by selected vo.\n",
- item);
- return 0;
-}
-
-int video_get_colors(struct dec_video *d_video, const char *item, int *value)
-{
- vf_equalizer_t data;
-
- data.item = item;
-
- MP_VERBOSE(d_video, "get video colors %s \n", item);
- if (d_video->vfilter) {
- int ret = video_vf_vo_control(d_video, VFCTRL_GET_EQUALIZER, &data);
- if (ret == CONTROL_TRUE) {
- *value = data.value;
- return 1;
- }
- }
- return 0;
-}
-
void video_uninit(struct dec_video *d_video)
{
mp_image_unrefp(&d_video->waiting_decoded_mpi);
@@ -398,39 +363,3 @@ struct mp_image *video_decode(struct dec_video *d_video,
d_video->decoded_pts = pts;
return mpi;
}
-
-// Send a VCTRL, or if it doesn't work, translate it to a VOCTRL and try the VO.
-int video_vf_vo_control(struct dec_video *d_video, int vf_cmd, void *data)
-{
- if (d_video->vfilter && d_video->vfilter->initialized > 0) {
- int r = vf_control_any(d_video->vfilter, vf_cmd, data);
- if (r != CONTROL_UNKNOWN)
- return r;
- }
-
- switch (vf_cmd) {
- case VFCTRL_GET_DEINTERLACE:
- return vo_control(d_video->vo, VOCTRL_GET_DEINTERLACE, data) == VO_TRUE;
- case VFCTRL_SET_DEINTERLACE:
- return vo_control(d_video->vo, VOCTRL_SET_DEINTERLACE, data) == VO_TRUE;
- case VFCTRL_SET_EQUALIZER: {
- vf_equalizer_t *eq = data;
- if (!d_video->vo->config_ok)
- return CONTROL_FALSE; // vo not configured?
- struct voctrl_set_equalizer_args param = {
- eq->item, eq->value
- };
- return vo_control(d_video->vo, VOCTRL_SET_EQUALIZER, &param) == VO_TRUE;
- }
- case VFCTRL_GET_EQUALIZER: {
- vf_equalizer_t *eq = data;
- if (!d_video->vo->config_ok)
- return CONTROL_FALSE; // vo not configured?
- struct voctrl_get_equalizer_args param = {
- eq->item, &eq->value
- };
- return vo_control(d_video->vo, VOCTRL_GET_EQUALIZER, &param) == VO_TRUE;
- }
- }
- return CONTROL_UNKNOWN;
-}