CMBufferQueueInstallTriggerWithIntegerThreshold(_:callback:refcon:condition:threshold:triggerTokenOut:)
Installs a trigger with a callback and threshold on a buffer queue.
Declaration
func CMBufferQueueInstallTriggerWithIntegerThreshold(_ queue: CMBufferQueue, callback: CMBufferQueueTriggerCallback?, refcon: UnsafeMutableRawPointer?, condition: CMBufferQueueTriggerCondition, threshold: CMItemCount, triggerTokenOut: UnsafeMutablePointer<CMBufferQueueTriggerToken?>?) -> OSStatusParameters
- queue:
CMBufferQueueon which the trigger is being set. - callback:
Callback to be called when the trigger condition becomes true. Can be
NULL, if client intends only to explicitly test the condition. Cannot beNULLif triggerTokenOut is NULL, otherwise the trigger would be meaningless. - refcon:
Refcon to be passed to the triggerCallback. Can be
NULLif the callback doesn’t need it, or is itselfNULL.`` - condition:
The condition to be tested when evaluating the trigger. Must be a valid condition for an integer threshold.
- threshold:
The integer value to compare against when evaluating the trigger.
- triggerTokenOut:
Address where created trigger token will be written. Can be
NULL, if client has no need to explicitly test or remove the trigger. Cannot beNULLif triggerCallback is NULL, since the trigger would be meaningless then.
Return Value
A result code. See Result Codes
Discussion
This function behaves the same way as CMBufferQueueInstallTrigger(_:callback:refcon:condition:time:triggerTokenOut:) except the trigger is evaluated against the integer value rather than the time value.
See Also
Managing Triggers
CMBufferQueueInstallTriggerHandler(_:_:_:_:_:)CMBufferQueueInstallTriggerHandlerWithIntegerThreshold(_:_:_:_:_:)CMBufferQueueTriggerHandlerCMBufferQueueTriggerTokenBuffer Trigger ConditionsCMBufferQueueTestTrigger(_:triggerToken:)CMBufferQueueInstallTrigger(_:callback:refcon:condition:time:triggerTokenOut:)CMBufferQueueTriggerCallbackCMBufferQueueTriggerCondition