Updated packet creator class name

This commit is contained in:
Prianka Liz Kariat 2022-12-21 01:07:31 +05:30
parent 4a7a3b342b
commit febca359a6
3 changed files with 9 additions and 12 deletions

View File

@ -50,9 +50,9 @@ objc_library(
)
objc_library(
name = "MPPPacketCreator",
srcs = ["sources/MPPPacketCreator.mm"],
hdrs = ["sources/MPPPacketCreator.h"],
name = "MPPTextPacketCreator",
srcs = ["sources/MPPTextPacketCreator.mm"],
hdrs = ["sources/MPPTextPacketCreator.h"],
copts = [
"-ObjC++",
"-std=c++17",

View File

@ -14,15 +14,12 @@
#import <Foundation/Foundation.h>
#ifndef __cplusplus
#error This header can only be included by an Objective-C++ file.
#endif
#include "mediapipe/framework/packet.h"
/// This class is an Objective-C wrapper around a MediaPipe graph object, and
/// helps interface it with iOS technologies such as AVFoundation.
@interface MPPPacketCreator : NSObject
/* This class is an Objective-C wrapper around a MediaPipe graph object, and
* helps interface it with iOS technologies such as AVFoundation.
*/
@interface MPPTextPacketCreator : NSObject
+ (mediapipe::Packet)createWithText:(NSString *)text;

View File

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#import "mediapipe/tasks/ios/core/sources/MPPPacketCreator.h"
#import "mediapipe/tasks/ios/core/sources/MPPTextPacketCreator.h"
#import "mediapipe/tasks/ios/common/utils/sources/NSString+Helpers.h"
namespace {
@ -20,7 +20,7 @@ using ::mediapipe::MakePacket;
using ::mediapipe::Packet;
} // namespace
@implementation MPPPacketCreator
@implementation MPPTextPacketCreator
+ (Packet)createWithText:(NSString *)text {
return MakePacket<std::string>(text.cppString);