13 #define INSTP(_p_) HEX0N(uint64_t(_p_),16) 14 #define DIFAIL(__x__) AJA_sERROR (AJA_DebugUnit_DriverInterface, INSTP(this) << "::" << AJAFUNC << ": " << __x__) 15 #define DIWARN(__x__) AJA_sWARNING(AJA_DebugUnit_DriverInterface, INSTP(this) << "::" << AJAFUNC << ": " << __x__) 16 #define DINOTE(__x__) AJA_sNOTICE (AJA_DebugUnit_DriverInterface, INSTP(this) << "::" << AJAFUNC << ": " << __x__) 17 #define DIINFO(__x__) AJA_sINFO (AJA_DebugUnit_DriverInterface, INSTP(this) << "::" << AJAFUNC << ": " << __x__) 18 #define DIDBG(__x__) AJA_sDEBUG (AJA_DebugUnit_DriverInterface, INSTP(this) << "::" << AJAFUNC << ": " << __x__) 33 #if defined(NTV2_NUB_CLIENT_SUPPORT) 38 #endif// defined(NTV2_NUB_CLIENT_SUPPORT) 39 #if defined(MSWindows) 40 return WinConfigureSubscription (
true,
id);
50 if (!SubscribeOutputVerticalEvent(*it))
58 if (!SubscribeInputVerticalEvent(*it))
69 #if defined(NTV2_NUB_CLIENT_SUPPORT) 74 #endif// defined(NTV2_NUB_CLIENT_SUPPORT) 75 #if defined(MSWindows) 76 return WinConfigureSubscription (
false,
id);
86 if (!UnsubscribeOutputVerticalEvent(*it))
94 if (!UnsubscribeInputVerticalEvent(*it))
130 }
while (--inRepeatCount && result);
145 }
while (--inRepeatCount && result);
154 static ULWord bitShift [] = { 23, 5, 3, 1, 9, 7, 5, 3, 0};
158 outFieldID = ReadRegister (regNum[channel], statusValue)
159 ?
NTV2FieldID((statusValue >> bitShift[channel]) & 0x1)
169 bool bInterruptHappened (WaitForOutputVerticalInterrupt(channel));
173 GetOutputFieldID(channel, currentFieldID);
176 if (currentFieldID != inFieldID)
177 bInterruptHappened = WaitForOutputVerticalInterrupt(channel);
179 return bInterruptHappened;
188 static ULWord bitShift [] = { 21, 19, 21, 19, 17, 15, 13, 3, 0};
192 outFieldID = ReadRegister (regNum[channel], statusValue)
193 ?
NTV2FieldID((statusValue >> bitShift[channel]) & 0x1)
203 bool bInterruptHappened (WaitForInputVerticalInterrupt(channel));
207 GetInputFieldID(channel, currentFieldID);
210 if (currentFieldID != inFieldID)
211 bInterruptHappened = WaitForInputVerticalInterrupt(channel);
213 return bInterruptHappened;
virtual bool WaitForInputFieldID(const NTV2FieldID inFieldID, const NTV2Channel inChannel=NTV2_CHANNEL1)
Efficiently sleeps the calling thread/process until the next input VBI for the given field and input ...
NTV2FieldID
These values are used to identify fields for interlaced video. See Field/Frame Interrupts and CNTV2Ca...
NTV2ChannelSet::const_iterator NTV2ChannelSetConstIter
A handy const iterator into an NTV2ChannelSet.
Declares the AJADebug class.
bool isSuccess(void) const
#define NTV2_IS_VALID_INTERRUPT_ENUM(__e__)
virtual bool SubscribeOutputVerticalEvent(const NTV2Channel inChannel=NTV2_CHANNEL1)
Causes me to be notified when an output vertical blanking interrupt is generated for the given output...
Configure interrupt (subscribe/unsubscribe, enable/disable, query subscribed interrupts, query enabled interrupts, etc.).
INTERRUPT_ENUMS NTV2ChannelToInputInterrupt(const NTV2Channel inChannel)
Converts the given NTV2Channel value into the equivalent input INTERRUPT_ENUMS value.
NTV2Channel
These enum values are mostly used to identify a specific widget_framestore. They're also commonly use...
virtual bool SubscribeEvent(const INTERRUPT_ENUMS inEventCode)
Causes me to be notified when the given event/interrupt is triggered for the AJA device.
virtual bool WaitForOutputFieldID(const NTV2FieldID inFieldID, const NTV2Channel inChannel=NTV2_CHANNEL1)
Efficiently sleeps the calling thread/process until the next output VBI for the given field and outpu...
virtual bool SubscribeInputVerticalEvent(const NTV2Channel inChannel=NTV2_CHANNEL1)
Causes me to be notified when an input vertical blanking interrupt occurs on the given input channel...
enum _INTERRUPT_ENUMS_ INTERRUPT_ENUMS
static INTERRUPT_ENUMS gChannelToInputVerticalInterrupt[]
virtual bool GetInputFieldID(const NTV2Channel inChannel, NTV2FieldID &outFieldID)
Returns the current field ID of the specified input channel.
virtual bool UnsubscribeEvent(const INTERRUPT_ENUMS inEventCode)
Unregisters me so I'm no longer notified when the given event/interrupt is triggered on the AJA devic...
NTV2ConfigInterrupt & doUnsubscribe(const INTERRUPT_ENUMS id)
Unsubscribe local HANDLE from given interruptID.
#define NTV2_IS_VALID_CHANNEL(__x__)
virtual bool UnsubscribeOutputVerticalEvent(const NTV2Channel inChannel)
Unregisters me so I'm no longer notified when an output VBI is signaled on the given output channel...
std::set< NTV2Channel > NTV2ChannelSet
A set of distinct NTV2Channel values.
virtual bool WaitForOutputVerticalInterrupt(const NTV2Channel inChannel=NTV2_CHANNEL1, UWord inRepeatCount=1)
Efficiently sleeps the calling thread/process until the next one or more field (interlaced video) or ...
virtual bool GetOutputFieldID(const NTV2Channel inChannel, NTV2FieldID &outFieldID)
Returns the current field ID of the specified output channel.
NTV2ConfigInterrupt & doSubscribe(const INTERRUPT_ENUMS id)
Create event handle and subscribe it to given interruptID.
virtual bool UnsubscribeInputVerticalEvent(const NTV2Channel inChannel=NTV2_CHANNEL1)
Unregisters me so I'm no longer notified when an input VBI is signaled on the given input channel...
Declares the CNTV2Card class.
#define NTV2_IS_VALID_FIELD(__x__)
virtual bool GetInputVerticalInterruptCount(ULWord &outCount, const NTV2Channel inChannel=NTV2_CHANNEL1)
Answers with the number of input vertical interrupts handled by the driver for the given input channe...
Identifies the first field in time for an interlaced video frame, or the first and only field in a pr...
INTERRUPT_ENUMS NTV2ChannelToOutputInterrupt(const NTV2Channel inChannel)
Converts the given NTV2Channel value into the equivalent output INTERRUPT_ENUMS value.
static std::string IntName(const INTERRUPT_ENUMS id)
virtual bool GetOutputVerticalInterruptCount(ULWord &outCount, const NTV2Channel inChannel=NTV2_CHANNEL1)
Answers with the number of output vertical interrupts handled by the driver for the given output chan...
virtual bool WaitForInputVerticalInterrupt(const NTV2Channel inChannel=NTV2_CHANNEL1, UWord inRepeatCount=1)
Efficiently sleeps the calling thread/process until the next one or more field (interlaced video) or ...
static INTERRUPT_ENUMS gChannelToOutputVerticalInterrupt[]