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( objc_library(
name = "MPPPacketCreator", name = "MPPTextPacketCreator",
srcs = ["sources/MPPPacketCreator.mm"], srcs = ["sources/MPPTextPacketCreator.mm"],
hdrs = ["sources/MPPPacketCreator.h"], hdrs = ["sources/MPPTextPacketCreator.h"],
copts = [ copts = [
"-ObjC++", "-ObjC++",
"-std=c++17", "-std=c++17",

View File

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

View File

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