Update GVFG for new driver capture flow
Use driver-managed video start/stop IOCTLs and request completed frames with MAXULONG instead of querying the done index. Add 300-frame timing statistics, lock format changes during GVFG streaming, and clear stale preview frames to black on signal loss. Document that this SDK revision requires the new PCIE S2MM driver.
This commit is contained in:
@@ -1429,6 +1429,19 @@ gvfg_preview_present_result_t D3DPreviewPipeline::present_preview(int src_w, int
|
||||
return GVFG_PREVIEW_PRESENTED;
|
||||
}
|
||||
|
||||
bool D3DPreviewPipeline::clear_preview_black()
|
||||
{
|
||||
if (!preview_enabled_ || !preview_swapchain_ || !preview_rtv_ || !ctx_)
|
||||
return false;
|
||||
|
||||
ID3D11RenderTargetView *rtv = preview_rtv_.Get();
|
||||
ctx_->OMSetRenderTargets(1, &rtv, nullptr);
|
||||
const float black[4] = {0, 0, 0, 1};
|
||||
ctx_->ClearRenderTargetView(rtv, black);
|
||||
ctx_->Flush();
|
||||
return SUCCEEDED(preview_swapchain_->Present(0, 0));
|
||||
}
|
||||
|
||||
DXGI_FORMAT D3DPreviewPipeline::preview_backbuffer_format() const
|
||||
{
|
||||
if (preview_swapchain_format_ != DXGI_FORMAT_UNKNOWN)
|
||||
|
||||
@@ -53,6 +53,7 @@ public:
|
||||
bool ensure_preview_swapchain(int w, int h);
|
||||
bool preview_swapchain_10bit() const { return preview_swapchain_10bit_; }
|
||||
gvfg_preview_present_result_t present_preview(int src_w, int src_h);
|
||||
bool clear_preview_black();
|
||||
DXGI_FORMAT preview_backbuffer_format() const;
|
||||
DXGI_FORMAT scene_texture_format() const;
|
||||
DXGI_FORMAT linear_fp16_texture_format() const;
|
||||
|
||||
Reference in New Issue
Block a user