[vlc-commits] vout: add vout_display_IsWindowed() helper
Rémi Denis-Courmont
git at videolan.org
Thu Oct 16 19:25:58 CEST 2014
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Oct 14 22:29:56 2014 +0300| [6bf3a80f7551f07187d8435f7d4d27e805d528ce] | committer: Rémi Denis-Courmont
vout: add vout_display_IsWindowed() helper
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6bf3a80f7551f07187d8435f7d4d27e805d528ce
---
include/vlc_vout_display.h | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/include/vlc_vout_display.h b/include/vlc_vout_display.h
index f5f6817..bfe5a8c 100644
--- a/include/vlc_vout_display.h
+++ b/include/vlc_vout_display.h
@@ -405,6 +405,25 @@ static inline void vout_display_DeleteWindow(vout_display_t *vd,
vd->owner.window_del(vd, window);
}
+static inline bool vout_display_IsWindowed(vout_display_t *vd)
+{
+#ifndef __cplusplus
+ vout_window_cfg_t cfg = {
+ .width = vd->cfg->display.width,
+ .height = vd->cfg->display.height,
+ };
+#else
+ vout_window_cfg_t cfg;
+ memset(&cfg, 0, sizeof (cfg));
+ cfg.width = vd->cfg->display.width;
+ cfg.height = vd->cfg->display.height;
+#endif
+ vout_window_t *window = vout_display_NewWindow(vd, &cfg);
+ if (window != NULL)
+ vout_display_DeleteWindow(vd, window);
+ return window != NULL;
+}
+
/**
* Computes the default display size given the source and
* the display configuration.
More information about the vlc-commits
mailing list