framework 编译work
This commit is contained in:
parent
e2bfbbbfb4
commit
493b6c109e
|
@ -18,13 +18,8 @@
|
|||
|
||||
#include <assert.h>
|
||||
#include <algorithm>
|
||||
#if defined(__APPLE__)
|
||||
#include "FilterGroup.hpp"
|
||||
#include "Context.hpp"
|
||||
#else
|
||||
#include "../include/GPUImage-x/filter/FilterGroup.hpp"
|
||||
#include "../include/GPUImage-x/Context.hpp"
|
||||
#endif
|
||||
|
||||
NS_GI_BEGIN
|
||||
|
||||
|
|
|
@ -19,15 +19,9 @@
|
|||
#ifndef FilterGroup_hpp
|
||||
#define FilterGroup_hpp
|
||||
|
||||
#if defined(__APPLE__)
|
||||
#include "GPUImageMacros.h"
|
||||
#include "Source.hpp"
|
||||
#include "Target.hpp"
|
||||
#else
|
||||
#include "GPUImage-x/GPUImageMacros.h"
|
||||
#include "GPUImage-x/source//Source.hpp"
|
||||
#include "GPUImage-x/target/Target.hpp"
|
||||
#endif
|
||||
#include <vector>
|
||||
#include "Filter.hpp"
|
||||
|
||||
|
|
32
mediapipe/render/core/GLThreadDispatch.cpp
Normal file
32
mediapipe/render/core/GLThreadDispatch.cpp
Normal file
|
@ -0,0 +1,32 @@
|
|||
//
|
||||
// Created by jormin on 2021/6/23.
|
||||
//
|
||||
|
||||
#if defined(__APPLE__)
|
||||
#include "GLThreadDispatch.h"
|
||||
#else
|
||||
#include "QStream/Dispatcher/GLThreadDispatch.h"
|
||||
#endif
|
||||
#include <assert.h>
|
||||
|
||||
|
||||
using namespace QStream;
|
||||
|
||||
|
||||
GLThreadDispatch::GLThreadDispatch(std::thread::id glThreadId, DispatchAsyncFunction dispatchAsyncFunction) : _glThreadId(glThreadId), _dispatchAsync(dispatchAsyncFunction) {
|
||||
}
|
||||
|
||||
void GLThreadDispatch::runSync(void *host, std::function<void(void)> func) {
|
||||
if (std::this_thread::get_id() == _glThreadId) {
|
||||
func();
|
||||
} else {
|
||||
assert("not support run sync in gl thread now");
|
||||
}
|
||||
}
|
||||
|
||||
void GLThreadDispatch::runAsync(void *host, std::function<void(void)> func) {
|
||||
if (_dispatchAsync) {
|
||||
_dispatchAsync(host, func);
|
||||
}
|
||||
}
|
||||
|
|
@ -17,15 +17,9 @@
|
|||
*/
|
||||
|
||||
#include <math.h>
|
||||
#if defined(__APPLE__)
|
||||
#include "SourceCamera.hpp"
|
||||
#include "Context.hpp"
|
||||
#include "GPUImageUtil.h"
|
||||
#else
|
||||
#include "GPUImage-x/source/SourceCamera.hpp"
|
||||
#include "GPUImage-x/Context.hpp"
|
||||
#include "GPUImage-x/util.h"
|
||||
#endif
|
||||
#if defined(__APPLE__)
|
||||
#include "CVFramebuffer.hpp"
|
||||
#endif
|
||||
|
|
|
@ -16,15 +16,10 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if defined(__APPLE__)
|
||||
#include "SourceImage.hpp"
|
||||
#include "Context.hpp"
|
||||
#include "GPUImageUtil.h"
|
||||
#else
|
||||
#include "GPUImage-x/source/SourceImage.hpp"
|
||||
#include "GPUImage-x/Context.hpp"
|
||||
#include "GPUImage-x/util.h"
|
||||
#endif
|
||||
|
||||
#if defined(__APPLE__)
|
||||
#include "CVFramebuffer.hpp"
|
||||
#endif
|
||||
|
|
|
@ -16,17 +16,10 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if defined(__APPLE__)
|
||||
#include "TargetView.hpp"
|
||||
#include "Context.hpp"
|
||||
#include "GPUImageUtil.h"
|
||||
#include "Filter.hpp"
|
||||
#else
|
||||
#include "GPUImage-x/target/TargetView.hpp"
|
||||
#include "GPUImage-x/Context.hpp"
|
||||
#include "GPUImage-x/util.h"
|
||||
#include "GPUImage-x/filter/Filter.hpp"
|
||||
#endif
|
||||
|
||||
USING_NS_GI
|
||||
|
||||
|
|
|
@ -20,11 +20,7 @@
|
|||
#define GPUIMAGE_X_TARGETVIEW_H
|
||||
|
||||
#include "Target.hpp"
|
||||
#if defined(__APPLE__)
|
||||
#include "GLProgram.hpp"
|
||||
#else
|
||||
#include "GPUImage-x/GLProgram.hpp"
|
||||
#endif
|
||||
|
||||
NS_GI_BEGIN
|
||||
class Context;
|
||||
|
|
|
@ -4,41 +4,30 @@ load(
|
|||
"//mediapipe/framework/tool:mediapipe_graph.bzl",
|
||||
"mediapipe_binary_graph",
|
||||
)
|
||||
|
||||
|
||||
load("@bazel_skylib//lib:selects.bzl", "selects")
|
||||
load("@build_bazel_rules_apple//apple:ios.bzl", "ios_unit_test")
|
||||
load("@build_bazel_rules_apple//apple:ios.bzl", "ios_framework")
|
||||
|
||||
ios_framework(
|
||||
name = "OlaRenderFramework",
|
||||
name = "OlaRenderDevelopFramework",
|
||||
hdrs = [
|
||||
"OlaRender.h",
|
||||
"OlaRenderDevelop.h",
|
||||
],
|
||||
infoplists = ["Info.plist"],
|
||||
bundle_id = "com.noppelab.MyFramework",
|
||||
bundle_id = "com.ola.olarender.develop",
|
||||
families = ["iphone", "ipad"],
|
||||
minimum_os_version = "10.0",
|
||||
minimum_os_version = "11.0",
|
||||
deps = [
|
||||
":OlaRender",
|
||||
"@ios_opencv//:OpencvFramework",
|
||||
":OlaRenderDevelop",
|
||||
],
|
||||
)
|
||||
|
||||
objc_library(
|
||||
name = "OlaRender",
|
||||
srcs = [
|
||||
"OlaRender.mm",
|
||||
],
|
||||
name = "OlaRenderDevelop",
|
||||
hdrs = [
|
||||
"OlaRender.h",
|
||||
"OlaRenderDevelop.h",
|
||||
],
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//mediapipe/render/core:core",
|
||||
"//mediapipe/objc:mediapipe_framework_ios",
|
||||
"//mediapipe/objc:mediapipe_input_sources_ios",
|
||||
"//mediapipe/objc:mediapipe_layer_renderer",
|
||||
],
|
||||
copts = select({
|
||||
"//mediapipe:apple": [
|
||||
|
@ -53,6 +42,5 @@ objc_library(
|
|||
"CoreMedia",
|
||||
"UIKit",
|
||||
"OpenGLES",
|
||||
"AssetsLibrary",
|
||||
],
|
||||
)
|
||||
|
|
|
@ -1 +1,50 @@
|
|||
load("//mediapipe/gpu:metal.bzl", "metal_library")
|
||||
load("//mediapipe/gpu:metal.bzl", "metal_library")
|
||||
load("@build_bazel_rules_apple//apple:ios.bzl", "ios_framework")
|
||||
|
||||
|
||||
ios_framework(
|
||||
name = "OlaCameraFramework",
|
||||
hdrs = glob(["*.h"]),
|
||||
infoplists = ["Info.plist"],
|
||||
bundle_id = "com.ola.cameraframework",
|
||||
families = ["iphone", "ipad"],
|
||||
minimum_os_version = "11.0",
|
||||
deps = [
|
||||
":OlaCamera",
|
||||
],
|
||||
)
|
||||
|
||||
objc_library(
|
||||
name = "OlaCamera",
|
||||
srcs = glob(["*.m","*.mm"]),
|
||||
hdrs = glob(["*.h"]),
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
":OlaCameraMetalLibrary",
|
||||
],
|
||||
copts = select({
|
||||
"//mediapipe:apple": [
|
||||
"-x objective-c++",
|
||||
"-fobjc-arc", # enable reference-counting
|
||||
],
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
sdk_frameworks = [
|
||||
"AVFoundation",
|
||||
"CoreGraphics",
|
||||
"CoreMedia",
|
||||
"UIKit",
|
||||
"OpenGLES",
|
||||
"MetalKit",
|
||||
"GLKit",
|
||||
"Metal",
|
||||
"CoreVideo",
|
||||
"IOSurface",
|
||||
"Foundation",
|
||||
],
|
||||
)
|
||||
|
||||
metal_library(
|
||||
name = "OlaCameraMetalLibrary",
|
||||
srcs = ["OlaCameraFramework.metal"],
|
||||
)
|
|
@ -17,6 +17,6 @@
|
|||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
<string>1.0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
//
|
||||
// QuarameraCameraRender.h
|
||||
// QuarameraFramework
|
||||
// OlaCameraRender.h
|
||||
// OlaFramework
|
||||
//
|
||||
// Created by wangrenzhu on 2021/1/25.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <AVFoundation/AVFoundation.h>
|
||||
#import "QuarameraShareTexture.h"
|
||||
#import "OlaShareTexture.h"
|
||||
|
||||
@interface OlaCameraRender : NSObject
|
||||
@property (nonatomic, readonly) CGSize renderSize;
|
||||
|
@ -15,10 +15,10 @@
|
|||
|
||||
- (instancetype)initWithRenderSize:(CGSize)renderSize
|
||||
device:(id<MTLDevice>)device
|
||||
cameraTexture:(QuarameraShareTexture *)cameraTexture
|
||||
cameraTexture:(OlaShareTexture *)cameraTexture
|
||||
contentScaleFactor:(CGFloat)factor;
|
||||
|
||||
- (void)setupWithDevice:(id<MTLDevice>)device shareTexture:(QuarameraShareTexture *)shareTexture useRenderMode:(BOOL)useRenderMode;
|
||||
- (void)setupWithDevice:(id<MTLDevice>)device shareTexture:(OlaShareTexture *)shareTexture useRenderMode:(BOOL)useRenderMode;
|
||||
|
||||
/// 重置画布大小
|
||||
/// @param renderSize 画布大小
|
||||
|
@ -33,7 +33,7 @@
|
|||
/// @param frameTime 帧时间
|
||||
- (void)render:(NSTimeInterval)frameTime;
|
||||
|
||||
- (void)updateCameraTexture:(QuarameraShareTexture *)cameraTexture;
|
||||
- (void)updateCameraTexture:(OlaShareTexture *)cameraTexture;
|
||||
|
||||
|
||||
@end
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
//
|
||||
// QuarameraCameraRender.m
|
||||
// QuarameraFramework
|
||||
// OlaCameraRender.m
|
||||
// OlaFramework
|
||||
//
|
||||
// Created by wangrenzhu on 2021/1/25.
|
||||
//
|
||||
|
||||
#import "QuarameraCameraRender.h"
|
||||
#import "OlaCameraRender.h"
|
||||
|
||||
@implementation QuarameraCameraRender
|
||||
@implementation OlaCameraRender
|
||||
@synthesize renderSize = _renderSize;
|
||||
|
||||
- (instancetype)initWithRenderSize:(CGSize)renderSize
|
||||
device:(id<MTLDevice>)device
|
||||
cameraTexture:(QuarameraShareTexture *)cameraTexture
|
||||
cameraTexture:(OlaShareTexture *)cameraTexture
|
||||
contentScaleFactor:(CGFloat)factor
|
||||
{
|
||||
NSAssert(NO, @"subclass must implement this method");
|
||||
|
@ -20,7 +20,7 @@
|
|||
}
|
||||
|
||||
|
||||
- (void)setupWithDevice:(id<MTLDevice>)device shareTexture:(QuarameraShareTexture *)shareTexture useRenderMode:(BOOL)useRenderMode;
|
||||
- (void)setupWithDevice:(id<MTLDevice>)device shareTexture:(OlaShareTexture *)shareTexture useRenderMode:(BOOL)useRenderMode;
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -40,7 +40,7 @@
|
|||
|
||||
}
|
||||
|
||||
- (void)updateCameraTexture:(QuarameraShareTexture *)cameraTexture
|
||||
- (void)updateCameraTexture:(OlaShareTexture *)cameraTexture
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// QuarameraMTLRender.h
|
||||
// QuameraDemo
|
||||
// OlaMTLRender.h
|
||||
//
|
||||
//
|
||||
// Created by wangrenzhu on 2021/1/22.
|
||||
// Copyright © 2021 alibaba. All rights reserved.
|
||||
|
@ -10,10 +10,10 @@
|
|||
#import <AVFoundation/AVFoundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <MetalKit/MetalKit.h>
|
||||
#import "QuarameraShareTexture.h"
|
||||
#import "QuarameraCameraRender.h"
|
||||
#import "OlaShareTexture.h"
|
||||
#import "OlaCameraRender.h"
|
||||
|
||||
@protocol QuarameraMTLCameraRenderDelegate <NSObject>
|
||||
@protocol OlaMTLCameraRenderDelegate <NSObject>
|
||||
|
||||
/// 闪电拍照准备完毕
|
||||
- (void)lightningModelPrepared;
|
||||
|
@ -25,7 +25,7 @@
|
|||
|
||||
|
||||
|
||||
@interface QuarameraMTLCameraRender : QuarameraCameraRender
|
||||
@interface OlaMTLCameraRender : OlaCameraRender
|
||||
|
||||
/// 输出CameraTexture
|
||||
@property (nonatomic) id<MTLTexture> outputTexture;
|
||||
|
@ -40,8 +40,8 @@
|
|||
@property (nonatomic, readonly) CVPixelBufferRef renderTarget;
|
||||
|
||||
|
||||
@property (nonatomic, weak) id<QuarameraMTLCameraRenderDelegate> renderDelegate;
|
||||
@property (nonatomic, strong) QuarameraShareTexture *offscreenCameraTexture;
|
||||
@property (nonatomic, weak) id<OlaMTLCameraRenderDelegate> renderDelegate;
|
||||
@property (nonatomic, strong) OlaShareTexture *offscreenCameraTexture;
|
||||
|
||||
/// 渲染到纹理指令
|
||||
/// @param displayTexture displayTexture description
|
|
@ -1,13 +1,13 @@
|
|||
//
|
||||
// QuarameraMTLRender.m
|
||||
// QuameraDemo
|
||||
// OlaMTLRender.m
|
||||
//
|
||||
//
|
||||
// Created by wangrenzhu on 2021/1/22.
|
||||
// Copyright © 2021 alibaba. All rights reserved.
|
||||
//
|
||||
#import <MetalKit/MetalKit.h>
|
||||
#import <simd/simd.h>
|
||||
#import "QuarameraMTLCameraRender.h"
|
||||
#import "OlaMTLCameraRender.h"
|
||||
|
||||
|
||||
typedef struct
|
||||
|
@ -45,7 +45,7 @@ struct TextureScale {
|
|||
simd_float3 scaleFlip;
|
||||
};
|
||||
|
||||
@interface QuarameraMTLCameraRender()
|
||||
@interface OlaMTLCameraRender()
|
||||
|
||||
@property (nonatomic) id<MTLRenderPipelineState> colorConvertPipelineState;
|
||||
|
||||
|
@ -79,12 +79,12 @@ struct TextureScale {
|
|||
@property (nonatomic) size_t cameraOutputWidth;
|
||||
@property (nonatomic) size_t cameraOutputHeight;
|
||||
|
||||
@property (nonatomic, strong) QuarameraShareTexture *shareTexture;
|
||||
@property (nonatomic, strong) OlaShareTexture *shareTexture;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@implementation QuarameraMTLCameraRender
|
||||
@implementation OlaMTLCameraRender
|
||||
@synthesize renderSize = _renderSize;
|
||||
|
||||
- (void)dealloc
|
||||
|
@ -112,7 +112,7 @@ struct TextureScale {
|
|||
|
||||
- (instancetype)initWithRenderSize:(CGSize)renderSize
|
||||
device:(id<MTLDevice>)device
|
||||
cameraTexture:(QuarameraShareTexture *)cameraTexture
|
||||
cameraTexture:(OlaShareTexture *)cameraTexture
|
||||
contentScaleFactor:(CGFloat)factor
|
||||
{
|
||||
self = [super init];
|
||||
|
@ -123,13 +123,13 @@ struct TextureScale {
|
|||
__unused NSError *error;
|
||||
_offscreenCameraTexture = cameraTexture;
|
||||
NSBundle *bundle = [NSBundle mainBundle];
|
||||
NSURL *shaderURL = [bundle URLForResource:@"QuarameraFramework" withExtension:@"metallib"];
|
||||
NSURL *shaderURL = [bundle URLForResource:@"OlaFramework" withExtension:@"metallib"];
|
||||
if (@available(iOS 11.0, *)) {
|
||||
if (shaderURL) {
|
||||
self.library = [self.device newLibraryWithURL:shaderURL error:&error];
|
||||
}
|
||||
} else {
|
||||
NSString *lib = [[NSBundle mainBundle] pathForResource:@"QuarameraFramework" ofType:@"metallib"];
|
||||
NSString *lib = [[NSBundle mainBundle] pathForResource:@"OlaFramework" ofType:@"metallib"];
|
||||
if (lib) {
|
||||
_library = [_device newLibraryWithFile:lib error:nil];
|
||||
}
|
||||
|
@ -346,13 +346,13 @@ struct TextureScale {
|
|||
[colorConversionEncoder drawPrimitives:MTLPrimitiveTypeTriangleStrip vertexStart:0 vertexCount:4];
|
||||
[colorConversionEncoder endEncoding];
|
||||
|
||||
__weak QuarameraMTLCameraRender *weakSelf = self;
|
||||
__weak OlaMTLCameraRender *weakSelf = self;
|
||||
|
||||
[commandBuffer addCompletedHandler:^(id<MTLCommandBuffer> commandBuffer) {
|
||||
if (weakSelf == nil) {
|
||||
return;
|
||||
}
|
||||
__strong QuarameraMTLCameraRender *strongSelf = weakSelf;
|
||||
__strong OlaMTLCameraRender *strongSelf = weakSelf;
|
||||
if (!strongSelf.firstFrameRender) {
|
||||
NSLog(@"相机首帧渲染完毕");
|
||||
//这里埋点时机和Android统一,收到相机帧时发送,但实际上还是渲染完后发送比较合适
|
||||
|
@ -445,7 +445,7 @@ struct TextureScale {
|
|||
self.cameraOutputHeight = self.renderSize.height;
|
||||
}
|
||||
|
||||
- (void)updateCameraTexture:(QuarameraShareTexture *)cameraTexture
|
||||
- (void)updateCameraTexture:(OlaShareTexture *)cameraTexture
|
||||
{
|
||||
_offscreenCameraTexture = nil;
|
||||
_offscreenCameraTexture = cameraTexture;
|
|
@ -1,18 +1,17 @@
|
|||
//
|
||||
// WANativeMTLCameraPreviewView.h
|
||||
// WebAR-iOS
|
||||
// 基于Metal的相机预览视图,闪电拍照定制优化,具备相机预览的基础功能
|
||||
//
|
||||
// Created by wangrenzhu on 2020/11/16.
|
||||
// Copyright © 2020 Taobao lnc. All rights reserved.
|
||||
//
|
||||
|
||||
#import <MetalKit/MetalKit.h>
|
||||
#import <AVFoundation/AVFoundation.h>
|
||||
#import <QuarameraFramework/QuarameraCameraRender.h>
|
||||
#import <QuarameraFramework/QuarameraMTLCameraRender.h>
|
||||
#import <QuarameraFramework/QuarameraShareTexture.h>
|
||||
#import "OlaCameraRender.h"
|
||||
#import "OlaMTLCameraRender.h"
|
||||
#import "OlaShareTexture.h"
|
||||
|
||||
@protocol QuarameraMTLCameraRenderViewDelegate
|
||||
@protocol OlaMTLCameraRenderViewDelegate
|
||||
|
||||
- (void)draw:(NSTimeInterval)frameTime;
|
||||
|
||||
|
@ -21,8 +20,8 @@
|
|||
/// @param texture texture description
|
||||
/// @param onScreenTexture 上屏纹理
|
||||
/// @param frameTime 帧时间
|
||||
- (IOSurfaceID)bgraCameraTextureReady:(QuarameraShareTexture *)texture
|
||||
onScreenTexture:(QuarameraShareTexture *)onScreenTexture
|
||||
- (IOSurfaceID)bgraCameraTextureReady:(OlaShareTexture *)texture
|
||||
onScreenTexture:(OlaShareTexture *)onScreenTexture
|
||||
frameTime:(NSTimeInterval)frameTime;
|
||||
|
||||
@optional
|
||||
|
@ -32,29 +31,29 @@
|
|||
/// @param targetTexture targetTexture description
|
||||
/// @param buffer MTL的CommandBuffer
|
||||
- (void)externalRender:(NSTimeInterval)frameTime
|
||||
targetTexture:(QuarameraShareTexture *)targetTexture
|
||||
targetTexture:(OlaShareTexture *)targetTexture
|
||||
commandBuffer:(id<MTLCommandBuffer>)buffer;
|
||||
|
||||
|
||||
/// YUV 相机纹理
|
||||
/// @param yTexture y纹理
|
||||
/// @param uvTexture yv纹理
|
||||
- (void)yuvTextureReady:(QuarameraShareTexture *)yTexture uvTexture:(QuarameraShareTexture *)uvTexture;
|
||||
- (void)yuvTextureReady:(OlaShareTexture *)yTexture uvTexture:(OlaShareTexture *)uvTexture;
|
||||
|
||||
@end
|
||||
|
||||
@interface QuarameraMTLCameraRenderView : MTKView
|
||||
@interface OlaMTLCameraRenderView : MTKView
|
||||
|
||||
/// MetalRender
|
||||
@property (nonatomic, strong, readonly) QuarameraMTLCameraRender *mtlRender;
|
||||
@property (nonatomic, strong, readonly) OlaMTLCameraRender *mtlRender;
|
||||
|
||||
@property (nonatomic, weak) id<QuarameraMTLCameraRenderViewDelegate> cameraDelegate;
|
||||
@property (nonatomic, weak) id<OlaMTLCameraRenderViewDelegate> cameraDelegate;
|
||||
|
||||
@property (nonatomic) dispatch_queue_t displayRenderQueue;
|
||||
|
||||
/// 原始相机纹理 可以快速读取
|
||||
@property (nonatomic, readonly, strong) QuarameraShareTexture *cameraTexture;
|
||||
@property (nonatomic, readonly, strong) QuarameraShareTexture *shareTexture;
|
||||
@property (nonatomic, readonly, strong) OlaShareTexture *cameraTexture;
|
||||
@property (nonatomic, readonly, strong) OlaShareTexture *shareTexture;
|
||||
|
||||
/// 不带后处理的相机渲染的原始纹理
|
||||
@property (nonatomic, readonly) CVPixelBufferRef renderTarget;
|
||||
|
@ -72,10 +71,10 @@
|
|||
/// @param sampleBuffer 相机采集流
|
||||
- (void)cameraSampleBufferArrive:(CMSampleBufferRef)sampleBuffer;
|
||||
|
||||
- (void)addRender:(QuarameraCameraRender *)render;
|
||||
- (void)addRender:(OlaCameraRender *)render;
|
||||
|
||||
|
||||
/// 是否开启Quaramera
|
||||
/// 是否开启Ola
|
||||
/// @param frame frame description
|
||||
- (instancetype)initWithFrame:(CGRect)frame;
|
||||
|
|
@ -1,35 +1,35 @@
|
|||
//
|
||||
// WANativeMTLRenderView.m
|
||||
// WebAR-iOS
|
||||
//
|
||||
//
|
||||
// Created by wangrenzhu on 2020/11/16.
|
||||
// Copyright © 2020 Taobao lnc. All rights reserved.
|
||||
//
|
||||
|
||||
#import "QuarameraMTLCameraRenderView.h"
|
||||
#import "QuarameraShareTexture.h"
|
||||
#import "QuarameraMTLCameraRender.h"
|
||||
#import "OlaMTLCameraRenderView.h"
|
||||
#import "OlaShareTexture.h"
|
||||
#import "OlaMTLCameraRender.h"
|
||||
#import <OpenGLES/EAGL.h>
|
||||
#import <OpenGLES/ES3/gl.h>
|
||||
|
||||
static const NSUInteger MaxFramesInFlight = 3;
|
||||
static size_t const kQuarameraDynamicTextureByteAlignment = 16;
|
||||
static size_t const kOlaDynamicTextureByteAlignment = 16;
|
||||
|
||||
NS_INLINE size_t QAAlignSize(size_t size)
|
||||
{
|
||||
return ceil(size / (double)kQuarameraDynamicTextureByteAlignment) * kQuarameraDynamicTextureByteAlignment;
|
||||
return ceil(size / (double)kOlaDynamicTextureByteAlignment) * kOlaDynamicTextureByteAlignment;
|
||||
}
|
||||
|
||||
@interface QuarameraMTLCameraRenderView()
|
||||
@interface OlaMTLCameraRenderView()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@property (nonatomic, strong) QuarameraMTLCameraRender *mtlRender;
|
||||
@property (nonatomic, strong) OlaMTLCameraRender *mtlRender;
|
||||
|
||||
@property (nonatomic) NSTimeInterval frameTime;
|
||||
@property (nonatomic, strong) QuarameraShareTexture *shareTexture;
|
||||
@property (nonatomic, strong) QuarameraShareTexture *cameraTexture;
|
||||
@property (nonatomic, strong) OlaShareTexture *shareTexture;
|
||||
@property (nonatomic, strong) OlaShareTexture *cameraTexture;
|
||||
@property (nonatomic) id<MTLTexture> ioSurfaceTexture;
|
||||
@property (nonatomic) IOSurfaceID lastIOSurfaceID;
|
||||
@property (nonatomic, strong) EAGLContext *openGLContext;
|
||||
|
@ -39,11 +39,11 @@ NS_INLINE size_t QAAlignSize(size_t size)
|
|||
|
||||
@property (nonatomic, assign) BOOL useRenderMode;
|
||||
|
||||
@property (nonatomic, strong) NSMutableArray<QuarameraCameraRender *> *renders;
|
||||
@property (nonatomic, strong) NSMutableArray<OlaCameraRender *> *renders;
|
||||
@property (nonatomic) CGSize lastFrameSize;
|
||||
@end
|
||||
|
||||
@implementation QuarameraMTLCameraRenderView
|
||||
@implementation OlaMTLCameraRenderView
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
|
@ -94,17 +94,17 @@ NS_INLINE size_t QAAlignSize(size_t size)
|
|||
frame.size.height * self.contentScaleFactor);
|
||||
|
||||
|
||||
_shareTexture = [[QuarameraShareTexture alloc] initWithMetalDevice:self.device
|
||||
_shareTexture = [[OlaShareTexture alloc] initWithMetalDevice:self.device
|
||||
openGLContext:self.openGLContext
|
||||
metalPixelFormat:self.colorPixelFormat
|
||||
size:textureSize];
|
||||
|
||||
_cameraTexture = [[QuarameraShareTexture alloc] initWithMetalDevice:self.device
|
||||
_cameraTexture = [[OlaShareTexture alloc] initWithMetalDevice:self.device
|
||||
openGLContext:self.openGLContext
|
||||
metalPixelFormat:self.colorPixelFormat
|
||||
size:textureSize];
|
||||
|
||||
_mtlRender = [[QuarameraMTLCameraRender alloc] initWithRenderSize:textureSize
|
||||
_mtlRender = [[OlaMTLCameraRender alloc] initWithRenderSize:textureSize
|
||||
device:self.device
|
||||
cameraTexture:self.cameraTexture
|
||||
contentScaleFactor:self.contentScaleFactor];
|
||||
|
@ -116,7 +116,7 @@ NS_INLINE size_t QAAlignSize(size_t size)
|
|||
dispatch_queue_attr_make_with_qos_class(DISPATCH_QUEUE_SERIAL,
|
||||
QOS_CLASS_USER_INTERACTIVE, 0);
|
||||
self.displayFrameRenderingSemaphore = dispatch_semaphore_create(MaxFramesInFlight);
|
||||
self.displayRenderQueue = dispatch_queue_create("quaramera.ios.displayRenderQueue",
|
||||
self.displayRenderQueue = dispatch_queue_create("Ola.ios.displayRenderQueue",
|
||||
interactive);
|
||||
|
||||
self.cameraFrameRenderingSemaphore = dispatch_semaphore_create(1);
|
||||
|
@ -144,7 +144,7 @@ NS_INLINE size_t QAAlignSize(size_t size)
|
|||
|
||||
[self.mtlRender resize:textureSize];
|
||||
|
||||
[self.renders enumerateObjectsUsingBlock:^(QuarameraCameraRender * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
||||
[self.renders enumerateObjectsUsingBlock:^(OlaCameraRender * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
||||
[obj resize:textureSize];
|
||||
}];
|
||||
self.paused = NO;
|
||||
|
@ -177,7 +177,7 @@ NS_INLINE size_t QAAlignSize(size_t size)
|
|||
|
||||
id<CAMetalDrawable> drawable = [((CAMetalLayer *)self.layer) nextDrawable];
|
||||
|
||||
__weak QuarameraMTLCameraRenderView *weakSelf = self;
|
||||
__weak OlaMTLCameraRenderView *weakSelf = self;
|
||||
|
||||
// dispatch_semaphore_t block_camera_sema = self.cameraFrameRenderingSemaphore;
|
||||
dispatch_semaphore_t block_display_sema = self.displayFrameRenderingSemaphore;
|
||||
|
@ -188,14 +188,14 @@ NS_INLINE size_t QAAlignSize(size_t size)
|
|||
dispatch_semaphore_signal(block_display_sema);
|
||||
};
|
||||
|
||||
NSMutableArray<QuarameraCameraRender *> *renders = [self.renders copy];
|
||||
NSMutableArray<OlaCameraRender *> *renders = [self.renders copy];
|
||||
|
||||
dispatch_async(self.displayRenderQueue, ^{
|
||||
if (weakSelf == nil) {
|
||||
return;
|
||||
}
|
||||
|
||||
__strong QuarameraMTLCameraRenderView *strongSelf = weakSelf;
|
||||
__strong OlaMTLCameraRenderView *strongSelf = weakSelf;
|
||||
|
||||
strongSelf.frameTime += (1.0 / strongSelf.preferredFramesPerSecond) * 1000.0;
|
||||
if (dispatch_semaphore_wait(block_display_sema, DISPATCH_TIME_NOW) != 0)
|
||||
|
@ -218,7 +218,7 @@ NS_INLINE size_t QAAlignSize(size_t size)
|
|||
//quarkitRendre把相机渲染到shareTexture上
|
||||
|
||||
glFlush();
|
||||
[renders enumerateObjectsUsingBlock:^(QuarameraCameraRender * _Nonnull obj,
|
||||
[renders enumerateObjectsUsingBlock:^(OlaCameraRender * _Nonnull obj,
|
||||
NSUInteger idx, BOOL * _Nonnull stop) {
|
||||
if (obj.enable) {
|
||||
[obj render:weakSelf.frameTime];
|
||||
|
@ -311,7 +311,7 @@ NS_INLINE size_t QAAlignSize(size_t size)
|
|||
}
|
||||
|
||||
dispatch_semaphore_t block_camera_sema = self.cameraFrameRenderingSemaphore;
|
||||
__strong QuarameraMTLCameraRenderView *weakSelf = self;
|
||||
__strong OlaMTLCameraRenderView *weakSelf = self;
|
||||
void (^renderCompleted)(id<MTLCommandBuffer> buffer) = ^(id<MTLCommandBuffer> buffer)
|
||||
{
|
||||
dispatch_semaphore_signal(block_camera_sema);
|
||||
|
@ -323,7 +323,7 @@ NS_INLINE size_t QAAlignSize(size_t size)
|
|||
CFRelease(sampleBuffer);
|
||||
return;
|
||||
}
|
||||
__strong QuarameraMTLCameraRenderView *strongSelf = weakSelf;
|
||||
__strong OlaMTLCameraRenderView *strongSelf = weakSelf;
|
||||
CVPixelBufferRef pixelBuffer = CMSampleBufferGetImageBuffer(sampleBuffer);
|
||||
[strongSelf.mtlRender renderToCameraTextureWithPixelBuffer:pixelBuffer completedHandler:renderCompleted];
|
||||
|
||||
|
@ -336,7 +336,7 @@ NS_INLINE size_t QAAlignSize(size_t size)
|
|||
return self.cameraTexture.renderTarget;
|
||||
}
|
||||
|
||||
- (void)addRender:(QuarameraCameraRender *)render
|
||||
- (void)addRender:(OlaCameraRender *)render
|
||||
{
|
||||
NSAssert([NSThread isMainThread], @"call on main Thread");
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
//
|
||||
// QuarameraShareTexture.h
|
||||
// OlaShareTexture.h
|
||||
// QuameraDemo
|
||||
//
|
||||
// Created by wangrenzhu on 2021/1/21.
|
||||
|
@ -17,9 +17,9 @@ typedef struct {
|
|||
GLuint glInternalFormat;
|
||||
GLuint glFormat;
|
||||
GLuint glType;
|
||||
} QuarameraTextureFormatInfo;
|
||||
} OlaTextureFormatInfo;
|
||||
|
||||
@interface QuarameraShareTexture : NSObject
|
||||
@interface OlaShareTexture : NSObject
|
||||
|
||||
- (nonnull instancetype)initWithMetalDevice:(nonnull id<MTLDevice>)mtlDevice
|
||||
openGLContext:(nonnull EAGLContext*)glContext
|
||||
|
@ -40,7 +40,7 @@ typedef struct {
|
|||
|
||||
@property (readonly, nonatomic) CGSize size;
|
||||
@property (strong, nullable, nonatomic) NSString *name;
|
||||
@property (readonly, nonnull, nonatomic) QuarameraTextureFormatInfo *formatInfo;
|
||||
@property (readonly, nonnull, nonatomic) OlaTextureFormatInfo *formatInfo;
|
||||
@property (readonly, nonatomic) IOSurfaceID surfaceID;
|
||||
|
||||
@end
|
|
@ -1,12 +1,12 @@
|
|||
//
|
||||
// QuarameraShareTexture.m
|
||||
// QuameraDemo
|
||||
// OlaShareTexture.m
|
||||
// OlaCameraFramework
|
||||
//
|
||||
// Created by wangrenzhu on 2021/1/21.
|
||||
// Copyright © 2021 alibaba. All rights reserved.
|
||||
//
|
||||
|
||||
#import "QuarameraShareTexture.h"
|
||||
#import "OlaShareTexture.h"
|
||||
#import <OpenGLES/ES2/gl.h>
|
||||
#import <OpenGLES/ES2/glext.h>
|
||||
#import <MetalKit/MetalKit.h>
|
||||
|
@ -18,7 +18,7 @@
|
|||
|
||||
#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
|
||||
|
||||
__unused static QuarameraTextureFormatInfo formatTable[] =
|
||||
__unused static OlaTextureFormatInfo formatTable[] =
|
||||
{
|
||||
// Core Video Pixel Format, Metal Pixel Format, GL internalformat, GL format, GL type
|
||||
{ kCVPixelFormatType_32BGRA, MTLPixelFormatBGRA8Unorm, GL_RGBA, GL_BGRA_EXT, GL_UNSIGNED_INT_8_8_8_8_REV },
|
||||
|
@ -38,9 +38,9 @@ static const float standardImageVertices[] = {
|
|||
1.0, -1.0
|
||||
};
|
||||
|
||||
static const NSUInteger interopFormats = sizeof(formatTable) / sizeof(QuarameraTextureFormatInfo);
|
||||
static const NSUInteger interopFormats = sizeof(formatTable) / sizeof(OlaTextureFormatInfo);
|
||||
|
||||
QuarameraTextureFormatInfo* textureFormatInfoFromMetalPixelFormat(MTLPixelFormat pixelFormat)
|
||||
OlaTextureFormatInfo* textureFormatInfoFromMetalPixelFormat(MTLPixelFormat pixelFormat)
|
||||
{
|
||||
for(int i = 0; i < interopFormats; i++) {
|
||||
if(pixelFormat == formatTable[i].mtlFormat) {
|
||||
|
@ -50,7 +50,7 @@ QuarameraTextureFormatInfo* textureFormatInfoFromMetalPixelFormat(MTLPixelFormat
|
|||
return NULL;
|
||||
}
|
||||
|
||||
@interface QuarameraShareTexture() {
|
||||
@interface OlaShareTexture() {
|
||||
|
||||
}
|
||||
|
||||
|
@ -61,9 +61,9 @@ QuarameraTextureFormatInfo* textureFormatInfoFromMetalPixelFormat(MTLPixelFormat
|
|||
|
||||
@end
|
||||
|
||||
@implementation QuarameraShareTexture
|
||||
@implementation OlaShareTexture
|
||||
{
|
||||
QuarameraTextureFormatInfo *_formatInfo;
|
||||
OlaTextureFormatInfo *_formatInfo;
|
||||
CVPixelBufferRef _pixelBuffer;
|
||||
CVMetalTextureRef _mtlTexture;
|
||||
|
||||
|
@ -290,9 +290,9 @@ QuarameraTextureFormatInfo* textureFormatInfoFromMetalPixelFormat(MTLPixelFormat
|
|||
return _pixelBuffer;
|
||||
}
|
||||
|
||||
- (QuarameraTextureFormatInfo *)formatInfo
|
||||
- (OlaTextureFormatInfo *)formatInfo
|
||||
{
|
||||
return (QuarameraTextureFormatInfo *)_formatInfo;
|
||||
return (OlaTextureFormatInfo *)_formatInfo;
|
||||
}
|
||||
|
||||
- (id<MTLTexture>)loadTextureFromImage:(UIImage *)image
|
||||
|
@ -319,13 +319,13 @@ QuarameraTextureFormatInfo* textureFormatInfoFromMetalPixelFormat(MTLPixelFormat
|
|||
|
||||
NSError *error;
|
||||
NSBundle *bundle = [NSBundle mainBundle];
|
||||
NSURL *shaderURL = [bundle URLForResource:@"QuarameraFramework" withExtension:@"metallib"];
|
||||
NSURL *shaderURL = [bundle URLForResource:@"OlaFramework" withExtension:@"metallib"];
|
||||
if (@available(iOS 11.0, *)) {
|
||||
if (shaderURL) {
|
||||
self.library = [self.metalDevice newLibraryWithURL:shaderURL error:&error];
|
||||
}
|
||||
} else {
|
||||
NSString *lib = [[NSBundle mainBundle] pathForResource:@"QuarameraFramework" ofType:@"metallib"];
|
||||
NSString *lib = [[NSBundle mainBundle] pathForResource:@"OlaFramework" ofType:@"metallib"];
|
||||
if (lib) {
|
||||
_library = [_metalDevice newLibraryWithFile:lib error:nil];
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
//
|
||||
// OlaRender.h
|
||||
// OlaRender
|
||||
// Created by Renzhu wang on 2022/7/12.
|
||||
// Copyright © 2022 Ola. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface OlaRender : NSObject
|
||||
|
||||
@end
|
|
@ -5,10 +5,5 @@
|
|||
// Copyright © 2022 Ola. All rights reserved.
|
||||
//
|
||||
|
||||
#import "OlaRender.h"
|
||||
|
||||
|
||||
@implementation OlaRender
|
||||
|
||||
|
||||
@end
|
||||
#include "GPUImage-x.h"
|
||||
#include "Framebuffer.hpp"
|
|
@ -0,0 +1,59 @@
|
|||
{
|
||||
"additionalFilePaths" : [
|
||||
"mediapipe/render/ios/BUILD"
|
||||
],
|
||||
"buildTargets" : [
|
||||
"//mediapipe/render/ios:OlaRenderDevelop",
|
||||
"//mediapipe/render/ios:OlaRenderDevelopFramework"
|
||||
],
|
||||
"optionSet" : {
|
||||
"BazelBuildOptionsDebug" : {
|
||||
"p" : "$(inherited)"
|
||||
},
|
||||
"BazelBuildOptionsRelease" : {
|
||||
"p" : "$(inherited)"
|
||||
},
|
||||
"BazelBuildStartupOptionsDebug" : {
|
||||
"p" : "$(inherited)"
|
||||
},
|
||||
"BazelBuildStartupOptionsRelease" : {
|
||||
"p" : "$(inherited)"
|
||||
},
|
||||
"BuildActionPostActionScript" : {
|
||||
"p" : "$(inherited)"
|
||||
},
|
||||
"BuildActionPreActionScript" : {
|
||||
"p" : "$(inherited)"
|
||||
},
|
||||
"CommandlineArguments" : {
|
||||
"p" : "$(inherited)"
|
||||
},
|
||||
"EnvironmentVariables" : {
|
||||
"p" : "$(inherited)"
|
||||
},
|
||||
"LaunchActionPostActionScript" : {
|
||||
"p" : "$(inherited)"
|
||||
},
|
||||
"LaunchActionPreActionScript" : {
|
||||
"p" : "$(inherited)"
|
||||
},
|
||||
"ProjectGenerationBazelStartupOptions" : {
|
||||
"p" : "$(inherited)"
|
||||
},
|
||||
"ProjectGenerationPlatformConfiguration" : {
|
||||
"p" : "ios_arm64"
|
||||
},
|
||||
"TestActionPostActionScript" : {
|
||||
"p" : "$(inherited)"
|
||||
},
|
||||
"TestActionPreActionScript" : {
|
||||
"p" : "$(inherited)"
|
||||
}
|
||||
},
|
||||
"projectName" : "OlaVideo",
|
||||
"sourceFilters" : [
|
||||
"mediapipe/render/core",
|
||||
"mediapipe/render/core/math",
|
||||
"mediapipe/render/ios"
|
||||
]
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"configDefaults" : {
|
||||
"optionSet" : {
|
||||
"CLANG_CXX_LANGUAGE_STANDARD" : {
|
||||
"p" : "c++17"
|
||||
},
|
||||
"ProjectGenerationPlatformConfiguration" : {
|
||||
"p" : "ios_arm64"
|
||||
}
|
||||
}
|
||||
},
|
||||
"packages" : [
|
||||
"mediapipe/render/ios"
|
||||
],
|
||||
"projectName" : "OlaVideo",
|
||||
"workspaceRoot" : "../../../.."
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"optionSet" : {
|
||||
"BazelPath" : {
|
||||
"p" : "/opt/homebrew/Cellar/bazelisk/1.12.0/bin/bazelisk"
|
||||
},
|
||||
"WorkspaceRootPath" : {
|
||||
"p" : "/Users/wangrenzhu/Documents/github/mediapipe-render"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"additionalFilePaths" : [
|
||||
"mediapipe/render/ios/BUILD"
|
||||
],
|
||||
"buildTargets" : [
|
||||
"//mediapipe/render/ios:OlaRenderDevelop",
|
||||
"//mediapipe/render/ios:OlaRenderDevelopFramework"
|
||||
],
|
||||
"optionSet" : {
|
||||
"ProjectGenerationPlatformConfiguration" : {
|
||||
"p" : "ios_arm64"
|
||||
}
|
||||
},
|
||||
"projectName" : "OlaVideo",
|
||||
"sourceFilters" : [
|
||||
"mediapipe/render/core",
|
||||
"mediapipe/render/core/math",
|
||||
"mediapipe/render/ios"
|
||||
]
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"optionSet" : {
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>Stub Info.plist (do not edit)</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>Stub Info.plist for a watchOS app extension (do not edit)</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>NSExtension</key>
|
||||
<dict>
|
||||
<key>NSExtensionPointIdentifier</key>
|
||||
<string>com.apple.watchkit</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>Stub Info.plist for a watchOS app (do not edit)</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>WKWatchKitApp</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>application-identifier</key>
|
||||
<string>$(TeamIdentifier).$(BundleIdentifier)</string>
|
||||
<key>com.apple.developer.team-identifier</key>
|
||||
<string>$(TeamIdentifier)</string>
|
||||
<key>get-task-allow</key>
|
||||
<true/>
|
||||
<key>keychain-access-groups</key>
|
||||
<array>
|
||||
<string>$(TeamIdentifier).$(BundleIdentifier)</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,33 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.application-identifier</key>
|
||||
<string>$(BundleIdentifier)</string>
|
||||
<key>com.apple.security.app-sandbox</key>
|
||||
<true/>
|
||||
<key>com.apple.security.network.client</key>
|
||||
<true/>
|
||||
<key>com.apple.security.temporary-exception.files.absolute-path.read-only</key>
|
||||
<array>
|
||||
<string>/</string>
|
||||
<string>/</string>
|
||||
</array>
|
||||
<key>com.apple.security.temporary-exception.mach-lookup.global-name</key>
|
||||
<array>
|
||||
<string>com.apple.coresymbolicationd</string>
|
||||
<string>com.apple.testmanagerd</string>
|
||||
</array>
|
||||
<key>com.apple.security.temporary-exception.mach-lookup.local-name</key>
|
||||
<array>
|
||||
<string>com.apple.axserver</string>
|
||||
</array>
|
||||
<key>com.apple.security.temporary-exception.sbpl</key>
|
||||
<array>
|
||||
<string>(allow network-outbound (subpath "/private/tmp"))</string>
|
||||
<string>(allow hid-control)</string>
|
||||
<string>(allow signal)</string>
|
||||
<string>(allow network-outbound (subpath "/private/tmp"))</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,115 @@
|
|||
#!/usr/bin/python3
|
||||
# Copyright 2018 The Tulsi Authors. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
"""Copy on write with similar behavior to shutil.copy2, when available."""
|
||||
|
||||
import errno
|
||||
import os
|
||||
import re
|
||||
import shutil
|
||||
import subprocess
|
||||
|
||||
|
||||
def _APFSCheck(volume_path):
|
||||
"""Reports if the given path belongs to an APFS volume.
|
||||
|
||||
Args:
|
||||
volume_path: Absolute path to the volume we want to test.
|
||||
|
||||
Returns:
|
||||
True if the volume has been formatted as APFS.
|
||||
False if not.
|
||||
"""
|
||||
output = subprocess.check_output(['diskutil', 'info', volume_path],
|
||||
encoding='utf-8')
|
||||
# Match the output's "Type (Bundle): ..." entry to determine if apfs.
|
||||
target_fs = re.search(r'(?:Type \(Bundle\):) +([^ ]+)', output)
|
||||
if not target_fs:
|
||||
return False
|
||||
filesystem = target_fs.group(1)
|
||||
if 'apfs' not in filesystem:
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
def _IsOnDevice(path, st_dev):
|
||||
"""Checks if a given path belongs to a FS on a given device.
|
||||
|
||||
Args:
|
||||
path: a filesystem path, possibly to a non-existent file or directory.
|
||||
st_dev: the ID of a device with a filesystem, as in os.stat(...).st_dev.
|
||||
|
||||
Returns:
|
||||
True if the path or (if the path does not exist) its closest existing
|
||||
ancestor exists on the device.
|
||||
False if not.
|
||||
"""
|
||||
if not os.path.isabs(path):
|
||||
path = os.path.abspath(path)
|
||||
try:
|
||||
return os.stat(path).st_dev == st_dev
|
||||
except OSError as err:
|
||||
if err.errno == errno.ENOENT:
|
||||
dirname = os.path.dirname(path)
|
||||
if len(dirname) < len(path):
|
||||
return _IsOnDevice(dirname, st_dev)
|
||||
return False
|
||||
|
||||
# At launch, determine if the root filesystem is APFS.
|
||||
IS_ROOT_APFS = _APFSCheck('/')
|
||||
|
||||
# At launch, determine the root filesystem device ID.
|
||||
ROOT_ST_DEV = os.stat('/').st_dev
|
||||
|
||||
|
||||
def CopyOnWrite(source, dest, tree=False):
|
||||
"""Invokes cp -c to perform a CoW copy2 of all files, like clonefile(2).
|
||||
|
||||
Args:
|
||||
source: Source path to copy.
|
||||
dest: Destination for copying.
|
||||
tree: "True" to copy all child files and folders, like shutil.copytree().
|
||||
"""
|
||||
# Note that this is based on cp, so permissions are copied, unlike shutil's
|
||||
# copyfile method.
|
||||
#
|
||||
# Identical to shutil's copy2 method, used by shutil's move and copytree.
|
||||
cmd = ['cp']
|
||||
if IS_ROOT_APFS and _IsOnDevice(source, ROOT_ST_DEV) and _IsOnDevice(
|
||||
dest, ROOT_ST_DEV):
|
||||
# Copy on write (clone) is possible if both source and destination reside in
|
||||
# the same APFS volume. For simplicity, and since checking FS type can be
|
||||
# expensive, allow CoW only for the root volume.
|
||||
cmd.append('-c')
|
||||
if tree:
|
||||
# Copy recursively if indicated.
|
||||
cmd.append('-R')
|
||||
# Follow symlinks, emulating shutil.copytree defaults.
|
||||
cmd.append('-L')
|
||||
# Preserve all possible file attributes and permissions (copystat/copy2).
|
||||
cmd.extend(['-p', source, dest])
|
||||
try:
|
||||
# Attempt the copy action with cp.
|
||||
subprocess.check_output(cmd)
|
||||
except subprocess.CalledProcessError:
|
||||
# If -c is not supported, use shutil's copy2-based methods directly.
|
||||
if tree:
|
||||
# A partial tree might be left over composed of dirs but no files.
|
||||
# Remove them with rmtree so that they don't interfere with copytree.
|
||||
if os.path.exists(dest):
|
||||
shutil.rmtree(dest)
|
||||
shutil.copytree(source, dest)
|
||||
else:
|
||||
shutil.copy2(source, dest)
|
1863
mediapipe/render/ios/OlaVideo.xcodeproj/.tulsi/Scripts/bazel_build.py
Executable file
1863
mediapipe/render/ios/OlaVideo.xcodeproj/.tulsi/Scripts/bazel_build.py
Executable file
File diff suppressed because it is too large
Load Diff
136
mediapipe/render/ios/OlaVideo.xcodeproj/.tulsi/Scripts/bazel_build_events.py
Executable file
136
mediapipe/render/ios/OlaVideo.xcodeproj/.tulsi/Scripts/bazel_build_events.py
Executable file
|
@ -0,0 +1,136 @@
|
|||
# Copyright 2017 The Tulsi Authors. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the 'License');
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an 'AS IS' BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
"""Parses a stream of JSON build event protocol messages from a file."""
|
||||
|
||||
import json
|
||||
|
||||
|
||||
class _FileLineReader(object):
|
||||
"""Reads lines from a streaming file.
|
||||
|
||||
This will repeatedly check the file for an entire line to read. It will
|
||||
buffer partial lines until they are completed.
|
||||
This is meant for files that are being modified by an long-living external
|
||||
program.
|
||||
"""
|
||||
|
||||
def __init__(self, file_obj):
|
||||
"""Creates a new FileLineReader object.
|
||||
|
||||
Args:
|
||||
file_obj: The file object to watch.
|
||||
|
||||
Returns:
|
||||
A FileLineReader instance.
|
||||
"""
|
||||
self._file_obj = file_obj
|
||||
self._buffer = []
|
||||
|
||||
def check_for_changes(self):
|
||||
"""Checks the file for any changes, returning the line read if any."""
|
||||
line = self._file_obj.readline()
|
||||
self._buffer.append(line)
|
||||
|
||||
# Only parse complete lines.
|
||||
if not line.endswith('\n'):
|
||||
return None
|
||||
full_line = ''.join(self._buffer)
|
||||
del self._buffer[:]
|
||||
return full_line
|
||||
|
||||
|
||||
class BazelBuildEvent(object):
|
||||
"""Represents a Bazel Build Event.
|
||||
|
||||
Public Properties:
|
||||
event_dict: the source dictionary for this event.
|
||||
stdout: stdout string, if any.
|
||||
stderr: stderr string, if any.
|
||||
files: list of file URIs.
|
||||
"""
|
||||
|
||||
def __init__(self, event_dict):
|
||||
"""Creates a new BazelBuildEvent object.
|
||||
|
||||
Args:
|
||||
event_dict: Dictionary representing a build event
|
||||
|
||||
Returns:
|
||||
A BazelBuildEvent instance.
|
||||
"""
|
||||
self.event_dict = event_dict
|
||||
self.stdout = None
|
||||
self.stderr = None
|
||||
self.files = []
|
||||
if 'progress' in event_dict:
|
||||
self._update_fields_for_progress(event_dict['progress'])
|
||||
if 'namedSetOfFiles' in event_dict:
|
||||
self._update_fields_for_named_set_of_files(event_dict['namedSetOfFiles'])
|
||||
|
||||
def _update_fields_for_progress(self, progress_dict):
|
||||
self.stdout = progress_dict.get('stdout')
|
||||
self.stderr = progress_dict.get('stderr')
|
||||
|
||||
def _update_fields_for_named_set_of_files(self, named_set):
|
||||
files = named_set.get('files', [])
|
||||
for file_obj in files:
|
||||
uri = file_obj.get('uri', '')
|
||||
if uri.startswith('file://'):
|
||||
self.files.append(uri[7:])
|
||||
|
||||
|
||||
class BazelBuildEventsWatcher(object):
|
||||
"""Watches a build events JSON file."""
|
||||
|
||||
def __init__(self, json_file, warning_handler=None):
|
||||
"""Creates a new BazelBuildEventsWatcher object.
|
||||
|
||||
Args:
|
||||
json_file: The JSON file object to watch.
|
||||
warning_handler: Handler function for warnings accepting a single string.
|
||||
|
||||
Returns:
|
||||
A BazelBuildEventsWatcher instance.
|
||||
"""
|
||||
self.file_reader = _FileLineReader(json_file)
|
||||
self.warning_handler = warning_handler
|
||||
self._read_any_events = False
|
||||
|
||||
def has_read_events(self):
|
||||
return self._read_any_events
|
||||
|
||||
def check_for_new_events(self):
|
||||
"""Checks the file for new BazelBuildEvents.
|
||||
|
||||
Returns:
|
||||
A list of all new BazelBuildEvents.
|
||||
"""
|
||||
new_events = []
|
||||
while True:
|
||||
line = self.file_reader.check_for_changes()
|
||||
if not line:
|
||||
break
|
||||
try:
|
||||
build_event_dict = json.loads(line)
|
||||
except (UnicodeDecodeError, ValueError) as e:
|
||||
handler = self.warning_handler
|
||||
if handler:
|
||||
handler('Could not decode BEP event "%s"\n' % line)
|
||||
handler('Received error of %s, "%s"\n' % (type(e), e))
|
||||
break
|
||||
self._read_any_events = True
|
||||
build_event = BazelBuildEvent(build_event_dict)
|
||||
new_events.append(build_event)
|
||||
return new_events
|
|
@ -0,0 +1,274 @@
|
|||
# Copyright 2018 The Tulsi Authors. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
#
|
||||
# Generated by Tulsi to resolve flags during builds.
|
||||
|
||||
|
||||
import sys
|
||||
|
||||
|
||||
def _StandardizeTargetLabel(label):
|
||||
"""Convert labels of form //dir/target to //dir/target:target."""
|
||||
if label is None:
|
||||
return label
|
||||
if not label.startswith('//') and not label.startswith('@'):
|
||||
sys.stderr.write('[WARNING] Target label "{0}" is not fully qualified. '
|
||||
'Labels should start with "@" or "//".\n\n'.format(label))
|
||||
sys.stderr.flush()
|
||||
tokens = label.rsplit('/', 1)
|
||||
if len(tokens) <= 1:
|
||||
return label
|
||||
|
||||
target_base = tokens[0]
|
||||
target = tokens[1]
|
||||
|
||||
if '...' in target or ':' in target:
|
||||
return label
|
||||
return label + ':' + target
|
||||
|
||||
|
||||
class BazelFlags(object):
|
||||
"""Represents Bazel flags."""
|
||||
|
||||
def __init__(self, startup = [], build = []):
|
||||
self.startup = startup
|
||||
self.build = build
|
||||
|
||||
|
||||
class BazelFlagsSet(object):
|
||||
"""Represents a set of Bazel flags which can vary by compilation mode."""
|
||||
|
||||
def __init__(self, debug = None, release = None, flags = None):
|
||||
if debug is None:
|
||||
debug = flags or BazelFlags()
|
||||
if release is None:
|
||||
release = flags or BazelFlags()
|
||||
|
||||
self.debug = debug
|
||||
self.release = release
|
||||
|
||||
def flags(self, is_debug):
|
||||
"""Returns the proper flags (either debug or release)."""
|
||||
return self.debug if is_debug else self.release
|
||||
|
||||
|
||||
class BazelBuildSettings(object):
|
||||
"""Represents a Tulsi project's Bazel settings."""
|
||||
|
||||
def __init__(self, bazel, bazelExecRoot, bazelOutputBase,
|
||||
defaultPlatformConfigId, platformConfigFlags,
|
||||
swiftTargets,
|
||||
cacheAffecting, cacheSafe,
|
||||
swiftOnly, nonSwiftOnly,
|
||||
swiftFeatures, nonSwiftFeatures,
|
||||
projDefault, projTargetMap):
|
||||
self.bazel = bazel
|
||||
self.bazelExecRoot = bazelExecRoot
|
||||
self.bazelOutputBase = bazelOutputBase
|
||||
self.defaultPlatformConfigId = defaultPlatformConfigId
|
||||
self.platformConfigFlags = platformConfigFlags
|
||||
self.swiftTargets = swiftTargets
|
||||
self.cacheAffecting = cacheAffecting
|
||||
self.cacheSafe = cacheSafe
|
||||
self.swiftOnly = swiftOnly
|
||||
self.nonSwiftOnly = nonSwiftOnly
|
||||
self.swiftFeatures = swiftFeatures
|
||||
self.nonSwiftFeatures = nonSwiftFeatures
|
||||
self.projDefault = projDefault
|
||||
self.projTargetMap = projTargetMap
|
||||
|
||||
def features_for_target(self, target, is_swift_override=None):
|
||||
"""Returns an array of enabled features for the given target."""
|
||||
|
||||
target = _StandardizeTargetLabel(target)
|
||||
is_swift = target in self.swiftTargets
|
||||
if is_swift_override is not None:
|
||||
is_swift = is_swift_override
|
||||
|
||||
return self.swiftFeatures if is_swift else self.nonSwiftFeatures
|
||||
|
||||
def flags_for_target(self, target, is_debug,
|
||||
config, is_swift_override=None):
|
||||
"""Returns (bazel, startup flags, build flags) for the given target."""
|
||||
|
||||
target = _StandardizeTargetLabel(target)
|
||||
target_flag_set = self.projTargetMap.get(target)
|
||||
if not target_flag_set:
|
||||
target_flag_set = self.projDefault
|
||||
|
||||
is_swift = target in self.swiftTargets
|
||||
if is_swift_override is not None:
|
||||
is_swift = is_swift_override
|
||||
lang = self.swiftOnly if is_swift else self.nonSwiftOnly
|
||||
|
||||
config_flags = self.platformConfigFlags[config]
|
||||
cache_affecting = self.cacheAffecting.flags(is_debug)
|
||||
cache_safe = self.cacheSafe.flags(is_debug)
|
||||
target = target_flag_set.flags(is_debug)
|
||||
lang = lang.flags(is_debug)
|
||||
|
||||
startupFlags = []
|
||||
startupFlags.extend(target.startup)
|
||||
startupFlags.extend(cache_safe.startup)
|
||||
startupFlags.extend(cache_affecting.startup)
|
||||
startupFlags.extend(lang.startup)
|
||||
|
||||
buildFlags = []
|
||||
buildFlags.extend(target.build)
|
||||
buildFlags.extend(config_flags)
|
||||
buildFlags.extend(cache_safe.build)
|
||||
buildFlags.extend(cache_affecting.build)
|
||||
buildFlags.extend(lang.build)
|
||||
|
||||
return (self.bazel, startupFlags, buildFlags)
|
||||
|
||||
# Default value in case the template does not behave as expected.
|
||||
BUILD_SETTINGS = None
|
||||
|
||||
# Generated by Tulsi. DO NOT EDIT.
|
||||
BUILD_SETTINGS = BazelBuildSettings(
|
||||
'/opt/homebrew/Cellar/bazelisk/1.12.0/bin/bazelisk',
|
||||
'/private/var/tmp/_bazel_wangrenzhu/b244be861f40c753b454f38ce4e943dc/execroot/mediapipe',
|
||||
'/private/var/tmp/_bazel_wangrenzhu/b244be861f40c753b454f38ce4e943dc',
|
||||
'ios_arm64',
|
||||
{
|
||||
'ios_sim_arm64': [
|
||||
'--apple_platform_type=ios',
|
||||
'--cpu=ios_sim_arm64',
|
||||
'--watchos_cpus=armv7k',
|
||||
],
|
||||
'watchos_armv7k': [
|
||||
'--apple_platform_type=watchos',
|
||||
'--watchos_cpus=armv7k,arm64_32',
|
||||
],
|
||||
'ios_armv7': [
|
||||
'--apple_platform_type=ios',
|
||||
'--cpu=ios_armv7',
|
||||
'--watchos_cpus=armv7k',
|
||||
],
|
||||
'ios_arm64': [
|
||||
'--apple_platform_type=ios',
|
||||
'--cpu=ios_arm64',
|
||||
'--watchos_cpus=armv7k,arm64_32',
|
||||
],
|
||||
'macos_arm64e': [
|
||||
'--apple_platform_type=macos',
|
||||
'--cpu=darwin_arm64e',
|
||||
],
|
||||
'ios_i386': [
|
||||
'--apple_platform_type=ios',
|
||||
'--cpu=ios_i386',
|
||||
'--watchos_cpus=i386',
|
||||
],
|
||||
'watchos_x86_64': [
|
||||
'--apple_platform_type=watchos',
|
||||
'--watchos_cpus=i386',
|
||||
],
|
||||
'ios_arm64e': [
|
||||
'--apple_platform_type=ios',
|
||||
'--cpu=ios_arm64e',
|
||||
'--watchos_cpus=armv7k,arm64_32',
|
||||
],
|
||||
'tvos_x86_64': [
|
||||
'--apple_platform_type=tvos',
|
||||
'--tvos_cpus=x86_64',
|
||||
],
|
||||
'tvos_arm64': [
|
||||
'--apple_platform_type=tvos',
|
||||
'--tvos_cpus=arm64',
|
||||
],
|
||||
'watchos_i386': [
|
||||
'--apple_platform_type=watchos',
|
||||
'--watchos_cpus=i386',
|
||||
],
|
||||
'watchos_arm64_32': [
|
||||
'--apple_platform_type=watchos',
|
||||
'--watchos_cpus=armv7k,arm64_32',
|
||||
],
|
||||
'ios_x86_64': [
|
||||
'--apple_platform_type=ios',
|
||||
'--cpu=ios_x86_64',
|
||||
'--watchos_cpus=i386',
|
||||
],
|
||||
'macos_x86_64': [
|
||||
'--apple_platform_type=macos',
|
||||
'--cpu=darwin_x86_64',
|
||||
],
|
||||
'macos_arm64': [
|
||||
'--apple_platform_type=macos',
|
||||
'--cpu=darwin_arm64',
|
||||
],
|
||||
},
|
||||
set(),
|
||||
BazelFlagsSet(
|
||||
debug = BazelFlags(
|
||||
startup = [],
|
||||
build = [
|
||||
'--override_repository=tulsi=/Users/wangrenzhu/Library/Application Support/Tulsi/0.20220209.88/Bazel',
|
||||
'--compilation_mode=dbg',
|
||||
'--define=apple.add_debugger_entitlement=1',
|
||||
'--define=apple.propagate_embedded_extra_outputs=1',
|
||||
],
|
||||
),
|
||||
release = BazelFlags(
|
||||
startup = [],
|
||||
build = [
|
||||
'--override_repository=tulsi=/Users/wangrenzhu/Library/Application Support/Tulsi/0.20220209.88/Bazel',
|
||||
'--compilation_mode=opt',
|
||||
'--strip=always',
|
||||
'--apple_generate_dsym',
|
||||
'--define=apple.add_debugger_entitlement=1',
|
||||
'--define=apple.propagate_embedded_extra_outputs=1',
|
||||
],
|
||||
),
|
||||
),
|
||||
BazelFlagsSet(
|
||||
flags = BazelFlags(
|
||||
startup = [],
|
||||
build = [
|
||||
'--announce_rc',
|
||||
],
|
||||
),
|
||||
),
|
||||
BazelFlagsSet(
|
||||
flags = BazelFlags(
|
||||
startup = [],
|
||||
build = [
|
||||
'--define=apple.experimental.tree_artifact_outputs=1',
|
||||
'--features=debug_prefix_map_pwd_is_dot',
|
||||
],
|
||||
),
|
||||
),
|
||||
BazelFlagsSet(
|
||||
flags = BazelFlags(
|
||||
startup = [],
|
||||
build = [
|
||||
'--define=apple.experimental.tree_artifact_outputs=1',
|
||||
'--features=debug_prefix_map_pwd_is_dot',
|
||||
],
|
||||
),
|
||||
),
|
||||
[
|
||||
'TreeArtifactOutputs',
|
||||
'DebugPathNormalization',
|
||||
],
|
||||
[
|
||||
'TreeArtifactOutputs',
|
||||
'DebugPathNormalization',
|
||||
],
|
||||
BazelFlagsSet(),
|
||||
{},
|
||||
)
|
||||
|
54
mediapipe/render/ios/OlaVideo.xcodeproj/.tulsi/Scripts/bazel_clean.sh
Executable file
54
mediapipe/render/ios/OlaVideo.xcodeproj/.tulsi/Scripts/bazel_clean.sh
Executable file
|
@ -0,0 +1,54 @@
|
|||
#!/bin/bash
|
||||
# Copyright 2016 The Tulsi Authors. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
#
|
||||
# Bridge between Xcode and Bazel for the "clean" action.
|
||||
#
|
||||
# Usage: bazel_clean.sh <bazel_binary_path> <bazel_binary_output_path> <bazel startup options>
|
||||
# Note that the ACTION environment variable is expected to be set to "clean".
|
||||
|
||||
set -eu
|
||||
|
||||
readonly bazel_executable="$1"; shift
|
||||
readonly bazel_bin_dir="$1"; shift
|
||||
|
||||
if [ -z $# ]; then
|
||||
readonly arguments=(clean)
|
||||
else
|
||||
readonly arguments=("$@" clean)
|
||||
fi
|
||||
|
||||
if [[ "${ACTION}" != "clean" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Removes a directory if it exists and is not a symlink.
|
||||
function remove_dir() {
|
||||
directory="$1"
|
||||
|
||||
if [[ -d "${directory}" && ! -L "${directory}" ]]; then
|
||||
rm -r "${directory}"
|
||||
fi
|
||||
}
|
||||
|
||||
# Xcode may have generated a bazel-bin directory after a previous clean.
|
||||
# Remove it to prevent a useless warning.
|
||||
remove_dir "${bazel_bin_dir}"
|
||||
|
||||
(
|
||||
set -x
|
||||
"${bazel_executable}" "${arguments[@]}"
|
||||
)
|
||||
|
42
mediapipe/render/ios/OlaVideo.xcodeproj/.tulsi/Scripts/bazel_options.py
Executable file
42
mediapipe/render/ios/OlaVideo.xcodeproj/.tulsi/Scripts/bazel_options.py
Executable file
|
@ -0,0 +1,42 @@
|
|||
# Copyright 2017 The Tulsi Authors. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the 'License');
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an 'AS IS' BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
"""Logic to translate Xcode options to Bazel options."""
|
||||
|
||||
|
||||
class BazelOptions(object):
|
||||
"""Converts Xcode features into Bazel command line flags."""
|
||||
|
||||
def __init__(self, xcode_env):
|
||||
"""Creates a new BazelOptions object.
|
||||
|
||||
Args:
|
||||
xcode_env: A dictionary of Xcode environment variables.
|
||||
|
||||
Returns:
|
||||
A BazelOptions instance.
|
||||
"""
|
||||
self.xcode_env = xcode_env
|
||||
|
||||
def bazel_feature_flags(self):
|
||||
"""Returns a list of bazel flags for the current Xcode env configuration."""
|
||||
flags = []
|
||||
if self.xcode_env.get('ENABLE_ADDRESS_SANITIZER') == 'YES':
|
||||
flags.append('--features=asan')
|
||||
if self.xcode_env.get('ENABLE_THREAD_SANITIZER') == 'YES':
|
||||
flags.append('--features=tsan')
|
||||
if self.xcode_env.get('ENABLE_UNDEFINED_BEHAVIOR_SANITIZER') == 'YES':
|
||||
flags.append('--features=ubsan')
|
||||
|
||||
return flags
|
187
mediapipe/render/ios/OlaVideo.xcodeproj/.tulsi/Scripts/bootstrap_lldbinit.py
Executable file
187
mediapipe/render/ios/OlaVideo.xcodeproj/.tulsi/Scripts/bootstrap_lldbinit.py
Executable file
|
@ -0,0 +1,187 @@
|
|||
#!/usr/bin/python3
|
||||
# Copyright 2018 The Tulsi Authors. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
"""Bootstraps the presence and setup of ~/.lldbinit-tulsiproj."""
|
||||
|
||||
import io
|
||||
import os
|
||||
import shutil
|
||||
import sys
|
||||
|
||||
|
||||
TULSI_LLDBINIT_FILE = os.path.expanduser('~/.lldbinit-tulsiproj')
|
||||
|
||||
CHANGE_NEEDED = 0
|
||||
NO_CHANGE = 1
|
||||
NOT_FOUND = 2
|
||||
|
||||
|
||||
class BootstrapLLDBInit(object):
|
||||
"""Bootstrap Xcode's preferred lldbinit for Bazel debugging."""
|
||||
|
||||
def _ExtractLLDBInitContent(self, lldbinit_path, source_string,
|
||||
add_source_string):
|
||||
"""Extracts non-Tulsi content in a given lldbinit if needed.
|
||||
|
||||
Args:
|
||||
lldbinit_path: Absolute path to the lldbinit we are writing to.
|
||||
source_string: String that we wish to write or remove from the lldbinit.
|
||||
add_source_string: Boolean indicating whether we intend to write or remove
|
||||
the source string.
|
||||
|
||||
Returns:
|
||||
(int, [string]): A tuple featuring the status code along with the list
|
||||
of strings representing content to write to lldbinit
|
||||
that does not account for the Tulsi-generated strings.
|
||||
Status code will be 0 if Tulsi-generated strings are
|
||||
not all there. Status code will be 1 if we intend to
|
||||
write Tulsi strings and all strings were accounted for.
|
||||
Alternatively, if we intend to remove the Tulsi strings,
|
||||
the status code will be 1 if none of the strings were
|
||||
found. Status code will be 2 if the lldbinit file could
|
||||
not be found.
|
||||
"""
|
||||
if not os.path.isfile(lldbinit_path):
|
||||
return (NOT_FOUND, [])
|
||||
content = []
|
||||
with open(lldbinit_path) as f:
|
||||
ignoring = False
|
||||
|
||||
# Split on the newline. This works as long as the last string isn't
|
||||
# suffixed with \n.
|
||||
source_lines = source_string.split('\n')
|
||||
|
||||
source_idx = 0
|
||||
|
||||
# If the last line was suffixed with \n, last elements would be length
|
||||
# minus 2, accounting for the extra \n.
|
||||
source_last = len(source_lines) - 1
|
||||
|
||||
for line in f:
|
||||
|
||||
# For each line found matching source_string, increment the iterator
|
||||
# and do not append that line to the list.
|
||||
if source_idx <= source_last and source_lines[source_idx] in line:
|
||||
|
||||
# If we intend to write the source string and all lines were found,
|
||||
# return an error code with empty content.
|
||||
if add_source_string and source_idx == source_last:
|
||||
return (NO_CHANGE, [])
|
||||
|
||||
# Increment for each matching line found.
|
||||
source_idx += 1
|
||||
ignoring = True
|
||||
|
||||
if ignoring:
|
||||
|
||||
# If the last line was found...
|
||||
if source_lines[source_last] in line:
|
||||
# Stop ignoring lines and continue appending to content.
|
||||
ignoring = False
|
||||
continue
|
||||
|
||||
# If the line could not be found within source_string, append to the
|
||||
# content array.
|
||||
content.append(line)
|
||||
|
||||
# If we intend to remove the source string and none of the lines to remove
|
||||
# were found, return an error code with empty content.
|
||||
if not add_source_string and source_idx == 0:
|
||||
return (NO_CHANGE, [])
|
||||
|
||||
return (CHANGE_NEEDED, content)
|
||||
|
||||
def _LinkTulsiLLDBInit(self, add_source_string):
|
||||
"""Adds or removes a reference to ~/.lldbinit-tulsiproj to the primary lldbinit file.
|
||||
|
||||
Xcode 8+ executes the contents of the first available lldbinit on startup.
|
||||
To help work around this, an external reference to ~/.lldbinit-tulsiproj is
|
||||
added to that lldbinit. This causes Xcode's lldb-rpc-server to load the
|
||||
possibly modified contents between Debug runs of any given app. Note that
|
||||
this only happens after a Debug session terminates; the cache is only fully
|
||||
invalidated after Xcode is relaunched.
|
||||
|
||||
Args:
|
||||
add_source_string: Boolean indicating whether we intend to write or remove
|
||||
the source string.
|
||||
"""
|
||||
|
||||
# ~/.lldbinit-Xcode is the only lldbinit file that Xcode will read if it is
|
||||
# present, therefore it has priority.
|
||||
lldbinit_path = os.path.expanduser('~/.lldbinit-Xcode')
|
||||
if not os.path.isfile(lldbinit_path):
|
||||
# If ~/.lldbinit-Xcode does not exist, write the reference to
|
||||
# ~/.lldbinit-tulsiproj to ~/.lldbinit, the second lldbinit file that
|
||||
# Xcode will attempt to read if ~/.lldbinit-Xcode isn't present.
|
||||
lldbinit_path = os.path.expanduser('~/.lldbinit')
|
||||
|
||||
# String that we plan to inject or remove from this lldbinit.
|
||||
source_string = ('# <TULSI> LLDB bridge [:\n'
|
||||
'# This was autogenerated by Tulsi in order to modify '
|
||||
'LLDB source-maps at build time.\n'
|
||||
'command source %s\n' % TULSI_LLDBINIT_FILE +
|
||||
'# ]: <TULSI> LLDB bridge')
|
||||
|
||||
# Retrieve the contents of lldbinit if applicable along with a return code.
|
||||
return_code, content = self._ExtractLLDBInitContent(lldbinit_path,
|
||||
source_string,
|
||||
add_source_string)
|
||||
|
||||
out = io.StringIO()
|
||||
|
||||
if add_source_string:
|
||||
if return_code == CHANGE_NEEDED:
|
||||
# Print the existing contents of this ~/.lldbinit without any malformed
|
||||
# tulsi lldbinit block, and add the correct tulsi lldbinit block to the
|
||||
# end of it.
|
||||
for line in content:
|
||||
out.write(line)
|
||||
elif return_code == NO_CHANGE:
|
||||
# If we should ignore the contents of this lldbinit, and it has the
|
||||
# association with ~/.lldbinit-tulsiproj that we want, do not modify it.
|
||||
return
|
||||
|
||||
# Add a newline after the source_string for protection from other elements
|
||||
# within the lldbinit file.
|
||||
out.write(source_string + '\n')
|
||||
else:
|
||||
if return_code != CHANGE_NEEDED:
|
||||
# The source string was not found in the lldbinit so do not modify it.
|
||||
return
|
||||
|
||||
# Print the existing contents of this ~/.lldbinit without the tulsi
|
||||
# lldbinit block.
|
||||
for line in content:
|
||||
out.write(line)
|
||||
|
||||
out.seek(0, os.SEEK_END)
|
||||
if out.tell() == 0:
|
||||
# The file did not contain any content other than the source string so
|
||||
# remove the file altogether.
|
||||
os.remove(lldbinit_path)
|
||||
return
|
||||
|
||||
with open(lldbinit_path, 'w') as outfile:
|
||||
out.seek(0)
|
||||
# Negative length to make copyfileobj write the whole file at once.
|
||||
shutil.copyfileobj(out, outfile, -1)
|
||||
|
||||
def __init__(self, do_inject_link=True):
|
||||
self._LinkTulsiLLDBInit(do_inject_link)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
BootstrapLLDBInit()
|
||||
sys.exit(0)
|
37
mediapipe/render/ios/OlaVideo.xcodeproj/.tulsi/Scripts/clang_stub.sh
Executable file
37
mediapipe/render/ios/OlaVideo.xcodeproj/.tulsi/Scripts/clang_stub.sh
Executable file
|
@ -0,0 +1,37 @@
|
|||
#!/bin/bash
|
||||
# Copyright 2022 The Tulsi Authors. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
# Stub for Xcode's clang invocations to avoid compilation but still create the
|
||||
# expected compiler outputs.
|
||||
|
||||
set -eu
|
||||
|
||||
while test $# -gt 0
|
||||
do
|
||||
case $1 in
|
||||
-MF|--serialize-diagnostics)
|
||||
# TODO: See if we can create a valid diagnostics file (it appear to be
|
||||
# LLVM bitcode), currently we get warnings like:
|
||||
# file.dia:1:1: Could not read serialized diagnostics file: error("Invalid diagnostics signature")
|
||||
shift
|
||||
touch $1
|
||||
;;
|
||||
*.o)
|
||||
break
|
||||
;;
|
||||
esac
|
||||
|
||||
shift
|
||||
done
|
103
mediapipe/render/ios/OlaVideo.xcodeproj/.tulsi/Scripts/install_genfiles.py
Executable file
103
mediapipe/render/ios/OlaVideo.xcodeproj/.tulsi/Scripts/install_genfiles.py
Executable file
|
@ -0,0 +1,103 @@
|
|||
#!/usr/bin/python3
|
||||
# Copyright 2018 The Tulsi Authors. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
"""Symlinks files generated by Bazel into bazel-tulsi-includes for indexing."""
|
||||
|
||||
|
||||
import json
|
||||
import os
|
||||
import shutil
|
||||
import sys
|
||||
|
||||
|
||||
class Installer(object):
|
||||
"""Symlinks generated files into bazel-tulsi-includes."""
|
||||
|
||||
def __init__(self, bazel_exec_root, preserve_tulsi_includes=True,
|
||||
output_root=None):
|
||||
"""Initializes the installer with the proper Bazel paths."""
|
||||
|
||||
self.bazel_exec_root = bazel_exec_root
|
||||
self.preserve_tulsi_includes = preserve_tulsi_includes
|
||||
# The folder must begin with an underscore as otherwise Bazel will delete
|
||||
# it whenever it builds. See tulsi_aspects.bzl for futher explanation.
|
||||
if not output_root:
|
||||
output_root = bazel_exec_root
|
||||
self.tulsi_root = os.path.join(output_root, 'bazel-tulsi-includes')
|
||||
|
||||
def PrepareTulsiIncludes(self):
|
||||
"""Creates tulsi includes, possibly removing the old folder."""
|
||||
|
||||
tulsi_root = self.tulsi_root
|
||||
if not self.preserve_tulsi_includes and os.path.exists(tulsi_root):
|
||||
shutil.rmtree(tulsi_root)
|
||||
if not os.path.exists(tulsi_root):
|
||||
os.mkdir(tulsi_root)
|
||||
|
||||
def InstallForTulsiouts(self, tulsiouts):
|
||||
"""Creates tulsi includes and symlinks generated sources."""
|
||||
self.PrepareTulsiIncludes()
|
||||
|
||||
for file_path in tulsiouts:
|
||||
try:
|
||||
output_data = json.load(open(file_path))
|
||||
self.InstallForData(output_data)
|
||||
except (ValueError, IOError) as e:
|
||||
print('Failed to load output data file "%s". %s' % (file_path, e))
|
||||
|
||||
def InstallForData(self, output_data):
|
||||
"""Symlinks generated sources present in the output_data."""
|
||||
bazel_exec_root = self.bazel_exec_root
|
||||
tulsi_root = self.tulsi_root
|
||||
|
||||
for gs in output_data['generated_sources']:
|
||||
real_path, link_path = gs
|
||||
src = os.path.join(bazel_exec_root, real_path)
|
||||
|
||||
# Bazel outputs are not guaranteed to be created if nothing references
|
||||
# them. This check skips the processing if an output was declared
|
||||
# but not created.
|
||||
if not os.path.exists(src):
|
||||
continue
|
||||
|
||||
# The /x/x/ part is here to match the number of directory components
|
||||
# between tulsi root and bazel root. See tulsi_aspects.bzl for futher
|
||||
# explanation.
|
||||
dst = os.path.join(tulsi_root, 'x/x/', link_path)
|
||||
|
||||
dst_dir = os.path.dirname(dst)
|
||||
if not os.path.exists(dst_dir):
|
||||
os.makedirs(dst_dir)
|
||||
|
||||
# It's important to use lexists() here in case dst is a broken symlink
|
||||
# (in which case exists() would return False).
|
||||
if os.path.lexists(dst):
|
||||
# Don't need to do anything if the link hasn't changed.
|
||||
if os.readlink(dst) == src:
|
||||
continue
|
||||
|
||||
# Link changed; must remove it otherwise os.symlink will fail.
|
||||
os.unlink(dst)
|
||||
|
||||
os.symlink(src, dst)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
if len(sys.argv) < 3:
|
||||
sys.stderr.write('usage: %s <bazel exec root> '
|
||||
'<.tulsiouts JSON files>\n' % sys.argv[0])
|
||||
exit(1)
|
||||
|
||||
Installer(sys.argv[1]).InstallForTulsiouts(sys.argv[2:])
|
33
mediapipe/render/ios/OlaVideo.xcodeproj/.tulsi/Scripts/ld_stub.sh
Executable file
33
mediapipe/render/ios/OlaVideo.xcodeproj/.tulsi/Scripts/ld_stub.sh
Executable file
|
@ -0,0 +1,33 @@
|
|||
#!/bin/bash
|
||||
# Copyright 2022 The Tulsi Authors. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
# Stub for Xcode's ld invocations to avoid linking but still create the expected
|
||||
# linker outputs.
|
||||
|
||||
set -eu
|
||||
|
||||
while test $# -gt 0
|
||||
do
|
||||
case $1 in
|
||||
*.dat)
|
||||
# Create an empty .dat file containing just a simple header.
|
||||
echo -n -e '\x00lld\0' > $1
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
shift
|
||||
done
|
76
mediapipe/render/ios/OlaVideo.xcodeproj/.tulsi/Scripts/swiftc_stub.py
Executable file
76
mediapipe/render/ios/OlaVideo.xcodeproj/.tulsi/Scripts/swiftc_stub.py
Executable file
|
@ -0,0 +1,76 @@
|
|||
#!/usr/bin/python3
|
||||
# Copyright 2022 The Tulsi Authors. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
"""Stub to avoid swiftc but create the expected swiftc outputs."""
|
||||
|
||||
import json
|
||||
import os
|
||||
import pathlib
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
|
||||
def _TouchFile(filepath):
|
||||
"""Touch the given file: create if necessary and update its mtime."""
|
||||
pathlib.Path(filepath).touch()
|
||||
|
||||
|
||||
def _HandleOutputMapFile(filepath):
|
||||
# Touch all output files referenced in the map. See the documentation here:
|
||||
# https://github.com/apple/swift/blob/main/docs/Driver.md#output-file-maps
|
||||
with open(filepath, 'rb') as file:
|
||||
output_map = json.load(file)
|
||||
for single_file_outputs in output_map.values():
|
||||
for output in single_file_outputs.values():
|
||||
_TouchFile(output)
|
||||
|
||||
|
||||
def _CreateModuleFiles(module_path):
|
||||
_TouchFile(module_path)
|
||||
filename_no_ext = os.path.splitext(module_path)[0]
|
||||
_TouchFile(filename_no_ext + '.swiftdoc')
|
||||
_TouchFile(filename_no_ext + '.swiftsourceinfo')
|
||||
|
||||
|
||||
def main(args):
|
||||
# Xcode may call `swiftc -v` which we need to pass through.
|
||||
if args == ['-v'] or args == ['--version']:
|
||||
return subprocess.call(['swiftc', '-v'])
|
||||
|
||||
index = 0
|
||||
num_args = len(args)
|
||||
# Compare against length - 1 since we only care about arguments which come in
|
||||
# pairs.
|
||||
while index < num_args - 1:
|
||||
cur_arg = args[index]
|
||||
|
||||
if cur_arg == '-output-file-map':
|
||||
index += 1
|
||||
output_file_map = args[index]
|
||||
_HandleOutputMapFile(output_file_map)
|
||||
elif cur_arg == '-emit-module-path':
|
||||
index += 1
|
||||
module_path = args[index]
|
||||
_CreateModuleFiles(module_path)
|
||||
elif cur_arg == '-emit-objc-header-path':
|
||||
index += 1
|
||||
header_path = args[index]
|
||||
_TouchFile(header_path)
|
||||
index += 1
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main(sys.argv[1:]))
|
119
mediapipe/render/ios/OlaVideo.xcodeproj/.tulsi/Scripts/symbol_cache_schema.py
Executable file
119
mediapipe/render/ios/OlaVideo.xcodeproj/.tulsi/Scripts/symbol_cache_schema.py
Executable file
|
@ -0,0 +1,119 @@
|
|||
#!/usr/bin/python3
|
||||
# Copyright 2018 The Tulsi Authors. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
"""Manages our dSYM SQLite database schema."""
|
||||
|
||||
import errno
|
||||
import os
|
||||
import sqlite3
|
||||
|
||||
|
||||
SQLITE_SYMBOL_CACHE_PATH = os.path.expanduser('~/Library/Application Support/'
|
||||
'Tulsi/Scripts/symbol_cache.db')
|
||||
|
||||
|
||||
class SymbolCacheSchema(object):
|
||||
"""Defines and updates the SQLite database used for DBGShellCommands."""
|
||||
|
||||
current_version = 1
|
||||
|
||||
def UpdateSchemaV1(self, connection):
|
||||
"""Updates the database to the v1 schema.
|
||||
|
||||
Args:
|
||||
connection: Connection to the database that needs to be updated.
|
||||
|
||||
Returns:
|
||||
True if the database reported that it was updated to v1.
|
||||
False if not.
|
||||
"""
|
||||
# Create the table (schema version 1).
|
||||
cursor = connection.cursor()
|
||||
cursor.execute('CREATE TABLE symbol_cache('
|
||||
'uuid TEXT PRIMARY KEY, '
|
||||
'dsym_path TEXT, '
|
||||
'architecture TEXT'
|
||||
');')
|
||||
# NOTE: symbol_cache (uuid) already has an index, as the PRIMARY KEY.
|
||||
# Create a unique index to keep dSYM paths and architectures unique.
|
||||
cursor.execute('CREATE UNIQUE INDEX idx_dsym_arch '
|
||||
'ON '
|
||||
'symbol_cache('
|
||||
'dsym_path, '
|
||||
'architecture'
|
||||
');')
|
||||
cursor.execute('PRAGMA user_version = 1;')
|
||||
|
||||
# Verify the updated user_version, as confirmation of the update.
|
||||
cursor.execute('PRAGMA user_version;')
|
||||
return cursor.fetchone()[0] == 1
|
||||
|
||||
def VerifySchema(self, connection):
|
||||
"""Updates the database to the latest schema.
|
||||
|
||||
Args:
|
||||
connection: Connection to the database that needs to be updated.
|
||||
|
||||
Returns:
|
||||
True if the database reported that it was updated to the latest schema.
|
||||
False if not.
|
||||
"""
|
||||
cursor = connection.cursor()
|
||||
cursor.execute('PRAGMA user_version;') # Default is 0
|
||||
db_version = cursor.fetchone()[0]
|
||||
|
||||
# Update to the latest schema in the given database, if necessary.
|
||||
if db_version < self.current_version:
|
||||
# Future schema updates will build on this.
|
||||
if self.UpdateSchemaV1(connection):
|
||||
db_version = 1
|
||||
|
||||
# Return if the database has been updated to the latest schema.
|
||||
return db_version == self.current_version
|
||||
|
||||
def InitDB(self, db_path):
|
||||
"""Initializes a new connection to a SQLite database.
|
||||
|
||||
Args:
|
||||
db_path: String representing a reference to the SQLite database.
|
||||
|
||||
Returns:
|
||||
A sqlite3.connection object representing an active connection to
|
||||
the database referenced by db_path.
|
||||
"""
|
||||
# If this is not an in-memory SQLite database...
|
||||
if ':memory:' not in db_path:
|
||||
# Create all subdirs before we create a new db or connect to existing.
|
||||
if not os.path.isfile(db_path):
|
||||
try:
|
||||
os.makedirs(os.path.dirname(db_path))
|
||||
except OSError as e:
|
||||
if e.errno != errno.EEXIST:
|
||||
raise
|
||||
|
||||
connection = sqlite3.connect(db_path)
|
||||
|
||||
# Update to the latest schema and return the db connection.
|
||||
if self.VerifySchema(connection):
|
||||
return connection
|
||||
else:
|
||||
return None
|
||||
|
||||
def __init__(self, db_path=SQLITE_SYMBOL_CACHE_PATH):
|
||||
self.connection = self.InitDB(db_path)
|
||||
|
||||
def __del__(self):
|
||||
if self.connection:
|
||||
self.connection.close()
|
77
mediapipe/render/ios/OlaVideo.xcodeproj/.tulsi/Scripts/tulsi_logging.py
Executable file
77
mediapipe/render/ios/OlaVideo.xcodeproj/.tulsi/Scripts/tulsi_logging.py
Executable file
|
@ -0,0 +1,77 @@
|
|||
# Copyright 2017 The Tulsi Authors. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the 'License');
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an 'AS IS' BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
"""Logging routines used by Tulsi scripts."""
|
||||
|
||||
import logging
|
||||
import logging.handlers
|
||||
import os
|
||||
import sys
|
||||
|
||||
|
||||
def validity_check():
|
||||
"""Returns a warning message from logger initialization, if applicable."""
|
||||
return None
|
||||
|
||||
|
||||
class Logger(object):
|
||||
"""Tulsi specific logging."""
|
||||
|
||||
def __init__(self):
|
||||
logging_dir = os.path.expanduser('~/Library/Application Support/Tulsi')
|
||||
if not os.path.exists(logging_dir):
|
||||
os.mkdir(logging_dir)
|
||||
|
||||
logfile = os.path.join(logging_dir, 'build_log.txt')
|
||||
|
||||
# Currently only creates a single logger called 'tulsi_logging'. If
|
||||
# additional loggers are needed, consider adding a name attribute to the
|
||||
# Logger.
|
||||
self._logger = logging.getLogger('tulsi_logging')
|
||||
self._logger.setLevel(logging.INFO)
|
||||
|
||||
try:
|
||||
file_handler = logging.handlers.RotatingFileHandler(logfile,
|
||||
backupCount=20)
|
||||
file_handler.setLevel(logging.INFO)
|
||||
# Create a new log file for each build.
|
||||
file_handler.doRollover()
|
||||
self._logger.addHandler(file_handler)
|
||||
except (IOError, OSError) as err:
|
||||
filename = 'none'
|
||||
if hasattr(err, 'filename'):
|
||||
filename = err.filename
|
||||
sys.stderr.write('Failed to set up logging to file: %s (%s).\n' %
|
||||
(os.strerror(err.errno), filename))
|
||||
sys.stderr.flush()
|
||||
|
||||
console = logging.StreamHandler()
|
||||
console.setLevel(logging.INFO)
|
||||
self._logger.addHandler(console)
|
||||
|
||||
def log_bazel_message(self, message):
|
||||
self._logger.info(message)
|
||||
|
||||
def log_action(self, action_name, action_id, seconds, start=None, end=None):
|
||||
"""Logs the start, duration, and end of an action."""
|
||||
del action_id # Unused by this logger.
|
||||
if start:
|
||||
self._logger.info('<**> %s start: %f', action_name, start)
|
||||
|
||||
# Log to file and print to stdout for display in the Xcode log.
|
||||
self._logger.info('<*> %s completed in %0.3f ms',
|
||||
action_name, seconds * 1000)
|
||||
|
||||
if end:
|
||||
self._logger.info('<**> %s end: %f', action_name, end)
|
|
@ -0,0 +1,54 @@
|
|||
#!/usr/bin/python3
|
||||
# Copyright 2018 The Tulsi Authors. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
"""Update the Tulsi dSYM symbol cache."""
|
||||
|
||||
import sqlite3
|
||||
from symbol_cache_schema import SQLITE_SYMBOL_CACHE_PATH
|
||||
from symbol_cache_schema import SymbolCacheSchema
|
||||
|
||||
|
||||
class UpdateSymbolCache(object):
|
||||
"""Provides a common interface to update a UUID referencing a dSYM."""
|
||||
|
||||
def UpdateUUID(self, uuid, dsym_path, arch):
|
||||
"""Updates a given UUID entry in the database.
|
||||
|
||||
Args:
|
||||
uuid: A UUID representing a binary slice in the dSYM bundle.
|
||||
dsym_path: An absolute path to the dSYM bundle.
|
||||
arch: The binary slice's architecture.
|
||||
|
||||
Returns:
|
||||
None: If no error occurred in inserting the new set of values.
|
||||
String: If a sqlite3.error was raised upon attempting to store new
|
||||
values into the dSYM cache.
|
||||
"""
|
||||
con = self.cache_schema.connection
|
||||
cur = con.cursor()
|
||||
# Relies on the UNIQUE constraint between dsym_path + architecture to
|
||||
# update the UUID if dsym_path and arch match an existing pair, or
|
||||
# create a new row if this combination of dsym_path and arch is unique.
|
||||
try:
|
||||
cur.execute('INSERT OR REPLACE INTO symbol_cache '
|
||||
'(uuid, dsym_path, architecture) '
|
||||
'VALUES("%s", "%s", "%s");' % (uuid, dsym_path, arch))
|
||||
con.commit()
|
||||
except sqlite3.Error as e:
|
||||
return e.message
|
||||
return None
|
||||
|
||||
def __init__(self, db_path=SQLITE_SYMBOL_CACHE_PATH):
|
||||
self.cache_schema = SymbolCacheSchema(db_path)
|
111
mediapipe/render/ios/OlaVideo.xcodeproj/.tulsi/Scripts/user_build.py
Executable file
111
mediapipe/render/ios/OlaVideo.xcodeproj/.tulsi/Scripts/user_build.py
Executable file
|
@ -0,0 +1,111 @@
|
|||
#!/usr/bin/python3
|
||||
# Copyright 2018 The Tulsi Authors. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
"""Invokes Bazel builds for the given target using Tulsi specific flags."""
|
||||
|
||||
|
||||
import argparse
|
||||
import pipes
|
||||
import subprocess
|
||||
import sys
|
||||
from bazel_build_settings import BUILD_SETTINGS
|
||||
|
||||
|
||||
def _FatalError(msg, exit_code=1):
|
||||
"""Prints a fatal error message to stderr and exits."""
|
||||
sys.stderr.write(msg)
|
||||
sys.exit(exit_code)
|
||||
|
||||
|
||||
def _BuildSettingsTargetForTargets(targets):
|
||||
"""Returns the singular target to use when fetching build settings."""
|
||||
return targets[0] if len(targets) == 1 else None
|
||||
|
||||
|
||||
def _CreateCommand(targets, build_settings, test, release,
|
||||
config, xcode_version, force_swift):
|
||||
"""Creates a Bazel command for targets with the specified settings."""
|
||||
target = _BuildSettingsTargetForTargets(targets)
|
||||
bazel, startup, flags = build_settings.flags_for_target(
|
||||
target, not release, config, is_swift_override=force_swift)
|
||||
bazel_action = 'test' if test else 'build'
|
||||
|
||||
command = [bazel]
|
||||
command.extend(startup)
|
||||
command.append(bazel_action)
|
||||
command.extend(flags)
|
||||
if xcode_version:
|
||||
command.append('--xcode_version=%s' % xcode_version)
|
||||
command.append('--tool_tag=tulsi:user_build')
|
||||
command.extend(targets)
|
||||
|
||||
return command
|
||||
|
||||
|
||||
def _QuoteCommandForShell(cmd):
|
||||
cmd = [pipes.quote(x) for x in cmd]
|
||||
return ' '.join(cmd)
|
||||
|
||||
|
||||
def _InterruptSafeCall(cmd):
|
||||
p = subprocess.Popen(cmd)
|
||||
try:
|
||||
return p.wait()
|
||||
except KeyboardInterrupt:
|
||||
return p.wait()
|
||||
|
||||
|
||||
def main():
|
||||
if not BUILD_SETTINGS:
|
||||
_FatalError('Unable to fetch build settings. Please report a Tulsi bug.')
|
||||
|
||||
default_config = BUILD_SETTINGS.defaultPlatformConfigId
|
||||
config_options = BUILD_SETTINGS.platformConfigFlags
|
||||
config_help = (
|
||||
'Bazel apple config (used for flags). Default: {}').format(default_config)
|
||||
|
||||
parser = argparse.ArgumentParser(description='Invoke a Bazel build or test '
|
||||
'with the same flags as Tulsi.')
|
||||
parser.add_argument('--test', dest='test', action='store_true', default=False)
|
||||
parser.add_argument('--release', dest='release', action='store_true',
|
||||
default=False)
|
||||
parser.add_argument('--noprint_cmd', dest='print_cmd', action='store_false',
|
||||
default=True)
|
||||
parser.add_argument('--norun', dest='run', action='store_false', default=True)
|
||||
parser.add_argument('--config', help=config_help, default=default_config,
|
||||
choices=config_options)
|
||||
parser.add_argument('--xcode_version', help='Bazel --xcode_version flag.')
|
||||
parser.add_argument('--force_swift', dest='swift', action='store_true',
|
||||
default=None, help='Forcibly treat the given targets '
|
||||
'as containing Swift.')
|
||||
parser.add_argument('--force_noswift', dest='swift', action='store_false',
|
||||
default=None, help='Forcibly treat the given targets '
|
||||
'as not containing Swift.')
|
||||
parser.add_argument('targets', nargs='+')
|
||||
|
||||
args = parser.parse_args()
|
||||
command = _CreateCommand(args.targets, BUILD_SETTINGS, args.test,
|
||||
args.release, args.config, args.xcode_version,
|
||||
args.swift)
|
||||
if args.print_cmd:
|
||||
print(_QuoteCommandForShell(command))
|
||||
|
||||
if args.run:
|
||||
return _InterruptSafeCall(command)
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main())
|
|
@ -0,0 +1,6 @@
|
|||
# This file is autogenerated by Tulsi and should not be edited.
|
||||
# This sets lldb's working directory to the Bazel workspace root used by 'OlaVideo.xcodeproj'.
|
||||
platform settings -w "/Users/wangrenzhu/Documents/github/mediapipe-render/"
|
||||
# This enables implicitly loading Clang modules which can be disabled when a Swift module was built with explicit modules enabled.
|
||||
settings set -- target.swift-extra-clang-flags "-fimplicit-module-maps"
|
||||
settings clear target.source-map
|
|
@ -0,0 +1 @@
|
|||
/private/var/tmp/_bazel_wangrenzhu/b244be861f40c753b454f38ce4e943dc/execroot/mediapipe
|
1
mediapipe/render/ios/OlaVideo.xcodeproj/.tulsi/tulsi-output-base
Symbolic link
1
mediapipe/render/ios/OlaVideo.xcodeproj/.tulsi/tulsi-output-base
Symbolic link
|
@ -0,0 +1 @@
|
|||
/private/var/tmp/_bazel_wangrenzhu/b244be861f40c753b454f38ce4e943dc
|
1
mediapipe/render/ios/OlaVideo.xcodeproj/.tulsi/tulsi-workspace
Symbolic link
1
mediapipe/render/ios/OlaVideo.xcodeproj/.tulsi/tulsi-workspace
Symbolic link
|
@ -0,0 +1 @@
|
|||
/private/var/tmp/_bazel_wangrenzhu/b244be861f40c753b454f38ce4e943dc/execroot/mediapipe
|
1240
mediapipe/render/ios/OlaVideo.xcodeproj/project.pbxproj
Normal file
1240
mediapipe/render/ios/OlaVideo.xcodeproj/project.pbxproj
Normal file
File diff suppressed because it is too large
Load Diff
4
mediapipe/render/ios/OlaVideo.xcodeproj/project.xcworkspace/contents.xcworkspacedata
generated
Normal file
4
mediapipe/render/ios/OlaVideo.xcodeproj/project.xcworkspace/contents.xcworkspacedata
generated
Normal file
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
</Workspace>
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>BuildSystemType</key>
|
||||
<string>Original</string>
|
||||
<key>DisableBuildSystemDeprecationDiagnostic</key>
|
||||
<true/>
|
||||
<key>DisableBuildSystemDeprecationWarning</key>
|
||||
<true/>
|
||||
<key>IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
Binary file not shown.
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IssueFilterStyle</key>
|
||||
<string>ShowAll</string>
|
||||
<key>LiveSourceIssuesEnabled</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,29 @@
|
|||
|
||||
<Scheme version="1.3" LastUpgradeVersion="1000">
|
||||
<BuildAction parallelizeBuildables="YES" buildImplicitDependencies="YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry buildForAnalyzing="YES" buildForRunning="YES" buildForProfiling="YES" buildForArchiving="YES" buildForTesting="YES">
|
||||
<BuildableReference BlueprintName="OlaRenderDevelopFramework" ReferencedContainer="container:OlaVideo.xcodeproj" BuildableIdentifier="primary" BlueprintIdentifier="60974006CD5CD7AC00000000" BuildableName="OlaRenderDevelopFramework.framework"></BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction buildConfiguration="__TulsiTestRunner_Debug" selectedLauncherIdentifier="Xcode.DebuggerFoundation.Launcher.LLDB" shouldUseLaunchSchemeArgsEnv="YES" selectedDebuggerIdentifier="Xcode.DebuggerFoundation.Debugger.LLDB" customLLDBInitFile="$(PROJECT_FILE_PATH)/.tulsi/Utils/lldbinit">
|
||||
<Testables></Testables>
|
||||
<BuildableProductRunnable runnableDebuggingMode="0">
|
||||
<BuildableReference BuildableName="OlaRenderDevelopFramework.framework" BlueprintName="OlaRenderDevelopFramework" ReferencedContainer="container:OlaVideo.xcodeproj" BlueprintIdentifier="60974006CD5CD7AC00000000" BuildableIdentifier="primary"></BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</TestAction>
|
||||
<LaunchAction debugDocumentVersioning="YES" buildConfiguration="Debug" launchStyle="0" ignoresPersistentStateOnLaunch="NO" allowLocationSimulation="YES" selectedLauncherIdentifier="Xcode.DebuggerFoundation.Launcher.LLDB" debugServiceExtension="internal" selectedDebuggerIdentifier="Xcode.DebuggerFoundation.Debugger.LLDB" customLLDBInitFile="$(PROJECT_FILE_PATH)/.tulsi/Utils/lldbinit" useCustomWorkingDirectory="NO">
|
||||
<EnvironmentVariables></EnvironmentVariables>
|
||||
<BuildableProductRunnable runnableDebuggingMode="0">
|
||||
<BuildableReference BuildableName="OlaRenderDevelopFramework.framework" BuildableIdentifier="primary" ReferencedContainer="container:OlaVideo.xcodeproj" BlueprintIdentifier="60974006CD5CD7AC00000000" BlueprintName="OlaRenderDevelopFramework"></BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</LaunchAction>
|
||||
<ProfileAction shouldUseLaunchSchemeArgsEnv="YES" debugDocumentVersioning="YES" buildConfiguration="__TulsiTestRunner_Release" useCustomWorkingDirectory="NO">
|
||||
<BuildableProductRunnable runnableDebuggingMode="0">
|
||||
<BuildableReference BuildableName="OlaRenderDevelopFramework.framework" BlueprintIdentifier="60974006CD5CD7AC00000000" BuildableIdentifier="primary" ReferencedContainer="container:OlaVideo.xcodeproj" BlueprintName="OlaRenderDevelopFramework"></BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction buildConfiguration="Debug"></AnalyzeAction>
|
||||
<ArchiveAction revealArchiveInOrganizer="YES" buildConfiguration="Release"></ArchiveAction>
|
||||
</Scheme>
|
|
@ -0,0 +1,52 @@
|
|||
|
||||
<Scheme LastUpgradeVersion="1000" version="1.3">
|
||||
<BuildAction buildImplicitDependencies="YES" parallelizeBuildables="YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry buildForAnalyzing="YES" buildForProfiling="YES" buildForArchiving="YES" buildForTesting="YES" buildForRunning="YES">
|
||||
<BuildableReference BuildableName="lib_idx_ref_gpuimagemath_gpuimageutil_8DCE756C_ios_min11.0.a" BlueprintName="_idx_ref_gpuimagemath_gpuimageutil_8DCE756C_ios_min11.0" BuildableIdentifier="primary" ReferencedContainer="container:OlaVideo.xcodeproj" BlueprintIdentifier="6097400656E721E400000000"></BuildableReference>
|
||||
</BuildActionEntry>
|
||||
<BuildActionEntry buildForAnalyzing="YES" buildForProfiling="YES" buildForArchiving="YES" buildForRunning="YES" buildForTesting="YES">
|
||||
<BuildableReference BuildableIdentifier="primary" BlueprintIdentifier="609740068115297A00000000" BuildableName="lib_idx_core_F3E5C6E5_ios_min15.5.a" BlueprintName="_idx_core_F3E5C6E5_ios_min15.5" ReferencedContainer="container:OlaVideo.xcodeproj"></BuildableReference>
|
||||
</BuildActionEntry>
|
||||
<BuildActionEntry buildForTesting="YES" buildForProfiling="YES" buildForRunning="YES" buildForArchiving="YES" buildForAnalyzing="YES">
|
||||
<BuildableReference BuildableIdentifier="primary" ReferencedContainer="container:OlaVideo.xcodeproj" BuildableName="lib_idx_ref_gpuimagemath_gpuimageutil_8DCE756C_ios_min15.5.a" BlueprintIdentifier="60974006A1CF146A00000000" BlueprintName="_idx_ref_gpuimagemath_gpuimageutil_8DCE756C_ios_min15.5"></BuildableReference>
|
||||
</BuildActionEntry>
|
||||
<BuildActionEntry buildForTesting="YES" buildForRunning="YES" buildForProfiling="YES" buildForArchiving="YES" buildForAnalyzing="YES">
|
||||
<BuildableReference BuildableName="lib_idx_ref_gpuimagemath_gpuimageutil_8DCE756C_ios_min11.0.a" BuildableIdentifier="primary" BlueprintIdentifier="6097400656E721E400000000" BlueprintName="_idx_ref_gpuimagemath_gpuimageutil_8DCE756C_ios_min11.0" ReferencedContainer="container:OlaVideo.xcodeproj"></BuildableReference>
|
||||
</BuildActionEntry>
|
||||
<BuildActionEntry buildForRunning="YES" buildForTesting="YES" buildForProfiling="YES" buildForArchiving="YES" buildForAnalyzing="YES">
|
||||
<BuildableReference BlueprintName="_idx_ref_gpuimagemath_gpuimageutil_8DCE756C_ios_min15.5" ReferencedContainer="container:OlaVideo.xcodeproj" BuildableIdentifier="primary" BuildableName="lib_idx_ref_gpuimagemath_gpuimageutil_8DCE756C_ios_min15.5.a" BlueprintIdentifier="60974006A1CF146A00000000"></BuildableReference>
|
||||
</BuildActionEntry>
|
||||
<BuildActionEntry buildForAnalyzing="YES" buildForRunning="YES" buildForTesting="YES" buildForProfiling="YES" buildForArchiving="YES">
|
||||
<BuildableReference BlueprintName="_idx_ref_gpuimagemath_gpuimageutil_8DCE756C_ios_min11.0" BuildableIdentifier="primary" ReferencedContainer="container:OlaVideo.xcodeproj" BuildableName="lib_idx_ref_gpuimagemath_gpuimageutil_8DCE756C_ios_min11.0.a" BlueprintIdentifier="6097400656E721E400000000"></BuildableReference>
|
||||
</BuildActionEntry>
|
||||
<BuildActionEntry buildForTesting="YES" buildForAnalyzing="YES" buildForProfiling="YES" buildForRunning="YES" buildForArchiving="YES">
|
||||
<BuildableReference BlueprintIdentifier="60974006EE42527000000000" BuildableName="lib_idx_math_702C098E_ios_min11.0.a" BlueprintName="_idx_math_702C098E_ios_min11.0" ReferencedContainer="container:OlaVideo.xcodeproj" BuildableIdentifier="primary"></BuildableReference>
|
||||
</BuildActionEntry>
|
||||
<BuildActionEntry buildForAnalyzing="YES" buildForRunning="YES" buildForArchiving="YES" buildForTesting="YES" buildForProfiling="YES">
|
||||
<BuildableReference BlueprintIdentifier="60974006A1CF146A00000000" BuildableIdentifier="primary" BlueprintName="_idx_ref_gpuimagemath_gpuimageutil_8DCE756C_ios_min15.5" BuildableName="lib_idx_ref_gpuimagemath_gpuimageutil_8DCE756C_ios_min15.5.a" ReferencedContainer="container:OlaVideo.xcodeproj"></BuildableReference>
|
||||
</BuildActionEntry>
|
||||
<BuildActionEntry buildForRunning="YES" buildForTesting="YES" buildForArchiving="YES" buildForAnalyzing="YES" buildForProfiling="YES">
|
||||
<BuildableReference BlueprintIdentifier="60974006A1CF146A00000000" BlueprintName="_idx_ref_gpuimagemath_gpuimageutil_8DCE756C_ios_min15.5" BuildableIdentifier="primary" BuildableName="lib_idx_ref_gpuimagemath_gpuimageutil_8DCE756C_ios_min15.5.a" ReferencedContainer="container:OlaVideo.xcodeproj"></BuildableReference>
|
||||
</BuildActionEntry>
|
||||
<BuildActionEntry buildForTesting="YES" buildForAnalyzing="YES" buildForRunning="YES" buildForArchiving="YES" buildForProfiling="YES">
|
||||
<BuildableReference BlueprintName="_idx_core_F3E5C6E5_ios_min11.0" BuildableIdentifier="primary" BlueprintIdentifier="60974006872FED6400000000" BuildableName="lib_idx_core_F3E5C6E5_ios_min11.0.a" ReferencedContainer="container:OlaVideo.xcodeproj"></BuildableReference>
|
||||
</BuildActionEntry>
|
||||
<BuildActionEntry buildForTesting="YES" buildForProfiling="YES" buildForAnalyzing="YES" buildForRunning="YES" buildForArchiving="YES">
|
||||
<BuildableReference BlueprintIdentifier="6097400656E721E400000000" BuildableName="lib_idx_ref_gpuimagemath_gpuimageutil_8DCE756C_ios_min11.0.a" BuildableIdentifier="primary" ReferencedContainer="container:OlaVideo.xcodeproj" BlueprintName="_idx_ref_gpuimagemath_gpuimageutil_8DCE756C_ios_min11.0"></BuildableReference>
|
||||
</BuildActionEntry>
|
||||
<BuildActionEntry buildForArchiving="YES" buildForProfiling="YES" buildForAnalyzing="YES" buildForRunning="YES" buildForTesting="YES">
|
||||
<BuildableReference BlueprintIdentifier="609740065CF3050A00000000" BuildableIdentifier="primary" ReferencedContainer="container:OlaVideo.xcodeproj" BuildableName="lib_idx_math_702C098E_ios_min15.5.a" BlueprintName="_idx_math_702C098E_ios_min15.5"></BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction selectedLauncherIdentifier="Xcode.DebuggerFoundation.Launcher.LLDB" shouldUseLaunchSchemeArgsEnv="YES" buildConfiguration="Debug" selectedDebuggerIdentifier="Xcode.DebuggerFoundation.Debugger.LLDB">
|
||||
<Testables></Testables>
|
||||
</TestAction>
|
||||
<LaunchAction debugDocumentVersioning="YES" useCustomWorkingDirectory="NO" ignoresPersistentStateOnLaunch="NO" launchStyle="0" selectedDebuggerIdentifier="Xcode.DebuggerFoundation.Debugger.LLDB" allowLocationSimulation="YES" buildConfiguration="Debug" selectedLauncherIdentifier="Xcode.DebuggerFoundation.Launcher.LLDB" debugServiceExtension="internal">
|
||||
<EnvironmentVariables></EnvironmentVariables>
|
||||
</LaunchAction>
|
||||
<ProfileAction useCustomWorkingDirectory="NO" debugDocumentVersioning="YES" shouldUseLaunchSchemeArgsEnv="YES" buildConfiguration="Release"></ProfileAction>
|
||||
<AnalyzeAction buildConfiguration="Debug"></AnalyzeAction>
|
||||
<ArchiveAction buildConfiguration="Release" revealArchiveInOrganizer="YES"></ArchiveAction>
|
||||
</Scheme>
|
|
@ -0,0 +1,29 @@
|
|||
|
||||
<Scheme LastUpgradeVersion="1000" version="1.3">
|
||||
<BuildAction buildImplicitDependencies="YES" parallelizeBuildables="YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry buildForRunning="YES" buildForArchiving="YES" buildForTesting="YES" buildForAnalyzing="YES" buildForProfiling="YES">
|
||||
<BuildableReference ReferencedContainer="container:OlaVideo.xcodeproj" BlueprintIdentifier="6097400654A872A400000000" BuildableIdentifier="primary" BuildableName="libmediapipe-render-ios-OlaRenderDevelop.a" BlueprintName="mediapipe-render-ios-OlaRenderDevelop"></BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction selectedDebuggerIdentifier="Xcode.DebuggerFoundation.Debugger.LLDB" buildConfiguration="__TulsiTestRunner_Debug" selectedLauncherIdentifier="Xcode.DebuggerFoundation.Launcher.LLDB" shouldUseLaunchSchemeArgsEnv="YES" customLLDBInitFile="$(PROJECT_FILE_PATH)/.tulsi/Utils/lldbinit">
|
||||
<Testables></Testables>
|
||||
<BuildableProductRunnable runnableDebuggingMode="0">
|
||||
<BuildableReference BlueprintName="mediapipe-render-ios-OlaRenderDevelop" ReferencedContainer="container:OlaVideo.xcodeproj" BlueprintIdentifier="6097400654A872A400000000" BuildableName="libmediapipe-render-ios-OlaRenderDevelop.a" BuildableIdentifier="primary"></BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</TestAction>
|
||||
<LaunchAction launchStyle="0" debugServiceExtension="internal" debugDocumentVersioning="YES" customLLDBInitFile="$(PROJECT_FILE_PATH)/.tulsi/Utils/lldbinit" ignoresPersistentStateOnLaunch="NO" allowLocationSimulation="YES" buildConfiguration="Debug" useCustomWorkingDirectory="NO" selectedDebuggerIdentifier="Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier="Xcode.DebuggerFoundation.Launcher.LLDB">
|
||||
<EnvironmentVariables></EnvironmentVariables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference BuildableName="libmediapipe-render-ios-OlaRenderDevelop.a" BlueprintName="mediapipe-render-ios-OlaRenderDevelop" BuildableIdentifier="primary" BlueprintIdentifier="6097400654A872A400000000" ReferencedContainer="container:OlaVideo.xcodeproj"></BuildableReference>
|
||||
</MacroExpansion>
|
||||
</LaunchAction>
|
||||
<ProfileAction buildConfiguration="__TulsiTestRunner_Release" debugDocumentVersioning="YES" shouldUseLaunchSchemeArgsEnv="YES" useCustomWorkingDirectory="NO">
|
||||
<MacroExpansion>
|
||||
<BuildableReference BlueprintName="mediapipe-render-ios-OlaRenderDevelop" BuildableIdentifier="primary" ReferencedContainer="container:OlaVideo.xcodeproj" BuildableName="libmediapipe-render-ios-OlaRenderDevelop.a" BlueprintIdentifier="6097400654A872A400000000"></BuildableReference>
|
||||
</MacroExpansion>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction buildConfiguration="Debug"></AnalyzeAction>
|
||||
<ArchiveAction buildConfiguration="Release" revealArchiveInOrganizer="YES"></ArchiveAction>
|
||||
</Scheme>
|
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>SchemeUserState</key>
|
||||
<dict>
|
||||
<key>OlaRenderDevelopFramework.xcscheme_^#shared#^_</key>
|
||||
<dict>
|
||||
<key>isShown</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>_idx_Scheme.xcscheme_^#shared#^_</key>
|
||||
<dict>
|
||||
<key>isShown</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<key>mediapipe-render-ios-OlaRenderDevelop.xcscheme_^#shared#^_</key>
|
||||
<dict>
|
||||
<key>isShown</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>SuppressBuildableAutocreation</key>
|
||||
<dict/>
|
||||
</dict>
|
||||
</plist>
|
0
mediapipe/render/module/beauty/BUILD
Normal file
0
mediapipe/render/module/beauty/BUILD
Normal file
Loading…
Reference in New Issue
Block a user