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
198- (ZMVideoSDKErrors)sendShareAudio:(char * _Nullable)data dataLength:(unsigned int)length sampleRate:(int)rate audioChannel:(ZMVideoSDKAudioChannel)channel;
199@end
200
201
206@protocol ZMVideoSDKShareAudioSource <NSObject>
207
212- (void)onStartSendAudio:(ZMVideoSDKShareAudioSender * _Nonnull)sender;
213
218@end
219
220
225@interface ZMVideoSDKShareOption : NSObject
229@property (nonatomic, assign, readwrite) BOOL isWithDeviceAudio;
230
234@property (nonatomic, assign, readwrite) BOOL isOptimizeForSharedVideo;
235
236@end
237
238
243@interface ZMVideoSDKShareHelper : NSObject
244
252- (ZMVideoSDKErrors)startShareView:(CGWindowID)windowID shareOption:(ZMVideoSDKShareOption* _Nullable)option;
253
261- (ZMVideoSDKErrors)startShareApplication:(pid_t)processID shareOption:(ZMVideoSDKShareOption* _Nullable)option;
262
268- (BOOL)isShareViewValid:(CGWindowID)windowID;
269
276- (ZMVideoSDKErrors)startShareScreen:(CGDirectDisplayID)monitorID shareOption:(ZMVideoSDKShareOption* _Nullable)option;
277
284- (ZMVideoSDKErrors)startShareMultiScreen:(NSArray <NSNumber *>*)monitorIDs shareOption:(ZMVideoSDKShareOption* _Nullable)option;
285
291
297
303
309
315
321
327
333- (ZMVideoSDKErrors)lockShare:(BOOL)lock;
334
340
347- (ZMVideoSDKErrors)enableMultiShare:(BOOL)enable;
348
354
360- (ZMVideoSDKErrors)enableShareDeviceAudio:(BOOL)enable;
361
367
373- (ZMVideoSDKErrors)enableOptimizeForSharedVideo:(BOOL)enable;
374
380
387- (ZMVideoSDKErrors)startShare2ndCamera:(NSString* _Nullable)cameraID;
388
395- (ZMVideoSDKErrors)subscribeMyShareCamera:(id<ZMVideoSDKRawDataPipeDelegate> _Nonnull)dataHandler DEPRECATED_MSG_ATTRIBUTE("Use [ZMVideoSDKRawDataPipe subscribe: listener:] instead");
396
402- (ZMVideoSDKErrors)unSubscribeMyShareCamera DEPRECATED_MSG_ATTRIBUTE("Use [ZMVideoSDKRawDataPipe: unSubscribe:] instead");
403
412- (ZMVideoSDKErrors)startSharingExternalSource:(id<ZMVideoSDKShareSource> _Nonnull)shareSource audioSource:(id<ZMVideoSDKShareAudioSource> _Nullable)audioSource DEPRECATED_MSG_ATTRIBUTE("Use -startSharingExternalSource: audioSource: isPlaying: instead");
413
422- (ZMVideoSDKErrors)startSharingExternalSource:(id<ZMVideoSDKShareSource> _Nonnull)shareSource audioSource:(id<ZMVideoSDKShareAudioSource> _Nullable)audioSource isPlaying:(BOOL)isPlaying;
429- (ZMVideoSDKErrors)startSharePureAudioSource:(id<ZMVideoSDKShareAudioSource> _Nonnull)audioSource DEPRECATED_MSG_ATTRIBUTE("Use -startSharePureAudioSource: isPlaying: instead");
430
437- (ZMVideoSDKErrors)startSharePureAudioSource:(id<ZMVideoSDKShareAudioSource> _Nonnull)audioSource isPlaying:(BOOL)isPlaying;
438
444
451- (ZMVideoSDKErrors)disableViewerAnnotation:(BOOL)disable;
452
459
467- (ZMVideoSDKAnnotationHelper* _Nullable)createAnnotationHelper:(NSView* _Nullable)view;
468
474- (ZMVideoSDKErrors)destroyAnnotationHelper:(ZMVideoSDKAnnotationHelper* _Nonnull)helper;
475
485- (ZMVideoSDKErrors)setAnnotationVanishingToolTime:(unsigned int)displayTime vanishingTime:(unsigned int)vanishingTime;
486
494- (ZMVideoSDKErrors)getAnnotationVanishingToolTime:(unsigned int*)displayTime vanishingTime:(unsigned int*)vanishingTime;
495
501- (ZMVideoSDKErrors)enablePlaySharingAudioRawdata:(BOOL)bPlay;
502
509- (ZMVideoSDKErrors)startShareWithPreprocessing:(ZMVideoSDKSharePreprocessParam* _Nonnull)param sharePreprocessor:(id<ZMVideoSDKSharePreprocessor> _Nonnull)preprocessor;
510
516@end
517NS_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 unSubscribeMyShareCamera()
Unsubscribes to the camera's raw data stream that is shared as the second camera.
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.