Consolidate playback APIs and add standalone OSD bitmap rendering
- move public PCM, image and presentation types into gvfg_playback.h and remove the separate backend headers from source and installation - keep WASAPI and D3D backends private while preserving the existing public type names, fields and static backend integration - move detailed preview delivery counters into a private header and expose their playback query only through the Debug diagnostics API - retain public preview information and basic presentation statistics, mark EQUEUE_FULL as reserved, and document capacity limits as advanced settings with recommended defaults - refresh customer guides, API reference and error handling for the single-header interface, presentation counter limits and EAUDIO handle-recreation policy - add SDK-owned standalone premultiplied BGRA text rendering with transparent backgrounds, measured dimensions, thread-local snapshot lifetime and validated output bounds Validation: git diff --cached --check passed. Release gvfg_playback and Customer Sample builds, standalone C/C++ header checks, Debug playback syntax checks and Release export inspection passed earlier in this session. Final follow-up changes affect comments and documentation only. No runtime or hardware playback validation was performed. The existing Release gvfg target was also checked and was up to date. OSD rendering changes were source-reviewed; no new bitmap or hardware test was run in this commit pass. Capture debug exports are unchanged.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
add_library(gvfg_preview STATIC
|
||||
include/gvfg_preview.h
|
||||
src/preview_delivery_stats.h
|
||||
src/preview_output_internal.h
|
||||
../../sdk/gvfg/src/gpu/d3d_conversion_pipeline.cpp
|
||||
../../sdk/gvfg/src/gpu/d3d_conversion_pipeline.h
|
||||
@@ -13,9 +13,8 @@ set_target_properties(gvfg_preview PROPERTIES
|
||||
)
|
||||
|
||||
target_include_directories(gvfg_preview
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../gvfg_playback/include
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../sdk/gvfg/src/gpu
|
||||
)
|
||||
|
||||
@@ -1,75 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
/* Public image and presentation types used by gvfg_playback.h. */
|
||||
#include <stdint.h>
|
||||
|
||||
typedef enum
|
||||
{
|
||||
GVFG_PREVIEW_PIXFMT_YUY2 = 1,
|
||||
GVFG_PREVIEW_PIXFMT_Y210 = 2,
|
||||
GVFG_PREVIEW_PIXFMT_GRAY16 = 4,
|
||||
|
||||
/* Four interleaved 16-bit UNORM components per pixel: R, G, B, A. */
|
||||
GVFG_PREVIEW_PIXFMT_RGBA16 = 5,
|
||||
|
||||
/* DICOM native YBR_FULL_422: four 16-bit words per pixel pair,
|
||||
* ordered Y0, Y1, Cb, Cr. Values are right-aligned to bit_depth. */
|
||||
GVFG_PREVIEW_PIXFMT_DICOM_YBR_FULL_422 = 6
|
||||
} gvfg_preview_pixel_format_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
const void *data;
|
||||
uint64_t data_size;
|
||||
int width;
|
||||
int height;
|
||||
int pixel_format; /* gvfg_preview_pixel_format_t */
|
||||
int bit_depth;
|
||||
int row_bytes;
|
||||
uint64_t frame_id;
|
||||
} gvfg_preview_frame_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int active;
|
||||
int width;
|
||||
int height;
|
||||
int bit_depth;
|
||||
char pixel_format[32];
|
||||
char adapter_name[160];
|
||||
int adapter_index;
|
||||
} gvfg_preview_info_t;
|
||||
|
||||
/*
|
||||
* Preview presentation statistics.
|
||||
*
|
||||
* present_fps counts only frames accepted by DXGI Present, not physical
|
||||
* scanout. The rate uses successful presents from the most recent five
|
||||
* seconds. Pending preview replacements are excluded from this rate.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
double present_fps;
|
||||
uint64_t presented_frames;
|
||||
uint64_t skipped_presents;
|
||||
} gvfg_preview_stats_t;
|
||||
|
||||
/* Lifetime counters (until shutdown); configure/clear do not reset them.
|
||||
* submitted = presented + replaced + busy + failed + cancelled + in_flight.
|
||||
* Presented means DXGI accepted Present, not proof of physical scanout.
|
||||
* Failed render API calls are counted by the caller, not in submitted.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
uint64_t submitted;
|
||||
uint64_t presented;
|
||||
uint64_t replaced; /* Queued frames discarded after the 50 ms age limit. */
|
||||
uint64_t busy;
|
||||
uint64_t failed;
|
||||
uint64_t cancelled;
|
||||
uint64_t in_flight;
|
||||
uint64_t last_presented_id;
|
||||
uint64_t present_busy;
|
||||
uint64_t slots_busy;
|
||||
uint64_t last_busy_id;
|
||||
} gvfg_preview_delivery_stats_t;
|
||||
@@ -0,0 +1,24 @@
|
||||
#pragma once
|
||||
|
||||
/* Private preview diagnostics; never install this header. */
|
||||
#include <stdint.h>
|
||||
|
||||
/* Lifetime counters (until shutdown); configure/clear do not reset them.
|
||||
* submitted = presented + replaced + busy + failed + cancelled + in_flight.
|
||||
* Presented means DXGI accepted Present, not proof of physical scanout.
|
||||
* Failed render API calls are counted by the caller, not in submitted.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
uint64_t submitted;
|
||||
uint64_t presented;
|
||||
uint64_t replaced; /* Queued frames discarded after the 50 ms age limit. */
|
||||
uint64_t busy;
|
||||
uint64_t failed;
|
||||
uint64_t cancelled;
|
||||
uint64_t in_flight;
|
||||
uint64_t last_presented_id;
|
||||
uint64_t present_busy;
|
||||
uint64_t slots_busy;
|
||||
uint64_t last_busy_id;
|
||||
} gvfg_preview_delivery_stats_t;
|
||||
@@ -1,7 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
/* Private static backend; not part of the customer API. */
|
||||
#include "gvfg_preview.h"
|
||||
#include "gvfg_playback.h"
|
||||
#include "preview_delivery_stats.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
Reference in New Issue
Block a user