Adjust video format stabilization before capture
Allow up to one second for the format event and wait 500 ms after receipt before the single hardware format readback.
This commit is contained in:
@@ -10,7 +10,8 @@ namespace
|
|||||||
constexpr uint32_t kFourccYuyv = GVFG_MAKEFOURCC('Y', 'U', 'Y', 'V');
|
constexpr uint32_t kFourccYuyv = GVFG_MAKEFOURCC('Y', 'U', 'Y', 'V');
|
||||||
constexpr uint32_t kFourccUyvy = GVFG_MAKEFOURCC('U', 'Y', 'V', 'Y');
|
constexpr uint32_t kFourccUyvy = GVFG_MAKEFOURCC('U', 'Y', 'V', 'Y');
|
||||||
constexpr uint32_t kFourccY210 = GVFG_MAKEFOURCC('Y', '2', '1', '0');
|
constexpr uint32_t kFourccY210 = GVFG_MAKEFOURCC('Y', '2', '1', '0');
|
||||||
constexpr DWORD kVideoFormatChangeTimeoutMs = 100;
|
constexpr DWORD kVideoFormatChangeTimeoutMs = 1000;
|
||||||
|
constexpr DWORD kVideoFormatSettleMs = 500;
|
||||||
// Temporary bring-up workaround: HDMI VideoSignalLock is not implemented
|
// Temporary bring-up workaround: HDMI VideoSignalLock is not implemented
|
||||||
// by the current driver/FPGA. Set false once HDMI lock reporting is ready.
|
// by the current driver/FPGA. Set false once HDMI lock reporting is ready.
|
||||||
constexpr bool kBypassHdmiSignalLock = true;
|
constexpr bool kBypassHdmiSignalLock = true;
|
||||||
@@ -313,6 +314,8 @@ namespace gvfg::internal
|
|||||||
#endif
|
#endif
|
||||||
if (wait != WAIT_OBJECT_0 && wait != WAIT_TIMEOUT)
|
if (wait != WAIT_OBJECT_0 && wait != WAIT_TIMEOUT)
|
||||||
return reject(GVFG_EIO, "Capture video-format event wait failed");
|
return reject(GVFG_EIO, "Capture video-format event wait failed");
|
||||||
|
if (wait == WAIT_OBJECT_0)
|
||||||
|
Sleep(kVideoFormatSettleMs);
|
||||||
|
|
||||||
// Setting the already-active color depth does not necessarily emit a
|
// Setting the already-active color depth does not necessarily emit a
|
||||||
// format-change event. Query once after the wait and accept the
|
// format-change event. Query once after the wait and accept the
|
||||||
|
|||||||
Reference in New Issue
Block a user