提交 e67854cf 编写于 作者: Z Zhang Rui

jni: merge libs

上级 6d2c10ea
...@@ -34,4 +34,4 @@ APP_CFLAGS := -O3 -Wall -pipe \ ...@@ -34,4 +34,4 @@ APP_CFLAGS := -O3 -Wall -pipe \
# armeabi-v7a # armeabi-v7a
APP_CFLAGS += -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp APP_CFLAGS += -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp
APP_LDFLAGS += -Wl,--fix-cortex-a8 APP_LDFLAGS += -Wl,--fix-cortex-a8
\ No newline at end of file
...@@ -30,7 +30,7 @@ LOCAL_C_INCLUDES += $(MY_APP_JNI_ROOT) ...@@ -30,7 +30,7 @@ LOCAL_C_INCLUDES += $(MY_APP_JNI_ROOT)
LOCAL_SRC_FILES += ff_cmdutils.c LOCAL_SRC_FILES += ff_cmdutils.c
LOCAL_SRC_FILES += ff_ffplay.c LOCAL_SRC_FILES += ff_ffplay.c
LOCAL_STATIC_LIBRARIES := ijksdl LOCAL_SHARED_LIBRARIES := ijksdl
LOCAL_MODULE := ffplay LOCAL_MODULE := ffplay
include $(BUILD_STATIC_LIBRARY) include $(BUILD_STATIC_LIBRARY)
...@@ -27,11 +27,11 @@ LOCAL_C_INCLUDES += $(LOCAL_PATH) ...@@ -27,11 +27,11 @@ LOCAL_C_INCLUDES += $(LOCAL_PATH)
LOCAL_C_INCLUDES += $(MY_APP_FFMPEG_INCLUDE_PATH) LOCAL_C_INCLUDES += $(MY_APP_FFMPEG_INCLUDE_PATH)
LOCAL_C_INCLUDES += $(MY_APP_JNI_ROOT) LOCAL_C_INCLUDES += $(MY_APP_JNI_ROOT)
LOCAL_SRC_FILES += ijkplayer_jni.c LOCAL_SRC_FILES += android/ijkplayer_jni.c
LOCAL_SRC_FILES += ijkplayer_android.c LOCAL_SRC_FILES += android/ijkplayer_android.c
LOCAL_STATIC_LIBRARIES := ffplay LOCAL_STATIC_LIBRARIES := ffplay
LOCAL_SHARED_LIBRARIES := ffmpeg ijkutil_android ijksdl_android LOCAL_SHARED_LIBRARIES := ffmpeg ijkutil ijksdl
LOCAL_MODULE := ijkplayer_android LOCAL_MODULE := ijkplayer
include $(BUILD_SHARED_LIBRARY) include $(BUILD_SHARED_LIBRARY)
...@@ -24,8 +24,8 @@ ...@@ -24,8 +24,8 @@
#include <string.h> #include <string.h>
#include <pthread.h> #include <pthread.h>
#include <jni.h> #include <jni.h>
#include "ijksdl_android/ijksdl_android.h" #include "ijksdl/ijksdl_android.h"
#include "ijkutil_android/ijkutil_android.h" #include "ijkutil/ijkutil_android.h"
#include "ffplay/ff_ffplay.h" #include "ffplay/ff_ffplay.h"
#include "ijkplayer_android.h" #include "ijkplayer_android.h"
......
...@@ -35,5 +35,11 @@ LOCAL_SRC_FILES += ijksdl_timer.c ...@@ -35,5 +35,11 @@ LOCAL_SRC_FILES += ijksdl_timer.c
LOCAL_SRC_FILES += ijksdl_vout.c LOCAL_SRC_FILES += ijksdl_vout.c
LOCAL_SRC_FILES += ijksdl_vout_overlay_ffmpeg.c LOCAL_SRC_FILES += ijksdl_vout_overlay_ffmpeg.c
LOCAL_SRC_FILES += android/ijksdl_aout_android_audiotrack.c
LOCAL_SRC_FILES += android/android_audiotrack.c
LOCAL_SRC_FILES += android/ijksdl_vout_android_nativewindow.c
LOCAL_SRC_FILES += android/ijksdl_vout_android_surface.c
LOCAL_MODULE := ijksdl LOCAL_MODULE := ijksdl
include $(BUILD_STATIC_LIBRARY) include $(BUILD_STATIC_LIBRARY)
...@@ -24,8 +24,8 @@ ...@@ -24,8 +24,8 @@
#include "android_audiotrack.h" #include "android_audiotrack.h"
#include <assert.h> #include <assert.h>
#include "ijkutil_android/ijkutil_android.h" #include "ijkutil/ijkutil_android.h"
#include "ijksdl/ijksdl_audio.h" #include "../ijksdl_audio.h"
typedef struct AudioChannelMapEntry { typedef struct AudioChannelMapEntry {
Uint8 sdl_channel; Uint8 sdl_channel;
......
...@@ -26,8 +26,8 @@ ...@@ -26,8 +26,8 @@
#include <stdint.h> #include <stdint.h>
#include <jni.h> #include <jni.h>
#include "ijksdl/ijksdl_audio.h" #include "../ijksdl_audio.h"
#include "ijksdl/ijksdl_aout.h" #include "../ijksdl_aout.h"
typedef struct SDL_AndroidAudioTrack_Spec { typedef struct SDL_AndroidAudioTrack_Spec {
enum StreamType { enum StreamType {
......
...@@ -26,8 +26,8 @@ ...@@ -26,8 +26,8 @@
#include <stdbool.h> #include <stdbool.h>
#include <assert.h> #include <assert.h>
#include "ijkutil/ijkutil.h" #include "ijkutil/ijkutil.h"
#include "ijksdl/ijksdl_thread.h" #include "../ijksdl_thread.h"
#include "ijksdl/ijksdl_aout_internal.h" #include "../ijksdl_aout_internal.h"
#include "android_audiotrack.h" #include "android_audiotrack.h"
typedef struct SDL_Aout_Opaque { typedef struct SDL_Aout_Opaque {
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#define IJKSDL_ANDROID__IJKSDL_AOUT_ANDROID_AUDIOTRACK_H #define IJKSDL_ANDROID__IJKSDL_AOUT_ANDROID_AUDIOTRACK_H
#include <jni.h> #include <jni.h>
#include "ijksdl/ijksdl_aout.h" #include "../ijksdl_aout.h"
void SDL_Init_AoutAndroid(JNIEnv *env); void SDL_Init_AoutAndroid(JNIEnv *env);
SDL_Aout *SDL_AoutAndroid_CreateForAudioTrack(JavaVM* jvm); SDL_Aout *SDL_AoutAndroid_CreateForAudioTrack(JavaVM* jvm);
......
...@@ -26,9 +26,9 @@ ...@@ -26,9 +26,9 @@
#include <assert.h> #include <assert.h>
#include <android/native_window.h> #include <android/native_window.h>
#include "ijkutil/ijkutil.h" #include "ijkutil/ijkutil.h"
#include "ijksdl/ijksdl_ffinc.h" #include "../ijksdl_ffinc.h"
#include "ijksdl/ijksdl_vout.h" #include "../ijksdl_vout.h"
#include "ijksdl/ijksdl_vout_internal.h" #include "../ijksdl_vout_internal.h"
typedef struct SDL_VoutSurface_Opaque { typedef struct SDL_VoutSurface_Opaque {
SDL_Vout *vout; SDL_Vout *vout;
......
...@@ -24,8 +24,8 @@ ...@@ -24,8 +24,8 @@
#ifndef IJKSDL_ANDROID__IJKSDL_VOUT_ANDROID_NATIVEWINDOW_H #ifndef IJKSDL_ANDROID__IJKSDL_VOUT_ANDROID_NATIVEWINDOW_H
#define IJKSDL_ANDROID__IJKSDL_VOUT_ANDROID_NATIVEWINDOW_H #define IJKSDL_ANDROID__IJKSDL_VOUT_ANDROID_NATIVEWINDOW_H
#include "ijksdl/ijksdl_stdinc.h" #include "../ijksdl_stdinc.h"
#include "ijksdl/ijksdl_vout.h" #include "../ijksdl_vout.h"
typedef struct ANativeWindow ANativeWindow; typedef struct ANativeWindow ANativeWindow;
......
...@@ -25,8 +25,8 @@ ...@@ -25,8 +25,8 @@
#define IJKSDL_ANDROID__IJKSDL_VOUT_ANDROID_SURFACE_H #define IJKSDL_ANDROID__IJKSDL_VOUT_ANDROID_SURFACE_H
#include <jni.h> #include <jni.h>
#include "ijksdl/ijksdl_stdinc.h" #include "../ijksdl_stdinc.h"
#include "ijksdl/ijksdl_vout.h" #include "../ijksdl_vout.h"
SDL_Vout *SDL_VoutAndroid_CreateForAndroidSurface(); SDL_Vout *SDL_VoutAndroid_CreateForAndroidSurface();
void SDL_VoutAndroid_SetAndroidSurface(SDL_Vout *vout, JNIEnv *env, jobject android_surface); void SDL_VoutAndroid_SetAndroidSurface(SDL_Vout *vout, JNIEnv *env, jobject android_surface);
......
...@@ -21,14 +21,14 @@ ...@@ -21,14 +21,14 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#ifndef IJKSDL_ANDROID__IJKSDL_ANDROID_H #ifndef IJKSDL__IJKSDL_ANDROID_H
#define IJKSDL_ANDROID__IJKSDL_ANDROID_H #define IJKSDL__IJKSDL_ANDROID_H
#include "ijksdl/ijksdl.h" #include "ijksdl.h"
#include "ijksdl_aout_android_audiotrack.h" #include "android/ijksdl_aout_android_audiotrack.h"
#include "ijksdl_vout_android_nativewindow.h" #include "android/ijksdl_vout_android_nativewindow.h"
#include "ijksdl_vout_android_surface.h" #include "android/ijksdl_vout_android_surface.h"
#endif #endif
# copyright (c) 2013 Zhang Rui <bbcallen@gmail.com>
#
# This file is part of ijkPlayer.
#
# ijkPlayer is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# ijkPlayer is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with ijkPlayer; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_CFLAGS += -std=c99
LOCAL_LDLIBS += -llog -landroid
LOCAL_C_INCLUDES += $(LOCAL_PATH)
LOCAL_C_INCLUDES += $(MY_APP_FFMPEG_INCLUDE_PATH)
LOCAL_C_INCLUDES += $(MY_APP_JNI_ROOT)
LOCAL_SRC_FILES += ijksdl_aout_android_audiotrack.c
LOCAL_SRC_FILES += android_audiotrack.c
LOCAL_SRC_FILES += ijksdl_vout_android_nativewindow.c
LOCAL_SRC_FILES += ijksdl_vout_android_surface.c
LOCAL_STATIC_LIBRARIES := ijksdl
LOCAL_SHARED_LIBRARIES := ffmpeg ijkutil_android
LOCAL_MODULE := ijksdl_android
include $(BUILD_SHARED_LIBRARY)
...@@ -31,6 +31,16 @@ LOCAL_MODULE := ijkutil_c ...@@ -31,6 +31,16 @@ LOCAL_MODULE := ijkutil_c
include $(BUILD_STATIC_LIBRARY) include $(BUILD_STATIC_LIBRARY)
#--------------------
# CPP files: android
#--------------------
include $(CLEAR_VARS)
LOCAL_SRC_FILES += android/jnihelp.cpp
LOCAL_MODULE := ijkutil_android_cpp
include $(BUILD_STATIC_LIBRARY)
#-------------------- #--------------------
# so # so
#-------------------- #--------------------
...@@ -38,6 +48,7 @@ include $(CLEAR_VARS) ...@@ -38,6 +48,7 @@ include $(CLEAR_VARS)
LOCAL_LDLIBS += -llog LOCAL_LDLIBS += -llog
LOCAL_STATIC_LIBRARIES := ijkutil_c LOCAL_STATIC_LIBRARIES := ijkutil_c
LOCAL_WHOLE_STATIC_LIBRARIES := ijkutil_android_cpp
LOCAL_MODULE := ijkutil LOCAL_MODULE := ijkutil
include $(BUILD_STATIC_LIBRARY) include $(BUILD_SHARED_LIBRARY)
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include <assert.h> #include <assert.h>
#define LOG_TAG "JNIHelp" #define LOG_TAG "JNIHelp"
#include "ijkutil/ijkutil.h" #include "../loghelp.h"
/** /**
* Equivalent to ScopedLocalRef, but for C_JNIEnv instead. (And slightly more powerful.) * Equivalent to ScopedLocalRef, but for C_JNIEnv instead. (And slightly more powerful.)
......
...@@ -21,11 +21,11 @@ ...@@ -21,11 +21,11 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#ifndef IJKUTIL_ANDROID__IJKUTIL_ANDROID_H #ifndef IJKUTIL__IJKUTIL_ANDROID_H
#define IJKUTIL_ANDROID__IJKUTIL_ANDROID_H #define IJKUTIL__IJKUTIL_ANDROID_H
#include "ijkutil/ijkutil.h" #include "ijkutil.h"
#include "jnihelp.h" #include "android/jnihelp.h"
#define JNI_CHECK_GOTO(condition__, env__, exception__, msg__, label__) \ #define JNI_CHECK_GOTO(condition__, env__, exception__, msg__, label__) \
do { \ do { \
......
# copyright (c) 2013 Zhang Rui <bbcallen@gmail.com>
#
# This file is part of ijkPlayer.
#
# ijkPlayer is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# ijkPlayer is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with ijkPlayer; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
LOCAL_PATH := $(call my-dir)
#--------------------
# so
#--------------------
include $(CLEAR_VARS)
LOCAL_C_INCLUDES += $(LOCAL_PATH)
LOCAL_C_INCLUDES += $(MY_APP_JNI_ROOT)
LOCAL_LDLIBS += -llog
LOCAL_SRC_FILES += jnihelp.cpp
LOCAL_STATIC_LIBRARIES := ijkutil
LOCAL_MODULE := ijkutil_android
include $(BUILD_SHARED_LIBRARY)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册