Skip to content

Commit 3534437

Browse files
Initial Commit
0 parents  commit 3534437

File tree

71 files changed

+2541
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+2541
-0
lines changed

.gitignore

+156
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
# Created by https://www.gitignore.io
2+
3+
### Java ###
4+
*.class
5+
6+
# Mobile Tools for Java (J2ME)
7+
.mtj.tmp/
8+
9+
# Package Files #
10+
*.jar
11+
*.war
12+
*.ear
13+
14+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
15+
hs_err_pid*
16+
17+
18+
### Eclipse ###
19+
*.pydevproject
20+
.metadata
21+
.gradle
22+
bin/
23+
tmp/
24+
*.tmp
25+
*.bak
26+
*.swp
27+
*~.nib
28+
local.properties
29+
.settings/
30+
.loadpath
31+
32+
# External tool builders
33+
.externalToolBuilders/
34+
35+
# Locally stored "Eclipse launch configurations"
36+
*.launch
37+
38+
# CDT-specific
39+
.cproject
40+
41+
# PDT-specific
42+
.buildpath
43+
44+
# sbteclipse plugin
45+
.target
46+
47+
# TeXlipse plugin
48+
.texlipse
49+
50+
51+
### Android ###
52+
# Built application files
53+
*.apk
54+
*.ap_
55+
56+
# Files for the Dalvik VM
57+
*.dex
58+
59+
# Java class files
60+
*.class
61+
62+
# Generated files
63+
bin/
64+
gen/
65+
66+
# Gradle files
67+
.gradle/
68+
build/
69+
70+
# Local configuration file (sdk path, etc)
71+
local.properties
72+
73+
# Proguard folder generated by Eclipse
74+
proguard/
75+
76+
# Log Files
77+
*.log
78+
79+
80+
### Intellij ###
81+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm
82+
83+
/*.iml
84+
85+
## Directory-based project format:
86+
.idea/
87+
# if you remove the above rule, at least ignore the follwing:
88+
89+
# User-specific stuff:
90+
# .idea/workspace.xml
91+
# .idea/tasks.xml
92+
# .idea/dictionaries
93+
94+
# Sensitive or high-churn files:
95+
# .idea/dataSources.ids
96+
# .idea/dataSources.xml
97+
# .idea/sqlDataSources.xml
98+
# .idea/dynamic.xml
99+
# .idea/uiDesigner.xml
100+
101+
# Gradle:
102+
# .idea/gradle.xml
103+
# .idea/libraries
104+
105+
# Mongo Explorer plugin:
106+
# .idea/mongoSettings.xml
107+
108+
## File-based project format:
109+
*.ipr
110+
*.iws
111+
112+
## Plugin-specific files:
113+
114+
# IntelliJ
115+
out/
116+
117+
# mpeltonen/sbt-idea plugin
118+
.idea_modules/
119+
120+
# JIRA plugin
121+
atlassian-ide-plugin.xml
122+
123+
# Crashlytics plugin (for Android Studio and IntelliJ)
124+
com_crashlytics_export_strings.xml
125+
126+
127+
### OSX ###
128+
.DS_Store
129+
.AppleDouble
130+
.LSOverride
131+
132+
# Icon must end with two \r
133+
Icon
134+
135+
136+
# Thumbnails
137+
._*
138+
139+
# Files that might appear on external disk
140+
.Spotlight-V100
141+
.Trashes
142+
143+
# Directories potentially created on remote AFP share
144+
.AppleDB
145+
.AppleDesktop
146+
Network Trash Folder
147+
Temporary Items
148+
.apdisk
149+
150+
151+
### Linux ###
152+
*~
153+
154+
# KDE directory preferences
155+
.directory
156+
.gradle

FFmpegAndroid/.gitignore

+156
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
# Created by https://www.gitignore.io
2+
3+
### Java ###
4+
*.class
5+
6+
# Mobile Tools for Java (J2ME)
7+
.mtj.tmp/
8+
9+
# Package Files #
10+
*.jar
11+
*.war
12+
*.ear
13+
14+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
15+
hs_err_pid*
16+
17+
18+
### Eclipse ###
19+
*.pydevproject
20+
.metadata
21+
.gradle
22+
bin/
23+
tmp/
24+
*.tmp
25+
*.bak
26+
*.swp
27+
*~.nib
28+
local.properties
29+
.settings/
30+
.loadpath
31+
32+
# External tool builders
33+
.externalToolBuilders/
34+
35+
# Locally stored "Eclipse launch configurations"
36+
*.launch
37+
38+
# CDT-specific
39+
.cproject
40+
41+
# PDT-specific
42+
.buildpath
43+
44+
# sbteclipse plugin
45+
.target
46+
47+
# TeXlipse plugin
48+
.texlipse
49+
50+
51+
### Android ###
52+
# Built application files
53+
*.apk
54+
*.ap_
55+
56+
# Files for the Dalvik VM
57+
*.dex
58+
59+
# Java class files
60+
*.class
61+
62+
# Generated files
63+
bin/
64+
gen/
65+
66+
# Gradle files
67+
.gradle/
68+
build/
69+
70+
# Local configuration file (sdk path, etc)
71+
local.properties
72+
73+
# Proguard folder generated by Eclipse
74+
proguard/
75+
76+
# Log Files
77+
*.log
78+
79+
80+
### Intellij ###
81+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm
82+
83+
/*.iml
84+
85+
## Directory-based project format:
86+
.idea/
87+
# if you remove the above rule, at least ignore the follwing:
88+
89+
# User-specific stuff:
90+
# .idea/workspace.xml
91+
# .idea/tasks.xml
92+
# .idea/dictionaries
93+
94+
# Sensitive or high-churn files:
95+
# .idea/dataSources.ids
96+
# .idea/dataSources.xml
97+
# .idea/sqlDataSources.xml
98+
# .idea/dynamic.xml
99+
# .idea/uiDesigner.xml
100+
101+
# Gradle:
102+
# .idea/gradle.xml
103+
# .idea/libraries
104+
105+
# Mongo Explorer plugin:
106+
# .idea/mongoSettings.xml
107+
108+
## File-based project format:
109+
*.ipr
110+
*.iws
111+
112+
## Plugin-specific files:
113+
114+
# IntelliJ
115+
out/
116+
117+
# mpeltonen/sbt-idea plugin
118+
.idea_modules/
119+
120+
# JIRA plugin
121+
atlassian-ide-plugin.xml
122+
123+
# Crashlytics plugin (for Android Studio and IntelliJ)
124+
com_crashlytics_export_strings.xml
125+
126+
127+
### OSX ###
128+
.DS_Store
129+
.AppleDouble
130+
.LSOverride
131+
132+
# Icon must end with two \r
133+
Icon
134+
135+
136+
# Thumbnails
137+
._*
138+
139+
# Files that might appear on external disk
140+
.Spotlight-V100
141+
.Trashes
142+
143+
# Directories potentially created on remote AFP share
144+
.AppleDB
145+
.AppleDesktop
146+
Network Trash Folder
147+
Temporary Items
148+
.apdisk
149+
150+
151+
### Linux ###
152+
*~
153+
154+
# KDE directory preferences
155+
.directory
156+
.gradle
14.6 MB
Binary file not shown.
14.6 MB
Binary file not shown.

FFmpegAndroid/assets/x86/ffmpeg

17 MB
Binary file not shown.

FFmpegAndroid/build.gradle

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
apply plugin: 'com.android.library'
2+
3+
android {
4+
compileSdkVersion 19
5+
buildToolsVersion "20.0.0"
6+
7+
defaultConfig {
8+
applicationId "github.hiteshsondhi88.libffmpeg"
9+
minSdkVersion 16
10+
targetSdkVersion 16
11+
versionCode 1
12+
versionName "1.0"
13+
}
14+
15+
sourceSets.main {
16+
assets.srcDirs = ['assets']
17+
jni.srcDirs = [] //disable automatic ndk-build
18+
jniLibs.srcDirs = ['libs']
19+
}
20+
21+
buildTypes {
22+
release {
23+
runProguard false
24+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
25+
}
26+
}
27+
}
28+
29+
dependencies {
30+
compile fileTree(dir: 'libs', include: ['*.jar'])
31+
}

FFmpegAndroid/jni/Android.mk

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
LOCAL_PATH := $(call my-dir)
2+
3+
include $(CLEAR_VARS)
4+
5+
LOCAL_MODULE := ARM_ARCH
6+
7+
LOCAL_SRC_FILES := armArch.c
8+
9+
LOCAL_CFLAGS := -DHAVE_NEON=1
10+
LOCAL_STATIC_LIBRARIES := cpufeatures
11+
12+
LOCAL_LDLIBS := -llog
13+
14+
include $(BUILD_SHARED_LIBRARY)
15+
$(call import-module,cpufeatures)

FFmpegAndroid/jni/Application.mk

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Build for arm only
2+
APP_ABI := armeabi armeabi-v7a
3+
4+
APP_PLATFORM := android-14

FFmpegAndroid/jni/armArch.c

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#include <jni.h>
2+
#include <stdio.h>
3+
#include <stdlib.h>
4+
#include <cpu-features.h>
5+
6+
jstring
7+
Java_github_hiteshsondhi88_libffmpeg_ArmArchHelper_cpuArchFromJNI(JNIEnv* env, jobject obj)
8+
{
9+
// Maximum we need to store here is ARM v7-neon
10+
// Which is 11 char long, so initializing a character array of length 11
11+
char arch_info[11] = "";
12+
13+
// checking if CPU is of ARM family or not
14+
if (android_getCpuFamily() == ANDROID_CPU_FAMILY_ARM) {
15+
strcpy(arch_info, "ARM");
16+
17+
// checking if CPU is ARM v7 or not
18+
uint64_t cpuFeatures = android_getCpuFeatures();
19+
if ((cpuFeatures & ANDROID_CPU_ARM_FEATURE_ARMv7) != 0) {
20+
strcat(arch_info, " v7");
21+
22+
// checking if CPU is ARM v7 Neon
23+
if((cpuFeatures & ANDROID_CPU_ARM_FEATURE_NEON) != 0) {
24+
strcat(arch_info, "-neon");
25+
}
26+
}
27+
}
28+
return (*env)->NewStringUTF(env, arch_info);
29+
}
17.2 KB
Binary file not shown.
17.2 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)