forked from cropsly/ffmpeg-android-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated ffmpeg binaries + updated tests script + using sha1sum to che…
…ck if device ffmpeg binary is different
- Loading branch information
1 parent
b7d1c4c
commit ab9e8c3
Showing
13 changed files
with
86 additions
and
38 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 23 additions & 1 deletion
24
FFmpegAndroid/src/main/java/com/github/hiteshsondhi88/libffmpeg/CpuArch.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,27 @@ | ||
package com.github.hiteshsondhi88.libffmpeg; | ||
|
||
import android.text.TextUtils; | ||
|
||
enum CpuArch { | ||
x86, ARMv7, ARMv7_NEON, NONE | ||
x86("64978fa085af04a2d08907a3a853a6ed8f2f25b6"), | ||
ARMv7("b924a0ee8650f18da292a7e2ad398d2791d2966c"), | ||
ARMv7_NEON("7eb42611f316de0349edbd244440484f3b0f29bd"), | ||
NONE(null); | ||
|
||
private String sha1; | ||
|
||
CpuArch(String sha1) { | ||
this.sha1 = sha1; | ||
} | ||
|
||
static CpuArch fromString(String sha1) { | ||
if (!TextUtils.isEmpty(sha1)) { | ||
for (CpuArch cpuArch : CpuArch.values()) { | ||
if (sha1.equalsIgnoreCase(cpuArch.sha1)) { | ||
return cpuArch; | ||
} | ||
} | ||
} | ||
return NONE; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,17 @@ | ||
#!/bin/bash | ||
|
||
# x86 emulator | ||
echo no | android create avd -c 50M --force -n testx86 -t android-16 --abi x86 | ||
emulator -avd testx86 -no-skin -no-audio -no-window & | ||
EMULATOR_PID=$! | ||
adb wait-for-device | ||
./wait_for_emulator | ||
adb shell input keyevent 82 & | ||
./gradlew --info build connectedAndroidTest | ||
kill -9 $EMULATOR_PID && sleep 10 | ||
emulator -ports 5554,5555 -partition-size 256 -avd testx86 -no-skin -no-boot-anim -no-audio -no-window & | ||
PID_EMU1=$! | ||
./wait_for_emulator emulator-5554 | ||
|
||
# armeabi-v7a emulator | ||
echo no | android create avd -c 50M --force -n testarm -t android-16 --abi armeabi-v7a | ||
emulator -ports 5556,5557 -partition-size 256 -avd testarm -no-skin -no-boot-anim -no-audio -no-window & | ||
PID_EMU2=$! | ||
./wait_for_emulator emulator-5556 | ||
|
||
# Running Tests | ||
./gradlew --info build connectedCheck | ||
kill -9 $PID_EMU1 $PID_EMU2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,17 @@ | ||
#!/bin/bash | ||
|
||
# Originally written by Ralf Kistner <[email protected]>, but placed in the public domain | ||
|
||
EMU_SERIAL=$1 | ||
ADB_CMD='adb' | ||
if [ -n "$EMU_SERIAL" ]; then | ||
ADB_CMD="adb -s $EMU_SERIAL" | ||
fi | ||
set +e | ||
|
||
bootanim="" | ||
failcounter=0 | ||
until [[ "$bootanim" =~ "stopped" ]]; do | ||
bootanim=`adb -e shell getprop init.svc.bootanim 2>&1` | ||
bootanim=`$ADB_CMD -e shell getprop init.svc.bootanim 2>&1` | ||
echo "$bootanim" | ||
if [[ "$bootanim" =~ "not found" ]]; then | ||
let "failcounter += 1" | ||
|