用于管理媒体设备 更多...

class  JCMediaDeviceCamera
 
class  JCMediaDeviceAudio
 
class  JCMediaDeviceWindow
 
class  JCMediaDeviceAudioParam
 
protocol  <JCAudioFrameCallback>
 
protocol  <JCVideoFrameCallback>
 
class  JCMediaDevice
 
class  JCMediaDeviceVideoCanvas
 
protocol  <JCMediaDeviceCallback>
 

枚举

enum  JCMediaDeviceRotateAngle : NSInteger { JCMediaDeviceRotateAngle0 = 0, JCMediaDeviceRotateAngle90 = 90, JCMediaDeviceRotateAngle180 = 180, JCMediaDeviceRotateAngle270 = 270 }
 
enum  JCMediaDeviceRender : NSInteger { JCMediaDeviceRenderFullScreen = 0, JCMediaDeviceRenderFullContent, JCMediaDeviceRenderFullAuto }
 
enum  JCMediaDeviceVideoPixelFormat : NSInteger {
  JCMediaDeviceVideoPixelFormatI420 = 1, JCMediaDeviceVideoPixelFormatIYUV = 2, JCMediaDeviceVideoPixelFormatRGB24 = 3, JCMediaDeviceVideoPixelFormatABGR = 4,
  JCMediaDeviceVideoPixelFormatARGB = 5, JCMediaDeviceVideoPixelFormatARGB444 = 6, JCMediaDeviceVideoPixelFormatRGB565 = 7, JCMediaDeviceVideoPixelFormatARGB1555 = 8,
  JCMediaDeviceVideoPixelFormatYUY2 = 9, JCMediaDeviceVideoPixelFormatYV12 = 10, JCMediaDeviceVideoPixelFormatUYVY = 11, JCMediaDeviceVideoPixelFormatMJPG = 12,
  JCMediaDeviceVideoPixelFormatNV21 = 13, JCMediaDeviceVideoPixelFormatNV12 = 14, JCMediaDeviceVideoPixelFormatBGRA = 15
}
 
enum  JCMediaDeviceVideoAngel : NSInteger {
  JCMediaDeviceVideoAngelAuto = -1, JCMediaDeviceVideoAngel0 = 0, JCMediaDeviceVideoAngel90 = 90, JCMediaDeviceVideoAngel180 = 180,
  JCMediaDeviceVideoAngel270 = 270
}
 
enum  JCMediaDeviceCameraType : NSInteger { JCMediaDeviceCameraTypeNone = 0, JCMediaDeviceCameraTypeFront = 1, JCMediaDeviceCameraTypeBack = 2, JCMediaDeviceCameraTypeUnknown = 3 }
 
enum  JCMediaDeviceVideoSource : NSInteger { JCMediaDeviceVideoSourcePeer = 0, JCMediaDeviceVideoSourceCapture = 1, JCMediaDeviceVideoSourceFile = 2 }
 
enum  JCMediaDeviceMirror : NSInteger {
  JCMediaDeviceMirrorNone = 0, JCMediaDeviceMirrorHorizontal = 1, JCMediaDeviceMirrorVertical = 2, JCMediaDeviceMirrorAuto = 3,
  JCMediaDeviceMirrorFromLeft = 4, JCMediaDeviceMirrorFromTop = 8
}
 
enum  JCMediaDeviceAudioAECType : NSInteger { JCMediaDeviceAudioAECTypeOn, JCMediaDeviceAudioAECTypeOff, JCMediaDeviceAudioAECTypeAuto }
 

函数

(bool) - JCMediaDeviceVideoCanvas::replace:
 
(void) - JCMediaDeviceVideoCanvas::pause
 
(void) - JCMediaDeviceVideoCanvas::resume
 
(void) - JCMediaDeviceVideoCanvas::rotate:
 
(bool) - JCMediaDeviceVideoCanvas::snapshot:heigh:filePath:
 
(bool) - JCMediaDeviceVideoCanvas::videoMirror:
 
(bool) - JCMediaDeviceVideoCanvas::focus:yPercent:
 

属性

NSString * JCMediaDeviceVideoCanvas::videoSource
 
JCView * JCMediaDeviceVideoCanvas::videoView
 
JCMediaDeviceRender JCMediaDeviceVideoCanvas::renderType
 
id JCMediaDeviceVideoCanvas::customData
 

详细描述

用于管理媒体设备

枚举类型说明

◆ JCMediaDeviceAudioAECType

enum JCMediaDeviceAudioAECType : NSInteger
枚举值
JCMediaDeviceAudioAECTypeOn 

开启硬件AEC

JCMediaDeviceAudioAECTypeOff 

关闭硬件AEC

JCMediaDeviceAudioAECTypeAuto 

硬件AEC 自动

◆ JCMediaDeviceCameraType

enum JCMediaDeviceCameraType : NSInteger

摄像头类型

枚举值
JCMediaDeviceCameraTypeNone 

未获取到摄像头

JCMediaDeviceCameraTypeFront 

前置摄像头

JCMediaDeviceCameraTypeBack 

后置摄像头

JCMediaDeviceCameraTypeUnknown 

未知摄像头

◆ JCMediaDeviceMirror

enum JCMediaDeviceMirror : NSInteger

镜像类型

