WSCLib SDK 1.0.0
GPU-accelerated video output framework for Windows
Loading...
Searching...
No Matches
wscvideo.h
Go to the documentation of this file.
1
12#pragma once
13
14#ifdef WSCVIDEO_EXPORTS
15#define WSCV_API extern "C" __declspec(dllexport)
16#else
17#define WSCV_API extern "C" __declspec(dllimport)
18#endif
19
20#include <windows.h>
21
24
25#define WSCV_VERSION_MAJOR 1
26#define WSCV_VERSION_MINOR 0
27#define WSCV_VERSION_PATCH 0
28#define WSCV_VERSION_STRING "1.0.0"
29
31typedef struct WSCVVersion
32{
33 int major;
34 int minor;
35 int patch;
36 const char *string;
38
44
46
50
63
65
68
77
87
95
101
103
106
114
119
121
124
130WSCV_API int WSCV_CreatePlayer(const char *filePath);
131
138
145
147
151
161WSCV_API int WSCV_CreatePlayerMF(const char *filePath);
162
169
171
174
181
188
195
202
204
207
214WSCV_API WSCVResult WSCV_SetPosition(int playerId, float position);
215
221WSCV_API float WSCV_GetPosition(int playerId);
222
229WSCV_API WSCVResult WSCV_SetTime(int playerId, long long timeMs);
230
236WSCV_API long long WSCV_GetTime(int playerId);
237
243WSCV_API long long WSCV_GetLength(int playerId);
244
251WSCV_API WSCVResult WSCV_SetRate(int playerId, float rate);
252
258WSCV_API float WSCV_GetRate(int playerId);
259
261
264
271WSCV_API WSCVResult WSCV_SetVolume(int playerId, int volume);
272
278WSCV_API int WSCV_GetVolume(int playerId);
279
286WSCV_API WSCVResult WSCV_SetMute(int playerId, int mute);
287
293WSCV_API int WSCV_GetMute(int playerId);
294
296
299
309WSCV_API WSCVResult WSCV_SetLoop(int playerId, int loop);
310
316WSCV_API int WSCV_GetLoop(int playerId);
317
319
322
333WSCV_API WSCVResult WSCV_AttachOutput(int playerId, int outputId);
334
341WSCV_API WSCVResult WSCV_DetachOutput(int playerId, int outputId);
int WSCV_GetVolume(int playerId)
Get current volume.
WSCVResult WSCV_SetMute(int playerId, int mute)
Set mute state.
int WSCV_GetMute(int playerId)
Get mute state.
WSCVResult WSCV_SetVolume(int playerId, int volume)
Set volume (0–100, can exceed 100 for amplification).
void WSCV_Shutdown()
Shut down engines and destroy all players.
WSCVResult WSCV_Init()
Initialize VLC and Media Foundation engines.
WSCVDecodeMode
Decode mode — set before WSCV_Init().
Definition wscvideo.h:82
WSCVState
Playback state.
Definition wscvideo.h:71
void WSCV_SetDecodeMode(WSCVDecodeMode mode)
Set decode mode for VLC backend.
WSCVDecodeMode WSCV_GetDecodeMode()
Get current decode mode.
@ WSCV_DECODE_SOFTWARE
Definition wscvideo.h:84
@ WSCV_DECODE_HARDWARE
Definition wscvideo.h:85
@ WSCV_DECODE_AUTO
Definition wscvideo.h:83
@ WSCV_STATE_PLAYING
Definition wscvideo.h:73
@ WSCV_STATE_STOPPED
Definition wscvideo.h:75
@ WSCV_STATE_PAUSED
Definition wscvideo.h:74
@ WSCV_STATE_IDLE
Definition wscvideo.h:72
WSCVResult WSCV_SetLoop(int playerId, int loop)
Enable or disable looping.
int WSCV_GetLoop(int playerId)
Get current loop state.
int WSCV_CreatePlayerMF(const char *filePath)
Create a Media Foundation player with D3D11 hardware decode.
int WSCV_CreatePlayerMFFromUrl(const char *url)
Create a Media Foundation player from a URL.
WSCVResult WSCV_DetachOutput(int playerId, int outputId)
Detach a WSCLib output from this player.
int major
Definition wscvideo.h:33
int patch
Definition wscvideo.h:35
WSCVResult WSCV_AttachOutput(int playerId, int outputId)
Attach a WSCLib output to this player.
const char * string
Definition wscvideo.h:36
int minor
Definition wscvideo.h:34
WSCVResult WSCV_Play(int playerId)
Start or resume playback.
WSCVResult WSCV_Pause(int playerId)
Pause playback.
WSCVState WSCV_GetState(int playerId)
Get current playback state.
WSCVResult WSCV_Stop(int playerId)
Stop playback.
int WSCV_CreatePlayer(const char *filePath)
Create a VLC player from a file path.
int WSCV_CreatePlayerFromUrl(const char *url)
Create a VLC player from a URL.
WSCVResult WSCV_DestroyPlayer(int playerId)
Destroy a player and free resources.
WSCVResult
Result codes returned by WSCLibVideo functions.
Definition wscvideo.h:53
@ WSCV_OK
Definition wscvideo.h:54
@ WSCV_ERROR_INVALID_PARAM
Definition wscvideo.h:56
@ WSCV_ERROR_NOT_ACTIVE
Definition wscvideo.h:59
@ WSCV_ERROR_ALLOC_FAIL
Definition wscvideo.h:60
@ WSCV_ERROR_INVALID_ID
Definition wscvideo.h:58
@ WSCV_ERROR_NOT_INIT
Definition wscvideo.h:55
@ WSCV_ERROR_MF_FAIL
Definition wscvideo.h:61
@ WSCV_ERROR_VLC_FAIL
Definition wscvideo.h:57
WSCVResult WSCV_SetPosition(int playerId, float position)
Set playback position (normalized 0.0–1.0).
long long WSCV_GetLength(int playerId)
Get total duration in milliseconds.
float WSCV_GetRate(int playerId)
Get current playback rate.
float WSCV_GetPosition(int playerId)
Get current playback position (normalized 0.0–1.0).
WSCVResult WSCV_SetRate(int playerId, float rate)
Set playback rate.
WSCVResult WSCV_SetTime(int playerId, long long timeMs)
Set playback time in milliseconds.
long long WSCV_GetTime(int playerId)
Get current playback time in milliseconds.
WSCVVersion WSCV_GetVersion()
Get WSCLibVideo version info.
Version information structure.
Definition wscvideo.h:32
#define WSCV_API
Definition wscvideo.h:15