diff options
author | Alexander Preisinger <alexander.preisinger@gmail.com> | 2013-03-04 17:40:21 +0100 |
---|---|---|
committer | Alexander Preisinger <alexander.preisinger@gmail.com> | 2013-03-04 17:40:21 +0100 |
commit | 7686cd7f043ef5b42ade64db21ec01c8c8d6281e (patch) | |
tree | b8f2f3b73e2a7e19e6e999aa6ece03b381c87d14 /video/out/vo_x11.c | |
parent | dc226bb846f037e992ae4a9fa12aa2196e804e6d (diff) | |
download | mpv-7686cd7f043ef5b42ade64db21ec01c8c8d6281e.tar.bz2 mpv-7686cd7f043ef5b42ade64db21ec01c8c8d6281e.tar.xz |
vo: remove and cleanup globals
Removes almost every global variabel in vo.h and puts them in a special struct
in MPOpts for video output related options.
Also we completly remove the options/globals pts and refresh rate because
they were unused.
Diffstat (limited to 'video/out/vo_x11.c')
-rw-r--r-- | video/out/vo_x11.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/video/out/vo_x11.c b/video/out/vo_x11.c index 34c23523ef..9e5f4dc64d 100644 --- a/video/out/vo_x11.c +++ b/video/out/vo_x11.c @@ -49,6 +49,7 @@ #define MODE_BGR 0x2 #include "core/mp_msg.h" +#include "core/options.h" #include "osdep/timer.h" extern int sws_flags; @@ -348,7 +349,7 @@ static int config(struct vo *vo, uint32_t width, uint32_t height, } if (!XMatchVisualInfo(vo->x11->display, vo->x11->screen, p->depth, DirectColor, &p->vinfo) - || (WinID > 0 + || (vo->opts->vo.WinID > 0 && p->vinfo.visualid != XVisualIDFromVisual(p->attribs.visual))) { XMatchVisualInfo(vo->x11->display, vo->x11->screen, p->depth, TrueColor, @@ -365,7 +366,7 @@ static int config(struct vo *vo, uint32_t width, uint32_t height, vo_x11_config_vo_window(vo, &p->vinfo, vo->dx, vo->dy, vo->dwidth, vo->dheight, flags, "x11"); - if (WinID > 0) { + if (vo->opts->vo.WinID > 0) { unsigned depth, dummy_uint; int dummy_int; Window dummy_win; @@ -444,7 +445,7 @@ static void Display_Image(struct priv *p, XImage *myximage, uint8_t *ImageData) p->old_vo_dheight != vo->dheight) && p->zoomFlag) return; - if (WinID == 0) { + if (vo->opts->vo.WinID == 0) { x = vo->dx; y = vo->dy; } @@ -538,6 +539,7 @@ static void flip_page(struct vo *vo) static void draw_image(struct vo *vo, mp_image_t *mpi) { struct priv *p = vo->priv; + struct MPOpts *opts = vo->opts; uint8_t *dst[MP_MAX_PLANES] = {NULL}; int dstStride[MP_MAX_PLANES] = {0}; @@ -553,7 +555,7 @@ static void draw_image(struct vo *vo, mp_image_t *mpi) p->old_vo_dwidth = vo->dwidth; p->old_vo_dheight = vo->dheight; - if (vo_fs) + if (opts->vo.fs) aspect(vo, &newW, &newH, A_ZOOM); if (sws_flags == 0) newW &= (~31); // not needed but, if the user wants the FAST_BILINEAR SCALER, then its needed |