Skip to content

Commit cee1262

Browse files
doggycoderaiyaapp
authored andcommitted
pull request ->v3.3.0 (#26)
* add process error event * Enhance rendering efficiency * share library to bintray * use new model * Recovery of gitpack * update readme
1 parent ace24ae commit cee1262

File tree

18 files changed

+98
-10
lines changed

18 files changed

+98
-10
lines changed

AiyaEffectsSDK/bintrayUpload.gradle

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
apply plugin: 'com.github.dcendents.android-maven'
2+
apply plugin: 'com.jfrog.bintray'
3+
// 配置版本
4+
version = rootProject.ext.vName
5+
6+
// 定义相关网站
7+
def siteUrl = 'https://github.com/aiyaapp/AiyaEffectsAndroid' // 项目的主页
8+
def gitUrl = 'https://github.com/aiyaapp/AiyaEffectsAndroid.git'
9+
group = "com.aiyaapp.aiya"
10+
11+
install {
12+
repositories.mavenInstaller {
13+
// This generates POM.xml with proper parameters
14+
pom {
15+
project {
16+
packaging 'aar'
17+
// Add your description here
18+
name 'AiyaEffectsSDK'
19+
url siteUrl
20+
// Set your license
21+
licenses {
22+
license {
23+
name 'The Apache Software License, Version 2.0'
24+
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
25+
}
26+
}
27+
developers {
28+
developer {
29+
id 'doggycoder' //填写的一些基本信息
30+
name 'doggycoder'
31+
email '158183202@qq.com' // 填写邮箱
32+
}
33+
}
34+
scm {
35+
connection gitUrl
36+
developerConnection gitUrl
37+
url siteUrl
38+
}
39+
}
40+
}
41+
}
42+
}
43+
44+
// 打包 javadocjar 和 sourcejar
45+
task sourcesJar(type: Jar) {
46+
from android.sourceSets.main.java.srcDirs
47+
classifier = 'sources'
48+
}
49+
task javadoc(type: Javadoc) {
50+
source = android.sourceSets.main.java.srcDirs
51+
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
52+
}
53+
task javadocJar(type: Jar, dependsOn: javadoc) {
54+
classifier = 'javadoc'
55+
from javadoc.destinationDir
56+
}
57+
artifacts {
58+
archives javadocJar
59+
archives sourcesJar
60+
}
61+
Properties properties = new Properties()
62+
properties.load(project.rootProject.file('local.properties').newDataInputStream())
63+
bintray {
64+
user = properties.getProperty("bintray.user")
65+
key = properties.getProperty("bintray.apikey")
66+
configurations = ['archives']
67+
pkg {
68+
repo = "maven"
69+
name = "AiyaEffectsSDK" //发布到JCenter上的项目名字
70+
websiteUrl = siteUrl
71+
vcsUrl = gitUrl
72+
licenses = ["Apache-2.0"]
73+
publish = true
74+
}
75+
}
76+
javadoc { //jav doc采用utf-8编码否则会报“GBK的不可映射字符”错误
77+
options{
78+
encoding "UTF-8"
79+
charSet 'UTF-8'
80+
}
81+
}

AiyaEffectsSDK/build.gradle

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apply plugin: 'com.android.library'
22
apply plugin: 'com.github.dcendents.android-maven'
3-
group='com.github.doggycoder'
3+
group='com.aiyaapp.aiya'
44

55
android {
66

@@ -58,3 +58,5 @@ dependencies {
5858
})
5959
testCompile 'junit:junit:4.12'
6060
}
61+
62+
apply from: "bintrayUpload.gradle"
Binary file not shown.
-6 KB
Binary file not shown.
-405 KB
Binary file not shown.
Binary file not shown.
-2 KB
Binary file not shown.
-393 KB
Binary file not shown.
0 Bytes
Binary file not shown.

AiyaEffectsSDK/libs/x86/libaftk.so

-2 KB
Binary file not shown.
-393 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.

