summaryrefslogtreecommitdiffstats
path: root/video/out/aspect.c
diff options
context:
space:
mode:
authorAlexander Preisinger <alexander.preisinger@gmail.com>2013-03-04 22:41:27 +0100
committerAlexander Preisinger <alexander.preisinger@gmail.com>2013-03-04 23:32:47 +0100
commit1198c031e4233a0cff5aa7d24aab986163f6903a (patch)
treebff49197908452f3ad1363edcf4c527db9bf1fe0 /video/out/aspect.c
parent4949992264d78d6dd22c0f6c611850402fd6eb30 (diff)
downloadmpv-1198c031e4233a0cff5aa7d24aab986163f6903a.tar.bz2
mpv-1198c031e4233a0cff5aa7d24aab986163f6903a.tar.xz
vo: Separate vo options from MPOpts
Separate the video output options from the big MPOpts structure and also only pass the new mp_vo_opts structure to the vo backend. Move video_driver_list into mp_vo_opts
Diffstat (limited to 'video/out/aspect.c')
-rw-r--r--video/out/aspect.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/video/out/aspect.c b/video/out/aspect.c
index e7ca37a82d..cf2b0ca383 100644
--- a/video/out/aspect.c
+++ b/video/out/aspect.c
@@ -36,7 +36,7 @@ void aspect_save_videores(struct vo *vo, int w, int h, int d_w, int d_h)
void aspect_save_screenres(struct vo *vo, int scrw, int scrh)
{
mp_msg(MSGT_VO, MSGL_DBG2, "aspect_save_screenres %dx%d\n", scrw, scrh);
- struct MPOpts *opts = vo->opts;
+ struct mp_vo_opts *opts = vo->opts;
if (scrw <= 0 && scrh <= 0)
scrw = 1024;
if (scrh <= 0)
@@ -45,10 +45,10 @@ void aspect_save_screenres(struct vo *vo, int scrw, int scrh)
scrw = (scrh * 4 + 2) / 3;
vo->aspdat.scrw = scrw;
vo->aspdat.scrh = scrh;
- if (opts->vo.force_monitor_aspect)
- vo->monitor_par = opts->vo.force_monitor_aspect * scrh / scrw;
+ if (opts->force_monitor_aspect)
+ vo->monitor_par = opts->force_monitor_aspect * scrh / scrw;
else
- vo->monitor_par = 1.0 / opts->vo.monitor_pixel_aspect;
+ vo->monitor_par = 1.0 / opts->monitor_pixel_aspect;
}
/* aspect is called with the source resolution and the
@@ -88,7 +88,7 @@ static void get_max_dims(struct vo *vo, int *w, int *h, int zoom)
struct aspect_data *aspdat = &vo->aspdat;
*w = zoom ? aspdat->scrw : aspdat->prew;
*h = zoom ? aspdat->scrh : aspdat->preh;
- if (zoom && vo->opts->vo.WinID >= 0)
+ if (zoom && vo->opts->WinID >= 0)
zoom = A_WINZOOM;
if (zoom == A_WINZOOM) {
*w = vo->dwidth;
@@ -101,7 +101,7 @@ void aspect(struct vo *vo, int *srcw, int *srch, int zoom)
int fitw;
int fith;
get_max_dims(vo, &fitw, &fith, zoom);
- if (!zoom && vo->opts->vo.geometry.wh_valid) {
+ if (!zoom && vo->opts->geometry.wh_valid) {
mp_msg(MSGT_VO, MSGL_DBG2, "aspect(0) no aspect forced!\n");
return; // the user doesn't want to fix aspect
}
@@ -121,18 +121,18 @@ static void panscan_calc_internal(struct vo *vo, int zoom)
int vo_panscan_area;
int max_w, max_h;
get_max_dims(vo, &max_w, &max_h, zoom);
- struct MPOpts *opts = vo->opts;
+ struct mp_vo_opts *opts = vo->opts;
- if (opts->vo.panscanrange > 0) {
+ if (opts->panscanrange > 0) {
aspect(vo, &fwidth, &fheight, zoom);
vo_panscan_area = max_h - fheight;
if (!vo_panscan_area)
vo_panscan_area = max_w - fwidth;
- vo_panscan_area *= opts->vo.panscanrange;
+ vo_panscan_area *= opts->panscanrange;
} else
- vo_panscan_area = -opts->vo.panscanrange * max_h;
+ vo_panscan_area = -opts->panscanrange * max_h;
- vo->panscan_amount = opts->vo.fs || zoom == A_WINZOOM ? opts->vo.panscan : 0;
+ vo->panscan_amount = opts->fs || zoom == A_WINZOOM ? opts->panscan : 0;
vo->panscan_x = vo_panscan_area * vo->panscan_amount * vo->aspdat.asp;
vo->panscan_y = vo_panscan_area * vo->panscan_amount;
}