Skip to content

Commit 7267df1

Browse files
committed
Adding option to control DSR check during serial open
1 parent 529bf6b commit 7267df1

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

ndicapi.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,7 @@ ndicapiExport char* ndiSerialDeviceName(int i)
718718
}
719719

720720
//----------------------------------------------------------------------------
721-
ndicapiExport int ndiSerialProbe(const char* device)
721+
ndicapiExport int ndiSerialProbe(const char* device, bool checkDSR)
722722
{
723723
char reply[1024];
724724
char init_reply[16];
@@ -732,7 +732,7 @@ ndicapiExport int ndiSerialProbe(const char* device)
732732
}
733733

734734
// check DSR line to see whether any device is connected
735-
if (!ndiSerialCheckDSR(serial_port))
735+
if (checkDSR && !ndiSerialCheckDSR(serial_port))
736736
{
737737
ndiSerialClose(serial_port);
738738
return NDI_DSR_FAILURE;

ndicapi.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,8 @@ ndicapiExport char* ndiSerialDeviceName(int i);
221221
-# if the "INIT:" succeeds, send "VER:0" and check for response.
222222
-# restore the device to its previous state and close the device.
223223
224-
\param device name of a valid serial port device
224+
\param device name of a valid serial port device
225+
\param checkDSR whether or not to perform a DSR check
225226
226227
\return one of:
227228
- NDI_OKAY - probe was successful
@@ -232,7 +233,7 @@ ndicapiExport char* ndiSerialDeviceName(int i);
232233
- NDI_TIMEOUT - timeout while waiting for data
233234
- NDI_PROBE_FAIL - the device found was not an NDI device
234235
*/
235-
ndicapiExport int ndiSerialProbe(const char* device);
236+
ndicapiExport int ndiSerialProbe(const char* device, bool checkDSR);
236237

237238
/*! \ingroup NDIMethods
238239
Open communication with the NDI device on the specified

0 commit comments

Comments
 (0)