From 3a7aa29226d63e8e4ddd792616f0d5c72046fa47 Mon Sep 17 00:00:00 2001 From: Prianka Liz Kariat Date: Tue, 14 Feb 2023 20:49:14 +0530 Subject: [PATCH] Updated note about packets callback in vision task runner --- .../ios/vision/core/sources/MPPVisionTaskRunner.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/mediapipe/tasks/ios/vision/core/sources/MPPVisionTaskRunner.h b/mediapipe/tasks/ios/vision/core/sources/MPPVisionTaskRunner.h index 325e0622..5c5a835b 100644 --- a/mediapipe/tasks/ios/vision/core/sources/MPPVisionTaskRunner.h +++ b/mediapipe/tasks/ios/vision/core/sources/MPPVisionTaskRunner.h @@ -26,14 +26,22 @@ NS_ASSUME_NONNULL_BEGIN @interface MPPVisionTaskRunner : MPPTaskRunner /** - * Initializes a new `MPPVisionTaskRunner` with the MediaPipe calculator config protol running mode + * Initializes a new `MPPVisionTaskRunner` with the MediaPipe calculator config proto running mode * and packetsCallback. + * Make sure that the packets callback is set properly based on the vision task's running mode. + * In case of live stream running mode, a C++ packets callback that is intended to deliver inference + * results must be provided. In case of image or video running mode, packets callback must be set to + * nil. * * @param graphConfig A MediaPipe calculator config proto. * @param runningMode MediaPipe vision task running mode. * @param packetsCallback An optional C++ callback function that takes a list of output packets as * the input argument. If provided, the callback must in turn call the block provided by the user in - * the appropriate task options. + * the appropriate task options. Make sure that the packets callback is set properly based on the + * vision task's running mode. In case of live stream running mode, a C++ packets callback that is + * intended to deliver inference results must be provided. In case of image or video running mode, + * packets callback must be set to nil. + * * @param error Pointer to the memory location where errors if any should be * saved. If @c NULL, no error will be saved. *