forked from bilibili/ijkplayer
-
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.
android/patches: add "0004-{abi}-link-prebuilt-staic-libraries-of-ffm…
…epg.patch" update "0002-gradle-upgrade-build-tool-to-2.2.0-beta2.patch" fix an unpatch issue
- Loading branch information
Showing
8 changed files
with
372 additions
and
10 deletions.
There are no files selected for viewing
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,7 +1,7 @@ | ||
From 5d70fa0496f9ebfbcfa3786d85c74c690d66781e Mon Sep 17 00:00:00 2001 | ||
From: ctiao <[email protected]> | ||
Date: Mon, 29 Aug 2016 14:50:34 +0800 | ||
Subject: [PATCH 2/2] gradle: upgrade build-tool to 2.2.0-beta2 | ||
Subject: [PATCH 2/2] gradle: upgrade build-tool to 2.2.0-rc1 | ||
|
||
--- | ||
android/ijkplayer/build.gradle | 2 +- | ||
|
@@ -16,7 +16,7 @@ index 0de03ec..6132c1d 100644 | |
} | ||
dependencies { | ||
- classpath 'com.android.tools.build:gradle:2.1.3' | ||
+ classpath 'com.android.tools.build:gradle:2.2.0-beta2' | ||
+ classpath 'com.android.tools.build:gradle:2.2.0-rc1' | ||
|
||
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1' | ||
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7' | ||
|
1 change: 1 addition & 0 deletions
1
android/patches/0004-arm64-link-prebuilt-staic-libraries-of-ffmepg.patch
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
0004-armv7a-link-prebuilt-staic-libraries-of-ffmepg.patch |
1 change: 1 addition & 0 deletions
1
android/patches/0004-armv5-link-prebuilt-staic-libraries-of-ffmepg.patch
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
0004-armv7a-link-prebuilt-staic-libraries-of-ffmepg.patch |
117 changes: 117 additions & 0 deletions
117
android/patches/0004-armv7a-link-prebuilt-staic-libraries-of-ffmepg.patch
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 |
---|---|---|
@@ -0,0 +1,117 @@ | ||
From fb17b98cfeb265e09220568df17cc493192e6ebe Mon Sep 17 00:00:00 2001 | ||
From: ctiao <[email protected]> | ||
Date: Fri, 2 Sep 2016 16:39:02 +0800 | ||
Subject: [PATCH] armv7a: link prebuilt staic libraries of ffmepg | ||
|
||
--- | ||
.../src/main/jni/ffmpeg/Android.mk | 42 ++++++++++++++++++++-- | ||
.../danmaku/ijk/media/player/IjkMediaPlayer.java | 1 - | ||
ijkmedia/ijkplayer/Android.mk | 6 ++-- | ||
ijkmedia/ijksdl/Android.mk | 4 +-- | ||
4 files changed, 44 insertions(+), 9 deletions(-) | ||
|
||
diff --git a/android/ijkplayer/ijkplayer-armv7a/src/main/jni/ffmpeg/Android.mk b/android/ijkplayer/ijkplayer-armv7a/src/main/jni/ffmpeg/Android.mk | ||
index ec33908..3c525bd 100644 | ||
--- a/android/ijkplayer/ijkplayer-armv7a/src/main/jni/ffmpeg/Android.mk | ||
+++ b/android/ijkplayer/ijkplayer-armv7a/src/main/jni/ffmpeg/Android.mk | ||
@@ -1,6 +1,42 @@ | ||
LOCAL_PATH := $(call my-dir) | ||
+include $(CLEAR_VARS) | ||
+LOCAL_MODULE := avcodec | ||
+LOCAL_SRC_FILES := $(MY_APP_FFMPEG_OUTPUT_PATH)/lib/libavcodec.a | ||
+LOCAL_EXPORT_C_INCLUDES := $(MY_APP_FFMPEG_INCLUDE_PATH) | ||
+LOCAL_C_INCLUDES += $(MY_APP_FFMPEG_INCLUDE_PATH) | ||
+include $(PREBUILT_STATIC_LIBRARY) | ||
+ | ||
+include $(CLEAR_VARS) | ||
+LOCAL_MODULE := avformat | ||
+LOCAL_SRC_FILES := $(MY_APP_FFMPEG_OUTPUT_PATH)/lib/libavformat.a | ||
+LOCAL_EXPORT_C_INCLUDES := $(MY_APP_FFMPEG_INCLUDE_PATH) | ||
+LOCAL_C_INCLUDES += $(MY_APP_FFMPEG_INCLUDE_PATH) | ||
+include $(PREBUILT_STATIC_LIBRARY) | ||
+ | ||
+include $(CLEAR_VARS) | ||
+LOCAL_MODULE := swscale | ||
+LOCAL_SRC_FILES := $(MY_APP_FFMPEG_OUTPUT_PATH)/lib/libswscale.a | ||
+LOCAL_EXPORT_C_INCLUDES := $(MY_APP_FFMPEG_OUTPUT_PATH)/include | ||
+LOCAL_C_INCLUDES += $(MY_APP_FFMPEG_INCLUDE_PATH) | ||
+include $(PREBUILT_STATIC_LIBRARY) | ||
+ | ||
+include $(CLEAR_VARS) | ||
+LOCAL_MODULE := avutil | ||
+LOCAL_SRC_FILES := $(MY_APP_FFMPEG_OUTPUT_PATH)/lib/libavutil.a | ||
+LOCAL_EXPORT_C_INCLUDES := $(MY_APP_FFMPEG_INCLUDE_PATH) | ||
+LOCAL_C_INCLUDES += $(MY_APP_FFMPEG_INCLUDE_PATH) | ||
+include $(PREBUILT_STATIC_LIBRARY) | ||
+ | ||
+include $(CLEAR_VARS) | ||
+LOCAL_MODULE := avfilter | ||
+LOCAL_SRC_FILES := $(MY_APP_FFMPEG_OUTPUT_PATH)/lib/libavfilter.a | ||
+LOCAL_EXPORT_C_INCLUDES := $(MY_APP_FFMPEG_INCLUDE_PATH) | ||
+LOCAL_C_INCLUDES += $(MY_APP_FFMPEG_INCLUDE_PATH) | ||
+include $(PREBUILT_STATIC_LIBRARY) | ||
|
||
include $(CLEAR_VARS) | ||
-LOCAL_MODULE := ijkffmpeg | ||
-LOCAL_SRC_FILES := $(MY_APP_FFMPEG_OUTPUT_PATH)/libijkffmpeg.so | ||
-include $(PREBUILT_SHARED_LIBRARY) | ||
\ No newline at end of file | ||
+LOCAL_MODULE := swresample | ||
+LOCAL_SRC_FILES := $(MY_APP_FFMPEG_OUTPUT_PATH)/lib/libswresample.a | ||
+LOCAL_EXPORT_C_INCLUDES := $(MY_APP_FFMPEG_INCLUDE_PATH) | ||
+LOCAL_C_INCLUDES += $(MY_APP_FFMPEG_INCLUDE_PATH) | ||
+include $(PREBUILT_STATIC_LIBRARY) | ||
diff --git a/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/IjkMediaPlayer.java b/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/IjkMediaPlayer.java | ||
index 985f848..7ad3fe4 100755 | ||
--- a/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/IjkMediaPlayer.java | ||
+++ b/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/IjkMediaPlayer.java | ||
@@ -165,7 +165,6 @@ public final class IjkMediaPlayer extends AbstractMediaPlayer { | ||
if (libLoader == null) | ||
libLoader = sLocalLibLoader; | ||
|
||
- libLoader.loadLibrary("ijkffmpeg"); | ||
libLoader.loadLibrary("ijksdl"); | ||
libLoader.loadLibrary("ijkplayer"); | ||
mIsLibLoaded = true; | ||
diff --git a/ijkmedia/ijkplayer/Android.mk b/ijkmedia/ijkplayer/Android.mk | ||
index 92372ab..6c9270d 100644 | ||
--- a/ijkmedia/ijkplayer/Android.mk | ||
+++ b/ijkmedia/ijkplayer/Android.mk | ||
@@ -26,7 +26,7 @@ ifeq ($(TARGET_ARCH_ABI),armeabi-v7a) | ||
LOCAL_CFLAGS += -mfloat-abi=soft | ||
endif | ||
LOCAL_CFLAGS += -std=c99 | ||
-LOCAL_LDLIBS += -llog -landroid | ||
+LOCAL_LDLIBS += -llog -landroid -lm -lz | ||
|
||
LOCAL_C_INCLUDES += $(LOCAL_PATH) | ||
LOCAL_C_INCLUDES += $(realpath $(LOCAL_PATH)/..) | ||
@@ -59,8 +59,8 @@ LOCAL_SRC_FILES += ijkavformat/ijkurlhook.c | ||
LOCAL_SRC_FILES += ijkavformat/ijklongurl.c | ||
LOCAL_SRC_FILES += ijkavformat/ijksegment.c | ||
|
||
-LOCAL_SHARED_LIBRARIES := ijkffmpeg ijksdl | ||
-LOCAL_STATIC_LIBRARIES := android-ndk-profiler | ||
+LOCAL_SHARED_LIBRARIES := ijksdl | ||
+LOCAL_STATIC_LIBRARIES := avformat avcodec swscale swresample avfilter avutil android-ndk-profiler | ||
|
||
LOCAL_MODULE := ijkplayer | ||
include $(BUILD_SHARED_LIBRARY) | ||
diff --git a/ijkmedia/ijksdl/Android.mk b/ijkmedia/ijksdl/Android.mk | ||
index 08ebbab..4f6d804 100644 | ||
--- a/ijkmedia/ijksdl/Android.mk | ||
+++ b/ijkmedia/ijksdl/Android.mk | ||
@@ -70,8 +70,8 @@ LOCAL_SRC_FILES += android/ijksdl_vout_android_nativewindow.c | ||
LOCAL_SRC_FILES += android/ijksdl_vout_android_surface.c | ||
LOCAL_SRC_FILES += android/ijksdl_vout_overlay_android_mediacodec.c | ||
|
||
-LOCAL_SHARED_LIBRARIES := ijkffmpeg ijkj4a | ||
-LOCAL_STATIC_LIBRARIES := cpufeatures yuv_static | ||
+LOCAL_STATIC_LIBRARIES := avformat avcodec swscale swresample avfilter avutil cpufeatures yuv_static | ||
+LOCAL_SHARED_LIBRARIES := ijkj4a | ||
|
||
LOCAL_MODULE := ijksdl | ||
include $(BUILD_SHARED_LIBRARY) | ||
-- | ||
2.7.4 (Apple Git-66) | ||
|
118 changes: 118 additions & 0 deletions
118
android/patches/0004-x86-link-prebuilt-staic-libraries-of-ffmepg.patch
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 |
---|---|---|
@@ -0,0 +1,118 @@ | ||
From e8d39a74162855acb1332bd877f22fe1d881aa61 Mon Sep 17 00:00:00 2001 | ||
From: ctiao <[email protected]> | ||
Date: Fri, 2 Sep 2016 17:01:57 +0800 | ||
Subject: [PATCH] x86: link prebuilt staic libraries of ffmepg | ||
|
||
--- | ||
.../danmaku/ijk/media/player/IjkMediaPlayer.java | 1 - | ||
.../ijkplayer-x86/src/main/jni/ffmpeg/Android.mk | 43 ++++++++++++++++++++-- | ||
ijkmedia/ijkplayer/Android.mk | 6 +-- | ||
ijkmedia/ijksdl/Android.mk | 4 +- | ||
4 files changed, 45 insertions(+), 9 deletions(-) | ||
|
||
diff --git a/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/IjkMediaPlayer.java b/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/IjkMediaPlayer.java | ||
index 985f848..7ad3fe4 100755 | ||
--- a/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/IjkMediaPlayer.java | ||
+++ b/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/IjkMediaPlayer.java | ||
@@ -165,7 +165,6 @@ public final class IjkMediaPlayer extends AbstractMediaPlayer { | ||
if (libLoader == null) | ||
libLoader = sLocalLibLoader; | ||
|
||
- libLoader.loadLibrary("ijkffmpeg"); | ||
libLoader.loadLibrary("ijksdl"); | ||
libLoader.loadLibrary("ijkplayer"); | ||
mIsLibLoaded = true; | ||
diff --git a/android/ijkplayer/ijkplayer-x86/src/main/jni/ffmpeg/Android.mk b/android/ijkplayer/ijkplayer-x86/src/main/jni/ffmpeg/Android.mk | ||
index ec33908..44c50b1 100644 | ||
--- a/android/ijkplayer/ijkplayer-x86/src/main/jni/ffmpeg/Android.mk | ||
+++ b/android/ijkplayer/ijkplayer-x86/src/main/jni/ffmpeg/Android.mk | ||
@@ -1,6 +1,43 @@ | ||
LOCAL_PATH := $(call my-dir) | ||
|
||
include $(CLEAR_VARS) | ||
-LOCAL_MODULE := ijkffmpeg | ||
-LOCAL_SRC_FILES := $(MY_APP_FFMPEG_OUTPUT_PATH)/libijkffmpeg.so | ||
-include $(PREBUILT_SHARED_LIBRARY) | ||
\ No newline at end of file | ||
+LOCAL_MODULE := avcodec | ||
+LOCAL_SRC_FILES := $(MY_APP_FFMPEG_OUTPUT_PATH)/lib/libavcodec.a | ||
+LOCAL_EXPORT_C_INCLUDES := $(MY_APP_FFMPEG_INCLUDE_PATH) | ||
+LOCAL_C_INCLUDES += $(MY_APP_FFMPEG_INCLUDE_PATH) | ||
+include $(PREBUILT_STATIC_LIBRARY) | ||
+ | ||
+include $(CLEAR_VARS) | ||
+LOCAL_MODULE := avformat | ||
+LOCAL_SRC_FILES := $(MY_APP_FFMPEG_OUTPUT_PATH)/lib/libavformat.a | ||
+LOCAL_EXPORT_C_INCLUDES := $(MY_APP_FFMPEG_INCLUDE_PATH) | ||
+LOCAL_C_INCLUDES += $(MY_APP_FFMPEG_INCLUDE_PATH) | ||
+include $(PREBUILT_STATIC_LIBRARY) | ||
+ | ||
+include $(CLEAR_VARS) | ||
+LOCAL_MODULE := swscale | ||
+LOCAL_SRC_FILES := $(MY_APP_FFMPEG_OUTPUT_PATH)/lib/libswscale.a | ||
+LOCAL_EXPORT_C_INCLUDES := $(MY_APP_FFMPEG_OUTPUT_PATH)/include | ||
+LOCAL_C_INCLUDES += $(MY_APP_FFMPEG_INCLUDE_PATH) | ||
+include $(PREBUILT_STATIC_LIBRARY) | ||
+ | ||
+include $(CLEAR_VARS) | ||
+LOCAL_MODULE := avutil | ||
+LOCAL_SRC_FILES := $(MY_APP_FFMPEG_OUTPUT_PATH)/lib/libavutil.a | ||
+LOCAL_EXPORT_C_INCLUDES := $(MY_APP_FFMPEG_INCLUDE_PATH) | ||
+LOCAL_C_INCLUDES += $(MY_APP_FFMPEG_INCLUDE_PATH) | ||
+include $(PREBUILT_STATIC_LIBRARY) | ||
+ | ||
+include $(CLEAR_VARS) | ||
+LOCAL_MODULE := avfilter | ||
+LOCAL_SRC_FILES := $(MY_APP_FFMPEG_OUTPUT_PATH)/lib/libavfilter.a | ||
+LOCAL_EXPORT_C_INCLUDES := $(MY_APP_FFMPEG_INCLUDE_PATH) | ||
+LOCAL_C_INCLUDES += $(MY_APP_FFMPEG_INCLUDE_PATH) | ||
+include $(PREBUILT_STATIC_LIBRARY) | ||
+ | ||
+include $(CLEAR_VARS) | ||
+LOCAL_MODULE := swresample | ||
+LOCAL_SRC_FILES := $(MY_APP_FFMPEG_OUTPUT_PATH)/lib/libswresample.a | ||
+LOCAL_EXPORT_C_INCLUDES := $(MY_APP_FFMPEG_INCLUDE_PATH) | ||
+LOCAL_C_INCLUDES += $(MY_APP_FFMPEG_INCLUDE_PATH) | ||
+include $(PREBUILT_STATIC_LIBRARY) | ||
diff --git a/ijkmedia/ijkplayer/Android.mk b/ijkmedia/ijkplayer/Android.mk | ||
index 92372ab..6c9270d 100644 | ||
--- a/ijkmedia/ijkplayer/Android.mk | ||
+++ b/ijkmedia/ijkplayer/Android.mk | ||
@@ -26,7 +26,7 @@ ifeq ($(TARGET_ARCH_ABI),armeabi-v7a) | ||
LOCAL_CFLAGS += -mfloat-abi=soft | ||
endif | ||
LOCAL_CFLAGS += -std=c99 | ||
-LOCAL_LDLIBS += -llog -landroid | ||
+LOCAL_LDLIBS += -llog -landroid -lm -lz | ||
|
||
LOCAL_C_INCLUDES += $(LOCAL_PATH) | ||
LOCAL_C_INCLUDES += $(realpath $(LOCAL_PATH)/..) | ||
@@ -59,8 +59,8 @@ LOCAL_SRC_FILES += ijkavformat/ijkurlhook.c | ||
LOCAL_SRC_FILES += ijkavformat/ijklongurl.c | ||
LOCAL_SRC_FILES += ijkavformat/ijksegment.c | ||
|
||
-LOCAL_SHARED_LIBRARIES := ijkffmpeg ijksdl | ||
-LOCAL_STATIC_LIBRARIES := android-ndk-profiler | ||
+LOCAL_SHARED_LIBRARIES := ijksdl | ||
+LOCAL_STATIC_LIBRARIES := avformat avcodec swscale swresample avfilter avutil android-ndk-profiler | ||
|
||
LOCAL_MODULE := ijkplayer | ||
include $(BUILD_SHARED_LIBRARY) | ||
diff --git a/ijkmedia/ijksdl/Android.mk b/ijkmedia/ijksdl/Android.mk | ||
index 08ebbab..4f6d804 100644 | ||
--- a/ijkmedia/ijksdl/Android.mk | ||
+++ b/ijkmedia/ijksdl/Android.mk | ||
@@ -70,8 +70,8 @@ LOCAL_SRC_FILES += android/ijksdl_vout_android_nativewindow.c | ||
LOCAL_SRC_FILES += android/ijksdl_vout_android_surface.c | ||
LOCAL_SRC_FILES += android/ijksdl_vout_overlay_android_mediacodec.c | ||
|
||
-LOCAL_SHARED_LIBRARIES := ijkffmpeg ijkj4a | ||
-LOCAL_STATIC_LIBRARIES := cpufeatures yuv_static | ||
+LOCAL_STATIC_LIBRARIES := avformat avcodec swscale swresample avfilter avutil cpufeatures yuv_static | ||
+LOCAL_SHARED_LIBRARIES := ijkj4a | ||
|
||
LOCAL_MODULE := ijksdl | ||
include $(BUILD_SHARED_LIBRARY) | ||
-- | ||
2.7.4 (Apple Git-66) | ||
|
Oops, something went wrong.