static void Manage(vout_display_t *vd) { vout_display_sys_t *sys = vd->sys; CommonManage(vd); if (sys->changes & DX_POSITION_CHANGE) { /* Update overlay */ if (sys->use_overlay) DirectXUpdateOverlay(vd, NULL); /* Check if we are still on the same monitor */ HMONITOR hmon = MonitorFromWindow(sys->hwnd, MONITOR_DEFAULTTONEAREST); if (sys->hmonitor != hmon) { vout_display_SendEventPicturesInvalid(vd); } /* */ sys->changes &= ~DX_POSITION_CHANGE; } /* Wallpaper mode change */ vlc_mutex_lock(&sys->lock); const bool ch_wallpaper = sys->ch_wallpaper; const bool wallpaper_requested = sys->wallpaper_requested; sys->ch_wallpaper = false; vlc_mutex_unlock(&sys->lock); if (ch_wallpaper) WallpaperChange(vd, wallpaper_requested); /* */ if (sys->restore_overlay) DirectXUpdateOverlay(vd, NULL); }
static void Manage (vout_display_t *vd) { vout_display_sys_t *sys = vd->sys; CommonManage(vd); const int width = sys->rect_dest.right - sys->rect_dest.left; const int height = sys->rect_dest.bottom - sys->rect_dest.top; glViewport(0, 0, width, height); }
/** * Handles surface management * ID2D1RenderTargets cannot be resized and must be recreated */ static void Manage(vout_display_t *vd) { vout_display_sys_t *sys = vd->sys; CommonManage(vd); if (sys->changes & DX_POSITION_CHANGE) { D2D_ResizeRenderTarget(vd); sys->changes &= ~DX_POSITION_CHANGE; } }
static void Manage (vout_display_t *vd) { vout_display_sys_t *sys = vd->sys; CommonManage(vd); const int width = sys->rect_dest.right - sys->rect_dest.left; const int height = sys->rect_dest.bottom - sys->rect_dest.top; vout_display_opengl_SetWindowAspectRatio(sys->vgl, (float)width / height); glViewport(0, 0, width, height); }
static void Manage (vout_display_t *vd) { vout_display_sys_t *sys = vd->sys; CommonManage(vd); /* Desktop mode change */ vlc_mutex_lock(&sys->lock); const bool ch_desktop = sys->ch_desktop; sys->ch_desktop = false; vlc_mutex_unlock(&sys->lock); if (ch_desktop) { sys->reopen_device = true; vout_display_SendEventPicturesInvalid(vd); } #if 0 /* * Position Change */ if (sys->changes & DX_POSITION_CHANGE) { #if 0 /* need that when bicubic filter is available */ RECT rect; UINT width, height; GetClientRect(p_sys->hvideownd, &rect); width = rect.right-rect.left; height = rect.bottom-rect.top; if (width != p_sys->d3dpp.BackBufferWidth || height != p_sys->d3dpp.BackBufferHeight) { msg_Dbg(vd, "resizing device back buffers to (%lux%lu)", width, height); // need to reset D3D device to resize back buffer if (VLC_SUCCESS != Direct3DResetDevice(vd, width, height)) return VLC_EGENERIC; } #endif sys->changes &= ~DX_POSITION_CHANGE; } #endif }
static void Display(vout_display_t *vd, picture_t *picture) { vout_display_sys_t *sys = vd->sys; VLC_UNUSED(picture); #define rect_src vd->sys->rect_src #define rect_src_clipped vd->sys->sys.rect_src_clipped #define rect_dest vd->sys->sys.rect_dest #define rect_dest_clipped vd->sys->sys.rect_dest_clipped RECT rect_dst = rect_dest_clipped; HDC hdc = GetDC(sys->sys.hvideownd); OffsetRect(&rect_dst, -rect_dest.left, -rect_dest.top); SelectObject(sys->off_dc, sys->off_bitmap); if (rect_dest_clipped.right - rect_dest_clipped.left != rect_src_clipped.right - rect_src_clipped.left || rect_dest_clipped.bottom - rect_dest_clipped.top != rect_src_clipped.bottom - rect_src_clipped.top) { StretchBlt(hdc, rect_dst.left, rect_dst.top, rect_dst.right, rect_dst.bottom, sys->off_dc, rect_src_clipped.left, rect_src_clipped.top, rect_src_clipped.right, rect_src_clipped.bottom, SRCCOPY); } else { BitBlt(hdc, rect_dst.left, rect_dst.top, rect_dst.right, rect_dst.bottom, sys->off_dc, rect_src_clipped.left, rect_src_clipped.top, SRCCOPY); } ReleaseDC(sys->sys.hvideownd, hdc); #undef rect_src #undef rect_src_clipped #undef rect_dest #undef rect_dest_clipped CommonDisplay(vd); CommonManage(vd); }
static void Manage(vout_display_t *vd) { CommonManage(vd); }