枚举值
JCMediaDeviceMirrorNone 

不镜像

JCMediaDeviceMirrorHorizontal 

水平方向镜像

JCMediaDeviceMirrorVertical 

竖直方向镜像

JCMediaDeviceMirrorAuto 

自动选择

JCMediaDeviceMirrorFromLeft 

转场动画,从左侧翻转

JCMediaDeviceMirrorFromTop 

转场动画,从上侧翻转

◆ JCMediaDeviceRender

enum JCMediaDeviceRender : NSInteger

渲染模式

枚举值
JCMediaDeviceRenderFullScreen 

铺满窗口,会有裁剪

JCMediaDeviceRenderFullContent 

全图像显示,会有黑边

JCMediaDeviceRenderFullAuto 

自适应

◆ JCMediaDeviceRotateAngle

enum JCMediaDeviceRotateAngle : NSInteger

窗口与屏幕角度

枚举值
JCMediaDeviceRotateAngle0 

窗口与屏幕角度 0°

JCMediaDeviceRotateAngle90 

窗口与屏幕角度 90°

JCMediaDeviceRotateAngle180 

窗口与屏幕角度 180°

JCMediaDeviceRotateAngle270 

窗口与屏幕角度 270°

◆ JCMediaDeviceVideoAngel

enum JCMediaDeviceVideoAngel : NSInteger

视频旋转角度

枚举值
JCMediaDeviceVideoAngelAuto 

自动

JCMediaDeviceVideoAngel0 

JCMediaDeviceVideoAngel90 

90°

JCMediaDeviceVideoAngel180 

180°

JCMediaDeviceVideoAngel270 

270°

◆ JCMediaDeviceVideoPixelFormat

视频像素格式

枚举值
JCMediaDeviceVideoPixelFormatI420 

I420

JCMediaDeviceVideoPixelFormatIYUV 

IYUV

JCMediaDeviceVideoPixelFormatRGB24 

RGB24

JCMediaDeviceVideoPixelFormatABGR 

ABGR

JCMediaDeviceVideoPixelFormatARGB 

ARGB

JCMediaDeviceVideoPixelFormatARGB444 

ARGB444

JCMediaDeviceVideoPixelFormatRGB565 

RGB565

JCMediaDeviceVideoPixelFormatARGB1555 

ARGB1555

JCMediaDeviceVideoPixelFormatYUY2 

YUY2

JCMediaDeviceVideoPixelFormatYV12 

YV12

JCMediaDeviceVideoPixelFormatUYVY 

UYVY

JCMediaDeviceVideoPixelFormatMJPG 

MJPG

JCMediaDeviceVideoPixelFormatNV21 

NV21

JCMediaDeviceVideoPixelFormatNV12 

NV12

JCMediaDeviceVideoPixelFormatBGRA 

BGRA

◆ JCMediaDeviceVideoSource

enum JCMediaDeviceVideoSource : NSInteger

视频源类型

枚举值
JCMediaDeviceVideoSourcePeer 

用户

JCMediaDeviceVideoSourceCapture 

采集设备

JCMediaDeviceVideoSourceFile 

文件

函数说明

◆ focus:yPercent:

- (bool) focus: (float)  xPercent
yPercent: (float)  yPercent 

对焦

调用此方法时需要保证该视频对象正在渲染,否则将调用失败

注解
前置摄像头可能会调用失败
参数
xPercent焦点所在渲染视图 x 轴的比例,取值范围 0-1
yPercent焦点所在渲染视图 y 轴的比例,取值范围 0-1
返回
是否成功
  • true: 成功
  • false: 失败

◆ pause

- (void) pause

暂停视频渲染

◆ replace:

- (bool) replace: (NSString *)  videoSource

更新视频渲染标识

参数
videoSource视频源
返回
成功返回 true,失败返回 false

◆ resume

- (void) resume

恢复视频渲染

◆ rotate:

- (void) rotate: (int)  angle

旋转角度,必须是90的倍数,该角度表示与屏幕正方向旋转后的夹角

参数
angle角度值

◆ snapshot:heigh:filePath:

- (bool) snapshot: (int)  width
heigh: (int)  height
filePath: (NSString *)  filePath 

视频通话截图

调用此方法时需要保证该视频对象正在渲染,否则将调用失败

参数
width截屏宽度像素,-1为视频源像素
height截屏高度像素,-1为视频源像素
filePath文件路径,需精确到文件名及格式,例如:/Documents/JuphoonCloud/picture.png。请确保目录存在且可写。
返回
是否成功
  • true: 成功
  • false: 失败

◆ videoMirror:

- (bool) videoMirror: (JCMediaDeviceMirror mirrorType

镜像

调用此方法时需要保证该视频对象正在渲染,否则将调用失败

参数
mirrorType镜像类型
参见
JCMediaDeviceMirror
返回
是否成功
  • true: 成功
  • false: 失败

属性

◆ customData

- (id) customData
readwritenonatomicassign

自定义数据

◆ renderType

- (JCMediaDeviceRender) renderType
readnonatomicassign

渲染模式

◆ videoSource

- (NSString*) videoSource
readnonatomicassign

渲染标识

◆ videoView

- (JCView*) videoView
readnonatomicstrong

获取视频渲染视图

最后更新时间: 2021/11/9 17:34:32