9#import <Foundation/Foundation.h>
11#import "JRTCMediaDeviceVideoCanvas.h"
12#import "JRTCMediaDeviceCallback.h"
13#import "JRTCMediaDeviceConstants.h"
14#import "JRTCMediaDeviceInitParam.h"
15#import "JRTCRecordVideoCaptureParam.h"
23@protocol AudioInputFrameCallback <NSObject>
33- (void)onFrame:(const
char *_Nonnull)inputId sampleRateHz:(
int)iSampleRateHz channels:(
int)iChannels data:(NSData *_Nullable)data;
37@protocol VideoCaptureFrameCallback <NSObject>
48- (void)onFrame:(const
char *_Nonnull)streamId angle:(
int)angle width:(
int)width height:(
int)height data:(
unsigned char *_Nonnull)data;
57@property (nonatomic, readonly, nonnull) NSString*
cameraId;
61@property (nonatomic, readonly, nonnull) NSString*
cameraName;
79@property (nonatomic, readonly, nonnull) NSString* audioId;
84@property (nonatomic, readonly, nonnull) NSString* audioName;
91@property (nonatomic, readonly)
bool input;
101@property (nonatomic, readonly, nonnull) NSString* windowId;
106@property (nonatomic, readonly, nonnull) NSString* windowName;
120@property (nonatomic)
int audioInputSamplingRate;
129@property (nonatomic)
int audioOutputSamplingRate;
136@property (nonatomic)
int audioInputChannelNumber;
143@property (nonatomic)
int audioOutputChannelNumber;
153@property (nonatomic, nullable) id<AudioInputFrameCallback> audioInputFrameCallback;
158@property (nonatomic, readonly)
bool isAudioInputStart;
163@property (nonatomic, readonly)
bool isAudioOutputStart;
168@property (nonatomic, readonly)
bool cameraOpen;
173@property (nonatomic, readonly)
bool videoFileOpen;
183@property (nonatomic, readonly, nonnull) NSArray<JRTCMediaDeviceCamera*> * cameras;
200@property (nonatomic, strong, readonly, nonnull) NSString* videoFileId;
205@property (nonatomic, readonly)
bool audioInterrupt;
215@property (nonatomic, readonly)
bool isAutoScreenOrientation;
225@property (nonatomic)
bool useInternalAudioDeviceLogic;
232@property (nonatomic, readonly, nonnull) NSArray<JRTCMediaDeviceAudio*>* audioInputs;
242@property (nonatomic, readonly, nonnull) NSArray<JRTCMediaDeviceAudio*>* audioOutputs;
252@property (nonatomic, readonly, nonnull) NSArray<JRTCMediaDeviceWindow*>* desktops;
257@property (nonatomic, readonly, nonnull) NSArray<JRTCMediaDeviceWindow*>* windows;
280+ (
JRTCMediaDevice* _Nullable)create:(
JRTCClient* _Nonnull)client callback:(
id<JRTCMediaDeviceCallback> _Nonnull)callback initParam:(JRTCMediaDeviceInitParam* _Nullable)initParam;
366- (void)stopAllVideos;
392- (bool)startAudioInput;
401- (bool)stopAudioInput;
409- (bool)startAudioOutput;
417- (bool)stopAudioOutput;
482- (void)specifyCameraAngle:(
int)angle;
493- (void)setCameraProperty:(
int)width height:(
int)height framerate:(
int)frameRate;
504- (void)setScreenCaptureProperty:(
int)width height:(
int)height framerate:(
int)frameRate;
510- (int)getScreenFramerate;
523- (void)setAutoScreenOrientation:(
bool)enable;
525#if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR
532@property (nonatomic)
bool defaultSpeakerOn;
550- (void)enableSpeaker:(
bool)enable;
564- (bool)enableScreenCapture:(
bool)enable;
577- (bool)enableScreenCapture:(
bool)enable appGroupId:(NSString *__nullable)appGroupId preferredExtension:(NSString *__nullable)preferredExtension;
590- (NSString* __nullable) getScreenCaptureId;
602- (bool)startVideoFile;
612- (bool)stopVideoFile;
633- (bool)setVideoFileFrame:(NSData* __nonnull)srcFrame format:(
JRTCMediaDeviceVideoPixelFormat)format width:(
int)width height:(
int)height angle:(
int)angle;
652- (void)setVideoFileFrame:(CVPixelBufferRef __nonnull)srcFrame angle:(
int)angle mirror:(
int)mirror;
676- (bool)startVideoCaptureRecord:(NSString *_Nonnull)filePath streamId:(NSString *_Nonnull)streamId audioSource:(
JRTCRecordAudioSource)audioSource fileType:(
JRTCVideoRecordFileType)fileType width:(
int)width height:(
int)height DEPRECATED_MSG_ATTRIBUTE("该方法即将废弃,请使用 startVideoCaptureRecord:recordParam: 替换");
685- (bool)stopVideoCaptureRecord:(NSString *_Nonnull)streamId;
704- (bool)stopAudioRecord;
719- (bool)recoveryRecordFile:(NSString *_Nonnull)fileDir;
730- (bool)snapshotWithStreamId:(NSString* __nonnull)streamId path:(NSString* __nonnull)path;
736- (void)setAudioInputFrameCallback:(
id<AudioInputFrameCallback> _Nullable)callback;
743- (void)setVideoCaptureFrameCallback:(
id<VideoCaptureFrameCallback> _Nullable)callback;
750- (void)setScreenCaptureData:(UIImage * __nonnull)image;
756- (void)resetScreenCaptureData;
804- (int)getAnrNoiseLevel;
815- (int)getAnrNoiseRatio;
827- (bool)startRing:(NSString * _Nonnull)filePath isLoop:(
bool)isLoop;
850- (bool)enableAudioInputFromFile:(
bool)enable filePath:(NSString* __nullable)filePath loop:(
bool)loop;
860- (bool)suspendAudioInputFromFile:(
bool)suspend;
868- (void)setAec:(
bool)aecOn;
876- (void)setAgc:(
bool)agcOn;
JRTCMediaDeviceRender
Definition: JRTCMediaDeviceConstants.h:31
JRTCMediaDeviceVideoAngle
Definition: JRTCMediaDeviceConstants.h:57
JRTCVideoRecordFileType
Definition: JRTCMediaDeviceConstants.h:135
JRTCRecordAudioSource
Definition: JRTCMediaDeviceConstants.h:161
JRTCMediaDeviceAudioRouteType
Definition: JRTCMediaDeviceConstants.h:184
JRTCAudioRecordFileType
Definition: JRTCMediaDeviceConstants.h:109
JRTCMediaDeviceTestType
Definition: JRTCMediaDeviceConstants.h:210
JRTCMediaDeviceCameraType
Definition: JRTCMediaDeviceConstants.h:43
JRTCMediaDeviceVideoPixelFormat
Definition: JRTCMediaDeviceConstants.h:73
登录登出管理
Definition: JRTCClient.h:24
Definition: JRTCRecordVideoCaptureParam.h:18