Skip to content

Commit 5c7615d

Browse files
committed
delta VideoMasterHD 5.19 compat
1 parent 4854693 commit 5c7615d

File tree

3 files changed

+59
-3
lines changed

3 files changed

+59
-3
lines changed

src/deltacast_common.cpp

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@
5151
#include "utils/color_out.h"
5252
#include "video_frame.h" // for get_interlacing_suffix
5353

54+
#if !defined VHD_MIN_6_00
55+
#define VHD_GetBoardModel(BoardIndex) "UNKNOWN"
56+
#define VHD_GetPCIeIdentificationString(BoardIndex, pIdString_c) \
57+
snprintf_ch(pIdString_c, "UNKNOWN")
58+
#endif
59+
5460
#define MOD_NAME "[DELTACAST] "
5561

5662
const char *
@@ -156,10 +162,12 @@ delta_get_error_description(ULONG CodeError)
156162
return "Device removed";
157163
case VHDERR_LTCSOURCEUNLOCKED:
158164
return "LTC source unlocked";
165+
#ifdef VHD_MIN_6_00
159166
case VHDERR_INVALIDACCESSRIGHT:
160167
return "Invalid access right";
161168
case VHDERR_INVALIDCAPABILITY:
162169
return "Invalid capability index";
170+
#endif // defined VHD_MIN_6_00
163171
#ifdef DELTA_DVI_DEPRECATED
164172
case VHDERR_DEPRECATED:
165173
return "Symbol is deprecated";
@@ -290,7 +298,7 @@ print_board_info(int BoardIndex, ULONG DllVersion, bool full)
290298

291299
ULONG SerialNumber_UL[4] = {};
292300
ULONG NbOfLane, BusType, FirmwareVersion, Firmware3Version, LowProfile,
293-
NbRxChannels, NbTxChannels, Firmware4Version, ProductVersion = 0;
301+
NbRxChannels, NbTxChannels, ProductVersion = 0;
294302
char pIdString_c[64];
295303

296304
Result = VHD_GetBoardProperty(BoardHandle, VHD_CORE_BP_BOARD_TYPE,
@@ -319,8 +327,10 @@ print_board_info(int BoardIndex, ULONG DllVersion, bool full)
319327
&NbRxChannels);
320328
VHD_GetBoardProperty(BoardHandle, VHD_CORE_BP_NB_TXCHANNELS,
321329
&NbTxChannels);
330+
#if defined VHD_MIN_6_00
322331
VHD_GetBoardProperty(BoardHandle, VHD_CORE_BP_PRODUCT_VERSION,
323332
&ProductVersion);
333+
#endif
324334
VHD_GetBoardProperty(BoardHandle, VHD_CORE_BP_BUS_TYPE, &BusType);
325335
VHD_GetPCIeIdentificationString(BoardIndex, pIdString_c);
326336

@@ -340,6 +350,8 @@ print_board_info(int BoardIndex, ULONG DllVersion, bool full)
340350
(Firmware3Version >> 16) & 0xFF,
341351
(Firmware3Version >> 8) & 0xFF);
342352
}
353+
#if defined VHD_MIN_6_00
354+
ULONG Firmware4Version = 0;
343355
if (BoardType == VHD_BOARDTYPE_IP) {
344356
VHD_GetBoardProperty(BoardHandle, VHD_CORE_BP_FIRMWARE4_VERSION,
345357
&Firmware4Version);
@@ -349,6 +361,7 @@ print_board_info(int BoardIndex, ULONG DllVersion, bool full)
349361
(Firmware4Version >> 16) & 0xFF,
350362
(Firmware4Version >> 8) & 0xFF);
351363
}
364+
#endif
352365
printf("\t - Board serial# : 0x%08X%08X%08X%08X\n", SerialNumber_UL[3],
353366
SerialNumber_UL[2], SerialNumber_UL[1], SerialNumber_UL[0]);
354367

