提交 0b26f380 编写于 作者: Z Zhang Rui

ijksdl: fix build

上级 840063bf
......@@ -26,8 +26,22 @@ LOCAL_C_INCLUDES += $(LOCAL_PATH)
LOCAL_C_INCLUDES += $(MY_APP_FFMPEG_INCLUDE_PATH)
LOCAL_C_INCLUDES += $(MY_APP_JNI_ROOT)
LOCAL_SRC_FILES += $(notdir $(wildcard *.c))
LOCAL_SRC_FILES += $(notdir $(wildcard android/*.c))
LOCAL_SRC_FILES += ijksdl_aout.c
LOCAL_SRC_FILES += ijksdl_error.c
LOCAL_SRC_FILES += ijksdl_mutex.c
LOCAL_SRC_FILES += ijksdl_stdinc.c
LOCAL_SRC_FILES += ijksdl_thread.c
LOCAL_SRC_FILES += ijksdl_timer.c
LOCAL_SRC_FILES += ijksdl_vout_overlay_ffmpeg.c
LOCAL_SRC_FILES += ijksdl_vout.c
LOCAL_SRC_FILES += android/android_audiotrack.c
LOCAL_SRC_FILES += android/ijksdl_android_jni.c
LOCAL_SRC_FILES += android/ijksdl_aout_android_audiotrack.c
LOCAL_SRC_FILES += android/ijksdl_vout_android_nativewindow.c
LOCAL_SRC_FILES += android/ijksdl_vout_android_surface.c
LOCAL_SHARED_LIBRARIES := ffmpeg ijkutil
LOCAL_MODULE := ijksdl
include $(BUILD_SHARED_LIBRARY)
......@@ -25,6 +25,7 @@
#include <assert.h>
#include "ijkutil/ijkutil_android.h"
#include "../ijksdl_inc_internal.h"
#include "../ijksdl_audio.h"
typedef struct AudioChannelMapEntry {
......
......@@ -23,7 +23,7 @@
#include "ijksdl_android_jni.h"
#include "../ijksdl_stdinc.h"
#include "../ijksdl_inc_internal.h"
JavaVM *g_jvm;
......@@ -54,7 +54,7 @@ jint SDL_AndroidJni_DetachCurrentThread()
return (*jvm)->DetachCurrentThread(jvm);
}
jint JNI_OnLoad(JavaVM *vm, void *reserved)
JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *reserved)
{
JNIEnv* env = NULL;
......@@ -66,6 +66,6 @@ jint JNI_OnLoad(JavaVM *vm, void *reserved)
return JNI_VERSION_1_4;
}
void JNI_OnUnload(JavaVM *jvm, void *reserved)
JNIEXPORT void JNICALL JNI_OnUnload(JavaVM *jvm, void *reserved)
{
}
......@@ -26,9 +26,10 @@
#include <stdbool.h>
#include <assert.h>
#include <jni.h>
#include "ijkutil/ijkutil.h"
#include "../ijksdl_inc_internal.h"
#include "../ijksdl_thread.h"
#include "../ijksdl_aout_internal.h"
#include "ijksdl_android_jni.h"
#include "android_audiotrack.h"
typedef struct SDL_Aout_Opaque {
......@@ -84,10 +85,10 @@ int aout_thread_n(JNIEnv *env, SDL_Aout *aout)
int aout_thread(void *arg)
{
SDL_Aout *aout = arg;
SDL_Aout_Opaque *opaque = aout->opaque;
// SDL_Aout_Opaque *opaque = aout->opaque;
JNIEnv *env = NULL;
if (JNI_OK != SDL_AndroidJni_AttachCurrentThread(&env, NULL)) {
if (JNI_OK != SDL_AndroidJni_AttachCurrentThread(&env)) {
ALOGE("aout_thread: AttachCurrentThread: failed");
return -1;
}
......@@ -128,9 +129,9 @@ int aout_open_audio_n(JNIEnv *env, SDL_Aout *aout, SDL_AudioSpec *desired, SDL_A
int aout_open_audio(SDL_Aout *aout, SDL_AudioSpec *desired, SDL_AudioSpec *obtained)
{
SDL_Aout_Opaque *opaque = aout->opaque;
// SDL_Aout_Opaque *opaque = aout->opaque;
JNIEnv *env = NULL;
if (JNI_OK != SDL_AndroidJni_AttachCurrentThread(&env, NULL)) {
if (JNI_OK != SDL_AndroidJni_AttachCurrentThread(&env)) {
ALOGE("aout_open_audio: AttachCurrentThread: failed");
return -1;
}
......
......@@ -26,7 +26,7 @@
#include <assert.h>
#include <android/native_window.h>
#include "ijkutil/ijkutil.h"
#include "../ijksdl_ffinc.h"
#include "../ijksdl_inc_ffmpeg.h"
#include "../ijksdl_vout.h"
#include "../ijksdl_vout_internal.h"
......
......@@ -24,6 +24,8 @@
#include "ijksdl_vout_android_surface.h"
#include <android/native_window_jni.h>
#include "../ijksdl_inc_internal.h"
#include "ijksdl_android_jni.h"
#include "ijksdl_vout_android_nativewindow.h"
SDL_Vout *SDL_VoutAndroid_CreateForAndroidSurface()
......@@ -50,7 +52,7 @@ void SDL_VoutAndroid_SetAndroidSurface(SDL_Vout *vout, jobject android_surface)
return;
JNIEnv *env = NULL;
if (JNI_OK != SDL_AndroidJni_AttachCurrentThread(&env, NULL)) {
if (JNI_OK != SDL_AndroidJni_AttachCurrentThread(&env)) {
ALOGE("SDL_VoutAndroid_SetAndroidSurface: AttachCurrentThread: failed");
return;
}
......
......@@ -28,4 +28,6 @@
#include "libavcodec/avcodec.h"
#include "libswscale/swscale.h"
#include "ijksdl_inc_internal.h"
#endif
/*
* ijksdl_inc_internal.h
*
* 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
*/
#ifndef IJKPLAYER__IJKSDL_INC_INTERNAL_H
#define IJKPLAYER__IJKSDL_INC_INTERNAL_H
#include <stdint.h>
#define IJK_LOG_TAG "IJKSDL"
#include "ijkutil/ijkutil.h"
#include "ijksdl_stdinc.h"
#endif
......@@ -23,7 +23,7 @@
#include <errno.h>
#include <assert.h>
#include "ijkutil/ijkutil.h"
#include "ijksdl_inc_internal.h"
#include "ijksdl_thread.h"
static void *SDL_RunThread(void *data)
......
......@@ -23,7 +23,8 @@
#include "ijksdl_vout_overlay_ffmpeg.h"
#include "ijksdl_ffinc.h"
#include "ijksdl_stdinc.h"
#include "ijksdl_inc_ffmpeg.h"
#include "ijksdl_mutex.h"
#include "ijksdl_vout_internal.h"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册