设备模块
更多...
#import <JCMediaDevice.h>
◆ create:callback:
◆ destroy
◆ getCameras
◆ getScreenFramerate
- (int) getScreenFramerate |
|
|
|
◆ setCameraProperty:height:framerate:
- (void) setCameraProperty: |
|
(int) |
width |
height: |
|
(int) |
height |
framerate: |
|
(int) |
framerate |
|
|
| |
@breif 设置摄像头采集属性
- 参数
-
width | 采集宽度,默认640 |
height | 采集高度,默认360 |
framerate | 帧速率,默认30 |
◆ setScreenCaptureProperty:height:framerate:
- (void) setScreenCaptureProperty: |
|
(int) |
width |
height: |
|
(int) |
height |
framerate: |
|
(int) |
framerate |
|
|
| |
@breif 设置屏幕共享采集属性
- 参数
-
width | 采集宽度,默认640 |
height | 采集高度,默认360 |
framerate | 帧速率,默认16 |
◆ setVideoFileFrame:angle:mirror:
- (void) setVideoFileFrame: |
|
(CVPixelBufferRef __nonnull) |
srcFrame |
angle: |
|
(int) |
angle |
mirror: |
|
(int) |
mirror |
|
|
| |
向文件视频源逐帧添加视频数据
- 参数
-
CVPixelBufferRef | 视频数据 |
angle | 角度, 为 90 的倍数 |
mirror | 是否镜像,0 不镜像,1 镜像 |
◆ setVideoFileFrame:format:width:height:angle:
- (bool) setVideoFileFrame: |
|
(NSData *__nonnull) |
srcFrame |
format: |
|
(JCMediaDeviceVideoPixelFormat) |
format |
width: |
|
(int) |
width |
height: |
|
(int) |
height |
angle: |
|
(int) |
angle |
|
|
| |
向文件视频源逐帧添加视频数据
- 参数
-
srcFrame | 画面二进制数据 |
format | 视频像素格式 |
width | 宽 |
height | 高 |
angle | 角度, 为 90 的倍数 |
- 返回
- 是否成功
◆ specifyCamera:
@breif 指定要开启的摄像头,在 startCamera 之前调用
- 参数
-
◆ specifyCameraAngle:
- (void) specifyCameraAngle: |
|
(int) |
angle |
|
@breif 指定摄像头采集角度,为90的倍数
- 参数
-
◆ startAudio
启动音频,一般正式开启通话前需要调用此接口
- 返回
- 成功返回 true,失败返回 false
◆ startAudioInput
打开音频输入设备
- 返回
- 成功返回 true,失败返回 false
◆ startAudioOutput
- (bool) startAudioOutput |
|
|
|
打开音频输出设备
- 返回
- 成功返回 true,失败返回 false
◆ startAudioRecordFilePath:fileType:
开始音频录制
- 参数
-
filePath | 存储路径 |
fileType | 文件类型 |
- 返回
- ture表示开启成功,false表示开启失败
◆ startCamera
◆ startCameraVideo:
◆ startScreenShareVideoFile
- (bool) startScreenShareVideoFile |
|
|
|
◆ startVideo:renderType:
◆ startVideo:renderType:view:
- (JCMediaDeviceVideoCanvas* __nullable) startVideo: |
|
(NSString *__nonnull) |
videoSource |
renderType: |
|
(int) |
type |
view: |
|
(JCView *__nonnull) |
view |
|
|
| |
◆ startVideoCaptureRecordFilePath:captureId:fileType:width:height:
- (bool) startVideoCaptureRecordFilePath: |
|
(NSString *_Nonnull) |
filePath |
captureId: |
|
(NSString *_Nonnull) |
captureId |
fileType: |
|
(JCVideoCaptureRecordFileType) |
fileType |
width: |
|
(int) |
width |
height: |
|
(int) |
height |
|
|
| |
开始视频录制
- 参数
-
filePath | 存储路径 |
captureId | 捕获ID |
fileType | 文件类型 |
width | 宽 |
height | 高 |
- 返回
- ture表示开启成功,false表示开启失败
◆ startVideoFile
开启视频文件作为视频输入源,文件和摄像头作为视频输入源只能存在一种,当前摄像头开启的话会关闭摄像头
- 返回
- 是否成功
◆ stopAudio
停止音频,一般在通话结束时调用
- 返回
- 成功返回 true,失败返回 false
◆ stopAudioCaptureRecord
- (bool) stopAudioCaptureRecord |
|
|
|
停止音频录制
- 返回
- ture表示关闭成功,false表示关闭失败
◆ stopAudioInput
关闭音频输入设备
- 返回
- 成功返回 true,失败返回 false
◆ stopAudioOutput
关闭音频输出设备
- 返回
- 成功返回 true,失败返回 false
◆ stopCamera
@breif 关闭摄像头
- 返回
- 成功返回 true,失败返回 false
◆ stopVideo:
◆ stopVideoCaptureRecordCaptureId:
- (bool) stopVideoCaptureRecordCaptureId: |
|
(NSString *_Nonnull) |
captureId |
|
停止视频录制
- 参数
-
- 返回
- ture表示关闭成功,false表示关闭失败
◆ stopVideoFile
关闭文件视频源
- 返回
- ture表示关闭成功,false表示关闭失败
◆ switchCamera
@breif 切换摄像头,内部会根据当前摄像头类型来进行切换
- 返回
- 成功返回 true,失败返回 false
◆ switchCamera:
◆ audioInterrupt
◆ audioParam
◆ audioStart
◆ cameraOpen
◆ cameras
◆ currentCamera
◆ defaultCamera
◆ isAudioInputStart
- (bool) isAudioInputStart |
|
readnonatomicassign |
◆ isAudioOutputStart
- (bool) isAudioOutputStart |
|
readnonatomicassign |
◆ useInternalAudioDeviceLogic
- (bool) useInternalAudioDeviceLogic |
|
readwritenonatomicassign |
是否使用内部音频设备逻辑
1.打开扬声器 -> 使用扬声器输出声音 2.连上蓝牙耳机 -> 使用蓝牙耳机输出声音,如果扬声器开着则关闭扬声器 3.插入耳机 -> 使用耳机输出声音,如果扬声器开着则关闭扬声器 4.蓝牙耳机和有线耳机以最后连上的作为输出 5.关闭扬声器 -> (蓝牙耳机|有线耳机) > 听筒
◆ videoAngle
◆ videoFileId
- (NSString* __nonnull) videoFileId |
|
readnonatomicstrong |
◆ videoFileOpen
该类的文档由以下文件生成:
- /Users/yangxiangkun/projects/JuphoonCloud/SDK/iOS/JMSDK/JMSDK/JCCommon/JCMediaDevice/JCMediaDevice.h