From 33a34de03bcae1fa05583c383f2b0cc308a35f57 Mon Sep 17 00:00:00 2001 From: Prianka Liz Kariat Date: Thu, 2 Mar 2023 19:50:00 +0530 Subject: [PATCH] Updated method signature in MPPTaskRunner --- mediapipe/tasks/ios/core/sources/MPPTaskRunner.h | 2 +- mediapipe/tasks/ios/core/sources/MPPTaskRunner.mm | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/mediapipe/tasks/ios/core/sources/MPPTaskRunner.h b/mediapipe/tasks/ios/core/sources/MPPTaskRunner.h index b2881ac06..20720e723 100644 --- a/mediapipe/tasks/ios/core/sources/MPPTaskRunner.h +++ b/mediapipe/tasks/ios/core/sources/MPPTaskRunner.h @@ -91,7 +91,7 @@ NS_ASSUME_NONNULL_BEGIN * Shuts down the C++ task runner. After the runner is closed, any calls that send input data to the * runner are illegal and will receive errors. */ -- (absl::Status)close; +- (BOOL)closeWithError:(NSError **)error; - (instancetype)init NS_UNAVAILABLE; diff --git a/mediapipe/tasks/ios/core/sources/MPPTaskRunner.mm b/mediapipe/tasks/ios/core/sources/MPPTaskRunner.mm index a57846338..0813760c2 100644 --- a/mediapipe/tasks/ios/core/sources/MPPTaskRunner.mm +++ b/mediapipe/tasks/ios/core/sources/MPPTaskRunner.mm @@ -63,8 +63,9 @@ using TaskRunnerCpp = ::mediapipe::tasks::core::TaskRunner; return [MPPCommonUtils checkCppError:sendStatus toError:error]; } -- (absl::Status)close { - return _cppTaskRunner->Close(); +- (BOOL)closeWithError:(NSError **)error { + absl::Status closeStatus = _cppTaskRunner->Close(); + return [MPPCommonUtils checkCppError:closeStatus toError:error]; } @end