Skip to content

Commit

Permalink
Release v3.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jdbbjd committed Sep 11, 2017
1 parent 4f8ee4d commit 3ad0d9e
Show file tree
Hide file tree
Showing 17 changed files with 852 additions and 583 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,11 @@ FULiveDemo/.DS_Store
FULiveDemo.xcworkspace/xcuserdata/liuyang.xcuserdatad/UserInterfaceState.xcuserstate

*.xcuserstate
*.DS_Store
FULiveDemo/DemoCode/.DS_Store

FULiveDemo/DemoCode/.DS_Store

FULiveDemo/Faceunity/.DS_Store

FULiveDemo/Faceunity/FaceUnity-SDK-iOS/.DS_Store
Binary file modified FULiveDemo/DemoCode/FUAPIDemoBar.framework/Assets.car
Binary file not shown.
Binary file modified FULiveDemo/DemoCode/FUAPIDemoBar.framework/FUAPIDemoBar
Binary file not shown.
Binary file modified FULiveDemo/DemoCode/FUAPIDemoBar.framework/FUDemoBar.nib
Binary file not shown.
Binary file modified FULiveDemo/DemoCode/FUAPIDemoBar.framework/FUItemCell.nib
Binary file not shown.
Binary file modified FULiveDemo/DemoCode/FUAPIDemoBar.framework/Info.plist
Binary file not shown.
Binary file modified FULiveDemo/DemoCode/FUAPIDemoBar.framework/blurCell.nib
Binary file not shown.
Binary file modified FULiveDemo/DemoCode/FUAPIDemoBar.framework/filterCell.nib
Binary file not shown.
3 changes: 1 addition & 2 deletions FULiveDemo/DemoCode/FUCamera.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@
@interface FUCamera : NSObject
@property (nonatomic, assign) id<FUCameraDelegate> delegate;
@property (nonatomic, assign, readonly) BOOL isFrontCamera;
@property (assign, nonatomic) int captureFormat; //采集格式
@property (copy , nonatomic) dispatch_queue_t captureQueue;//录制的队列

- (instancetype)initWithCameraPosition:(AVCaptureDevicePosition)cameraPosition captureFormat:(int)captureFormat;

- (void)startUp;

- (void)startCapture;

- (void)stopCapture;
Expand Down
24 changes: 17 additions & 7 deletions FULiveDemo/DemoCode/FUCamera.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ @interface FUCamera()<AVCaptureVideoDataOutputSampleBufferDelegate,AVCaptureAudi
@property (nonatomic, strong) AVCaptureDevice *camera;

@property (assign, nonatomic) AVCaptureDevicePosition cameraPosition;
@property (assign, nonatomic) int captureFormat;

@end

Expand All @@ -51,10 +50,6 @@ - (instancetype)init
return self;
}

- (void)startUp{
[self startCapture];
}

