summaryrefslogtreecommitdiffstats
path: root/libvo/x11_common.h
diff options
context:
space:
mode:
authorUoti Urpala <uau@mplayer2.org>2012-07-27 03:40:38 +0300
committerUoti Urpala <uau@mplayer2.org>2012-07-27 03:40:38 +0300
commit31458a51b5c6a7c8a6449b0b3baa4f3fef6c4938 (patch)
treea7504628cd47ac9f4df4190a3a95f235c4e8178d /libvo/x11_common.h
parentadfa7bdfb2c61b136b2d15dcae516c0394b2e86b (diff)
downloadmpv-31458a51b5c6a7c8a6449b0b3baa4f3fef6c4938.tar.bz2
mpv-31458a51b5c6a7c8a6449b0b3baa4f3fef6c4938.tar.xz
vo_vdpau: disable refresh-aware frame timing when composited
Under a compositing window manager the current VDPAU implementation behaves differently than without it. Frame flip timing info becomes incorrect (I guess it only reflects when the frame was sent to the compositor, not when it was actually shown), and there is no limitation to at most one frame switch per refresh like without compositing. Detect whether a compositing window manager is active and disable refresh-aware frame timing and dropping in this case, similarly to what fps=-1 would do. This behavior can be controlled with the new suboption "composite-detect". Disabling the refresh-aware logic makes timing somewhat less accurate. Because the video switch rate limit isn't there, the lack of frame dropping on player side does not impose a hard limit on video FPS, but does reduce performance somewhat as redundant frames are drawn in memory. The existence of a compositing window manager does not guarantee that the current window is actually composited, so the current check is not foolproof. In particular, some WMs have support for a "unredirect fullscreen windows" option. Support for such things could be improved.
Diffstat (limited to 'libvo/x11_common.h')
-rw-r--r--libvo/x11_common.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/libvo/x11_common.h b/libvo/x11_common.h
index 14c7e44549..bd340c822d 100644
--- a/libvo/x11_common.h
+++ b/libvo/x11_common.h
@@ -95,6 +95,7 @@ struct vo_x11_state {
Atom XAWM_PROTOCOLS;
Atom XAWM_DELETE_WINDOW;
Atom XAUTF8_STRING;
+ Atom XA_NET_WM_CM;
};
#if defined(CONFIG_GL) || defined(CONFIG_X11) || defined(CONFIG_XV)
@@ -137,6 +138,7 @@ void vo_x11_uninit(struct vo *vo);
Colormap vo_x11_create_colormap(struct vo *vo, XVisualInfo *vinfo);
uint32_t vo_x11_set_equalizer(struct vo *vo, const char *name, int value);
uint32_t vo_x11_get_equalizer(const char *name, int *value);
+bool vo_x11_screen_is_composited(struct vo *vo);
void fstype_help(void);
void vo_x11_create_vo_window(struct vo *vo, XVisualInfo *vis,
int x, int y, unsigned int width, unsigned int height, int flags,