@@ -362,7 +375,7 @@ print_board_info(int BoardIndex, ULONG DllVersion, bool full)
362375
#endif
363376
printf("\t - %s on %s", delta_get_board_type_name(BoardType),
364377
bus_type_to_str(BusType));
365-
#undef bus_type_to_str "unknown bus"
378+
#undef bus_type_to_str
366379
if (NbOfLane)
367380
printf(" (%d lane%s)\n", NbOfLane, (NbOfLane > 1) ? "s" : "");
368381
else
@@ -601,12 +614,14 @@ delta_is_quad_channel_interface(ULONG Interface)
601614
case VHD_INTERFACE_2X3G_B_DS_425_3:
602615
case VHD_INTERFACE_4X3G_A_425_5:
603616
case VHD_INTERFACE_4X3G_B_DL_425_5:
617+
#if defined VHD_MIN_6_00
604618
case VHD_INTERFACE_2X3G_B_DS_425_3_DUAL:
605619
case VHD_INTERFACE_4XHD_QUADRANT_DUAL:
606620
case VHD_INTERFACE_4X3G_A_QUADRANT_DUAL:
607621
case VHD_INTERFACE_4X3G_A_425_5_DUAL:
608622
case VHD_INTERFACE_4X3G_B_DL_QUADRANT_DUAL:
609623
case VHD_INTERFACE_4X3G_B_DL_425_5_DUAL:
624+
#endif
610625
// Is8KInterface
611626
#if defined VHD_MIN_6_19
612627
case VHD_INTERFACE_4X6G_2081_10_QUADRANT:

src/deltacast_common.hpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
* require the use of older SDK to run on those.
1111
*
1212
* At this moment (2025-10), the source code compat is with 6.13 (last one
13-
* supporting DELTACAST DVI devices).
13+
* supporting DELTACAST DVI devices) but also 5.19 compat is currently kept.
14+
*
1415
* [ventuz]:
1516
* <https://www.ventuz.com/support/help/latest/MachineConfigurationVendors.html#SupportedModelsasofVentuz6.08.00>
1617
*/
@@ -102,6 +103,7 @@
102103
#define DELTA_DVI_DEPRECATED 1
103104
#endif
104105

106+
// VHD_MIN_X_YZ defined below means that the SDK version is at least X.YZ
105107
#ifdef __APPLE__
106108
#if __has_include(<VideoMasterHD/VideoMasterHD_Ip_Board.h>)
107109
#include <VideoMasterHD/VideoMasterHD_Ip_Board.h>
@@ -150,6 +152,10 @@
150152
#define VHD_CHNTYPE_12GSDI_ASI VHD_CHNTYPE_DISABLE
151153
#endif // not defined VHD_MIN_6_20
152154

