Skip to content

Commit 8b6825b

Browse files
committed
delta compat with 6.00
1 parent c2784ee commit 8b6825b

File tree

3 files changed

+25
-18
lines changed

3 files changed

+25
-18
lines changed

src/deltacast_common.cpp

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

54-
#if !defined VHD_MIN_6_00
54+
#if !defined VHD_MIN_6_19
5555
#define VHD_GetPCIeIdentificationString(BoardIndex, pIdString_c) \
5656
snprintf_ch(pIdString_c, "UNKNOWN")
5757
#endif
@@ -204,9 +204,11 @@ delta_get_error_description(ULONG CodeError)
204204
#ifdef VHD_MIN_6_00
205205
case VHDERR_INVALIDACCESSRIGHT:
206206
return "Invalid access right";
207+
#endif // defined VHD_MIN_6_00
208+
#ifdef VHD_MIN_6_19
207209
case VHDERR_INVALIDCAPABILITY:
208210
return "Invalid capability index";
209-
#endif // defined VHD_MIN_6_00
211+
#endif // defined VHD_MIN_6_19
210212
#ifdef DELTA_DVI_DEPRECATED
211213
case VHDERR_DEPRECATED:
212214
return "Symbol is deprecated";
@@ -366,7 +368,7 @@ print_board_info(int BoardIndex, ULONG DllVersion, bool full)
366368
&NbRxChannels);
367369
VHD_GetBoardProperty(BoardHandle, VHD_CORE_BP_NB_TXCHANNELS,
368370
&NbTxChannels);
369-
#if defined VHD_MIN_6_00
371+
#if defined VHD_MIN_6_19
370372
VHD_GetBoardProperty(BoardHandle, VHD_CORE_BP_PRODUCT_VERSION,
371373
&ProductVersion);
372374
#endif
@@ -713,7 +715,7 @@ delta_set_loopback_state(HANDLE BoardHandle, int ChannelIndex, BOOL32 State)
713715
}
714716
}
715717

