[vlc-commits] display: process fullscreen event synchronously
Rémi Denis-Courmont
git at videolan.org
Mon Dec 31 17:40:24 CET 2018
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Dec 31 18:34:23 2018 +0200| [c0b78a2d9ef0bda074976b3838dbd74856413ca7] | committer: Rémi Denis-Courmont
display: process fullscreen event synchronously
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c0b78a2d9ef0bda074976b3838dbd74856413ca7
---
include/vlc_vout_display.h | 9 ++++-----
src/video_output/display.c | 43 -------------------------------------------
2 files changed, 4 insertions(+), 48 deletions(-)
diff --git a/include/vlc_vout_display.h b/include/vlc_vout_display.h
index 2c8ad85155..32fb1ea751 100644
--- a/include/vlc_vout_display.h
+++ b/include/vlc_vout_display.h
@@ -169,10 +169,6 @@ enum {
/* */
VOUT_DISPLAY_EVENT_PICTURES_INVALID, /* The buffer are now invalid and need to be changed */
-#if defined(_WIN32) || defined(__OS2__)
- VOUT_DISPLAY_EVENT_FULLSCREEN,
-#endif
-
/* Mouse event */
VOUT_DISPLAY_EVENT_MOUSE_MOVED,
VOUT_DISPLAY_EVENT_MOUSE_PRESSED,
@@ -358,9 +354,12 @@ static inline void vout_display_SendEventPicturesInvalid(vout_display_t *vd)
}
#if defined(_WIN32) || defined(__OS2__)
+VLC_DEPRECATED
static inline void vout_display_SendEventFullscreen(vout_display_t *vd, bool is_fullscreen)
{
- vout_display_SendEvent(vd, VOUT_DISPLAY_EVENT_FULLSCREEN, is_fullscreen);
+ if (vout_display_Control(vd, VOUT_DISPLAY_CHANGE_FULLSCREEN,
+ is_fullscreen) == VLC_SUCCESS)
+ ((vout_display_cfg_t *)vd->cfg)->is_fullscreen = is_fullscreen;
}
VLC_DEPRECATED
diff --git a/src/video_output/display.c b/src/video_output/display.c
index 2f017ffcab..24d0561b42 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -331,12 +331,6 @@ typedef struct {
/* */
vout_display_cfg_t cfg;
- /* */
-#if defined(_WIN32) || defined(__OS2__)
- bool ch_fullscreen;
- bool is_fullscreen;
-#endif
-
struct {
int left;
int top;
@@ -537,22 +531,6 @@ static void VoutDisplayEvent(vout_display_t *vd, int event, va_list args)
(void *)va_arg(args, const vlc_viewpoint_t *));
break;
-#if defined(_WIN32) || defined(__OS2__)
- case VOUT_DISPLAY_EVENT_FULLSCREEN: {
- const int is_fullscreen = (int)va_arg(args, int);
-
- msg_Dbg(vd, "VoutDisplayEvent 'fullscreen' %d", is_fullscreen);
-
- vlc_mutex_lock(&osys->lock);
- if (!is_fullscreen != !osys->is_fullscreen) {
- osys->ch_fullscreen = true;
- osys->is_fullscreen = is_fullscreen;
- }
- vlc_mutex_unlock(&osys->lock);
- break;
- }
-#endif
-
case VOUT_DISPLAY_EVENT_PICTURES_INVALID: {
msg_Warn(vd, "VoutDisplayEvent 'pictures invalid'");
assert(vd->info.has_pictures_invalid);
@@ -604,27 +582,6 @@ picture_pool_t *vout_GetPool(vout_display_t *vd, unsigned count)
#if defined(_WIN32) || defined(__OS2__)
void vout_ManageDisplay(vout_display_t *vd)
{
- vout_display_priv_t *osys = container_of(vd, vout_display_priv_t, display);
-
- for (;;) {
- vlc_mutex_lock(&osys->lock);
- bool ch_fullscreen = osys->ch_fullscreen;
- bool is_fullscreen = osys->is_fullscreen;
- osys->ch_fullscreen = false;
- vlc_mutex_unlock(&osys->lock);
-
- if (!ch_fullscreen)
- break;
-
- /* */
- if (ch_fullscreen) {
- if (vout_display_Control(vd, VOUT_DISPLAY_CHANGE_FULLSCREEN,
- is_fullscreen) == VLC_SUCCESS) {
- osys->cfg.is_fullscreen = is_fullscreen;
- } else
- msg_Err(vd, "Failed to set fullscreen");
- }
- }
}
#endif
More information about the vlc-commits
mailing list