155+
#if !defined VHD_MIN_6_00
156+
#define VHD_CHNTYPE_12GSDI VHD_CHNTYPE_DISABLE
157+
#endif
158+
153159
struct deltacast_frame_mode_t {
154160
unsigned int width;
155161
unsigned int height;

src/video_capture/deltacast_dvi.cpp

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,39 @@ struct vidcap_deltacast_dvi_state {
9191
#define BADEEDID 1
9292

9393
// compat
94+
#if !defined VHD_MIN_6_00
95+
#define VHD_DV_EEDID_PRESET VHD_DVI_EEDID_PRESET
96+
#define VHD_DV_EEDID_EMPTY VHD_EEDID_EMPTY
97+
#define VHD_DV_EEDID_DVIA VHD_EEDID_DVIA
98+
#define VHD_DV_EEDID_DVID VHD_EEDID_DVID
99+
#define VHD_DV_EEDID_HDMI VHD_EEDID_HDMI
100+
#define VHD_DV_EEDID_DVID_DUAL VHD_EEDID_DVID_DUAL
101+
#define VHD_DV_EEDID_HDMI_H4K VHD_EEDID_HDMI_H4K
102+
#define VHD_DV_EEDID_DVID_H4K VHD_EEDID_DVID_H4K
103+
#define VHD_DV_MODE VHD_DVI_MODE
104+
#define VHD_DV_MODE_ANALOG_COMPONENT_VIDEO VHD_DVI_MODE_ANALOG_COMPONENT_VIDEO
105+
#define VHD_DV_MODE_DVI_D VHD_DVI_MODE_DVI_D
106+
#define VHD_DV_MODE_DVI_A VHD_DVI_MODE_DVI_A
107+
#define VHD_DV_MODE_HDMI VHD_DVI_MODE_HDMI
108+
#define VHD_DV_SP_MODE VHD_DVI_SP_MODE
109+
#define VHD_DV_SP_DISABLE_EDID_AUTO_LOAD VHD_DVI_SP_DISABLE_EDID_AUTO_LOAD
110+
#define VHD_DV_DVI_A_STANDARD VHD_DVI_A_STANDARD
111+
#define VHD_DV_DVIA_STD_DMT VHD_DVIA_STD_DMT
112+
#define VHD_DV_SP_ACTIVE_WIDTH VHD_DVI_SP_ACTIVE_WIDTH
113+
#define VHD_DV_SP_ACTIVE_HEIGHT VHD_DVI_SP_ACTIVE_HEIGHT
114+
#define VHD_DV_SP_INTERLACED VHD_DVI_SP_INTERLACED
115+
#define VHD_DV_SP_REFRESH_RATE VHD_DVI_SP_REFRESH_RATE
116+
#define VHD_DV_SP_DUAL_LINK VHD_DVI_SP_DUAL_LINK
117+
#define VHD_DV_SP_INPUT_CS VHD_DVI_SP_INPUT_CS
118+
#define VHD_DV_SP_PIXEL_CLOCK VHD_DVI_SP_PIXEL_CLOCK
119+
#define VHD_DV_CS VHD_HDMI_CS
120+
#define VHD_DV_STPROC_DEFAULT VHD_DVI_STPROC_DEFAULT
121+
#define VHD_DV_STPROC_JOINED VHD_DVI_STPROC_DISJOINED_VIDEO
122+
#define VHD_DV_BT_VIDEO VHD_DVI_BT_VIDEO
123+
#define NB_VHD_DV_EEDID_PRESET NB_VHD_EEDID
124+
#define NB_VHD_DV_MODES NB_VHD_DVI_MODES
125+
#endif
126+
94127
#if defined DELTA_DVI_DEPRECATED
95128
#define VHD_DV_EEDID_DVIA VHD_DV_EEDID_DVIA_DEPRECATED
96129
#define VHD_DV_MODE_DVI_A VHD_DV_MODE_DVI_A_DEPRECATED
@@ -112,11 +145,13 @@ const static map<VHD_DV_EEDID_PRESET, const char *> edid_presets = {
112145
{ VHD_DV_EEDID_DVID_DUAL, "DVI-D E-EDID with dual-link formats" },
113146
{ VHD_DV_EEDID_HDMI_H4K, "HDMI H4K E-EDID" },
114147
{ VHD_DV_EEDID_DVID_H4K, "DVI-D H4K E-EDID" },
148+
#if defined VHD_MIN_6_00
115149
{ VHD_DV_EEDID_HDMI_H4K2, "HDMI H4K2 E-EDID" },
116150
{ VHD_DV_EEDID_DVID_H4K2, "DVI-D H4K2 E-EDID" },
117151
{ VHD_DV_EEDID_DISPLAYPORT_1_2, "DisplayPort 1.2 E-EDID" },
118152
{ VHD_DV_EEDID_HDMI_FLEX_HMI, "HDMI FLEX-HMI E-EDID" },
119153
{ VHD_DV_EEDID_DVID_FLEX_HMI, "DVI-D FLEX-HMI E-EDID" },
154+
#endif
120155
{ (VHD_DV_EEDID_PRESET) -1, "avoid E-EDID loading" },
121156
};
122157

0 commit comments

Comments
 (0)