Video SDK for MacOS API Reference
Loading...
Searching...
No Matches
ZMVideoSDKShareHelper.h
Go to the documentation of this file.
1
5
6
7#import <Foundation/Foundation.h>
8#import <CoreGraphics/CoreGraphics.h>
9#import <ZMVideoSDK/ZMVideoSDKAnnotationHelper.h>
10#import <ZMVideoSDK/ZMVideoSDKRemoteControlHelper.h>
11#import <ZMVideoSDK/ZMVideoSDKWhiteboardHelper.h>
12NS_ASSUME_NONNULL_BEGIN
17@interface ZMVideoSDKSharePreprocessParam : NSObject
21@property(nonatomic,assign)ZMVideoSDKSharePreprocessType type;
25@property(nonatomic,assign)CGDirectDisplayID monitorID;
29@property(nonatomic,assign)CGWindowID windowID;
33@property(nonatomic,assign)pid_t processID;
34@end
35
36
47- (ZMVideoSDKErrors)sendPreprocessedData:(ZMVideoSDKYUVRawDataI420*)rawdata;
48@end
49
50
55@protocol ZMVideoSDKSharePreprocessor <NSObject>
61- (void)onCapturedRawDataReceived:(ZMVideoSDKYUVRawDataI420*)rawdata sharePreprocessSender:(ZMVideoSDKSharePreprocessSender * _Nonnull)sender;
62
67@end
68
69
74@interface ZMVideoSDKShareAction : NSObject
78@property (nonatomic, assign, readonly) unsigned int shareSourceId;
82@property (nonatomic, assign, readonly) ZMVideoSDKShareStatus shareStatus;
86@property (nonatomic, assign, readonly) ZMVideoSDKShareType shareType;
91@property (nonatomic, assign, readonly) ZMVideoSDKShareCapturePauseReason shareCapturePauseReason;
92
96@property (nonatomic, assign, readonly) ZMVideoSDKSubscribeFailReason subscribeFailReason;
100@property (nonatomic, assign, readonly) BOOL isAnnotationPrivilegeEnabled;
101
107
113
119
125
131
137
143
144@end
145
146
147
152@interface ZMVideoSDKShareSender : NSObject
153
163- (ZMVideoSDKErrors)sendShareFrame:(char* _Nullable)frameBuffer width:(int)width height:(int)height frameLength:(int)frameLength format:(ZMVideoSDKFrameDataFormat)format;
164@end
165
166
171@protocol ZMVideoSDKShareSource <NSObject>
176- (void)onShareSendStarted:(ZMVideoSDKShareSender* _Nonnull)sender;
181@end
182
183
188@interface ZMVideoSDKShareAudioSender : NSObject
202- (ZMVideoSDKErrors)sendShareAudio:(char * _Nullable)data dataLength:(unsigned int)length sampleRate:(int)rate audioChannel:(ZMVideoSDKAudioChannel)channel;
203@end
204
205
210@protocol ZMVideoSDKShareAudioSource <NSObject>
211
216- (void)onStartSendAudio:(ZMVideoSDKShareAudioSender * _Nonnull)sender;
217
222@end
223
224
229@interface ZMVideoSDKShareOption : NSObject
233@property (nonatomic, assign, readwrite) BOOL isWithDeviceAudio;
234
238@property (nonatomic, assign, readwrite) BOOL isOptimizeForSharedVideo;
239
240@end
241
242
247@interface ZMVideoSDKShareHelper : NSObject
248
256- (ZMVideoSDKErrors)startShareView:(CGWindowID)windowID shareOption:(ZMVideoSDKShareOption* _Nullable)option;
257
265- (ZMVideoSDKErrors)startShareApplication:(pid_t)processID shareOption:(ZMVideoSDKShareOption* _Nullable)option;
266
272- (BOOL)isShareViewValid:(CGWindowID)windowID;
273
280- (ZMVideoSDKErrors)startShareScreen:(CGDirectDisplayID)monitorID shareOption:(ZMVideoSDKShareOption* _Nullable)option;
281
288- (ZMVideoSDKErrors)startShareMultiScreen:(NSArray <NSNumber *>*)monitorIDs shareOption:(ZMVideoSDKShareOption* _Nullable)option;
289
295
301
307
313
319
325
331
337- (ZMVideoSDKErrors)lockShare:(BOOL)lock;
338
344
351- (ZMVideoSDKErrors)enableMultiShare:(BOOL)enable;
352
358
364- (ZMVideoSDKErrors)enableShareDeviceAudio:(BOOL)enable;
365
371
377- (ZMVideoSDKErrors)enableOptimizeForSharedVideo:(BOOL)enable;
378
384
391- (ZMVideoSDKErrors)startShare2ndCamera:(NSString* _Nullable)cameraID;
392
401- (ZMVideoSDKErrors)startSharingExternalSource:(id<ZMVideoSDKShareSource> _Nonnull)shareSource audioSource:(id<ZMVideoSDKShareAudioSource> _Nullable)audioSource isPlaying:(BOOL)isPlaying;
408- (ZMVideoSDKErrors)startSharePureAudioSource:(id<ZMVideoSDKShareAudioSource> _Nonnull)audioSource isPlaying:(BOOL)isPlaying;
409
415
422- (ZMVideoSDKErrors)disableViewerAnnotation:(BOOL)disable;
423
430
439- (ZMVideoSDKAnnotationHelper* _Nullable)createAnnotationHelper:(NSView* _Nullable)view;
440
446- (ZMVideoSDKErrors)destroyAnnotationHelper:(ZMVideoSDKAnnotationHelper* _Nonnull)helper;
447
457- (ZMVideoSDKErrors)setAnnotationVanishingToolTime:(unsigned int)displayTime vanishingTime:(unsigned int)vanishingTime;
458
466- (ZMVideoSDKErrors)getAnnotationVanishingToolTime:(unsigned int*)displayTime vanishingTime:(unsigned int*)vanishingTime;
467
474- (ZMVideoSDKErrors)setAnnotationAlwaysOnTop:(BOOL)alwaysOnTop;
475
481- (ZMVideoSDKErrors)enablePlaySharingAudioRawdata:(BOOL)bPlay;
482
489- (ZMVideoSDKErrors)startShareWithPreprocessing:(ZMVideoSDKSharePreprocessParam* _Nonnull)param sharePreprocessor:(id<ZMVideoSDKSharePreprocessor> _Nonnull)preprocessor;
490
496@end
497NS_ASSUME_NONNULL_END
ZMVideoSDKSharePreprocessType
Enumeration of share preprocess types.
ZMVideoSDKSubscribeFailReason
Enumerates the reasons for a failed video subscription attempt.
ZMVideoSDKShareCapturePauseReason
Enumeration of reasons why screen sharing capture is paused in the Zoom Video SDK.
ZMVideoSDKAudioChannel
Enumeration of audio channel types.
ZMVideoSDKShareType
Enumerates the types of content available for sharing in a session.
ZMVideoSDKErrors
Enumerates all errors in the VideoSDK.
ZMVideoSDKFrameDataFormat
Enumeration of raw data formats. Defines the color space format and color range for video frames.
ZMVideoSDKShareStatus
Enumerates the status of sharing.
Annotation helper interface for Zoom Video SDK.
Video or share raw data pipe interface.
Helper class to manage sending, approving, or canceling remote control requests in a session.
Represents the state and control interfaces of a share action in a Zoom session.
ZMVideoSDKErrors revokeRemoteControl()
Gets back all the authority of remote control. Only available for the user themselves.
ZMVideoSDKSubscribeFailReason subscribeFailReason
The subscribe fail reason.
ZMVideoSDKRemoteControlHelper *_Nullable getRemoteControlHelper()
Gets the helper class instance to access remote control. Only available for controller side.
BOOL isAnnotationPrivilegeEnabled
Determines whether annotation privilege is enabled.
unsigned int shareSourceId
Share source ID.
ZMVideoSDKShareCapturePauseReason shareCapturePauseReason
Gets the reason why the share capture is paused.
ZMVideoSDKVideoCanvas *_Nullable getShareCanvas()
Gets the render canvas object.
ZMVideoSDKRawDataPipe *_Nullable getSharePipe()
Gets the share raw data pipe.
NSArray< ZMVideoSDKUser * > *_Nullable getRemoteControlApprovedUserList()
Gets the list of users I (the controlling user) have agreed to control. Only available for the contro...
ZMVideoSDKShareStatus shareStatus
Share status.
ZMVideoSDKShareType shareType
Share type.
NSSize getShareSourceContentSize()
Gets the share content's size.
ZMVideoSDKUser *_Nullable getCurrentRemoteController()
Gets the controller ID who is currently controlling me (the controlled user). Only available for the ...
Interface to send share audio raw data.
Main helper class managing sharing.
BOOL isMultiShareEnabled()
Determines whether multi share is enabled or not.
ZMVideoSDKWhiteboardHelper *_Nullable getWhiteboardHelper()
Returns an instance to manage whiteboard during a video SDK session.
BOOL isSharingOut()
Determines whether the current user is sharing.
ZMVideoSDKErrors startShareComputerAudio()
Starts sharing the computer audio only.
BOOL isScreenSharingOut()
Determines whether the current user is sharing the screen.
ZMVideoSDKErrors pauseShare()
Pauses share.
BOOL isOtherSharing()
Determines whether other user is sharing.
BOOL isViewerAnnotationDisabled()
Whether annotation on current sharing is disabled or not.
BOOL isShareDeviceAudioEnabled()
Determines if the SDK has enabled share computer sound. This reflects the execution status of 'enable...
BOOL isShareLocked()
Determines whether sharing the view or screen is locked.
ZMVideoSDKErrors resumeShare()
Resumes share.
BOOL isOptimizeForSharedVideoEnabled()
Determines if optimization for video is enabled.
BOOL isAnnotationFeatureSupport()
Whether annotation feature is supported or not.
ZMVideoSDKErrors stopShare()
Stops view or screen share.
Configuration options for sharing.
BOOL isWithDeviceAudio
Share option, YES indicates share computer sound when sharing screen or window. Otherwise,...
BOOL isOptimizeForSharedVideo
Share option, YES indicates optimize the frame rate when sharing screen or window....
Parameters for share preprocessing including the type and screen or window identifiers.
CGWindowID windowID
The window handle that to share and pre-process.
CGDirectDisplayID monitorID
The screen ID that to share and pre-process.
pid_t processID
The application process ID that to share and pre-process.
ZMVideoSDKSharePreprocessType type
The share pre-process type.
Interface to send preprocessed YUV raw data frames back to the SDK.
Interface to send video share frame data.
Zoom Video SDK user information.
Manages the rendering of video or screen share content in the Zoom Video SDK.
Helper class for managing whiteboard functionality in Zoom Video SDK sessions.
YUV raw data 420 infomation interface.
void onStopSendAudio()
Callback for audio source to stop sending raw data.
void onShareStopped()
You receives this callback when call 'stopShare' successfully. In this event notification,...
void onShareSendStopped()
Callback for share source stop send raw data.