716-
#if !defined VHD_MIN_6_00
718+
#if !defined VHD_MIN_6_13
717719
struct deltacast_mode_info {
718720
unsigned int width;
719721
unsigned int height;
@@ -1056,6 +1058,8 @@ delta_board_type_is_dv(VHD_BOARDTYPE BoardType,
10561058
case VHD_BOARDTYPE_ASI: return false;
10571059
#if defined VHD_MIN_6_00
10581060
case VHD_BOARDTYPE_IP: return false;
1061+
#endif
1062+
#if defined VHD_MIN_6_13
10591063
case VHD_BOARDTYPE_HDMI20: return true;
10601064
case VHD_BOARDTYPE_FLEX_DP: return include_mixed;
10611065
case VHD_BOARDTYPE_FLEX_SDI: return false;

src/deltacast_common.hpp

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,12 @@
100100

101101
#include "types.h"
102102

103+
#if defined ENUMBASE_DV
104+
#define VHD_MIN_6_13 1
105+
#endif
106+
103107
#if defined VHD_DV_SP_INPUT_CS // (VideoMasterHD 6.14)
104-
#define DELTA_DVI_DEPRECATED 1
108+
#define VHD_MIN_6_14 1
105109
#endif
106110

107111
// VHD_MIN_X_YZ defined below means that the SDK version is at least X.YZ
@@ -137,27 +141,26 @@
137141
#endif
138142

139143
// compat
140-
#ifdef DELTA_DVI_DEPRECATED
144+
#ifdef VHD_MIN_6_14
141145
#define VHD_BOARDTYPE_DVI VHD_BOARDTYPE_DVI_DEPRECATED
142146
#define VHD_BOARDTYPE_HDKEY VHD_BOARDTYPE_HDKEY_DEPRECATED
143147
#endif
144148
// Following items have been actually deprecated in 6.20. But 6.20 doesn't
145149
// bring any new define and thus it is undistinguishable from 6.19. As a
146150
// consequence, it won't compile with 6.19.
147151
#if defined VHD_MIN_6_20
148-
#define VHD_BOARDTYPE_SD VHD_BOARDTYPE_SD_DEPRECATED
149-
#define VHD_BOARDTYPE_SDKEY VHD_BOARDTYPE_SDKEY_DEPRECATED
150-
#define VHD_CHNTYPE_SDSDI VHD_CHNTYPE_SDSDI_DEPRECATED
151-
#ifndef VHD_CORE_BP_BYPASS_RELAY_0 // not defined in 6.20
152-
// VHD_BOARDTYPE_HDMI is not deprecated anymore in 6.21
153-
#define VHD_BOARDTYPE_HDMI VHD_BOARDTYPE_HDMI_DEPRECATED
154-
#endif
152+
#define VHD_BOARDTYPE_SD VHD_BOARDTYPE_SD_DEPRECATED
153+
#define VHD_BOARDTYPE_SDKEY VHD_BOARDTYPE_SDKEY_DEPRECATED
154+
#define VHD_CHNTYPE_SDSDI VHD_CHNTYPE_SDSDI_DEPRECATED
155+
#if !defined VHD_MIN_6_21 // HDMI deprecatedd just in 6.20
156+
#define VHD_BOARDTYPE_HDMI VHD_BOARDTYPE_HDMI_DEPRECATED
157+
#endif
155158
#else
156159
#define VHD_CHNTYPE_3GSDI_ASI VHD_CHNTYPE_DISABLE
157160
#define VHD_CHNTYPE_12GSDI_ASI VHD_CHNTYPE_DISABLE
158161
#endif // not defined VHD_MIN_6_20
159162

160-
#if defined VHD_MIN_6_00
163+
#if defined VHD_MIN_6_13
161164
#define VHD_BOARDTYPE_FLEX VHD_BOARDTYPE_FLEX_DEPRECATED
162165
#else
163166
#define VHD_CHNTYPE_12GSDI VHD_CHNTYPE_DISABLE

src/video_capture/deltacast_dvi.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ struct vidcap_deltacast_dvi_state {
9393
#define BADEEDID 1
9494

9595
// compat
96-
#if !defined VHD_MIN_6_00
96+
#if !defined VHD_MIN_6_13
9797
#define VHD_DV_EEDID_PRESET VHD_DVI_EEDID_PRESET
9898
#define VHD_DV_EEDID_EMPTY VHD_EEDID_EMPTY
9999
#define VHD_DV_EEDID_DVIA VHD_EEDID_DVIA
@@ -126,7 +126,7 @@ struct vidcap_deltacast_dvi_state {
126126
#define NB_VHD_DV_MODES NB_VHD_DVI_MODES
127127
#endif
128128

129-
#if defined DELTA_DVI_DEPRECATED
129+
#if defined VHD_MIN_6_14
130130
#define VHD_DV_EEDID_DVIA VHD_DV_EEDID_DVIA_DEPRECATED
131131
#define VHD_DV_MODE_DVI_A VHD_DV_MODE_DVI_A_DEPRECATED
132132
#define VHD_DV_MODE_ANALOG_COMPONENT_VIDEO VHD_DV_MODE_ANALOG_COMPONENT_VIDEO_DEPRECATED
@@ -150,7 +150,7 @@ get_edid_preset_name(VHD_DV_EEDID_PRESET preset)
150150
case VHD_DV_EEDID_DVID_DUAL: return "DVI-D E-EDID with dual-link formats";
151151
case VHD_DV_EEDID_HDMI_H4K: return "HDMI H4K E-EDID";
152152
case VHD_DV_EEDID_DVID_H4K: return "DVI-D H4K E-EDID";
153-
#if defined VHD_MIN_6_00
153+
#if defined VHD_MIN_6_13
154154
case VHD_DV_EEDID_HDMI_H4K2: return "HDMI H4K2 E-EDID";
155155
case VHD_DV_EEDID_DVID_H4K2: return "DVI-D H4K2 E-EDID";
156156
case VHD_DV_EEDID_DISPLAYPORT_1_2: return "DisplayPort 1.2 E-EDID";
@@ -312,7 +312,7 @@ static bool wait_for_channel_locked(struct vidcap_deltacast_dvi_state *s, bool h
312312
standard. Manual setting or overriding of these properties is allowed
313313
Resolution, refresh rate and graphic timing standard can be auto-detect
314314
with VHD_DetectDviAFormat function */
315-
#if ! defined DELTA_DVI_DEPRECATED
315+
#if ! defined VHD_MIN_6_14
316316
Result = VHD_DetectDviAFormat(s->StreamHandle,&DviAStd,&Width,&Height,&RefreshRate,
317317
&Interlaced_B);
318318
#else

0 commit comments

Comments
 (0)