AiyaEffectsSDK/src/main/java/com/aiyaapp/camera/sdk/AiyaEffects.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ public class AiyaEffects implements ISdkManager {
8383
private int forceCloseTrack=FALSE;
8484

8585
private Event mProcessEvent=new Event(Event.PROCESS_END,Event.PROCESS_PLAY,"",null);
86+
private Event mInfoEvent=new Event(Event.PROCESS_ERROR,0,"",null);
8687

8788
private AiyaEffects(){
8889
mObservable=new ActionObservable();
@@ -314,9 +315,7 @@ public void run() {
314315
long start=System.currentTimeMillis();
315316
int trackCode=mAiyaCameraJni.track(trackData,mTrackWidth,mTrackHeight,info,
316317
trackIndex);
317-
Log.e("track------------------------>"+(System.currentTimeMillis()-start));
318-
319-
Log.e("info","info----:"+info[0]+"/"+info[1]+"/"+info[10]+"/"+info[11]);
318+
Log.d("track------------------------>"+(System.currentTimeMillis()-start));
320319

321320
if(mTrackCallback!=null){
322321
mTrackCallback.onTrack(trackCode,info);
@@ -350,6 +349,10 @@ public void process(int textureId, int trackIndex) {
350349
if(ret==STATE_EFFECT_END){
351350
mProcessEvent.strTag=currentEffect;
352351
mObservable.notifyState(mProcessEvent);
352+
}else if(ret<0){
353+
mInfoEvent.intTag=ret;
354+
mInfoEvent.strTag="process error";
355+
mObservable.notifyState(mInfoEvent);
353356
}
354357
if(mMode==MODE_GIFT&&ret==STATE_EFFECT_END){
355358
setEffect(null);

AiyaEffectsSDK/src/main/java/com/aiyaapp/camera/sdk/base/Event.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ public class Event {
2727

2828
public static final int PROCESS_PLAY=0xE002;
2929
public static final int PROCESS_END=0xE004;
30+
public static final int PROCESS_ERROR=0xE008;
3031

3132
public int eventType;
3233
public int intTag;

build.gradle

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,15 @@ buildscript {
1010
dependencies {
1111
classpath 'com.android.tools.build:gradle:2.3.0'
1212
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
13+
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
1314
// NOTE: Do not place your application dependencies here; they belong
1415
// in the individual module build.gradle files
1516
}
1617
}
1718

1819
ext{
19-
vCode=321
20-
vName="v3.2.0_a1"
20+
vCode=330
21+
vName="v3.3.0"
2122
}
2223

2324

readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55

66
See [English Document](readme_en.md)
77

8-
[![](https://jitpack.io/v/aiyaapp/AiyaEffectsAndroid.svg)](https://jitpack.io/#aiyaapp/AiyaEffectsAndroid)
8+
[![](https://jitpack.io/v/aiyaapp/AiyaEffectsAndroid.svg)](https://jitpack.io/#aiyaapp/AiyaEffectsAndroid)[ ![Download](https://api.bintray.com/packages/doggycoder/maven/AiyaEffectsSDK/images/download.svg) ](https://bintray.com/doggycoder/maven/AiyaEffectsSDK/_latestVersion)
99

1010
## 1. 概述
1111
宝宝特效 AiyaEffectsSDK 涵盖Android、iOS两个平台,基于自主研发的人脸识别模块,作为一款动态贴纸和动画特效高效渲染的解决方案
1212

1313
### 1.1 版本信息
14-
**当前版本:AiyaEffects SDK V3.2.0** [查看历史版本](https://github.com/aiyaapp/AiyaEffectsAndroid/wiki/%E5%8E%86%E5%8F%B2%E7%89%88%E6%9C%AC)
14+
**当前版本:AiyaEffects SDK V3.3.0** [查看历史版本](https://github.com/aiyaapp/AiyaEffectsAndroid/wiki/%E5%8E%86%E5%8F%B2%E7%89%88%E6%9C%AC)
1515

1616
### 1.2 集成示例
1717
* [集成到金山云的示例](https://github.com/aiyaapp/AiyaEffectsWithKSVCAndroid)

readme_en.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55

66
See [Chinese Document](readme_en.md)
77

8-
[![](https://jitpack.io/v/aiyaapp/AiyaEffectsAndroid.svg)](https://jitpack.io/#aiyaapp/AiyaEffectsAndroid)
8+
[![](https://jitpack.io/v/aiyaapp/AiyaEffectsAndroid.svg)](https://jitpack.io/#aiyaapp/AiyaEffectsAndroid)[ ![Download](https://api.bintray.com/packages/doggycoder/maven/AiyaEffectsSDK/images/download.svg) ](https://bintray.com/doggycoder/maven/AiyaEffectsSDK/_latestVersion)
99

1010
## 1. Summary
1111
AiyaEffectsSDK is a high-performance rendering solution about dynamic stickers and animation effects which based on the independent research and development of face recognition module and it can be used to Android/iOS , two platforms.
1212

1313
### 1.1 Version Info
14-
**Current Version:AiyaEffects SDK V3.2.0** [version history](doc/version_info.md)
14+
**Current Version:AiyaEffects SDK V3.3.0** [version history](https://github.com/aiyaapp/AiyaEffectsAndroid/wiki/VersionHistory)
1515

1616
### 1.2 Integration Examples
1717
* [AiyaEffectsSDK with KSVC Demo](https://github.com/aiyaapp/AiyaEffectsWithKSVCAndroid)

0 commit comments

Comments
 (0)