Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update 4.3.1 to 2024.3.20 #61

Merged
merged 1 commit into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions headers/rtc_4.3.1/include/AgoraBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -1185,6 +1185,28 @@ enum VIDEO_CODEC_TYPE {
VIDEO_CODEC_GENERIC_JPEG = 20,
};

/**
* Camera focal length type.
*/
enum CAMERA_FOCAL_LENGTH_TYPE {
/**
* By default, there are no wide-angle and ultra-wide-angle properties.
*/
CAMERA_FOCAL_LENGTH_DEFAULT = 0,
/**
* Lens with focal length from 24mm to 35mm.
*/
CAMERA_FOCAL_LENGTH_WIDE_ANGLE = 1,
/**
* Lens with focal length of less than 24mm.
*/
CAMERA_FOCAL_LENGTH_URLTRA_WIDE = 2,
/**
* Telephoto lens.
*/
CAMERA_FOCAL_LENGTH_TELEPHOTO = 3,
};

/**
* The CC (Congestion Control) mode options.
*/
Expand Down Expand Up @@ -1776,6 +1798,14 @@ struct CodecCapInfo {
CodecCapInfo(): codecType(VIDEO_CODEC_NONE), codecCapMask(0) {}
};

/** FocalLengthInfo contains the IDs of the front and rear cameras, along with the wide-angle types. */
struct FocalLengthInfo {
/** The camera direction. */
int cameraDirection;
/** Camera focal segment type. */
CAMERA_FOCAL_LENGTH_TYPE focalLengthType;
};

