Expose GigabyteLib SDI value enums
Compared with a8fe173:
- publish SDK-owned mode, resolution, and frame-rate enums for gvfg_sdi_info_t
- type the public SDI fields with those enums while preserving GigabyteLib values
- keep customer code independent from the private vendor header
- document that applications use enum values for logic and the existing names for display
This commit is contained in:
@@ -108,6 +108,39 @@ extern "C"
|
||||
GVFG_INPUT_INTERFACE_HDMI = 1
|
||||
} gvfg_video_interface_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
GVFG_SDI_INPUT_MODE_HD = 0,
|
||||
GVFG_SDI_INPUT_MODE_SD = 1,
|
||||
GVFG_SDI_INPUT_MODE_3G = 2
|
||||
} gvfg_sdi_mode_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
GVFG_SDI_INPUT_RESOLUTION_SMPTE_ST_274_1920X1080 = 0x0,
|
||||
GVFG_SDI_INPUT_RESOLUTION_SMPTE_ST_296_1280X720 = 0x1,
|
||||
GVFG_SDI_INPUT_RESOLUTION_SMPTE_2048_2048X1080 = 0x2,
|
||||
GVFG_SDI_INPUT_RESOLUTION_SMPTE_295_1920X1080 = 0x3,
|
||||
GVFG_SDI_INPUT_RESOLUTION_NTSC_720X486 = 0x8,
|
||||
GVFG_SDI_INPUT_RESOLUTION_PAL_720X576 = 0x9,
|
||||
GVFG_SDI_INPUT_RESOLUTION_UNKNOWN = 0xF
|
||||
} gvfg_sdi_resolution_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
GVFG_SDI_INPUT_FPS_NONE = 0x0,
|
||||
GVFG_SDI_INPUT_FPS_23_98 = 0x2,
|
||||
GVFG_SDI_INPUT_FPS_24 = 0x3,
|
||||
GVFG_SDI_INPUT_FPS_47_95 = 0x4,
|
||||
GVFG_SDI_INPUT_FPS_25 = 0x5,
|
||||
GVFG_SDI_INPUT_FPS_29_97 = 0x6,
|
||||
GVFG_SDI_INPUT_FPS_30 = 0x7,
|
||||
GVFG_SDI_INPUT_FPS_48 = 0x8,
|
||||
GVFG_SDI_INPUT_FPS_50 = 0x9,
|
||||
GVFG_SDI_INPUT_FPS_59_94 = 0xA,
|
||||
GVFG_SDI_INPUT_FPS_60 = 0xB
|
||||
} gvfg_sdi_fps_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint32_t sample_rate;
|
||||
@@ -129,9 +162,9 @@ extern "C"
|
||||
typedef struct
|
||||
{
|
||||
int connected;
|
||||
uint32_t mode;
|
||||
uint32_t resolution;
|
||||
uint32_t fps;
|
||||
gvfg_sdi_mode_t mode;
|
||||
gvfg_sdi_resolution_t resolution;
|
||||
gvfg_sdi_fps_t fps;
|
||||
int progressive;
|
||||
int level_b;
|
||||
uint32_t st352_payload;
|
||||
|
||||
@@ -274,9 +274,9 @@ gvfg_status_t GigabyteCaptureSession::get_sdi_info(gvfg_sdi_info_t &out) const
|
||||
return status;
|
||||
out = {};
|
||||
out.connected = info.VideoSignalLock ? 1 : 0;
|
||||
out.mode = info.Mode;
|
||||
out.resolution = info.Resol;
|
||||
out.fps = info.Fps;
|
||||
out.mode = static_cast<gvfg_sdi_mode_t>(info.Mode);
|
||||
out.resolution = static_cast<gvfg_sdi_resolution_t>(info.Resol);
|
||||
out.fps = static_cast<gvfg_sdi_fps_t>(info.Fps);
|
||||
out.progressive = info.Progressive ? 1 : 0;
|
||||
out.level_b = info.LevelB ? 1 : 0;
|
||||
out.st352_payload = info.St352Payload;
|
||||
|
||||
Reference in New Issue
Block a user