Updated formatting
This commit is contained in:
parent
4558486459
commit
4401b11c3a
|
@ -91,7 +91,10 @@ static NSString *const kTaskName = @"imageClassifier";
|
|||
// and cause a retain cycle, after self is set to `nil`.
|
||||
MPPImageClassifier *__weak weakSelf = self;
|
||||
|
||||
// Create a private serial dispatch queue in which the deleagte method will be called asynchronously. This is to ensure that if the client performs a long running operation in the delegate method, the queue on which the C++ callbacks is invoked is not blocked and is freed up to continue with its operations.
|
||||
// Create a private serial dispatch queue in which the deleagte method will be called
|
||||
// asynchronously. This is to ensure that if the client performs a long running operation in
|
||||
// the delegate method, the queue on which the C++ callbacks is invoked is not blocked and is
|
||||
// freed up to continue with its operations.
|
||||
const char *queueName = [MPPVisionTaskRunner uniqueQueueNameWithTaskName:kTaskName];
|
||||
dispatch_queue_t callbackQueue = dispatch_queue_create(queueName, NULL);
|
||||
packetsCallback = [=](absl::StatusOr<PacketMap> status_or_packets) {
|
||||
|
@ -125,9 +128,8 @@ static NSString *const kTaskName = @"imageClassifier";
|
|||
[MPPImageClassifierResult imageClassifierResultWithClassificationsPacket:
|
||||
outputPacketMap[kClassificationsStreamName.cppString]];
|
||||
|
||||
NSInteger timeStampInMilliseconds = outputPacketMap[kImageOutStreamName.cppString]
|
||||
.Timestamp()
|
||||
.Value() /
|
||||
NSInteger timeStampInMilliseconds =
|
||||
outputPacketMap[kImageOutStreamName.cppString].Timestamp().Value() /
|
||||
kMicroSecondsPerMilliSecond;
|
||||
dispatch_async(callbackQueue, ^{
|
||||
[weakSelf.imageClassifierDelegate imageClassifier:weakSelf
|
||||
|
|
Loading…
Reference in New Issue
Block a user