vcap/deltacast: modernize ClockChannel usage

(from SDK sample Sample_RX4K.cpp)

Removed setting the ClockSystem - not present even in example in SDK
6.13.1.
This commit is contained in:
Martin Pulec
2025-10-29 13:14:16 +01:00
parent 6d5ffbe3d5
commit 185f7de4cf

View File

@@ -193,11 +193,17 @@ static bool wait_for_channel(struct vidcap_deltacast_state *s)
}
/* Auto-detect clock system */
Result = VHD_GetBoardProperty(s->BoardHandle,
Result =
#ifdef VHD_MIN_6_21
VHD_GetChannelProperty(s->BoardHandle, VHD_RX_CHANNEL, s->channel,
VHD_SDI_CP_CLOCK_DIVISOR, &s->ClockSystem);
#else
VHD_GetBoardProperty(s->BoardHandle,
DELTA_CH_TO_VAL(s->channel,
VHD_SDI_BP_RX0_CLOCK_DIV,
VHD_SDI_BP_RX4_CLOCK_DIV),
&s->ClockSystem);
#endif
if(Result != VHDERR_NOERROR) {
MSG(ERROR,
@@ -209,9 +215,6 @@ static bool wait_for_channel(struct vidcap_deltacast_state *s)
printf("\nIncoming clock system : %s\n",(s->ClockSystem==VHD_CLOCKDIV_1)?"European":"American");
}
/* Select the detected clock system */
VHD_SetBoardProperty(s->BoardHandle,VHD_SDI_BP_CLOCK_SYSTEM,s->ClockSystem);
/* Create a logical stream to receive from RX0 connector */
const VHD_STREAMTYPE StrmType = delta_rx_ch_to_stream_t(s->channel);
ULONG ProcessingMode = 0;