@@ -88,6 +88,13 @@ public final class MTCReceiver: @unchecked Sendable { // @unchecked required for
88
88
/// >
89
89
/// > This closure may be executed on a background thread. If the logic in the closure results in
90
90
/// > user interface updates, ensure that they are performed on the main actor/thread.
91
+ ///
92
+ /// - Parameters:
93
+ /// - timecode: Current display timecode.
94
+ /// - event: The MTC event that triggered the callback.
95
+ /// - direction: The current MTC playback or scrub direction.
96
+ /// - isFrameChanged: Boolean indicating that there has been a change to the four main timecode
97
+ /// components (`HH:MM:SS:FF`, ignoring subframes) since the last time this callback was called.
91
98
nonisolated ( unsafe) var timecodeChangedHandler: ( @Sendable (
92
99
_ timecode: Timecode ,
93
100
_ event: MTCMessageType ,
@@ -105,6 +112,14 @@ public final class MTCReceiver: @unchecked Sendable { // @unchecked required for
105
112
/// >
106
113
/// > This closure may be executed on a background thread. If the logic in the closure results in
107
114
/// > user interface updates, ensure that they are performed on the main actor/thread.
115
+ ///
116
+ /// - Parameters:
117
+ /// - handler: Closure containing the following parameters:
118
+ /// - `timecode`: Current display timecode.
119
+ /// - `event`: The MTC event that triggered the callback.
120
+ /// - `direction`: The current MTC playback or scrub direction.
121
+ /// - `isFrameChanged`: Boolean indicating that there has been a change to the four main timecode
122
+ /// components (`HH:MM:SS:FF`, ignoring subframes) since the last time this callback was called.
108
123
public func setTimecodeChangedHandler(
109
124
_ handler: ( @Sendable (
110
125
_ timecode: Timecode ,
@@ -151,12 +166,13 @@ public final class MTCReceiver: @unchecked Sendable { // @unchecked required for
151
166
/// > actor/thread.
152
167
///
153
168
/// - Parameters:
154
- /// - name: optionally supply a simple, unique alphanumeric name for the instance, used
155
- /// internally to identify the dispatch thread; random UUID will be used if `nil`
156
- /// - initialLocalFrameRate: set an initial local frame rate
157
- /// - syncPolicy: set the MTC sync policy
158
- /// - timecodeChanged: handle timecode change callbacks, pass `nil` if not needed
159
- /// - stateChanged: handle receiver state change callbacks, pass `nil` if not needed
169
+ /// - name: Optionally supply a simple, unique alphanumeric name for the instance, used
170
+ /// internally to identify the dispatch thread. A random UUID will be used if `nil`.
171
+ /// - initialLocalFrameRate: Set an initial local frame rate.
172
+ /// - syncPolicy: Set the MTC sync policy.
173
+ /// - timecodeChanged: Timecode changed callback handler. See ``setTimecodeChangedHandler(_:)``
174
+ /// for more information.
175
+ /// - stateChanged: Receiver state change callback handler.
160
176
public init (
161
177
name: String ? = nil ,
162
178
initialLocalFrameRate: TimecodeFrameRate ? = nil ,
0 commit comments