/**
* The definition of the VideoEncoderConfiguration struct.
*/
Expand Down
44 changes: 44 additions & 0 deletions headers/rtc_4.3.1/include/IAgoraRtcEngine.h
Original file line number Diff line number Diff line change
Expand Up @@ -798,6 +798,16 @@ struct CameraCapturerConfiguration {
* The camera direction.
*/
CAMERA_DIRECTION cameraDirection;

/*- CAMERA_FOCAL_LENGTH_TYPE.CAMERA_FOCAL_LENGTH_DEFAULT:
For iOS, if iPhone/iPad has 3 or 2 back camera, it means combination of triple (wide + ultra wide + telephoto) camera
or dual wide(wide + ultra wide) camera.In this situation, you can apply for ultra wide len by set smaller zoom fator
and bigger zoom fator for telephoto len.Otherwise, it always means wide back/front camera.

- CAMERA_FOCAL_LENGTH_TYPE.CAMERA_FOCAL_LENGTH_WIDE_ANGLE:wide camera
- CAMERA_FOCAL_LENGTH_TYPE.CAMERA_FOCAL_LENGTH_URLTRA_WIDE:ultra wide camera
- CAMERA_FOCAL_LENGTH_TYPE.CAMERA_FOCAL_LENGTH_TELEPHOTO:telephoto camera*/
CAMERA_FOCAL_LENGTH_TYPE cameraFocalLengthType;
#else
/** For windows. The device ID of the playback device. The maximum length is #MAX_DEVICE_ID_LENGTH. */
char deviceId[MAX_DEVICE_ID_LENGTH];
Expand Down Expand Up @@ -2135,6 +2145,25 @@ class IRtcEngineEventHandler {
(void) vecDistance;
(void) numFaces;
}

#if defined(__ANDROID__)
/**
* When the actual configuration is different from the preset configuration, the callback is triggered.
*
* @param direction Camera orientation, front or back.
* @param focalLengthType The focal length of the camera, wide Angle, super wide Angle or ordinary lens.
* @param width Camera acquisition width.
* @param height Camera acquisition width.
* @param frameRate Camera acquisition frameRate.
*/
virtual void onCameraCapturerConfigurationChanged(int direction, int focalLengthType, int width, int height, int frameRate) {
(void)direction;
(void)focalLengthType;
(void)width;
(void)height;
(void)frameRate;
}
#endif // __ANDROID__
#endif
/**
* Occurs when the video stops playing.
Expand Down Expand Up @@ -7060,6 +7089,18 @@ class IRtcEngine : public agora::base::IEngineBase {
* - < 0: Failure..
*/
virtual int getAudioDeviceInfo(DeviceInfo& deviceInfo) = 0;
/**
* Query all focal attributes supported by the camera.
*
* @param focalLengthInfos The camera supports the collection of focal segments.
*
* @param size The camera supports the size of the focal segment set.
*
* @return
* - 0: Success.
* - < 0: Failure..
*/
virtual int queryCameraFocalLengthCapability(agora::rtc::FocalLengthInfo* focalLengthInfos, int& size) = 0;

#endif // __ANDROID__

Expand Down Expand Up @@ -7171,6 +7212,9 @@ class IRtcEngine : public agora::base::IEngineBase {
* - < 0: Failure.
*/
virtual int queryScreenCaptureCapability() = 0;
#if defined(__APPLE__) && TARGET_OS_IOS
virtual int queryCameraFocalLengthCapability(agora::rtc::FocalLengthInfo* focalLengthInfo, int& size) = 0;
#endif
#endif

#if defined(_WIN32) || defined(__APPLE__) || defined(__ANDROID__)
Expand Down
26 changes: 26 additions & 0 deletions headers/rtm_2.1.10/custom_headers/CustomIAgoraRtmClient.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#pragma once

#include "IAgoraStreamChannel.h"
#include "IAgoraRtmStorage.h"
#include "IAgoraRtmPresence.h"
#include "IAgoraRtmLock.h"
#include "AgoraRtmBase.h"
#include "IAgoraRtmClient.h"

namespace agora {
namespace rtm {
namespace ext {

class IRtmClient {
// ----------------------------- 👇🏻new API👇🏻 -----------------------------

// IRtmClient
//virtual int publish(const char* channelName, const char* message, const size_t length, const PublishOptions& option, uint64_t& requestId) = 0;
virtual int publishWithBuffer(const char* channelName, const unsigned char* message, const size_t length, const PublishOptions& option, uint64_t& requestId) = 0;

// ----------------------------- 👆🏻new API👆🏻 -----------------------------
};

} // namespace ext
} // namespace rtm
} // namespace agora
34 changes: 34 additions & 0 deletions headers/rtm_2.1.10/custom_headers/CustomIAgoraRtmStorage.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#pragma once

#include "AgoraRtmBase.h"
#include "IAgoraRtmStorage.h"

namespace agora {
namespace rtm {
namespace ext {

struct RtmMetadata {
// ----------------------------- 👇🏻new API👇🏻 -----------------------------
/**
* The key of the metadata item.
*/
const int64_t majorRevision;
/**
* The value of the metadata item.
*/
const MetadataItem* metadataItems;
/**
* The User ID of the user who makes the latest update to the metadata item.
*/
const uint64_t metadataItemsSize;

RtmMetadata() : majorRevision(-1),
metadataItems(NULL),
metadataItemsSize(NULL) {}

// ----------------------------- 👆🏻new API👆🏻 -----------------------------
};

} // namespace ext
} // namespace rtm
} // namespace agora
22 changes: 22 additions & 0 deletions headers/rtm_2.1.10/custom_headers/CustomIAgoraStreamChannel.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#pragma once

#include "AgoraRtmBase.h"
#include "IAgoraStreamChannel.h"

namespace agora {
namespace rtm {
namespace ext {

class IStreamChannel {
// ----------------------------- 👇🏻new API👇🏻 -----------------------------

// IStreamChannel
//virtual int publishTopicMessage(const char* topic, const char* message, size_t length, const PublishOptions& option) = 0;
virtual int publishTopicMessageWithBuffer(const char* topic, const unsigned char* message, size_t length, const PublishOptions& option) = 0;

// ----------------------------- 👆🏻new API👆🏻 -----------------------------
};

} // namespace ext
} // namespace rtm
} // namespace agora
Loading
Loading