android ijkplayer C++/C调试 没按官方的ReadMe方法

NDK版本:android-ndk-r10e
Android版本: android studio 3.0.1
ijkplayer: branch * latest cced91e3 k0.8.8
1.切换build.gradle版本

diff --git a/android/ijkplayer/build.gradle b/android/ijkplayer/build.gradle
index abc1270f..16f2ccc7 100644
--- a/android/ijkplayer/build.gradle
+++ b/android/ijkplayer/build.gradle
@@ -5,7 +5,8 @@ buildscript {
         jcenter()
     }
     dependencies {
-        classpath 'com.android.tools.build:gradle:2.1.3'
+//       classpath 'com.android.tools.build:gradle:2.1.3'
+        classpath 'com.android.tools.build:gradle:2.3.3'
 
         classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
         classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7'
@@ -29,7 +30,7 @@ ext {
     versionCode = 800800
     versionName = "0.8.8"
 }
-
-wrapper {
-    gradleVersion = '2.14.1'
-}
+//
+//wrapper {
+//    gradleVersion = '2.14.1'
+//}

2.build.gradle支持CmakeList.txt编译且只编译ijkplayer-armv7a

diff --git a/android/ijkplayer/ijkplayer-example/build.gradle b/android/ijkplayer/ijkplayer-example/build.gradle
index ae4a0c65..83bb407f 100644
--- a/android/ijkplayer/ijkplayer-example/build.gradle
+++ b/android/ijkplayer/ijkplayer-example/build.gradle
@@ -16,6 +16,27 @@ android {
         targetSdkVersion rootProject.ext.targetSdkVersion
         versionCode rootProject.ext.versionCode
         versionName rootProject.ext.versionName
+
+        externalNativeBuild {
+            cmake {
+
+                cppFlags "-frtti -fexceptions -std=gnu++11 -std=c++98  -DWEBRTC_POSIX -DNMDEBUG" +
+                        " -D__STDC_CONSTANT_MACROS -DUSR_DEF_ENABLE_CONVERTER=1" +
+                        " -DUSR_CODEC_DEBUG=0" +
+                        " -DTESR_RUNTIME_COST=0"
+            }
+        }
+
+        ndk {
+            abiFilters 'armeabi-v7a'
+        }
+
+    }
+
+    externalNativeBuild {
+        cmake {
+            path "CMakeLists.txt"
+        }
     }
     buildTypes {
         release {
@@ -44,15 +65,15 @@ dependencies {
     compile project(':ijkplayer-java')
     compile project(':ijkplayer-exo')
 
-    all32Compile project(':ijkplayer-armv5')
+    //all32Compile project(':ijkplayer-armv5')
     all32Compile project(':ijkplayer-armv7a')
-    all32Compile project(':ijkplayer-x86')
+    //all32Compile project(':ijkplayer-x86')
 
-    all64Compile project(':ijkplayer-armv5')
-    all64Compile project(':ijkplayer-armv7a')
-    all64Compile project(':ijkplayer-arm64')
-    all64Compile project(':ijkplayer-x86')
-    all64Compile project(':ijkplayer-x86_64')
+    //all64Compile project(':ijkplayer-armv5')
+    //all64Compile project(':ijkplayer-armv7a')
+    //all64Compile project(':ijkplayer-arm64')
+    //all64Compile project(':ijkplayer-x86')
+    //all64Compile project(':ijkplayer-x86_64')
 
     // compile 'tv.danmaku.ijk.media:ijkplayer-java:0.8.8'
     // compile 'tv.danmaku.ijk.media:ijkplayer-exo:0.8.8'

diff --git a/android/ijkplayer/settings.gradle b/android/ijkplayer/settings.gradle
index 758234a4..3b42cb8b 100644
--- a/android/ijkplayer/settings.gradle
+++ b/android/ijkplayer/settings.gradle
@@ -1,7 +1,5 @@
-include ':ijkplayer-armv5', ':ijkplayer-x86_64'
 include ':ijkplayer-armv7a'
-include ':ijkplayer-arm64'
-include ':ijkplayer-x86'
+//include ':ijkplayer-arm64'
 
 include ':ijkplayer-java'
 include ':ijkplayer-exo'

3.CMakeList.txt把ijkplayer和ijksdl库编译成一个库ijkplayer

--- 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
@@ -188,7 +188,7 @@ public final class IjkMediaPlayer extends AbstractMediaPlayer {
                     libLoader = sLocalLibLoader;
 
                 libLoader.loadLibrary("ijkffmpeg");
-                libLoader.loadLibrary("ijksdl");
+//                libLoader.loadLibrary("ijksdl");
                 libLoader.loadLibrary("ijkplayer");
                 mIsLibLoaded = true;
             }

4XXX

diff --git a/ijkmedia/ijksdl/ijksdl_thread.c b/ijkmedia/ijksdl/ijksdl_thread.c
index ae367987..df5af82b 100644
--- a/ijkmedia/ijksdl/ijksdl_thread.c
+++ b/ijkmedia/ijksdl/ijksdl_thread.c
@@ -86,7 +86,7 @@ int SDL_SetThreadPriority(SDL_ThreadPriority priority)
 
 void SDL_WaitThread(SDL_Thread *thread, int *status)
 {
-    assert(thread);
+    //assert(thread);
     if (!thread)
         return;
 
  1. 加上#include ,不然会报int64_t没定义
diff --git a/ijkmedia/ijkplayer/ijkavutil/ijkstl.cpp b/ijkmedia/ijkplayer/ijkavutil/ijkstl.cpp
index eee8b8cf..38e2d059 100644
--- a/ijkmedia/ijkplayer/ijkavutil/ijkstl.cpp
+++ b/ijkmedia/ijkplayer/ijkavutil/ijkstl.cpp
@@ -18,6 +18,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 #include 
+#include 
 
 using namespace std;

6.XXX

diff --git a/ijkmedia/ijksdl/android/android_nativewindow.c b/ijkmedia/ijksdl/android/android_nativewindow.c
index b9fb3458..11f75b06 100644
--- a/ijkmedia/ijksdl/android/android_nativewindow.c
+++ b/ijkmedia/ijksdl/android/android_nativewindow.c
@@ -99,7 +99,7 @@ static int android_render_on_yv12(ANativeWindow_Buffer *out_buffer, const SDL_Vo
 static int android_render_rgb_on_rgb(ANativeWindow_Buffer *out_buffer, const SDL_VoutOverlay *overlay, int bpp)
 {
     // SDLTRACE("SDL_VoutAndroid: android_render_rgb_on_rgb(%p)", overlay);
-    assert(overlay->format == SDL_FCC_RV16);
+    //assert(overlay->format == SDL_FCC_RV16);
     assert(overlay->planes == 1);
 
     int min_height = IJKMIN(out_buffer->height, overlay->h);

7.ijkplayer和ijksdl合成一个库,ijksdl_android_jni.c要借用ijkplayer_jni.c的JVM,防止编译重命名,修改为SDL_JNI_OnLoad

diff --git a/ijkmedia/ijkplayer/android/ijkplayer_jni.c b/ijkmedia/ijkplayer/android/ijkplayer_jni.c
index b5a50e7d..3903532f 100755
--- a/ijkmedia/ijkplayer/android/ijkplayer_jni.c
+++ b/ijkmedia/ijkplayer/android/ijkplayer_jni.c

@@ -1203,6 +1204,7 @@ JNIEXPORT jint JNI_OnLoad(JavaVM *vm, void *reserved)
 
     FFmpegApi_global_init(env);
 
+    SDL_JNI_OnLoad(vm, 0);
     return JNI_VERSION_1_4;
 }
 
--- a/ijkmedia/ijksdl/android/ijksdl_android_jni.c
+++ b/ijkmedia/ijksdl/android/ijksdl_android_jni.c
@@ -30,7 +30,7 @@
 
-JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *reserved)
+JNIEXPORT jint JNICALL SDL_JNI_OnLoad(JavaVM *vm, void *reserved)

 
-JNIEXPORT void JNICALL JNI_OnUnload(JavaVM *jvm, void *reserved)
+JNIEXPORT void JNICALL SDL_JNI_OnUnload(JavaVM *jvm, void *reserved)

diff --git a/ijkmedia/ijksdl/android/ijksdl_android_jni.h b/ijkmedia/ijksdl/android/ijksdl_android_jni.h
index 76477a91..6d40940e 100644
--- a/ijkmedia/ijksdl/android/ijksdl_android_jni.h
+++ b/ijkmedia/ijksdl/android/ijksdl_android_jni.h
@@ -53,6 +53,8 @@
 #define IJK_API_22_LOLLIPOP_MR1             22  // 5.1
 #define IJK_API_23_M                        23  // 6.0
 
+JNIEXPORT jint JNICALL SDL_JNI_OnLoad(JavaVM *vm, void *reserved);

9..//ijkmedia/ijkyuv/util/psnr.h .//ijkmedia/ijkyuv/util/psnr.cc

//ijkmedia/ijkyuv/util/psnr.h 
-double ComputeSumSquareError(const uint8* org, const uint8* rec, int size);
+//double ComputeSumSquareError(const uint8* org, const uint8* rec, int size);

//ijkmedia/ijkyuv/util/psnr.cc
-double ComputeSumSquareError(const uint8* org, const uint8* rec, int size);
+static double ComputeSumSquareError(const uint8* org, const uint8* rec, int size);

10.CMakeLists.txt
DIR:./ijkplayer/android/ijkplayer/ijkplayer-example/CMakeLists.txt

# For more information about using CMake with Android Studio, read the
# documentation: https://d.android.com/studio/projects/add-native-code.html

# Sets the minimum version of CMake required to build the native library.
#ComputeSumSquareError
#ADD_DEFINITIONS(-DHAVE_JPEG)

set(BASE_JNI_DIR
    "${CMAKE_SOURCE_DIR}/../ijkplayer-armv7a"
)

set(
    third-libs
    ${CMAKE_SOURCE_DIR}/../../contrib/build/ffmpeg-armv7a/output/libijkffmpeg.so
)

cmake_minimum_required(VERSION 3.4.1)
INCLUDE_DIRECTORIES(
    ${CMAKE_SOURCE_DIR}/../../contrib/build/ffmpeg-armv7a/output/include
    ${BASE_JNI_DIR}/src/main/jni/android-ndk-prof
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkj4a/j4a/class/android/media
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkj4a/j4a/class/android/os
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkj4a/j4a/class/java/nio
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkj4a/j4a/class/java/util
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkj4a/j4a/class/tv/danmaku/ijk/media/player
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkj4a/j4a/class/tv/danmaku/ijk/media/player/misc
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkj4a/j4a
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkj4a
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkj4a/j4au/class/android/media
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkj4a/j4au/class/java/nio
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkplayer/android
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkplayer/android/pipeline
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkplayer
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkplayer/pipeline
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksdl/android
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksdl/dummy
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksdl/ffmpeg
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksdl/gles2
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksdl
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksoundtouch
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksoundtouch/include
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksoundtouch/source/SoundStretch
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksoundtouch/source/SoundTouch
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksoundtouch/source/SoundTouchDLL
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkyuv/include
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkyuv/util
)

set( SRC_FILES
    ${BASE_JNI_DIR}/src/main/jni/android-ndk-prof/prof.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkj4a/j4a/class/android/media/AudioTrack.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkj4a/j4a/class/android/media/MediaCodec.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkj4a/j4a/class/android/media/MediaFormat.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkj4a/j4a/class/android/media/PlaybackParams.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkj4a/j4a/class/android/os/Build.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkj4a/j4a/class/android/os/Bundle.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkj4a/j4a/class/java/nio/Buffer.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkj4a/j4a/class/java/nio/ByteBuffer.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkj4a/j4a/class/java/util/ArrayList.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkj4a/j4a/class/tv/danmaku/ijk/media/player/IjkMediaPlayer.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkj4a/j4a/class/tv/danmaku/ijk/media/player/misc/IAndroidIO.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkj4a/j4a/class/tv/danmaku/ijk/media/player/misc/IMediaDataSource.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkj4a/j4a/j4a_allclasses.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkj4a/j4a/j4a_base.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkj4a/j4au/class/android/media/AudioTrack.util.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkj4a/j4au/class/java/nio/ByteBuffer.util.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkplayer/android/ffmpeg_api_jni.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkplayer/android/ijkplayer_android.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkplayer/android/ijkplayer_jni.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkplayer/android/pipeline/ffpipeline_android.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkplayer/android/pipeline/ffpipenode_android_mediacodec_vdec.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkplayer/ff_cmdutils.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkplayer/ff_ffpipeline.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkplayer/ff_ffpipenode.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkplayer/ff_ffplay.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkplayer/ijkavformat/allformats.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkplayer/ijkavformat/ijkasync.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkplayer/ijkavformat/ijkio.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkplayer/ijkavformat/ijkioandroidio.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkplayer/ijkavformat/ijkioapplication.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkplayer/ijkavformat/ijkiocache.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkplayer/ijkavformat/ijkioffio.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkplayer/ijkavformat/ijkiomanager.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkplayer/ijkavformat/ijkioprotocol.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkplayer/ijkavformat/ijkiourlhook.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkplayer/ijkavformat/ijklivehook.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkplayer/ijkavformat/ijklongurl.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkplayer/ijkavformat/ijkmediadatasource.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkplayer/ijkavformat/ijksegment.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkplayer/ijkavformat/ijkurlhook.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkplayer/ijkavutil/ijkdict.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkplayer/ijkavutil/ijkfifo.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkplayer/ijkavutil/ijkthreadpool.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkplayer/ijkavutil/ijktree.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkplayer/ijkavutil/ijkutils.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkplayer/ijkmeta.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkplayer/ijkplayer.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkplayer/pipeline/ffpipeline_ffplay.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkplayer/pipeline/ffpipenode_ffplay_vdec.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksdl/android/android_audiotrack.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksdl/android/android_nativewindow.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksdl/android/ijksdl_android_jni.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksdl/android/ijksdl_aout_android_audiotrack.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksdl/android/ijksdl_aout_android_opensles.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksdl/android/ijksdl_codec_android_mediacodec.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksdl/android/ijksdl_codec_android_mediacodec_dummy.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksdl/android/ijksdl_codec_android_mediacodec_internal.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksdl/android/ijksdl_codec_android_mediacodec_java.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksdl/android/ijksdl_codec_android_mediadef.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksdl/android/ijksdl_codec_android_mediaformat.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksdl/android/ijksdl_codec_android_mediaformat_java.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksdl/android/ijksdl_vout_android_nativewindow.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksdl/android/ijksdl_vout_android_surface.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksdl/android/ijksdl_vout_overlay_android_mediacodec.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksdl/dummy/ijksdl_vout_dummy.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksdl/ffmpeg/abi_all/image_convert.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksdl/ffmpeg/ijksdl_vout_overlay_ffmpeg.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksdl/gles2/color.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksdl/gles2/common.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksdl/gles2/fsh/rgb.fsh.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksdl/gles2/fsh/yuv420p.fsh.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksdl/gles2/fsh/yuv420sp.fsh.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksdl/gles2/fsh/yuv444p10le.fsh.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksdl/gles2/renderer.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksdl/gles2/renderer_rgb.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksdl/gles2/renderer_yuv420p.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksdl/gles2/renderer_yuv420sp.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksdl/gles2/renderer_yuv444p10le.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksdl/gles2/shader.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksdl/gles2/vsh/mvp.vsh.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksdl/ijksdl_aout.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksdl/ijksdl_audio.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksdl/ijksdl_egl.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksdl/ijksdl_error.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksdl/ijksdl_extra_log.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksdl/ijksdl_mutex.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksdl/ijksdl_stdinc.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksdl/ijksdl_thread.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksdl/ijksdl_timer.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksdl/ijksdl_vout.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkyuv/util/cpuid.c
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkyuv/source/compare.cc
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkyuv/source/compare_common.cc
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkyuv/source/compare_neon.cc
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkyuv/source/compare_neon64.cc
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkyuv/source/compare_posix.cc
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkyuv/source/compare_win.cc
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkyuv/source/convert.cc
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkyuv/source/convert_argb.cc
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkyuv/source/convert_from.cc
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkyuv/source/convert_from_argb.cc
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkyuv/source/convert_jpeg.cc
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkyuv/source/convert_to_argb.cc
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkyuv/source/convert_to_i420.cc
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkyuv/source/cpu_id.cc
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkyuv/source/format_conversion.cc
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkyuv/source/mjpeg_decoder.cc
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkyuv/source/mjpeg_validate.cc
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkyuv/source/planar_functions.cc
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkyuv/source/rotate.cc
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkyuv/source/rotate_argb.cc
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkyuv/source/rotate_mips.cc
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkyuv/source/rotate_neon.cc
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkyuv/source/rotate_neon64.cc
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkyuv/source/row_any.cc
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkyuv/source/row_common.cc
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkyuv/source/row_mips.cc
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkyuv/source/row_neon.cc
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkyuv/source/row_neon64.cc
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkyuv/source/row_posix.cc
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkyuv/source/row_win.cc
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkyuv/source/scale.cc
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkyuv/source/scale_argb.cc
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkyuv/source/scale_common.cc
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkyuv/source/scale_mips.cc
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkyuv/source/scale_neon.cc
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkyuv/source/scale_neon64.cc
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkyuv/source/scale_posix.cc
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkyuv/source/scale_win.cc
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkyuv/source/video_common.cc
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkyuv/util/psnr.cc
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkyuv/util/ssim.cc
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijkplayer/ijkavutil/ijkstl.cpp
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksoundtouch/ijksoundtouch_wrap.cpp
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksoundtouch/source/Android-lib/jni/soundtouch-jni.cpp
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksoundtouch/source/SoundStretch/RunParameters.cpp
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksoundtouch/source/SoundStretch/WavFile.cpp
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksoundtouch/source/SoundTouch/AAFilter.cpp
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksoundtouch/source/SoundTouch/BPMDetect.cpp
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksoundtouch/source/SoundTouch/cpu_detect_x86.cpp
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksoundtouch/source/SoundTouch/FIFOSampleBuffer.cpp
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksoundtouch/source/SoundTouch/FIRFilter.cpp
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksoundtouch/source/SoundTouch/InterpolateCubic.cpp
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksoundtouch/source/SoundTouch/InterpolateLinear.cpp
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksoundtouch/source/SoundTouch/InterpolateShannon.cpp
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksoundtouch/source/SoundTouch/mmx_optimized.cpp
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksoundtouch/source/SoundTouch/PeakFinder.cpp
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksoundtouch/source/SoundTouch/RateTransposer.cpp
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksoundtouch/source/SoundTouch/SoundTouch.cpp
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksoundtouch/source/SoundTouch/sse_optimized.cpp
    ${BASE_JNI_DIR}/src/main/jni/ijkmedia/ijksoundtouch/source/SoundTouch/TDStretch.cpp
)

# Creates and names a library, sets it as either STATIC
# or SHARED, and provides the relative paths to its source code.
# You can define multiple libraries, and CMake builds them for you.
# Gradle automatically packages shared libraries with your APK.
add_library( # Sets the name of the library.
             ijkplayer
             # Sets the library as a shared library.
             SHARED

             # Provides a relative path to your source file(s).
             ${SRC_FILES} )

# Searches for a specified prebuilt library and stores the path as a
# variable. Because CMake includes system libraries in the search path by
# default, you only need to specify the name of the public NDK library
# you want to add. CMake verifies that the library exists before
# completing its build.

find_library( # Sets the name of the path variable.
              log-lib

              # Specifies the name of the NDK library that
              # you want CMake to locate.
              log
              )
find_library( android-lib android)
find_library( EGL-lib EGL)
find_library( GLESv2-lib GLESv2)
find_library( GLESv1_CM-lib GLESv1_CM)
find_library( OpenSLES-lib OpenSLES)
find_library( dl-lib dl)
find_library( z-lib z)

# Specifies libraries CMake should link to your target library. You
# can link multiple libraries, such as libraries you define in this
# build script, prebuilt third-party libraries, or system libraries.

target_link_libraries( # Specifies the target library.
                       ijkplayer
                       # Links the target library to the log library
                       # included in the NDK.
                       ${log-lib}
                       ${android-lib}
                       ${EGL-lib}
                       ${GLESv2-lib}
                       ${GLESv1_CM-lib}
                       ${OpenSLES-lib}
                       ${dl-lib}
                       ${z-lib}
                       ${third-libs}
                        )

你可能感兴趣的:(android ijkplayer C++/C调试 没按官方的ReadMe方法)