Skip to content

Commit

Permalink
vout: add vout_display_IsWindowed() helper
Browse files Browse the repository at this point in the history
  • Loading branch information
Rémi Denis-Courmont committed Oct 16, 2014
1 parent 4bf20dd commit 6bf3a80
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions include/vlc_vout_display.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 6bf3a80

Please sign in to comment.