Commit 12881553 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Merge branch 'master' into dev_audio_bypass

parents 3a480a10 c01ab3c2
......@@ -21,6 +21,9 @@
############################################################################
find_library(LIBM NAMES m)
if(ANDROID)
find_library(ANDROID_CPU_FEATURES_LIBRARY NAMES cpufeatures)
endif()
if(MSVC AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone" AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
find_library(LIBGCC NAMES gcc)
......@@ -448,7 +451,11 @@ if(VOIP_SOURCE_FILES_ASM)
endif()
get_directory_property(DIRECTORY_PROPERTY_COMPILE_OPTIONS "COMPILE_OPTIONS")
string(REPLACE ";" " " DIRECTORY_PROPERTY_COMPILE_OPTIONS "${DIRECTORY_PROPERTY_COMPILE_OPTIONS}")
set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> ${CMAKE_CPP_FLAGS} ${CMAKE_C_FLAGS} ${DIRECTORY_PROPERTY_COMPILE_OPTIONS} ${ARCH_OPTIONS} -o <OBJECT> -c <SOURCE>")
set(CMAKE_ASM_TARGET_FLAG "")
if(CMAKE_C_COMPILER_TARGET)
set(CMAKE_ASM_TARGET_FLAG "--target=${CMAKE_C_COMPILER_TARGET}")
endif()
set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> ${CMAKE_ASM_TARGET_FLAG} ${CMAKE_CPP_FLAGS} ${CMAKE_C_FLAGS} ${DIRECTORY_PROPERTY_COMPILE_OPTIONS} ${ARCH_OPTIONS} -o <OBJECT> -c <SOURCE>")
enable_language(ASM)
endif()
......@@ -468,6 +475,9 @@ endif()
if(LIBM)
list(APPEND VOIP_LIBS ${LIBM})
endif()
if(ANDROID_CPU_FEATURES_LIBRARY)
list(APPEND VOIP_LIBS ${ANDROID_CPU_FEATURES_LIBRARY})
endif()
if(ANDROID AND ENABLE_VIDEO)
list(APPEND VOIP_LIBS GLESv2)
endif()
......
......@@ -604,12 +604,12 @@ bool AMediaFormat_getInt32(AMediaFormat *format, const char *name, int32_t *out)
if (mediaFormatClass==NULL){
ms_error("Couldn't find android/media/MediaFormat class !");
env->ExceptionClear(); //very important.
return NULL;
return false;
}
jmethodID setStringID = env->GetMethodID(mediaFormatClass,"getInteger","(Ljava/lang/String;)I");
if(format == NULL) {
ms_error("Format nul");
return AMEDIA_ERROR_BASE;
return false;
}
if (setStringID != NULL){
jstring jkey = env->NewStringUTF(name);
......@@ -620,10 +620,10 @@ bool AMediaFormat_getInt32(AMediaFormat *format, const char *name, int32_t *out)
ms_error("getInteger() not found in class format !");
env->ExceptionClear(); //very important.
env->DeleteLocalRef(mediaFormatClass);
return AMEDIA_ERROR_BASE;
return false;
}
env->DeleteLocalRef(mediaFormatClass);
return AMEDIA_OK;
return true;
}
void AMediaFormat_setInt32(AMediaFormat *format, const char* name, int32_t value){
......
......@@ -634,7 +634,7 @@ static void android_snd_write_cb(int event, void *user, void * p_info){
ms_bufferizer_skip_bytes(&ad->bf, avail - (ask * 2));
}
if (avail != 0) {
if ((ad->minBufferFilling == -1)) {
if (ad->minBufferFilling == -1) {
ad->minBufferFilling = avail;
} else if (avail < ad->minBufferFilling) {
ad->minBufferFilling = avail;
......
......@@ -772,7 +772,7 @@ static void opensles_player_callback(SLAndroidSimpleBufferQueueItf bq, void* con
}
if (avail != 0) {
if ((octx->minBufferFilling == -1)) {
if (octx->minBufferFilling == -1) {
octx->minBufferFilling = avail;
} else if (avail < octx->minBufferFilling) {
octx->minBufferFilling = avail;
......
......@@ -24,6 +24,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# define ELF @
#endif
#ifdef __clang__
# define FUNC @.func
# define ENDFUNC @.endfunc
#else
# define FUNC .func
# define ENDFUNC .endfunc
#endif
.macro require8 val=1
ELF .eabi_attribute 24, \val
.endm
......@@ -36,7 +44,7 @@ ELF .eabi_attribute 25, \val
.global \name
ELF .hidden \name
ELF .type \name, %function
.func \name
FUNC \name
\name:
.endm
......@@ -76,7 +84,7 @@ function ms_line_rgb2rgb565_4
bne 1b
pop {r4}
bx lr
.endfunc
ENDFUNC
/*void ms_line_rgb2rgb565_8 (const int16_t *r, const int16_t *g, const int16_t *b, uint16_t *dst, int width)*/
......@@ -97,7 +105,7 @@ function ms_line_rgb2rgb565_8
bne 1b
pop {r4}
bx lr
.endfunc
ENDFUNC
.macro load_pixels_4_2 d_reg1, d_reg2, src
add r12, \src, #2 /* offset to reach next pixels */
......@@ -157,7 +165,7 @@ function ms_line_scale_8
subs r3,r3,#8 /*we have processed 8 pixels, decrement width*/
bne 1b
pop {r4-r12,pc}
.endfunc
ENDFUNC
......@@ -199,7 +207,7 @@ function ms_line_scale_simple_8
bne 1b
pop {r4-r11}
bx lr
.endfunc
ENDFUNC
.if 0
......@@ -238,7 +246,7 @@ function line_yuv2rgb
/**/
pop {r4-r7}
bx lr
.endfunc
ENDFUNC
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment