[vlc-devel] [PATCH 1/7] vout: move vout_display_cfg_IsWindowed to vout_window_IsValid
Thomas Guillem
thomas at gllm.fr
Thu Mar 26 16:33:47 CET 2020
Use directly the vout_window_t argument.
The term "Windowed" was confusing. Indeed, "Windowed" also refers to fullscreen
vs no fullscreen (cf. vout_window_ReportWindowed).
---
include/vlc_vout_display.h | 5 -----
include/vlc_vout_window.h | 5 +++++
modules/video_output/caca.c | 2 +-
modules/video_output/fb.c | 2 +-
modules/video_output/ios.m | 2 +-
modules/video_output/kms.c | 2 +-
modules/video_output/splitter.c | 2 +-
7 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/include/vlc_vout_display.h b/include/vlc_vout_display.h
index cd183fb56c..cef9b47b40 100644
--- a/include/vlc_vout_display.h
+++ b/include/vlc_vout_display.h
@@ -451,11 +451,6 @@ static inline void vout_display_SendMouseMovedDisplayCoordinates(vout_display_t
vout_window_ReportMouseMoved(vd->cfg->window, m_x, m_y);
}
-static inline bool vout_display_cfg_IsWindowed(const vout_display_cfg_t *cfg)
-{
- return cfg->window->type != VOUT_WINDOW_TYPE_DUMMY;
-}
-
/**
* Computes the default display size given the source and
* the display configuration.
diff --git a/include/vlc_vout_window.h b/include/vlc_vout_window.h
index 9116fa6561..4d564d605c 100644
--- a/include/vlc_vout_window.h
+++ b/include/vlc_vout_window.h
@@ -689,5 +689,10 @@ static inline void vout_window_ReportOutputDevice(vout_window_t *window,
window->owner.cbs->output_event(window, id, name);
}
+static inline bool vout_window_IsValid(const vout_window_t *window)
+{
+ return window->type != VOUT_WINDOW_TYPE_DUMMY;
+}
+
/** @} */
#endif /* VLC_VOUT_WINDOW_H */
diff --git a/modules/video_output/caca.c b/modules/video_output/caca.c
index f95d985034..b3f235ab91 100644
--- a/modules/video_output/caca.c
+++ b/modules/video_output/caca.c
@@ -383,7 +383,7 @@ static int Open(vout_display_t *vd, const vout_display_cfg_t *cfg,
(void) context;
- if (vout_display_cfg_IsWindowed(cfg))
+ if (vout_window_IsValid(cfg->window))
return VLC_EGENERIC;
#if !defined(__APPLE__) && !defined(_WIN32)
# ifndef X_DISPLAY_MISSING
diff --git a/modules/video_output/fb.c b/modules/video_output/fb.c
index 1538af3465..338099e02c 100644
--- a/modules/video_output/fb.c
+++ b/modules/video_output/fb.c
@@ -169,7 +169,7 @@ static int Open(vout_display_t *vd, const vout_display_cfg_t *cfg,
{
vout_display_sys_t *sys;
- if (vout_display_cfg_IsWindowed(cfg))
+ if (vout_window_IsValid(cfg->window))
return VLC_EGENERIC;
/* Allocate instance and initialize some members */
diff --git a/modules/video_output/ios.m b/modules/video_output/ios.m
index 3bcf084d5c..34ffcd8bf8 100644
--- a/modules/video_output/ios.m
+++ b/modules/video_output/ios.m
@@ -142,7 +142,7 @@ static void *OurGetProcAddress(vlc_gl_t *gl, const char *name)
static int Open(vout_display_t *vd, const vout_display_cfg_t *cfg,
video_format_t *fmt, vlc_video_context *context)
{
- if (vout_display_cfg_IsWindowed(cfg))
+ if (vout_window_IsValid(cfg->window))
return VLC_EGENERIC;
vout_display_sys_t *sys = vlc_obj_calloc(VLC_OBJECT(vd), 1, sizeof(*sys));
diff --git a/modules/video_output/kms.c b/modules/video_output/kms.c
index be4a666978..2c01aa36c5 100644
--- a/modules/video_output/kms.c
+++ b/modules/video_output/kms.c
@@ -693,7 +693,7 @@ static int Open(vout_display_t *vd, const vout_display_cfg_t *cfg,
video_format_t fmt = {};
char *chroma;
- if (vout_display_cfg_IsWindowed(cfg))
+ if (vout_window_IsValid(cfg->window))
return VLC_EGENERIC;
/*
diff --git a/modules/video_output/splitter.c b/modules/video_output/splitter.c
index 71ceda4674..06f6c05d76 100644
--- a/modules/video_output/splitter.c
+++ b/modules/video_output/splitter.c
@@ -225,7 +225,7 @@ static int vlc_vidsplit_Open(vout_display_t *vd,
{
vlc_object_t *obj = VLC_OBJECT(vd);
- if (vout_display_cfg_IsWindowed(cfg))
+ if (vout_window_IsValid(cfg->window))
return VLC_EGENERIC;
char *name = var_InheritString(obj, "video-splitter");
--
2.20.1
More information about the vlc-devel
mailing list