| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536 |
- #import <Foundation/Foundation.h>
- #import "ZMVideoSDKDef.h"
- #import "ZMVideoSDKVideoCanvas.h"
- NS_ASSUME_NONNULL_BEGIN
- /**
- @brief ZMVideoSDKVideoStatus provides information on the user's video device (the detected compatible video camera device), and status (whether video is turned on or off).
- */
- @interface ZMVideoSDKVideoStatus : NSObject
- /**
- @brief Query if the user's device has a compatible camera. YES : compatible camera detected, NO : no compatible camera detected.
- */
- @property (nonatomic, assign, readonly) BOOL isHasVideoDevice;
-
- /**
- @brief Query if the camera is turned on. YES : camera turned on, NO : camera turned off.
- */
- @property (nonatomic, assign, readonly) BOOL isOn;
- @end
- /**
- @brief Audio status interface.
- */
- @interface ZMVideoSDKAudioStatus : NSObject
-
- /**
- @brief Get audio type: VOIP (Voice over IP), Telephony, or None.
- */
- @property (nonatomic, assign, readonly) ZMVideoSDKAudioType audioType;
-
- /**
- @brief Determine whether the audio is muted.
- */
- @property (nonatomic, assign, readonly) BOOL isMuted;
-
- /**
- @brief Determine whether the user is talking.
- */
- @property (nonatomic, assign, readonly) BOOL isTalking;
- @end
- /**
- @brief Video statistic information interface.
- */
- @interface ZMVideoSDKVideoStatisticInfo : NSObject
- /**
- @brief Get the width of video data size.
- */
- @property (nonatomic, assign, readonly) int width;
-
- /**
- @brief Get the height of video data size.
- */
- @property (nonatomic, assign, readonly) int height;
-
- /**
- @brief Get video fps.
- */
- @property (nonatomic, assign, readonly) int fps;
-
- /**
- @brief Get video Bpf.
- */
- @property (nonatomic, assign, readonly) int bpf;
- /**
- @brief Get video network status.
- */
- @property (nonatomic, assign, readonly) ZMVideoSDKNetworkStatus videoNetworkStatus;
- @end
- /**
- @brief Share statistic infomation interface.
- */
- @interface ZMVideoSDKShareStatisticInfo : NSObject
- /**
- @brief Get the width of share data size.
- @return The value is width of share data size.
- */
- @property (nonatomic, assign, readonly) int width;
-
- /**
- @brief Get the height of share data size.
- @return The value is height of share data size.
- */
- @property (nonatomic, assign, readonly) int height;
-
- /**
- @brief Get share fps.
- @return The value is fps of share.
- */
- @property (nonatomic, assign, readonly) int fps;
-
- /**
- @brief Get share Bpf.
- @return The value is Bpf of share.
- */
- @property (nonatomic, assign, readonly) int bpf;
- @end
- /**
- @brief YUV raw data 420 infomation interface.
- */
- @interface ZMVideoSDKYUVRawDataI420 : NSObject
- /**
- @brief Get the YUVI420 Y buffer. The Y component represents the luma or brightness values.
- */
- @property (nonatomic, assign, readonly) char* yBuffer;
- /**
- @brief Get the YUVI420 U buffer. The U component represents the chroma values.
- */
- @property (nonatomic, assign, readonly) char* uBuffer;
- /**
- @brief Get the YUVI420 V buffer. The V component represents the chroma values.
- */
- @property (nonatomic, assign, readonly) char* vBuffer;
- /**
- @brief The buffer data.
- */
- @property (nonatomic, assign, readonly) char* buffer;
- /**
- @brief The buffer length of this data.
- */
- @property (nonatomic, assign, readonly) unsigned int bufferLen;
- /**
- @brief Get if this data is limited I420 format.
- @return If is limited I420 format, it will return YES. Otherwise NO.
- */
- @property (nonatomic, assign, readonly) BOOL isLimitedI420;
- /**
- @brief Query stream width.
- @return If the function succeeds, it will return the stream width of this data.
- */
- @property (nonatomic, assign, readonly) unsigned int streamWidth;
- /**
- @brief Get the stream height.
- @return If the function succeeds, it will return the stream height of this data.
- */
- @property (nonatomic, assign, readonly) unsigned int streamHeight;
- /**
- @brief Query the video raw data rotation.
- @return If the function succeeds, it will return the rotation of this data.
- */
- @property (nonatomic, assign, readonly) unsigned int rotation;
- /**
- @brief Get the source_id of current YUV raw data.
- @return If the function succeeds, it will return the source_id of this data.
- */
- @property (nonatomic, assign, readonly) unsigned int resourceID;
- /**
- @brief Determine if the reference count for accessing the raw data buffer can be increased.
- @return If you addRef(), the SDK will try to hold the raw data buffer until the reference becomes 0. When you finish using the raw data buffer, you must call releaseRef;
- */
- -(BOOL)canAddRef;
- /**
- @brief Increase reference count by 1. Adding a reference will ensure that the raw data buffer will not be released.
- @return If you addRef, the SDK will try to hold the raw data buffer until the reference becomes 0. When you finish using the raw data buffer, you must call releaseRef.
- */
- -(BOOL)addRef;
- /**
- @brief Decrease reference count by 1. When you finish using the raw data buffer, you must call releaseRef.
- @return If the function succeeds, it will return reference count of this object.
- */
- -(int)releaseRef;
- @end
- /**
- @brief Raw data pipe delegate interface.
- */
- @protocol ZMVideoSDKRawDataPipeDelegate <NSObject>
- @optional
-
- /**
- @brief Notify if subscribed data received.
- @param data The pointer of ZMVideoSDKYUVRawDataI420 object.
- */
- - (void)onRawDataFrameReceived:(ZMVideoSDKYUVRawDataI420*)data;
-
- /**
- @brief Notify if subscribed data status changed.
- @param status The rawData status.
- */
- - (void)onRawDataStatusChanged:(ZMVideoSDKRawDataStatus)status;
- @end
- /**
- @brief Video/share raw data pipe interface.
- */
- @interface ZMVideoSDKRawDataPipe : NSObject
- /**
- @brief Subscribe video/share raw data.
- @param resolution The subscribe size.
- @param listener The callback sink object.
- @return If the function succeeds, it will return ZMVideoSDKErrors_Success.
- */
- - (ZMVideoSDKErrors)subscribe:(ZMVideoSDKResolution)resolution listener:(id<ZMVideoSDKRawDataPipeDelegate>)listener;
-
- /**
- @brief Unsubscribe video/share raw data.
- @param listener The callback sink object.
- @return If the function succeeds, it will return ZMVideoSDKErrors_Success.
- */
- - (ZMVideoSDKErrors)unSubscribe:(id<ZMVideoSDKRawDataPipeDelegate>)listener;
- /**
- @brief Get the raw data data type.
- @return Share or Video data type. Refer to ZoomVideoSDKRawDataType for the list of enum {@link ZoomVideoSDKRawDataType}.
- */
- - (ZMVideoSDKRawDataType)getRawdataType;
- /**
- @brief Get video status.
- @return If the function succeeds, the return value is pointer of video status object, otherwise returns nil.
- */
- - (ZMVideoSDKVideoStatus*)getVideoStatus;
- /**
- @brief Get video device name.
- @return If the function succeeds, the return value is the video device name, otherwise returns nil.
- */
- - (NSString*)getVideoDeviceName;
- /**
- @brief Get share status.
- @return If the function succeeds, the return value is current share status.
- */
- - (ZMVideoSDKShareStatus)getShareStatus;
- /**
- @brief Subscribe to the computer audio shared by other user.
- @return If the function succeeds, it will return ZMVideoSDKErrors_Success.
- @note This function has been marked as deprecated, then it will be instead by "[ZMVideoSDKUser setUserVolume:1.0 isSharingAudio:YES]".
- */
- - (ZMVideoSDKErrors)subscribeToSharedComputerAudio DEPRECATED_MSG_ATTRIBUTE("Use -setUserVolume: isSharingAudio: instead");
- /**
- @brief Unsubscribe to the computer audio shared by other user.
- @return If the function succeeds, it will return ZMVideoSDKErrors_Success.
- @note This function has been marked as deprecated, then it will be instead by "[ZMVideoSDKUser setUserVolume:0 isSharingAudio:YES]".
- */
- - (ZMVideoSDKErrors)unsubscribeToSharedComputerAudio DEPRECATED_MSG_ATTRIBUTE("Use -setUserVolume: isSharingAudio: instead");
- /**
- @brief Get share type.
- @return If the function succeeds, the return value is current share type.
- */
- - (ZMVideoSDKShareType)getShareType;
- /**
- @brief Get video statistic information.
- @return If the function succeeds, the return value is the object of ZMVideoSDKVideoStatisticInfo. For more information, see {@link ZMVideoSDKVideoStatisticInfo}.
- */
- - (ZMVideoSDKVideoStatisticInfo*)getVideoStatisticInfo;
- @end
- /**
- @brief Camera control request handler object interface.
- */
- @interface ZMVideoSDKCameraControlRequestHandler : NSObject
- /**
- @brief Approve the remote camera control request.
- @return If the function succeeds, it will return ZMVideoSDKErrors_Success.
- */
- -(ZMVideoSDKErrors)approve;
- /**
- @brief Decline the remote camera control request.
- @return If the function succeeds, it will return ZMVideoSDKErrors_Success.
- */
- -(ZMVideoSDKErrors)decline;
- @end
- /**
- @brief Remote camera control helper object interface.
- */
- @interface ZMVideoSDKRemoteCameraControlHelper : NSObject
- /**
- @brief Request to control remote camera.
- @return If the function succeeds, it will return ZMVideoSDKErrors_Success.
- */
- -(ZMVideoSDKErrors)requestControlRemoteCamera;
- /**
- @brief Give up control of the remote camera.
- @return If the function succeeds, it will return ZMVideoSDKErrors_Success.
- */
- -(ZMVideoSDKErrors)giveUpControlRemoteCamera;
- /**
- @brief Turn the camera to the left.
- @param range The rotation range, 10 <= range <= 100.
- @return If the function succeeds, it will return ZMVideoSDKErrors_Success.
- */
- -(ZMVideoSDKErrors)turnLeft:(unsigned int)range;
- /**
- @brief Turn the camera to the right.
- @param range rotation range, 10 <= range <= 100.
- @return If the function succeeds, it will return ZMVideoSDKErrors_Success.
- */
- -(ZMVideoSDKErrors)turnRight:(unsigned int)range;
- /**
- @brief Turn the camera up.
- @param range rotation range, 10 <= range <= 100.
- @return If the function succeeds, it will return ZMVideoSDKErrors_Success.
- */
- -(ZMVideoSDKErrors)turnUp:(unsigned int)range;
- /**
- @brief Turn the camera down.
- @param range rotation range, 10 <= range <= 100.
- @return If the function succeeds, it will return ZMVideoSDKErrors_Success.
- */
- -(ZMVideoSDKErrors)turnDown:(unsigned int)range;
- /**
- @brief Zoom the camera in.
- @param range rotation range, 10 <= range <= 100.
- @return If the function succeeds, it will return ZMVideoSDKErrors_Success.
- */
- -(ZMVideoSDKErrors)zoomIn:(unsigned int)range;
- /**
- @brief Zoom the camera out.
- @param range rotation range, 10 <= range <= 100.
- @return If the function succeeds, it will return ZMVideoSDKErrors_Success.
- */
- -(ZMVideoSDKErrors)zoomOut:(unsigned int)range;
- @end
- /**
- @brief Zoom Video SDK user information.
- */
- @interface ZMVideoSDKUser : NSObject
- /**
- @brief Get the user's id.
- @return If the function succeeds, the return value is user id, otherwise returns nil.
- */
- - (NSString*)getUserID;
- /**
- @brief Get the user's custom identity.
- @return If the function succeeds, the return value is custom id, otherwise returns nil.
- */
- - (NSString*)getCustomIdentity;
- /**
- @brief Get the name of the user in the session.
- @return If the function succeeds, the return value is user name, otherwise returns nil.
- */
- - (NSString*)getUserName;
-
- /**
- @brief Get the user's video status.
- @return Video status. For more information, see {@link ZMVideoSDKVideoStatus}.
- */
- - (ZMVideoSDKVideoStatus*)getVideoStatus DEPRECATED_MSG_ATTRIBUTE("Use [ZMVideoSDKRawDataPipe getVideoStatus] instead");
-
- /**
- @brief Get the user's audio status.
- @return Audio status. For more information, see {@link ZMVideoSDKAudioStatus}.
- */
- - (ZMVideoSDKAudioStatus*)getAudioStatus;
-
- /**
- @brief Get the user's screen share status.
- @return Share status. For more information, see {@link ZMVideoSDKShareStatus}.
- */
- - (ZMVideoSDKShareStatus)getShareStatus DEPRECATED_MSG_ATTRIBUTE("Use [ZMVideoSDKRawDataPipe getShareStatus] instead");
-
- /**
- @brief Determine whether the user is the host.
- @return YES indicates that the user is the host, otherwise NO.
- */
- - (BOOL)isHost;
-
- /**
- @brief Determine whether the user is the manager.
- @return YES indicates that the user is the manager, otherwise NO.
- */
- - (BOOL)isManager;
-
- /**
- @brief Get the user's video statistic information.
- @return Video statistic information. For more information, see {@link ZMVideoSDKVideoStatisticInfo}.
- */
- - (ZMVideoSDKVideoStatisticInfo*)getVideoStatisticInfo;
-
- /**
- @brief Get the user's share statistic information.
- @return Share statistic information. For more information, see {@link ZMVideoSDKShareStatisticInfo}.
- */
- - (ZMVideoSDKShareStatisticInfo*)getShareStatisticInfo;
-
- /**
- @brief Get the user's video pipe.
- @return Video pipe. For more information, see {@link ZMVideoSDKRawDataPipe}.
- */
- - (ZMVideoSDKRawDataPipe*)getVideoPipe;
-
- /**
- @brief Get the user's share pipe.
- @return Share pipe. For more information, see {@link ZMVideoSDKRawDataPipe}.
- */
- - (ZMVideoSDKRawDataPipe*)getSharePipe;
- /**
- @brief Gets the user's video canvas.
- @return If the function succeeds, it will return a ZMVideoSDKVideoCanvas object, otherwise returns nil.
- */
- - (ZMVideoSDKVideoCanvas *)getVideoCanvas;
- /**
- @brief Gets the user's share canvas.
- @return If the function succeeds, it will return a ZMVideoSDKVideoCanvas object, otherwise returns nil.
- */
- - (ZMVideoSDKVideoCanvas*)getShareCanvas;
- /**
- @brief Get the helper class instance to access the remote camera control.
- @return If the function succeeds, it will return a remote camera control object, otherwise returns nil.
- */
- - (ZMVideoSDKRemoteCameraControlHelper *)getRemoteCameraControlHelper;
- /**
- @brief Get the user's multi-camera stream list.
- @return A list of all streaming cameras pipe. For more information, see {@link ZMVideoSDKRawDataPipe}.
- */
- - (NSArray<ZMVideoSDKRawDataPipe *>*)getMultiCameraStreamList;
- /**
- @brief Set the user's local volume. This does not affect how other participants hear the user.
- @param volume Value can be >= 0 and <=10. If volume is 0, the user won't be able to hear the related audio.
- @param isSharingAudio YES means sets the volume of shared audio (such as shared computer audio), otherwise sets the volume of the microphone.
- @return If successful return YES, otherwise NO.
- */
- - (BOOL)setUserVolume:(float)volume isSharingAudio:(BOOL)isSharingAudio;
- /**
- @brief Get user volume.
- @param volume The user volume.
- @param isSharingAudio YES means gets the volume of shared audio (such as shared computer audio), otherwise gets the volume of the microphone.
- @return If success return YES, otherwise NO.
- */
- - (BOOL)getUserVolume:(float*)volume isSharingAudio:(BOOL)isSharingAudio;
- /**
- @brief Determine which audio you can set, shared audio or microphone.
- @param isShareAudio YES means checks whether you can set the volume of shared audio, otherwise you can set the volume of the microphone.
- @return If success return YES, otherwise NO.
- */
- - (BOOL)canSetUserVolume:(BOOL)isShareAudio;
- /**
- @brief Used to determine whether I agree to individual video recording.
- */
- - (BOOL)hasIndividualRecordingConsent;
- /**
- @brief Send file to current user object.
- @param filePath The local path of the file.
- @return If the function succeeds, it will return ZMVideoSDKErrors_Success.
- */
- - (ZMVideoSDKErrors)transferFile:(NSString *)filePath;
- @end
- /**
- @brief User control interface.
- */
- @interface ZMVideoSDKUserHelper: NSObject
-
- /**
- @brief Change a specific user's name.
- @param name The new user name.
- @param user User in the session.
- @return YES indicates that name change is success. Otherwise, this function returns NO.
- */
- - (BOOL)changeName:(NSString*)name user:(ZMVideoSDKUser*)user;
-
- /**
- @brief Assign a user as the session host.
- @param user User in the session.
- @return YES indicates that the user is now the host. Otherwise, this function returns NO.
- */
- - (BOOL)makeHost:(ZMVideoSDKUser*)user;
-
- /**
- @brief Assign a user as the session manager.
- @param user User in the session.
- @return YES indicates that the user is now the manager. Otherwise, this function returns NO.
- */
- - (BOOL)makeManager:(ZMVideoSDKUser*)user;
-
- /**
- @brief Revoke manager rights from a user.
- @param user User in the session.
- @return YES indicates that the user no longer has manager rights. Otherwise, this function returns NO.
- */
- - (BOOL)revokeManager:(ZMVideoSDKUser*)user;
-
- /**
- @brief Remove user from session.
- @param user User in the session.
- @return If the function succeeds, the return value is YES. Otherwise, this function returns NO.
- */
- - (BOOL)removeUser:(ZMVideoSDKUser*)user;
- @end
- NS_ASSUME_NONNULL_END
|