static int Control(vout_display_t *vd, int query, va_list args) { vout_display_sys_t *sys = vd->sys; switch (query) { case VOUT_DISPLAY_RESET_PICTURES: /* FIXME what to do here in case of failure */ if (sys->reset_device) { if (ControlResetDevice(vd)) { msg_Err(vd, "Failed to reset device"); return VLC_EGENERIC; } sys->reset_device = false; } else if(sys->reopen_device) { if (ControlReopenDevice(vd)) { msg_Err(vd, "Failed to reopen device"); return VLC_EGENERIC; } sys->reopen_device = false; } return VLC_SUCCESS; default: return CommonControl(vd, query, args); } }
static int Control(vout_display_t *vd, int query, va_list args) { vout_display_sys_t *sys = vd->sys; if (query == VOUT_DISPLAY_CHANGE_VIEWPOINT) return vout_display_opengl_SetViewpoint(sys->vgl, &va_arg (args, const vout_display_cfg_t* )->viewpoint); return CommonControl(vd, query, args); }
static int Control(vout_display_t *vd, int query, va_list args) { switch (query) { case VOUT_DISPLAY_RESET_PICTURES: assert(0); return VLC_EGENERIC; default: return CommonControl(vd, query, args); } }
static int Control(vout_display_t *vd, int query, va_list args) { switch (query) { case VOUT_DISPLAY_GET_OPENGL: { vlc_gl_t **gl = va_arg(args, vlc_gl_t **); *gl = &vd->sys->gl; CommonDisplay(vd); return VLC_SUCCESS; } default: return CommonControl(vd, query, args); } }
static int Control(vout_display_t *vd, int query, va_list args) { vout_display_sys_t *sys = vd->sys; switch (query) { case VOUT_DISPLAY_RESET_PICTURES: DirectXClose(vd); /* Make sure the wallpaper is restored */ if (sys->use_wallpaper) { vlc_mutex_lock(&sys->lock); if (!sys->ch_wallpaper) { sys->ch_wallpaper = true; sys->wallpaper_requested = true; } vlc_mutex_unlock(&sys->lock); WallpaperChange(vd, false); } return DirectXOpen(vd, &vd->fmt); default: return CommonControl(vd, query, args); } }
/** * Control event handler */ static int Control(vout_display_t *vd, int query, va_list args) { return CommonControl(vd, query, args); }