Skip to content

Commit da44dcb

Browse files
author
zhangwei
committed
[Android] Update .h file. fixs NMS-26670.
1 parent 19d2fea commit da44dcb

38 files changed

Lines changed: 3824 additions & 1293 deletions

Android/APIExample/agora-simple-filter/src/main/cpp/AgoraRtcKit/AgoraBase.h

Lines changed: 752 additions & 150 deletions
Large diffs are not rendered by default.

Android/APIExample/agora-simple-filter/src/main/cpp/AgoraRtcKit/AgoraExtensions.h

Lines changed: 501 additions & 0 deletions
Large diffs are not rendered by default.

Android/APIExample/agora-simple-filter/src/main/cpp/AgoraRtcKit/AgoraMediaBase.h

Lines changed: 72 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -306,73 +306,6 @@ enum MEDIA_SOURCE_TYPE {
306306
*/
307307
UNKNOWN_MEDIA_SOURCE = 100
308308
};
309-
/** Definition of contentinspect
310-
*/
311-
#define MAX_CONTENT_INSPECT_MODULE_COUNT 32
312-
enum CONTENT_INSPECT_RESULT {
313-
CONTENT_INSPECT_NEUTRAL = 1,
314-
CONTENT_INSPECT_SEXY = 2,
315-
CONTENT_INSPECT_PORN = 3,
316-
};
317-
318-
enum CONTENT_INSPECT_TYPE {
319-
/**
320-
* (Default) content inspect type invalid
321-
*/
322-
CONTENT_INSPECT_INVALID = 0,
323-
/**
324-
* @deprecated
325-
* Content inspect type moderation
326-
*/
327-
CONTENT_INSPECT_MODERATION __deprecated = 1,
328-
/**
329-
* Content inspect type supervise
330-
*/
331-
CONTENT_INSPECT_SUPERVISION = 2,
332-
/**
333-
* Content inspect type image moderation
334-
*/
335-
CONTENT_INSPECT_IMAGE_MODERATION = 3
336-
};
337-
338-
struct ContentInspectModule {
339-
/**
340-
* The content inspect module type.
341-
*/
342-
CONTENT_INSPECT_TYPE type;
343-
/**The content inspect frequency, default is 0 second.
344-
* the frequency <= 0 is invalid.
345-
*/
346-
unsigned int interval;
347-
ContentInspectModule() {
348-
type = CONTENT_INSPECT_INVALID;
349-
interval = 0;
350-
}
351-
};
352-
/** Definition of ContentInspectConfig.
353-
*/
354-
struct ContentInspectConfig {
355-
const char* extraInfo;
356-
/**
357-
* The specific server configuration for image moderation. Please contact technical support.
358-
*/
359-
const char* serverConfig;
360-
/**The content inspect modules, max length of modules is 32.
361-
* the content(snapshot of send video stream, image) can be used to max of 32 types functions.
362-
*/
363-
ContentInspectModule modules[MAX_CONTENT_INSPECT_MODULE_COUNT];
364-
/**The content inspect module count.
365-
*/
366-
int moduleCount;
367-
ContentInspectConfig& operator=(const ContentInspectConfig& rth) {
368-
extraInfo = rth.extraInfo;
369-
serverConfig = rth.serverConfig;
370-
moduleCount = rth.moduleCount;
371-
memcpy(&modules, &rth.modules, MAX_CONTENT_INSPECT_MODULE_COUNT * sizeof(ContentInspectModule));
372-
return *this;
373-
}
374-
ContentInspectConfig() : extraInfo(NULL), serverConfig(NULL), moduleCount(0) {}
375-
};
376309

