Project import generated by Copybara.

PiperOrigin-RevId: 264105834
This commit is contained in:
MediaPipe Team
2019-08-19 08:50:18 +00:00
committed by Camillo Lugaresi
parent 71a47bb18b
commit f5df228d9b
28 changed files with 276 additions and 257 deletions
+6 -6
View File
@@ -81,7 +81,7 @@ static void EnsureOutputDirFor(NSString *outputFile) {
inputPackets:(const std::map<std::string, mediapipe::Packet>&)inputPackets
timestamp:(mediapipe::Timestamp)timestamp
outputStream:(const std::string&)outputStream
packetType:(MediaPipePacketType)inputPacketType {
packetType:(MPPPacketType)inputPacketType {
__block CVPixelBufferRef output;
graph.delegate = self;
@@ -143,7 +143,7 @@ static void EnsureOutputDirFor(NSString *outputFile) {
- (CVPixelBufferRef)runGraph:(MPPGraph*)graph
withPixelBuffer:(CVPixelBufferRef)inputBuffer
packetType:(MediaPipePacketType)inputPacketType {
packetType:(MPPPacketType)inputPacketType {
return [self runGraph:graph
withInputPixelBuffers:{{"input_frames", MakeCFHolder(inputBuffer)}}
inputPackets:{}
@@ -156,7 +156,7 @@ static void EnsureOutputDirFor(NSString *outputFile) {
withInputPixelBuffers:
(const std::unordered_map<std::string, CFHolder<CVPixelBufferRef>>&)inputBuffers
outputStream:(const std::string&)output
packetType:(MediaPipePacketType)inputPacketType {
packetType:(MPPPacketType)inputPacketType {
return [self runGraph:graph
withInputPixelBuffers:inputBuffers
inputPackets:{}
@@ -362,7 +362,7 @@ static void EnsureOutputDirFor(NSString *outputFile) {
{
CVPixelBufferRef outputBuffer = [self runGraph:graph
withPixelBuffer:inputBuffer
packetType:MediaPipePacketPixelBuffer];
packetType:MPPPacketTypePixelBuffer];
#if DEBUG
// Xcode can display UIImage objects right in the debugger. It is handy to
// have these variables defined if the test fails.
@@ -405,7 +405,7 @@ static void EnsureOutputDirFor(NSString *outputFile) {
MPPGraph* graph = [[MPPGraph alloc] initWithGraphConfig:config];
[graph addSidePackets:sidePackets];
[graph addFrameOutputStream:outputStream.UTF8String
outputPacketType:MediaPipePacketPixelBuffer];
outputPacketType:MPPPacketTypePixelBuffer];
std::unordered_map<std::string, CFHolder<CVPixelBufferRef>> inputBuffers;
for (NSString* inputStream in fileInputs) {
@@ -428,7 +428,7 @@ static void EnsureOutputDirFor(NSString *outputFile) {
inputPackets:packetInputs
timestamp:timestamp
outputStream:outputStream.UTF8String
packetType:MediaPipePacketPixelBuffer];
packetType:MPPPacketTypePixelBuffer];
UIImage* output = UIImageWithPixelBuffer(outputBuffer);
XCTAssertNotNil(output);