Skip to content

Commit

Permalink
update sdk heads to 4.3.0-20231205 (#22)
Browse files Browse the repository at this point in the history
Co-authored-by: 夏羊群 <[email protected]>
  • Loading branch information
xiayangqun and 夏羊群 authored Dec 5, 2023
1 parent e30513c commit 2d4684f
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 13 deletions.
19 changes: 13 additions & 6 deletions headers/rtc_4.3.0/include/AgoraBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@

#if defined(AGORARTC_EXPORT)
#define AGORA_API extern "C" __declspec(dllexport)
#define AGORA_CPP_API __declspec(dllexport)
#else
#define AGORA_API extern "C" __declspec(dllimport)
#define AGORA_CPP_API __declspec(dllimport)
#endif // AGORARTC_EXPORT

#define AGORA_CALL __cdecl
Expand All @@ -46,18 +48,21 @@
#include <TargetConditionals.h>

#define AGORA_API extern "C" __attribute__((visibility("default")))
#define AGORA_CPP_API __attribute__((visibility("default")))
#define AGORA_CALL

#elif defined(__ANDROID__) || defined(__linux__)

#define AGORA_API extern "C" __attribute__((visibility("default")))
#define AGORA_CPP_API __attribute__((visibility("default")))
#define AGORA_CALL

#define __deprecated

#else // !_WIN32 && !__APPLE__ && !(__ANDROID__ || __linux__)

#define AGORA_API extern "C"
#define AGORA_CPP_API
#define AGORA_CALL

#define __deprecated
Expand Down Expand Up @@ -1263,7 +1268,7 @@ struct SenderOptions {

SenderOptions()
: ccMode(CC_ENABLED),
codecType(VIDEO_CODEC_H264),
codecType(VIDEO_CODEC_H265),
targetBitrate(6500) {}
};

Expand Down Expand Up @@ -1599,7 +1604,7 @@ struct EncodedVideoFrameInfo {
*/
uid_t uid;
/**
* The codec type of the local video stream. See #VIDEO_CODEC_TYPE. The default value is `VIDEO_CODEC_H264 (2)`.
* The codec type of the local video stream. See #VIDEO_CODEC_TYPE. The default value is `VIDEO_CODEC_H265 (3)`.
*/
VIDEO_CODEC_TYPE codecType;
/**
Expand Down Expand Up @@ -1873,7 +1878,7 @@ struct VideoEncoderConfiguration {
AdvanceOptions advanceOptions;

VideoEncoderConfiguration(const VideoDimensions& d, int f, int b, ORIENTATION_MODE m, VIDEO_MIRROR_MODE_TYPE mirror = VIDEO_MIRROR_MODE_DISABLED)
: codecType(VIDEO_CODEC_H264),
: codecType(VIDEO_CODEC_H265),
dimensions(d),
frameRate(f),
bitrate(b),
Expand All @@ -1883,7 +1888,7 @@ struct VideoEncoderConfiguration {
mirrorMode(mirror),
advanceOptions(PREFER_AUTO, PREFER_LOW_LATENCY) {}
VideoEncoderConfiguration(int width, int height, int f, int b, ORIENTATION_MODE m, VIDEO_MIRROR_MODE_TYPE mirror = VIDEO_MIRROR_MODE_DISABLED)
: codecType(VIDEO_CODEC_H264),
: codecType(VIDEO_CODEC_H265),
dimensions(width, height),
frameRate(f),
bitrate(b),
Expand All @@ -1903,7 +1908,7 @@ struct VideoEncoderConfiguration {
mirrorMode(config.mirrorMode),
advanceOptions(config.advanceOptions) {}
VideoEncoderConfiguration()
: codecType(VIDEO_CODEC_H264),
: codecType(VIDEO_CODEC_H265),
dimensions(FRAME_WIDTH_960, FRAME_HEIGHT_540),
frameRate(FRAME_RATE_FPS_15),
bitrate(STANDARD_BITRATE),
Expand Down Expand Up @@ -3040,7 +3045,7 @@ enum REMOTE_USER_STATE {
struct VideoTrackInfo {
VideoTrackInfo()
: isLocal(false), ownerUid(0), trackId(0), channelId(OPTIONAL_NULLPTR)
, streamType(VIDEO_STREAM_HIGH), codecType(VIDEO_CODEC_H264)
, streamType(VIDEO_STREAM_HIGH), codecType(VIDEO_CODEC_H265)
, encodedFrameOnly(false), sourceType(VIDEO_SOURCE_CAMERA_PRIMARY)
, observationPosition(agora::media::base::POSITION_POST_CAPTURER) {}
/**
Expand Down Expand Up @@ -6121,6 +6126,8 @@ struct VideoLayout
* 0 for normal video , 1 for placeholder image showed , 2 for black image.
*/
uint32_t videoState;

VideoLayout() : channelId(OPTIONAL_NULLPTR), uid(0), strUid(OPTIONAL_NULLPTR), x(0), y(0), width(0), height(0), videoState(0) {}
};
} // namespace agora

Expand Down
10 changes: 7 additions & 3 deletions headers/rtc_4.3.0/include/AgoraMediaBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,10 @@ struct ContentInspectModule {
*/
struct ContentInspectConfig {
const char* extraInfo;

/**
* The specific server configuration for image moderation. Please contact technical support.
*/
const char* serverConfig;
/**The content inspect modules, max length of modules is 32.
* the content(snapshot of send video stream, image) can be used to max of 32 types functions.
*/
Expand All @@ -305,11 +308,12 @@ struct ContentInspectConfig {
ContentInspectConfig& operator=(const ContentInspectConfig& rth)
{
extraInfo = rth.extraInfo;
serverConfig = rth.serverConfig;
moduleCount = rth.moduleCount;
memcpy(&modules, &rth.modules, MAX_CONTENT_INSPECT_MODULE_COUNT * sizeof(ContentInspectModule));
return *this;
}
ContentInspectConfig() :extraInfo(NULL), moduleCount(0){}
ContentInspectConfig() :extraInfo(NULL), serverConfig(NULL), moduleCount(0){}
};

namespace base {
Expand Down Expand Up @@ -1528,7 +1532,7 @@ enum MediaRecorderStreamType {
*/
enum RecorderState {
/**
* -1: An error occurs during the recording. See RecorderErrorCode for the reason.
* -1: An error occurs during the recording. See RecorderReasonCode for the reason.
*/
RECORDER_STATE_ERROR = -1,
/**
Expand Down
6 changes: 2 additions & 4 deletions headers/rtc_4.3.0/include/IAgoraRtcEngine.h
Original file line number Diff line number Diff line change
Expand Up @@ -3488,14 +3488,12 @@ class IRtcEngine : public agora::base::IEngineBase {
* @param sync Determines whether this method is a synchronous call.
* - `true`: This method is a synchronous call, which means that the result of this method call
* returns after the IRtcEngine object resources are released. Do not call this method
* in any callback generated by the SDK, or it may result in a deadlock. The SDK automatically
* detects the deadlock and turns this method into an asynchronous call, but the test itself takes
* extra time.
* in any callback generated by the SDK, or it may result in a deadlock.
* - `false`: This method is an asynchronous call. The result returns immediately even when the
* IRtcEngine object resources are not released.
*
*/
virtual void release(bool sync = false) = 0;
AGORA_CPP_API static void release(bool sync = false);

/**
* Initializes `IRtcEngine`.
Expand Down

0 comments on commit 2d4684f

Please sign in to comment.