Browse Source

修复加载ffmpeg加载问题和bug

leijie 8 years ago
parent
commit
d11af9ec61

+ 0 - 1
ipu-VideoCompressor/AndroidManifest.xml

@ -15,7 +15,6 @@
15 15
16 16
    <application
17 17
        android:allowBackup="true"
18
        android:icon="@drawable/ic_launcher"
19 18
        android:label="@string/app_name"
20 19
        android:theme="@style/AppTheme" >
21 20
        <activity

BIN
ipu-VideoCompressor/assets/armeabi-v7a-neon/ffmpeg


BIN
ipu-VideoCompressor/assets/armeabi-v7a/ffmpeg


BIN
ipu-VideoCompressor/assets/x86/ffmpeg


+ 0 - 5
ipu-VideoCompressor/bin/jarlist.cache

@ -1,5 +0,0 @@
1
# cache for current jar dependency. DO NOT EDIT.
2
# format is <lastModified> <length> <SHA-1> <path>
3
# Encoding is UTF-8
4
1473816918000 1364299 b6c138ba72ce38beda559df33d369856854fd6f5 D:\www\androidshare\ipu-ffmpeg\libs\android-support-v4.jar
5
1473733114000 1364299 b6c138ba72ce38beda559df33d369856854fd6f5 D:\www\androidshare\Android-Video-Compressor\libs\android-support-v4.jar

BIN
ipu-VideoCompressor/libs/armeabi-v7a/libARM_ARCH.so


BIN
ipu-VideoCompressor/libs/armeabi/libARM_ARCH.so


BIN
ipu-VideoCompressor/libs/x86/libARM_ARCH.so


BIN
ipu-VideoCompressor/res/drawable-hdpi/ic_launcher.png


BIN
ipu-VideoCompressor/res/drawable-mdpi/ic_launcher.png


BIN
ipu-VideoCompressor/res/drawable-xhdpi/ic_launcher.png


BIN
ipu-VideoCompressor/res/drawable-xxhdpi/ic_launcher.png


+ 0 - 10
ipu-VideoCompressor/res/values-w820dp/dimens.xml

@ -1,10 +0,0 @@
1
<resources>
2
3
    <!--
4
         Example customization of dimensions originally defined in res/values/dimens.xml
5
         (such as screen margins) for screens with more than 820dp of available width. This
6
         would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively).
7
    -->
8
    <dimen name="activity_horizontal_margin">64dp</dimen>
9
10
</resources>

+ 1 - 1
ipu-VideoCompressor/src/com/ai/ipu/videocompressor/CompressListener.java

@ -1,7 +1,7 @@
1 1
package com.ai.ipu.videocompressor;
2 2
3 3
public interface CompressListener {
4
    public void onExecSuccess(String message);
4
	public void onExecSuccess(String message);
5 5
    public void onExecFail(String reason);
6 6
    public void onExecProgress(String message);
7 7
}

+ 2 - 3
ipu-ffmpeg/AndroidManifest.xml

@ -5,12 +5,11 @@
5 5
    android:versionName="1.0" >
6 6
7 7
    <uses-sdk
8
        android:minSdkVersion="18"
9
        android:targetSdkVersion="18" />
8
        android:minSdkVersion="15"
9
        android:targetSdkVersion="22" />
10 10
11 11
    <application
12 12
        android:allowBackup="true"
13
        android:icon="@drawable/ic_launcher"
14 13
        android:label="@string/app_name"
15 14
        android:theme="@style/AppTheme" >
16 15
        <activity

+ 1 - 1
ipu-VideoCompressor/jni/Android.mk

@ -12,4 +12,4 @@ LOCAL_STATIC_LIBRARIES := cpufeatures
12 12
LOCAL_LDLIBS := -llog
13 13
14 14
include $(BUILD_SHARED_LIBRARY)
15
$(call import-module,cpufeatures)
15
$(call import-module,android/cpufeatures)

+ 1 - 1
ipu-VideoCompressor/jni/Application.mk

@ -1,4 +1,4 @@
1 1
# Build for arm only
2 2
APP_ABI := armeabi armeabi-v7a x86
3 3
4
APP_PLATFORM := android-18
4
APP_PLATFORM := android-22

ipu-VideoCompressor/jni/armArch.c → ipu-ffmpeg/jni/armArch.c


BIN
ipu-ffmpeg/libs/armeabi-v7a/libARM_ARCH.so


BIN
ipu-ffmpeg/libs/armeabi/libARM_ARCH.so


BIN
ipu-ffmpeg/libs/x86/libARM_ARCH.so


BIN
ipu-ffmpeg/res/drawable-hdpi/ic_launcher.png


BIN
ipu-ffmpeg/res/drawable-mdpi/ic_launcher.png


BIN
ipu-ffmpeg/res/drawable-xhdpi/ic_launcher.png


BIN
ipu-ffmpeg/res/drawable-xxhdpi/ic_launcher.png


+ 0 - 10
ipu-ffmpeg/res/values-w820dp/dimens.xml

@ -1,10 +0,0 @@
1
<resources>
2
3
    <!--
4
         Example customization of dimensions originally defined in res/values/dimens.xml
5
         (such as screen margins) for screens with more than 820dp of available width. This
6
         would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively).
7
    -->
8
    <dimen name="activity_horizontal_margin">64dp</dimen>
9
10
</resources>

+ 13 - 9
ipu-ffmpeg/src/com/ai/ipu/libffmpeg/FFmpeg.java

@ -34,15 +34,19 @@ public class FFmpeg implements FFmpegInterface {
34 34
        String cpuArchNameFromAssets = null;
35 35
        switch (CpuArchHelper.getCpuArch()) {
36 36
            case x86:
37
    				Log.i("Loading FFmpeg for x86 CPU");
38
    				cpuArchNameFromAssets = "x86";
39
    				break;
40
					case ARMv7:
41
					Log.i("Loading FFmpeg for armv7 CPU");
42
					cpuArchNameFromAssets = "armeabi-v7a";
43
					break;
44
					case NONE:
45
						throw new FFmpegNotSupportedException("Device not supported");
37
				Log.i("Loading FFmpeg for x86 CPU");
38
				cpuArchNameFromAssets = "x86";
39
			break;
40
			case ARMv7:
41
				Log.i("Loading FFmpeg for armv7 CPU");
42
				cpuArchNameFromAssets = "armeabi-v7a";
43
				break;
44
			case ARMv7_NEON:
45
				Log.i("Loading FFmpeg for armv7_NEON CPU");
46
				cpuArchNameFromAssets = "armeabi-v7a-neon";
47
				break;
48
			case NONE:
49
				throw new FFmpegNotSupportedException("Device not supported");
46 50
     	}
47 51
48 52
  if (!TextUtils.isEmpty(cpuArchNameFromAssets)) {