Refactor SDK to pure pull-based capture API

- Remove customer-facing SDK preview APIs and preview structs
- Strip D3D preview/render pipeline from gvfg.dll
- Keep gvfg.dll focused on capture, frame ownership, runtime status, and events
- Move Qt preview rendering into sample-owned private renderer
- Update Qt preview sample to render frames after gvfg_read_frame()
- Refresh customer API docs around read_frame/release_frame/poll_event flow
- Update architecture notes to mark preview as app/internal-tool code
This commit is contained in:
Mark.lin
2026-06-15 14:03:21 +08:00
parent c21f6981ea
commit 97971e6242
14 changed files with 947 additions and 1286 deletions
@@ -0,0 +1,44 @@
#pragma once
#include <gvfg_capture.h>
#include <memory>
#include <mutex>
namespace gvfg::internal
{
class SharedScenePipeline;
}
class SamplePreviewRenderer
{
public:
SamplePreviewRenderer();
~SamplePreviewRenderer();
bool configure(void *hwnd);
bool render(const gvfg_frame_t &frame);
void shutdown();
bool active() const;
int width() const;
int height() const;
int bitDepth() const;
const char *pixelFormat() const;
private:
bool ensureDevice();
bool ensurePipeline(int width, int height, int sourceBitDepth);
mutable std::mutex mutex_;
void *hwnd_ = nullptr;
bool configured_ = false;
int width_ = 0;
int height_ = 0;
int bitDepth_ = 0;
bool swapchain10Bit_ = false;
struct D3DState;
std::unique_ptr<D3DState> d3d_;
std::unique_ptr<gvfg::internal::SharedScenePipeline> pipeline_;
};