![]() |
WSCLib SDK 1.0.0
GPU-accelerated video output framework for Windows
|
WSCLib — Core rendering, output management, recording and streaming API. More...
#include <windows.h>Go to the source code of this file.
Data Structures | |
| struct | WSCVersion |
| Version information structure. More... | |
| struct | WSCColorParams |
| Color adjustment parameters (per-output). More... | |
| struct | WSCCropRect |
| Crop rectangle using normalized coordinates (0.0–1.0). More... | |
| struct | WSCTextOverlay |
| Text overlay parameters. More... | |
| struct | WSCImageOverlay |
| Image overlay parameters (logo / watermark). More... | |
| struct | WSCAdapterInfo |
| GPU adapter information. More... | |
| struct | WSCRecordParams |
| Recording parameters. More... | |
| struct | WSCStreamParams |
| Streaming parameters. More... | |
Macros | |
| #define | WSC_API extern "C" __declspec(dllexport) |
| #define | WSC_VERSION_MAJOR 1 |
| #define | WSC_VERSION_MINOR 0 |
| #define | WSC_VERSION_PATCH 0 |
| #define | WSC_VERSION_STRING "1.0.0" |
Enumerations | |
| enum | WSCResult { WSC_OK = 0 , WSC_ERROR_NOT_INIT = -1 , WSC_ERROR_INVALID_PARAM = -2 , WSC_ERROR_DEVICE_FAIL = -3 , WSC_ERROR_MAP_FAIL = -4 , WSC_ERROR_ALLOC_FAIL = -5 , WSC_ERROR_INVALID_ID = -6 , WSC_ERROR_NOT_ACTIVE = -7 , WSC_ERROR_FILE_NOT_FOUND = -8 , WSC_ERROR_DECODE_FAIL = -9 } |
| Result codes returned by WSCLib functions. More... | |
| enum | WSCHWCapability { WSC_CAP_NONE = 0x0000 , WSC_CAP_NVDEC = 0x0001 , WSC_CAP_NVENC = 0x0002 , WSC_CAP_D3D11_VA = 0x0004 , WSC_CAP_ZERO_COPY = 0x0008 , WSC_CAP_VIDEO_PROC = 0x0010 } |
| Hardware capability flags (bitmask). More... | |
Functions | |
| WSCVersion | WSC_GetVersion () |
| Get WSCLib version info. | |
| int | WSC_EnumAdapters (WSCAdapterInfo *infos, int maxCount) |
| Enumerate available GPU adapters. | |
| WSCResult | WSC_Init () |
| Initialize WSCLib with the default GPU adapter. | |
| WSCResult | WSC_InitWithAdapter (int adapterIndex) |
| Initialize WSCLib with a specific GPU adapter. | |
| void | WSC_Shutdown () |
| Shut down WSCLib and release all resources. | |
| int | WSC_CreateOutput (HWND parentHwnd, int x, int y, int w, int h) |
| Create an output as a child window inside a parent HWND. | |
| int | WSC_CreateOutputFromNative (HWND nativeHwnd) |
| Create an output bound directly to an existing native HWND. | |
| WSCResult | WSC_DestroyOutput (int outputId) |
| Destroy an output and free its GPU resources. | |
| WSCResult | WSC_SetOutputBounds (int outputId, int x, int y, int w, int h) |
| Move/resize a child output window. | |
| WSCResult | WSC_NotifyResize (int outputId, int w, int h) |
| Notify WSCLib that the output window has been resized. | |
| WSCResult | WSC_SetColorParams (int outputId, const WSCColorParams *params) |
| Set color adjustment for an output. | |
| WSCResult | WSC_SetCrop (int outputId, const WSCCropRect *crop) |
| Set crop rectangle for an output. | |
| WSCResult | WSC_SetTextOverlay (int outputId, const WSCTextOverlay *overlay) |
| Set a text overlay for an output. | |
| WSCResult | WSC_SetImageOverlay (int outputId, const WSCImageOverlay *overlay) |
| Set an image overlay (logo/watermark) from a file. | |
| WSCResult | WSC_SetImageOverlayFromMemory (int outputId, const void *data, int dataSize, int x, int y, int width, int height, float opacity) |
| Set an image overlay from a memory buffer. | |
| WSCResult | WSC_SetFlip (int outputId, int flipX, int flipY) |
| Set horizontal/vertical flip for an output. | |
| WSCResult | WSC_SetRotation (int outputId, int degrees) |
| Set rotation for an output. | |
| WSCResult | WSC_StartRecording (int outputId, const char *filePath, const WSCRecordParams *params) |
| Start recording the output to an MP4 file. | |
| WSCResult | WSC_StopRecording (int outputId) |
| Stop recording. | |
| int | WSC_IsRecording (int outputId) |
| Check if an output is currently recording. | |
| WSCResult | WSC_StartStreaming (int outputId, const char *url, const WSCStreamParams *params) |
| Start streaming to a URL via ffmpeg subprocess. | |
| WSCResult | WSC_StopStreaming (int outputId) |
| Stop streaming. | |
| int | WSC_IsStreaming (int outputId) |
| Check if an output is currently streaming. | |
| WSCResult | WSC_SubmitFrame (int outputId, const void *bgra, int width, int height, int pitch) |
| Submit a BGRA frame from CPU memory. | |
| WSCResult | WSC_SubmitTestFrame (int outputId, int width, int height, unsigned char r, unsigned char g, unsigned char b, unsigned char a) |
| Submit a solid-color test frame. | |
| WSCResult | WSC_LoadImage (int outputId, const char *filePath) |
| Load an image file and submit it to an output. | |
| WSCResult | WSC_LoadImageFromMemory (int outputId, const void *data, int dataSize) |
| Load an image from a memory buffer and submit to an output. | |
| WSCResult | WSC_SetOutputZOrder (int outputId, int zOrder) |
| Set z-order for an output. Higher values are on top. | |
| int | WSC_GetOutputZOrder (int outputId) |
| Get current z-order of an output. | |
| unsigned | WSC_GetCapabilities () |
| Query available hardware capabilities. | |
| WSCResult | WSC_SubmitTexture (int outputId, void *d3d11Texture2D) |
| Submit a D3D11 texture directly (GPU→GPU, no CPU copy). | |
| WSCResult | WSC_SubmitTextureNV12 (int outputId, void *d3d11Texture2D, int subresourceIndex) |
| Submit an NV12 texture via D3D11 Video Processor. | |
| WSCResult | WSC_SubmitFrameNV12 (int outputId, const void *nv12Data, int width, int height, int pitch) |
| Submit raw NV12 frame data from CPU memory. | |
| void * | WSC_GetD3D11Device () |
| Get the internal ID3D11Device pointer. | |
| void * | WSC_GetD3D11DeviceContext () |
| Get the internal ID3D11DeviceContext pointer. | |
WSCLib — Core rendering, output management, recording and streaming API.
WSCLib provides GPU-accelerated video output windows with D3D11, frame submission (BGRA / NV12), color adjustment, crop, flip/rotate, text/image overlays, H.264 recording and RTMP/SRT streaming.
| #define WSC_API extern "C" __declspec(dllexport) |