- (void)startCapture{
if (![self.captureSession isRunning]) {
[self.captureSession startRunning];
Expand Down Expand Up @@ -85,7 +80,7 @@ - (AVCaptureSession *)captureSession
}

[self.videoConnection setVideoOrientation:AVCaptureVideoOrientationPortrait];
if (self.videoConnection.supportsVideoMirroring) {
if (self.videoConnection.supportsVideoMirroring && self.isFrontCamera) {
self.videoConnection.videoMirrored = YES;
}

Expand Down Expand Up @@ -167,7 +162,7 @@ - (void)changeCameraInputDeviceisFront:(BOOL)isFront {
if (self.videoConnection.supportsVideoMirroring) {
self.videoConnection.videoMirrored = isFront;
}
//[self.captureSession startRunning];
[self.captureSession startRunning];
}

//用来返回是前置摄像头还是后置摄像头
Expand Down Expand Up @@ -225,6 +220,21 @@ - (AVCaptureConnection *)videoConnection {
return _videoConnection;
}

//设置采集格式
- (void)setCaptureFormat:(int)captureFormat
{
if (_captureFormat == captureFormat) {
return;
}

_captureFormat = captureFormat;

if (((NSNumber *)[[_videoOutput videoSettings] objectForKey:(id)kCVPixelBufferPixelFormatTypeKey]).intValue != captureFormat) {

[_videoOutput setVideoSettings:[NSDictionary dictionaryWithObject:[NSNumber numberWithInt:_captureFormat] forKey:(id)kCVPixelBufferPixelFormatTypeKey]];
}
}

- (BOOL)isFrontCamera
{
return self.cameraPosition == AVCaptureDevicePositionFront;
Expand Down
98 changes: 98 additions & 0 deletions FULiveDemo/Faceunity/FaceUnity-SDK-iOS/Headers/FURenderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,18 @@ typedef struct{
*/
- (void)setupWithData:(void *)data ardata:(void *)ardata authPackage:(void *)package authSize:(int)size;

/**
\brief Initialize and authenticate your SDK instance to the FaceUnity server, must be called exactly once before all other functions.
The buffers should NEVER be freed while the other functions are still being called.
You can call this function multiple times to "switch pointers".
\param data should point to contents of the "v2.bin" we provide
\param ardata should point to contents of the "ar.bin" we provide
\param package is the pointer to the authentication data pack we provide. You must avoid storing the data in a file.
Normally you can just `#include "authpack.h"` and put `g_auth_package` here.
\param create if shouldCreateContext is YES we will create on context in our SDK
*/
- (void)setupWithData:(void *)data ardata:(void *)ardata authPackage:(void *)package authSize:(int)size shouldCreateContext:(BOOL)create;

/**
\brief Generalized interface for rendering a list of items.
This function needs a GLES 2.0+ context.
Expand Down Expand Up @@ -85,6 +97,92 @@ typedef struct{
*/
- (void)renderFrame:(uint8_t*)y u:(uint8_t*)u v:(uint8_t*)v ystride:(int)ystride ustride:(int)ustride vstride:(int)vstride width:(int)width height:(int)height frameId:(int)frameid items:(int *)items itemCount:(int)itemCount;

/**
此接口会返回一个和原来不同的CVPixelBufferRef
*/
- (CVPixelBufferRef)renderToInternalPixelBuffer:(CVPixelBufferRef)pixelBuffer withFrameId:(int)frameid items:(int*)items itemCount:(int)itemCount;

/**
切换摄像头时调用
*/
+ (void)onCameraChange;

/**
创建道具
*/
+ (int)createItemFromPackage:(void*)data size:(int)size;

/**
销毁单个道具
*/
+ (void)destroyItem:(int)item;

/**
销毁所有道具
*/
+ (void)destroyAllItems;

/**
人脸信息跟踪
*/
+ (int)trackFace:(int)inputFormat inputData:(void*)inputData width:(int)width height:(int)height;

/**
为道具设置参数
value 只支持 NSString NSNumber两种数据类型
*/
+ (int)itemSetParam:(int)item withName:(NSString *)name value:(id)value;

/**
从道具中获取double值
*/
+ (double)itemGetDoubleParam:(int)item withName:(NSString *)name;

/**
从道具中获取string值
*/
+ (void)itemGetStringParam:(int)item withName:(NSString *)name buf:(char *)buf size:(int)size;

/**
判断是否识别到人脸,返回值为人脸个数
*/
+ (int)isTracking;

/**
设置多人,最多设置8个
*/
+ (int)setMaxFaces:(int)maxFaces;

/**
获取人脸信息
*/
+ (int)getFaceInfo:(int)faceId name:(NSString *)name pret:(float *)pret number:(int)number;

/**
将普通道具绑定到avatar道具
*/
+ (int)avatarBindItems:(int)avatarItem items:(int *)items itemsCount:(int)itemsCount contracts:(int *)contracts contractsCount:(int)contractsCount;

/**
将普通道具从avatar道具上解绑
*/
+ (int)avatarUnbindItems:(int)avatarItem items:(int *)items itemsCount:(int)itemsCount;

/**
绑定道具
*/
+ (int)bindItems:(int)item items:(int*)items itemsCount:(int)itemsCount;

/**
解绑道具
*/
+ (int)unbindAllItems:(int)item;

/**
获取版本信息
*/
+ (NSString *)getVersion;

@end
3 changes: 3 additions & 0 deletions FULiveDemo/Faceunity/FaceUnity-SDK-iOS/Headers/funama.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ typedef struct{
#define FU_ADM_FLAG_I420_TEXTURE 8
/*\brief Indicate that the input buffer is a packed IYUV420 buffer */
#define FU_ADM_FLAG_I420_BUFFER 16

#define FU_ADM_FALG_RGBA_BUFFER 128

typedef struct{
void* p_NV21;//<the NV21 buffer
int tex;//<the texture
Expand Down
Binary file not shown.
Binary file modified FULiveDemo/Faceunity/FaceUnity-SDK-iOS/libnama.a
Binary file not shown.
99 changes: 99 additions & 0 deletions FULiveDemo/Faceunity/FaceUnity-SDK-iOS/release_note.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
FaceUnity Nama SDK v3.4.0 (2017.6.8)
-------------------------
更新内容
- 增强iOS及Android应用层接口
- 提高安卓平台兼容性
- 兼容模式美颜
- 优化异步性能
- 降低运行时发热
- 其他已知问题修复

FaceUnity Nama SDK v3.3.10 (2017.5.18)
-------------------------
更新内容
- AR mesh 绘制修复
- Palette system
- 其他已知问题修复

FaceUnity Nama SDK v3.3.9 (2017.5.6)
-------------------------
更新内容
- 修复了一个会导致内存泄露的问题
- 修复使用镜像接口后道具偏移的问题
- 安卓上增加了一个控制软编码输出数据分辨率的接口
- 其他已知问题修复

FaceUnity Nama SDK v3.3.8 (2017.4.28)
-------------------------
更新内容
- 支持道具异步加载
- 改善脸部旋转角度大时的跟踪稳定性
- 解决安卓画面撕裂问题
- 改善初始鉴权体验
- 修复安卓上偶现的memory corruption问题

FaceUnity Nama SDK v3.3.7 (2017.4.27)
-------------------------
更新内容
- 缩小美颜道具体积
- 优化风格化滤镜
- 增加对i420图像数据的支持
- 其他已知问题修复

FaceUnity Nama SDK v3.3.6 (2017.4.20)
-------------------------
更新内容
- 修复安卓dualInput接口传入I420图像问题
- 修复无美颜道具时多人模式异常

FaceUnity Nama SDK v3.3.5 (2017.4.19)
-------------------------
更新内容
- 新版美颜性能优化
- 修复多人瘦脸异常的问题

FaceUnity Nama SDK v3.3.4 (2017.4.17)
-------------------------
更新内容
- 优化风格化滤镜性能
- 优化鉴权失败时的表现
- 包含高质量美颜和高性能美颜两个方案
- 其他已知问题修复

FaceUnity Nama SDK v3.3.3 (2017.4.5)
-------------------------
更新内容
- 修复Android美型bug
- 美颜性能轻微优化

FaceUnity Nama SDK v3.3.2 (2017.3.31)
-------------------------
更新内容
- 增加32款新的风格化滤镜
- 增加avatar绘制模块
- 支持FBX骨骼动画
- 优化新版美颜性能,优化参数默认值和取值范围
- 优化手势识别模块,发布v3版手势识别模型
- 其他已知问题修复

FaceUnity Nama SDK v3.3.1 (2017.3.27)
-------------------------
更新内容
- 兼容老版美型并作为默认方案
- 其他已知问题修复

FaceUnity Nama SDK v3.3.0 (2017.3.24)
-------------------------
更新内容
- 美颜模块全面升级,改进磨皮算法,增加红润效果,改善脸型美化
- 手势识别模块升级,发布v2版手势识别模型,利用深度神经网络提高手势检出率,同时降低误检率
- 其他已知问题修复

FaceUnity Nama SDK v3.2.4 (2017.3.14)
-------------------------
更新内容
- 人脸检测性能优化
- 改善美白效果,美颜性能优化,美颜资源占用空间减少
- 修复内存泄露
- 降低运行时发热
- 其他已知问题修复
Loading

0 comments on commit 3ad0d9e

Please sign in to comment.