forked from VoiSmart/pjsip-android-builder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
openh264-1.0.0-android21.patch
118 lines (111 loc) · 4.13 KB
/
openh264-1.0.0-android21.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
diff --git a/README.md b/README.md
index 6404d7dd92934cecd6e48f15adf4b90c205d9284..6e441576789ffe457bd1938052d65271459e492f 100644
--- a/README.md
+++ b/README.md
@@ -67,11 +67,10 @@ Valid **ANDROID_TARGET** can be found in **ANDROID_SDK**/platforms, such as andr
You can also set ARCH, NDKLEVEL, GCCVERSION according to your device and NDK version.
ARCH specifies the architecture of android device. Currently only arm and x86 are supported, the default is arm.
NDKLEVEL specifies android api level, the api level can be 12-19, the default is 12.
-GCCVERSION specifies which gcc in NDK is used, the default is 4.8.
By default these commands build for the armeabi-v7a ABI. To build for the other android
-ABIs, add "ARCH=mips" or "ARCH=x86". To build for the older armeabi ABI (which has
-armv5te as baseline), add "APP_ABI=armeabi" (ARCH=arm is implicit).
+ABIs, add "ARCH=arm64", "ARCH=x86", "ARCH=x86_64", "ARCH=mips" or "ARCH=mips64".
+To build for the older armeabi ABI (which has armv5te as baseline), add "APP_ABI=armeabi" (ARCH=arm is implicit).
For iOS Builds
--------------
diff --git a/build/platform-android.mk b/build/platform-android.mk
index 5ae754a0b0ba7d102f7791d9d28dabe42eb6e7a0..3d76cb1a57ad7cc428ca5e6ccd2d901c09bd5946 100644
--- a/build/platform-android.mk
+++ b/build/platform-android.mk
@@ -12,13 +12,20 @@ ifeq ($(ARCH), arm)
ifeq (Yes, $(USE_ASM))
ASMFLAGS += -march=armv7-a -mfpu=neon
endif
+else ifeq ($(ARCH), arm64)
+ APP_ABI = arm64-v8a
else ifeq ($(ARCH), x86)
- APP_ABI = x86
+ APP_ABI = x86
ifeq (Yes, $(USE_ASM))
ASMFLAGS += -f elf32
endif
+else ifeq ($(ARCH), x86_64)
+ APP_ABI = x86_64
+ ifeq (Yes, $(USE_ASM))
+ ASMFLAGS += -f elf64
+ endif
else
- APP_ABI = $(ARCH)
+ APP_ABI = $(ARCH)
endif
ifndef NDKROOT
diff --git a/codec/common/inc/crt_util_safe_x.h b/codec/common/inc/crt_util_safe_x.h
index 4d0d18715f139b3eca0a0b0ca43cb24a2582f030..f607c136ff411b1c8b44a487efa0bba322b6fbef 100644
--- a/codec/common/inc/crt_util_safe_x.h
+++ b/codec/common/inc/crt_util_safe_x.h
@@ -52,7 +52,6 @@
#include <sys/types.h>
#include <sys/timeb.h>
#else
-#include <sys/timeb.h>
#include <sys/time.h>
#include "typedefs.h"
#endif//_WIN32
@@ -72,7 +71,10 @@ typedef FILE WelsFileHandle;
#ifdef _WIN32
typedef struct _timeb SWelsTime;
#else
-typedef struct timeb SWelsTime;
+typedef struct TagWelsTime {
+ time_t time;
+ unsigned short millitm;
+} SWelsTime;
#endif
int32_t WelsSnprintf (char* buffer, int32_t sizeOfBuffer, const char* format, ...);
diff --git a/codec/common/inc/measure_time.h b/codec/common/inc/measure_time.h
index 86b820a2d04e77702fefd473872acc9038567c5e..c1baa041a94df5808113a8c48caa443b5c187d56 100644
--- a/codec/common/inc/measure_time.h
+++ b/codec/common/inc/measure_time.h
@@ -47,7 +47,6 @@
#include <sys/time.h>
#else
#include <windows.h>
-#include <sys/timeb.h>
#endif
#include <time.h>
diff --git a/codec/common/src/crt_util_safe_x.cpp b/codec/common/src/crt_util_safe_x.cpp
index 4967840a1d4990882395526213c3053c1b3ada55..a6dea9cde774ddc7bc9b033c0d3cbaf46ba46687 100644
--- a/codec/common/src/crt_util_safe_x.cpp
+++ b/codec/common/src/crt_util_safe_x.cpp
@@ -51,7 +51,6 @@
#endif //!_MSC_VER
#else
#include <sys/time.h>
-#include <sys/timeb.h>
#endif //_WIN32
#include "macros.h"
diff --git a/codec/decoder/plus/src/welsDecoderExt.cpp b/codec/decoder/plus/src/welsDecoderExt.cpp
index 9ebf9c1d695679e53ff01ff75dbccad8e2e417e3..cf78638a66e3e0f881f27b3949f26bd1891450ac 100644
--- a/codec/decoder/plus/src/welsDecoderExt.cpp
+++ b/codec/decoder/plus/src/welsDecoderExt.cpp
@@ -65,7 +65,6 @@ extern "C" {
#include <stdio.h>
#include <stdarg.h>
#include <sys/types.h>
-#include <sys/timeb.h>
#else
#include <sys/time.h>
#endif
diff --git a/codec/encoder/plus/src/welsEncoderExt.cpp b/codec/encoder/plus/src/welsEncoderExt.cpp
index 26c97af417e27cdbee55e1fa4e7e88a34e5d3393..2278c1ce2d9257eb4c0dec0f66bf7a7ce85893e9 100644
--- a/codec/encoder/plus/src/welsEncoderExt.cpp
+++ b/codec/encoder/plus/src/welsEncoderExt.cpp
@@ -48,7 +48,6 @@
#include <stdio.h>
#include <stdarg.h>
#include <sys/types.h>
-#include <sys/timeb.h>
#else
#include <sys/time.h>
#endif