377310
namespace base {
378311

@@ -1215,6 +1148,78 @@ enum VIDEO_MODULE_POSITION {
12151148

12161149
} // namespace base
12171150

1151+
/** Definition of contentinspect
1152+
*/
1153+
#define MAX_CONTENT_INSPECT_MODULE_COUNT 32
1154+
enum CONTENT_INSPECT_RESULT {
1155+
CONTENT_INSPECT_NEUTRAL = 1,
1156+
CONTENT_INSPECT_SEXY = 2,
1157+
CONTENT_INSPECT_PORN = 3,
1158+
};
1159+
1160+
enum CONTENT_INSPECT_TYPE {
1161+
/**
1162+
* (Default) content inspect type invalid
1163+
*/
1164+
CONTENT_INSPECT_INVALID = 0,
1165+
/**
1166+
* @deprecated
1167+
* Content inspect type moderation
1168+
*/
1169+
CONTENT_INSPECT_MODERATION __deprecated = 1,
1170+
/**
1171+
* Content inspect type supervise
1172+
*/
1173+
CONTENT_INSPECT_SUPERVISION = 2,
1174+
/**
1175+
* Content inspect type image moderation
1176+
*/
1177+
CONTENT_INSPECT_IMAGE_MODERATION = 3
1178+
};
1179+
1180+
struct ContentInspectModule {
1181+
/**
1182+
* The content inspect module type.
1183+
*/
1184+
CONTENT_INSPECT_TYPE type;
1185+
/**The content inspect frequency, default is 0 second.
1186+
* the frequency <= 0 is invalid.
1187+
*/
1188+
unsigned int interval;
1189+
/**
1190+
* The position of the video observation. See VIDEO_MODULE_POSITION.
1191+
*/
1192+
base::VIDEO_MODULE_POSITION position;
1193+
ContentInspectModule() {
1194+
type = CONTENT_INSPECT_INVALID;
1195+
interval = 0;
1196+
position = base::POSITION_PRE_ENCODER;
1197+
}
1198+
};
1199+
/** Definition of ContentInspectConfig.
1200+
*/
1201+
struct ContentInspectConfig {
1202+
const char* extraInfo;
1203+
/**
1204+
* The specific server configuration for image moderation. Please contact technical support.
1205+
*/
1206+
const char* serverConfig;
1207+
/**The content inspect modules, max length of modules is 32.
1208+
* the content(snapshot of send video stream, image) can be used to max of 32 types functions.
1209+
*/
1210+
ContentInspectModule modules[MAX_CONTENT_INSPECT_MODULE_COUNT];
1211+
/**The content inspect module count.
1212+
*/
1213+
int moduleCount;
1214+
ContentInspectConfig& operator=(const ContentInspectConfig& rth) {
1215+
extraInfo = rth.extraInfo;
1216+
serverConfig = rth.serverConfig;
1217+
moduleCount = rth.moduleCount;
1218+
memcpy(&modules, &rth.modules, MAX_CONTENT_INSPECT_MODULE_COUNT * sizeof(ContentInspectModule));
1219+
return *this;
1220+
}
1221+
ContentInspectConfig() : extraInfo(NULL), serverConfig(NULL), moduleCount(0) {}
1222+
};
12181223
/** Definition of SnapshotConfig.
12191224
*/
12201225
struct SnapshotConfig {

Android/APIExample/agora-simple-filter/src/main/cpp/AgoraRtcKit/IAgoraMediaPlayerSource.h

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,9 @@ class IMediaPlayerSource : public RefCountInterface {
273273
* Open the Agora CDN media source.
274274
* @param src The src of the media file that you want to play.
275275
* @param startPos The playback position (ms).
276+
*
277+
* @deprecated 4.6.0
278+
*
276279
* @return
277280
* - 0: Success.
278281
* - < 0: Failure.
@@ -281,6 +284,9 @@ class IMediaPlayerSource : public RefCountInterface {
281284

282285
/**
283286
* Gets the number of Agora CDN lines.
287+
*
288+
* @deprecated 4.6.0
289+
*
284290
* @return
285291
* - > 0: number of CDN.
286292
* - <= 0: Failure.
@@ -290,6 +296,9 @@ class IMediaPlayerSource : public RefCountInterface {
290296

291297
/**
292298
* Switch Agora CDN lines.
299+
*
300+
* @deprecated 4.6.0
301+
*
293302
* @param index Specific CDN line index.
294303
* @return
295304
* - 0: Success.
@@ -299,6 +308,9 @@ class IMediaPlayerSource : public RefCountInterface {
299308

300309
/**
301310
* Gets the line of the current CDN.
311+
*
312+
* @deprecated 4.6.0
313+
*
302314
* @return
303315
* - >= 0: Specific line.
304316
* - < 0: Failure.
@@ -307,6 +319,9 @@ class IMediaPlayerSource : public RefCountInterface {
307319

308320
/**
309321
* Enable automatic CDN line switching.
322+
*
323+
* @deprecated 4.6.0
324+
*
310325
* @param enable Whether enable.
311326
* @return
312327
* - 0: Success.
@@ -316,6 +331,9 @@ class IMediaPlayerSource : public RefCountInterface {
316331

317332
/**
318333
* Update the CDN source token and timestamp.
334+
*
335+
* @deprecated 4.6.0
336+
*
319337
* @param token token.
320338
* @param ts ts.
321339
* @return
@@ -326,6 +344,9 @@ class IMediaPlayerSource : public RefCountInterface {
326344

327345
/**
328346
* Switch the CDN source when open a media through "openWithAgoraCDNSrc" API
347+
*
348+
* @deprecated 4.6.0
349+
*
329350
* @param src Specific src.
330351
* @param syncPts Live streaming must be set to false.
331352
* @return
@@ -444,6 +465,9 @@ class IMediaPlayerSourceObserver {
444465

445466
/**
446467
* @brief AgoraCDN Token has expired and needs to be set up with renewAgoraCDNSrcToken(const char* src).
468+
*
469+
* @deprecated 4.6.0
470+
*
447471
*/
448472
virtual void onAgoraCDNTokenWillExpire() = 0;
449473

Android/APIExample/agora-simple-filter/src/main/cpp/AgoraRtcKit/IAgoraMediaStreamingSource.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ class IMediaStreamingSourceObserver;
2323

2424
/**
2525
* @brief The error code of streaming source
26+
*
27+
* @deprecated Since version 4.6.0, this feature has been turned off by default.
2628
*
2729
*/
2830
enum STREAMING_SRC_ERR {
@@ -54,6 +56,8 @@ enum STREAMING_SRC_ERR {
5456

5557
/**
5658
* @brief The state machine of Streaming Source
59+
*
60+
* @deprecated Since version 4.6.0, this feature has been turned off by default.
5761
*
5862
*/
5963
enum STREAMING_SRC_STATE {
@@ -69,6 +73,8 @@ enum STREAMING_SRC_STATE {
6973

7074
/**
7175
* @brief The input SEI data
76+
*
77+
* @deprecated Since version 4.6.0, this feature has been turned off by default.
7278
*
7379
*/
7480
struct InputSeiData {
@@ -85,6 +91,8 @@ struct InputSeiData {
8591
* @brief The IMediaStreamingSource class provides access to a media streaming source demuxer.
8692
* To playout multiple stream sources simultaneously,
8793
* create multiple media stream source objects.
94+
*
95+
* @deprecated Since version 4.6.0, this feature has been turned off by default.
8896
*/
8997
class IMediaStreamingSource : public RefCountInterface {
9098
public:
@@ -270,6 +278,8 @@ class IMediaStreamingSource : public RefCountInterface {
270278

271279
/**
272280
* @brief This observer interface of media streaming source
281+
*
282+
* @deprecated Since version 4.6.0, this feature has been turned off by default.
273283
*/
274284
class IMediaStreamingSourceObserver {
275285
public:

Android/APIExample/agora-simple-filter/src/main/cpp/AgoraRtcKit/IAgoraService.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,7 @@ class IAgoraService {
752752
const rtc::SenderOptions& options,
753753
const char* id = OPTIONAL_NULLPTR) = 0;
754754

755-
#if defined(__ANDROID__) || (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE)
755+
#if defined(__ANDROID__) || (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE) || defined(__OHOS__)
756756
/**
757757
* Creates a local video track object with a screen capture source extension and returns the pointer.
758758
*
@@ -917,7 +917,7 @@ class IAgoraService {
917917
*/
918918
virtual const char* getExtensionId(const char* provider_name, const char* extension_name) = 0;
919919

920-
#if defined (_WIN32) || defined(__linux__) || defined(__ANDROID__)
920+
#if defined (_WIN32) || defined(__linux__) || defined(__ANDROID__)
921921
/**
922922
* @brief load the dynamic library of the extension
923923
*
@@ -1019,4 +1019,4 @@ class IAgoraService {
10191019
* - A null pointer: Failure.
10201020
*/
10211021
AGORA_API agora::base::IAgoraService* AGORA_CALL createAgoraService();
1022-
/** @} */
1022+
/** @} */

Android/APIExample/agora-simple-filter/src/main/cpp/AgoraRtcKit/NGIAgoraAudioDeviceManager.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ static const int kAdmMaxGuidSize = 128;
2525
static const int kIntervalInMillseconds = 200;
2626

2727

28-
#if defined(_WIN32) || (defined(__APPLE__) && TARGET_OS_MAC && !TARGET_OS_IPHONE)
28+
#if defined(_WIN32) || (defined(__APPLE__) && TARGET_OS_MAC && !TARGET_OS_IPHONE) || defined(__linux__)
2929
/**
3030
* The struct of AudioDeviceInfo.
3131
*
3232
* @note
33-
* This struct applies to Windows and macOS only.
33+
* This struct applies to Windows,macOS and Linux.
3434
*/
3535
struct AudioDeviceInfo {
3636
/**
@@ -299,7 +299,7 @@ class INGAudioDeviceManager : public RefCountInterface {
299299
*/
300300
virtual int getRecordAudioParameters(AudioParameters* params) const = 0;
301301

302-
#if defined(__ANDROID__) || (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE)
302+
#if defined(__ANDROID__) || (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE) || defined (__OHOS__)
303303
/**
304304
* Sets the default audio routing.
305305
*
@@ -352,9 +352,9 @@ class INGAudioDeviceManager : public RefCountInterface {
352352
* - < 0: Failure.
353353
*/
354354
virtual int getCurrentRouting(AudioRoute& route) = 0;
355-
#endif // __ANDROID__ || TARGET_OS_IPHONE
355+
#endif // __ANDROID__ || TARGET_OS_IPHONE || __OHOS__
356356

357-
#if defined(_WIN32) || (defined(__APPLE__) && TARGET_OS_MAC && !TARGET_OS_IPHONE)
357+
#if defined(_WIN32) || (defined(__APPLE__) && TARGET_OS_MAC && !TARGET_OS_IPHONE) || defined(__linux__)
358358
/**
359359
* Gets the index numbers of all audio playout devices.
360360
*

0 commit comments

Comments
 (0)