Browse Source

fix. android native binding

matrixbirds 5 years ago
parent
commit
4f190f37f1

+ 44
- 0
android/CMakeLists.txt View File

1
+# For more information about using CMake with Android Studio, read the
2
+# documentation: https://d.android.com/studio/projects/add-native-code.html
3
+
4
+# Sets the minimum version of CMake required to build the native library.
5
+
6
+cmake_minimum_required(VERSION 3.4.1)
7
+
8
+# Creates and names a library, sets it as either STATIC
9
+# or SHARED, and provides the relative paths to its source code.
10
+# You can define multiple libraries, and CMake builds them for you.
11
+# Gradle automatically packages shared libraries with your APK.
12
+
13
+add_library( # Sets the name of the library.
14
+             apm-plugin-raw-data-api-java
15
+
16
+             # Sets the library as a shared library.
17
+             SHARED
18
+
19
+             # Provides a relative path to your source file(s).
20
+             src/main/cpp/src/agora_media_pre_processing.cpp )
21
+
22
+# Searches for a specified prebuilt library and stores the path as a
23
+# variable. Because CMake includes system libraries in the search path by
24
+# default, you only need to specify the name of the public NDK library
25
+# you want to add. CMake verifies that the library exists before
26
+# completing its build.
27
+
28
+find_library( # Sets the name of the path variable.
29
+              log-lib
30
+
31
+              # Specifies the name of the NDK library that
32
+              # you want CMake to locate.
33
+              log )
34
+
35
+# Specifies libraries CMake should link to your target library. You
36
+# can link multiple libraries, such as libraries you define in this
37
+# build script, prebuilt third-party libraries, or system libraries.
38
+
39
+target_link_libraries( # Specifies the target library.
40
+                       apm-plugin-raw-data-api-java
41
+
42
+                       # Links the target library to the log library
43
+                       # included in the NDK.
44
+                       ${log-lib} )

android/src/cpp/include/AgoraBase.h → android/src/main/cpp/include/AgoraBase.h View File


android/src/cpp/include/IAgoraMediaEngine.h → android/src/main/cpp/include/IAgoraMediaEngine.h View File


android/src/cpp/include/IAgoraRtcEngine.h → android/src/main/cpp/include/IAgoraRtcEngine.h View File


android/src/cpp/include/IAgoraService.h → android/src/main/cpp/include/IAgoraService.h View File


android/src/cpp/include/VMUtil.h → android/src/main/cpp/include/VMUtil.h View File


android/src/cpp/src/agora_media_pre_processing.cpp → android/src/main/cpp/src/agora_media_pre_processing.cpp View File


android/src/cpp/src/agora_media_pre_processing.h → android/src/main/cpp/src/agora_media_pre_processing.h View File


+ 2
- 0
lib/RtcEngine.native.d.ts View File

172
      * mediaMetaDataReceived | occurs when you received media meta data from the remote side through sendMediaData | on("mediaMetaDataReceived", evt) |
172
      * mediaMetaDataReceived | occurs when you received media meta data from the remote side through sendMediaData | on("mediaMetaDataReceived", evt) |
173
      * localUserRegistered | occurs when you register user account success | on("localUserRegistered", evt) |
173
      * localUserRegistered | occurs when you register user account success | on("localUserRegistered", evt) |
174
      * userInfoUpdated | occurs when you peer side using user account join channel | on("userInfoUpdated", evt) |
174
      * userInfoUpdated | occurs when you peer side using user account join channel | on("userInfoUpdated", evt) |
175
+     * receivedChannelMediaRelay | occurs when you received channel media relay | on('receivedChannelMediaRelay", evt)|
176
+     * mediaRelayStateChanged | occurs when you received remote media relay state changed | on('mediaRelayStateChanged", evt)|
175
      * ---
177
      * ---
176
      *
178
      *
177
      * @param eventType
179
      * @param eventType

+ 2
- 0
lib/RtcEngine.native.js View File

201
      * mediaMetaDataReceived | occurs when you received media meta data from the remote side through sendMediaData | on("mediaMetaDataReceived", evt) |
201
      * mediaMetaDataReceived | occurs when you received media meta data from the remote side through sendMediaData | on("mediaMetaDataReceived", evt) |
202
      * localUserRegistered | occurs when you register user account success | on("localUserRegistered", evt) |
202
      * localUserRegistered | occurs when you register user account success | on("localUserRegistered", evt) |
203
      * userInfoUpdated | occurs when you peer side using user account join channel | on("userInfoUpdated", evt) |
203
      * userInfoUpdated | occurs when you peer side using user account join channel | on("userInfoUpdated", evt) |
204
+     * receivedChannelMediaRelay | occurs when you received channel media relay | on('receivedChannelMediaRelay", evt)|
205
+     * mediaRelayStateChanged | occurs when you received remote media relay state changed | on('mediaRelayStateChanged", evt)|
204
      * ---
206
      * ---
205
      *
207
      *
206
      * @param eventType
208
      * @param eventType

+ 1
- 1
lib/RtcEngine.native.js.map
File diff suppressed because it is too large
View File


+ 3
- 1
src/RtcEngine.native.ts View File

50
      * @ignore AG_PREFIX
50
      * @ignore AG_PREFIX
51
      */ 
51
      */ 
52
     private static readonly AG_PREFIX: string = 'ag_rtc';
52
     private static readonly AG_PREFIX: string = 'ag_rtc';
53
-    
53
+
54
     /**
54
     /**
55
      * Creates a RtcEngine Object internal.
55
      * Creates a RtcEngine Object internal.
56
      *
56
      *
249
      * mediaMetaDataReceived | occurs when you received media meta data from the remote side through sendMediaData | on("mediaMetaDataReceived", evt) | 
249
      * mediaMetaDataReceived | occurs when you received media meta data from the remote side through sendMediaData | on("mediaMetaDataReceived", evt) | 
250
      * localUserRegistered | occurs when you register user account success | on("localUserRegistered", evt) |
250
      * localUserRegistered | occurs when you register user account success | on("localUserRegistered", evt) |
251
      * userInfoUpdated | occurs when you peer side using user account join channel | on("userInfoUpdated", evt) |
251
      * userInfoUpdated | occurs when you peer side using user account join channel | on("userInfoUpdated", evt) |
252
+     * receivedChannelMediaRelay | occurs when you received channel media relay | on('receivedChannelMediaRelay", evt)|
253
+     * mediaRelayStateChanged | occurs when you received remote media relay state changed | on('mediaRelayStateChanged", evt)|
252
      * ---
254
      * ---
253
      * 
255
      * 
254
      * @param eventType
256
      * @param eventType