summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2009-09-05 06:20:03 +0300
committerUoti Urpala <uau@glyph.nonexistent.invalid>2009-09-05 06:25:55 +0300
commit1d5421846519c4aad0c4e84c14cad342789425d9 (patch)
tree92e821d52a46056d8f08ff9ee92aff7572aa9d84 /libvo
parentd9cea6a98b1f0879c163e198061f1380c5ee8432 (diff)
downloadmpv-1d5421846519c4aad0c4e84c14cad342789425d9.tar.bz2
mpv-1d5421846519c4aad0c4e84c14cad342789425d9.tar.xz
vo_vdpau.c: Reindent control() switch statement
Diffstat (limited to 'libvo')
-rw-r--r--libvo/vo_vdpau.c153
1 files changed, 76 insertions, 77 deletions
diff --git a/libvo/vo_vdpau.c b/libvo/vo_vdpau.c
index 7778c093d0..258b40c9ad 100644
--- a/libvo/vo_vdpau.c
+++ b/libvo/vo_vdpau.c
@@ -1293,85 +1293,84 @@ static int control(struct vo *vo, uint32_t request, void *data)
struct vdp_functions *vdp = vc->vdp;
switch (request) {
- case VOCTRL_GET_DEINTERLACE:
- *(int*)data = vc->deint;
- return VO_TRUE;
- case VOCTRL_SET_DEINTERLACE:
- vc->deint = *(int*)data;
- if (vc->deint)
- vc->deint = vc->deint_type;
- if (vc->deint_type > 2) {
- VdpStatus vdp_st;
- VdpVideoMixerFeature features[1] =
- {vc->deint_type == 3 ?
- VDP_VIDEO_MIXER_FEATURE_DEINTERLACE_TEMPORAL :
- VDP_VIDEO_MIXER_FEATURE_DEINTERLACE_TEMPORAL_SPATIAL};
- VdpBool feature_enables[1] = {vc->deint ? VDP_TRUE : VDP_FALSE};
- vdp_st = vdp->video_mixer_set_feature_enables(vc->video_mixer,
- 1, features,
- feature_enables);
- CHECK_ST_WARNING("Error changing deinterlacing settings");
- vc->deint_buffer_past_frames = 1;
- }
- return VO_TRUE;
- case VOCTRL_PAUSE:
- return (vc->paused = true);
- case VOCTRL_RESUME:
- return (vc->paused = false);
- case VOCTRL_QUERY_FORMAT:
- return query_format(*(uint32_t *)data);
- case VOCTRL_GET_IMAGE:
- return get_image(vo, data);
- case VOCTRL_DRAW_IMAGE:
- return draw_image(vo, data);
- case VOCTRL_BORDER:
- vo_x11_border(vo);
- resize(vo);
- return VO_TRUE;
- case VOCTRL_FULLSCREEN:
- vo_x11_fullscreen(vo);
- resize(vo);
- return VO_TRUE;
- case VOCTRL_GET_PANSCAN:
- return VO_TRUE;
- case VOCTRL_SET_PANSCAN:
- resize(vo);
- return VO_TRUE;
- case VOCTRL_SET_EQUALIZER: {
- struct voctrl_set_equalizer_args *args = data;
- return set_equalizer(vo, args->name, args->value);
- }
- case VOCTRL_GET_EQUALIZER:
- {
- struct voctrl_get_equalizer_args *args = data;
- return get_equalizer(vo, args->name, args->valueptr);
+ case VOCTRL_GET_DEINTERLACE:
+ *(int*)data = vc->deint;
+ return VO_TRUE;
+ case VOCTRL_SET_DEINTERLACE:
+ vc->deint = *(int*)data;
+ if (vc->deint)
+ vc->deint = vc->deint_type;
+ if (vc->deint_type > 2) {
+ VdpStatus vdp_st;
+ VdpVideoMixerFeature features[1] =
+ {vc->deint_type == 3 ?
+ VDP_VIDEO_MIXER_FEATURE_DEINTERLACE_TEMPORAL :
+ VDP_VIDEO_MIXER_FEATURE_DEINTERLACE_TEMPORAL_SPATIAL};
+ VdpBool feature_enables[1] = {vc->deint ? VDP_TRUE : VDP_FALSE};
+ vdp_st = vdp->video_mixer_set_feature_enables(vc->video_mixer,
+ 1, features,
+ feature_enables);
+ CHECK_ST_WARNING("Error changing deinterlacing settings");
+ vc->deint_buffer_past_frames = 1;
}
- case VOCTRL_ONTOP:
- vo_x11_ontop(vo);
- return VO_TRUE;
- case VOCTRL_UPDATE_SCREENINFO:
- update_xinerama_info(vo);
- return VO_TRUE;
- case VOCTRL_DRAW_EOSD:
- if (!data)
- return VO_FALSE;
- generate_eosd(vo, data);
- draw_eosd(vo);
- return VO_TRUE;
- case VOCTRL_GET_EOSD_RES: {
- mp_eosd_res_t *r = data;
- r->mt = r->mb = r->ml = r->mr = 0;
- if (vo_fs) {
- r->w = vo->opts->vo_screenwidth;
- r->h = vo->opts->vo_screenheight;
- r->ml = r->mr = vc->border_x;
- r->mt = r->mb = vc->border_y;
- } else {
- r->w = vo->dwidth;
- r->h = vo->dheight;
- }
- return VO_TRUE;
+ return VO_TRUE;
+ case VOCTRL_PAUSE:
+ return (vc->paused = true);
+ case VOCTRL_RESUME:
+ return (vc->paused = false);
+ case VOCTRL_QUERY_FORMAT:
+ return query_format(*(uint32_t *)data);
+ case VOCTRL_GET_IMAGE:
+ return get_image(vo, data);
+ case VOCTRL_DRAW_IMAGE:
+ return draw_image(vo, data);
+ case VOCTRL_BORDER:
+ vo_x11_border(vo);
+ resize(vo);
+ return VO_TRUE;
+ case VOCTRL_FULLSCREEN:
+ vo_x11_fullscreen(vo);
+ resize(vo);
+ return VO_TRUE;
+ case VOCTRL_GET_PANSCAN:
+ return VO_TRUE;
+ case VOCTRL_SET_PANSCAN:
+ resize(vo);
+ return VO_TRUE;
+ case VOCTRL_SET_EQUALIZER: {
+ struct voctrl_set_equalizer_args *args = data;
+ return set_equalizer(vo, args->name, args->value);
+ }
+ case VOCTRL_GET_EQUALIZER: {
+ struct voctrl_get_equalizer_args *args = data;
+ return get_equalizer(vo, args->name, args->valueptr);
+ }
+ case VOCTRL_ONTOP:
+ vo_x11_ontop(vo);
+ return VO_TRUE;
+ case VOCTRL_UPDATE_SCREENINFO:
+ update_xinerama_info(vo);
+ return VO_TRUE;
+ case VOCTRL_DRAW_EOSD:
+ if (!data)
+ return VO_FALSE;
+ generate_eosd(vo, data);
+ draw_eosd(vo);
+ return VO_TRUE;
+ case VOCTRL_GET_EOSD_RES: {
+ mp_eosd_res_t *r = data;
+ r->mt = r->mb = r->ml = r->mr = 0;
+ if (vo_fs) {
+ r->w = vo->opts->vo_screenwidth;
+ r->h = vo->opts->vo_screenheight;
+ r->ml = r->mr = vc->border_x;
+ r->mt = r->mb = vc->border_y;
+ } else {
+ r->w = vo->dwidth;
+ r->h = vo->dheight;
}
+ return VO_TRUE;
+ }
}
return VO_NOTIMPL;
}