You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
208 lines
6.2 KiB
208 lines
6.2 KiB
1 year ago
|
//
|
||
|
// JCMediaDeviceConstants.h
|
||
|
// JCSDK-OC
|
||
|
//
|
||
|
// Created by maikireton on 2017/8/11.
|
||
|
// Copyright © 2017年 juphoon. All rights reserved.
|
||
|
//
|
||
|
|
||
|
#import <Foundation/Foundation.h>
|
||
|
|
||
|
/// @addtogroup 设备模块
|
||
|
/// @{
|
||
|
|
||
|
/**
|
||
|
* 窗口与屏幕角度
|
||
|
*/
|
||
|
typedef NS_ENUM(NSInteger, JCMediaDeviceRotateAngle) {
|
||
|
/// 窗口与屏幕角度 0°
|
||
|
JCMediaDeviceRotateAngle0 = 0,
|
||
|
/// 窗口与屏幕角度 90°
|
||
|
JCMediaDeviceRotateAngle90 = 90,
|
||
|
/// 窗口与屏幕角度 180°
|
||
|
JCMediaDeviceRotateAngle180 = 180,
|
||
|
/// 窗口与屏幕角度 270°
|
||
|
JCMediaDeviceRotateAngle270 = 270,
|
||
|
};
|
||
|
|
||
|
/**
|
||
|
* 渲染模式
|
||
|
*/
|
||
|
typedef NS_ENUM(NSInteger, JCMediaDeviceRender) {
|
||
|
/// 铺满窗口,会有裁剪
|
||
|
JCMediaDeviceRenderFullScreen = 0,
|
||
|
/// 全图像显示,会有黑边
|
||
|
JCMediaDeviceRenderFullContent,
|
||
|
/// 自适应
|
||
|
JCMediaDeviceRenderFullAuto,
|
||
|
};
|
||
|
|
||
|
/**
|
||
|
* 视频像素格式
|
||
|
*/
|
||
|
typedef NS_ENUM(NSInteger, JCMediaDeviceVideoPixelFormat) {
|
||
|
/// I420
|
||
|
JCMediaDeviceVideoPixelFormatI420 = 1,
|
||
|
/// IYUV
|
||
|
JCMediaDeviceVideoPixelFormatIYUV = 2,
|
||
|
/// RGB24
|
||
|
JCMediaDeviceVideoPixelFormatRGB24 = 3,
|
||
|
/// ABGR
|
||
|
JCMediaDeviceVideoPixelFormatABGR = 4,
|
||
|
/// ARGB
|
||
|
JCMediaDeviceVideoPixelFormatARGB = 5,
|
||
|
/// ARGB444
|
||
|
JCMediaDeviceVideoPixelFormatARGB444 = 6,
|
||
|
/// RGB565
|
||
|
JCMediaDeviceVideoPixelFormatRGB565 = 7,
|
||
|
/// ARGB1555
|
||
|
JCMediaDeviceVideoPixelFormatARGB1555 = 8,
|
||
|
/// YUY2
|
||
|
JCMediaDeviceVideoPixelFormatYUY2 = 9,
|
||
|
/// YV12
|
||
|
JCMediaDeviceVideoPixelFormatYV12 = 10,
|
||
|
/// UYVY
|
||
|
JCMediaDeviceVideoPixelFormatUYVY = 11,
|
||
|
/// MJPG
|
||
|
JCMediaDeviceVideoPixelFormatMJPG = 12,
|
||
|
/// NV21
|
||
|
JCMediaDeviceVideoPixelFormatNV21 = 13,
|
||
|
/// NV12
|
||
|
JCMediaDeviceVideoPixelFormatNV12 = 14,
|
||
|
/// BGRA
|
||
|
JCMediaDeviceVideoPixelFormatBGRA = 15,
|
||
|
};
|
||
|
|
||
|
/**
|
||
|
* 视频旋转角度
|
||
|
*/
|
||
|
typedef NS_ENUM(NSInteger, JCMediaDeviceVideoAngel) {
|
||
|
/// 自动
|
||
|
JCMediaDeviceVideoAngelAuto = -1,
|
||
|
/// 0°
|
||
|
JCMediaDeviceVideoAngel0 = 0,
|
||
|
/// 90°
|
||
|
JCMediaDeviceVideoAngel90 = 90,
|
||
|
/// 180°
|
||
|
JCMediaDeviceVideoAngel180 = 180,
|
||
|
/// 270°
|
||
|
JCMediaDeviceVideoAngel270 = 270
|
||
|
};
|
||
|
|
||
|
/**
|
||
|
* 摄像头类型
|
||
|
*/
|
||
|
typedef NS_ENUM(NSInteger, JCMediaDeviceCameraType) {
|
||
|
/// 未获取到摄像头
|
||
|
JCMediaDeviceCameraTypeNone = 0,
|
||
|
/// 前置摄像头
|
||
|
JCMediaDeviceCameraTypeFront = 1,
|
||
|
/// 后置摄像头
|
||
|
JCMediaDeviceCameraTypeBack = 2,
|
||
|
/// 未知摄像头
|
||
|
JCMediaDeviceCameraTypeUnknown = 3
|
||
|
};
|
||
|
|
||
|
/**
|
||
|
* 视频源类型
|
||
|
*/
|
||
|
typedef NS_ENUM(NSInteger, JCMediaDeviceVideoSource) {
|
||
|
/// 用户
|
||
|
JCMediaDeviceVideoSourcePeer = 0,
|
||
|
/// 采集设备
|
||
|
JCMediaDeviceVideoSourceCapture = 1,
|
||
|
/// 文件
|
||
|
JCMediaDeviceVideoSourceFile = 2,
|
||
|
};
|
||
|
|
||
|
/**
|
||
|
* 镜像类型
|
||
|
*/
|
||
|
typedef NS_ENUM(NSInteger, JCMediaDeviceMirror) {
|
||
|
/// 不镜像
|
||
|
JCMediaDeviceMirrorNone = 0,
|
||
|
/// 水平方向镜像
|
||
|
JCMediaDeviceMirrorHorizontal = 1,
|
||
|
/// 竖直方向镜像
|
||
|
JCMediaDeviceMirrorVertical = 2,
|
||
|
/// 自动选择
|
||
|
JCMediaDeviceMirrorAuto = 3,
|
||
|
/// 转场动画,从左侧翻转
|
||
|
JCMediaDeviceMirrorFromLeft = 4,
|
||
|
/// 转场动画,从上侧翻转
|
||
|
JCMediaDeviceMirrorFromTop = 8,
|
||
|
};
|
||
|
|
||
|
typedef NS_ENUM(NSInteger, JCMediaDeviceAudioAECType) {
|
||
|
/// 开启硬件AEC
|
||
|
JCMediaDeviceAudioAECTypeOn,
|
||
|
/// 关闭硬件AEC
|
||
|
JCMediaDeviceAudioAECTypeOff,
|
||
|
/// 硬件AEC 自动
|
||
|
JCMediaDeviceAudioAECTypeAuto
|
||
|
};
|
||
|
|
||
|
typedef NS_ENUM(NSInteger, JCMediaDeviceAudioAGCType) {
|
||
|
/// 开启硬件AGC
|
||
|
JCMediaDeviceAudioAGCTypeOn,
|
||
|
/// 关闭硬件AGC
|
||
|
JCMediaDeviceAudioAGCTypeOff,
|
||
|
/// 硬件AGC 自动
|
||
|
JCMediaDeviceAudioAGCTypeAuto
|
||
|
|
||
|
};
|
||
|
typedef NS_ENUM(NSInteger, JCMediaDeviceEffectType) {
|
||
|
JCMediaDeviceEffectTypeNone = 0, /**< @brief 无 */
|
||
|
/** 高斯模糊特效\n
|
||
|
* JSON 参数:\n
|
||
|
* "hoffset": 宽度偏移量,默认2像素\n
|
||
|
* "voffset": 高度偏移量,默认2像素\n
|
||
|
* "iterate": 重复次数,默认3\n
|
||
|
* "pixels": 模糊半径\n
|
||
|
* "sigma": sigma越大越模糊\n
|
||
|
*/
|
||
|
JCMediaDeviceEffectTypeBlur = 1, /**< @brief 高斯模糊 */
|
||
|
JCMediaDeviceEffectTypeGrey = 2, /**< @brief 黑白 */
|
||
|
JCMediaDeviceEffectTypeMask = 3, /**< @brief 掩膜 */
|
||
|
/** 放大镜特效\n
|
||
|
* JSON 参数:\n
|
||
|
* "dx": 相对于放大中心点坐标x的宽度偏移量\n
|
||
|
* "dy": 相对于放大中心点坐标y的高度偏移量\n
|
||
|
* "x": 放大中心x坐标,范围[0, 1]\n
|
||
|
* "y": 放大中心y坐标,范围[0, 1]\n
|
||
|
* "zoom": 放大倍数,默认2\n
|
||
|
*"radius": 放大半径,与高度或宽度中的较小值相关,默认0.2\n
|
||
|
*/
|
||
|
JCMediaDeviceEffectTypeMagnifier = 4, /**< @brief 放大镜 */
|
||
|
JCMediaDeviceEffectTypeOldTime = 5, /**< @brief 怀旧 */
|
||
|
JCMediaDeviceEffectTypePhotoVerse = 6, /**< @brief 底片 */
|
||
|
JCMediaDeviceEffectTypeLomo = 7, /**< @brief 温暖 */
|
||
|
/** 景深特效\n
|
||
|
* JSON 参数:\n
|
||
|
* "x": x轴中点\n
|
||
|
* "y": y轴中点\n
|
||
|
* "radius": 半径,与高度或宽度中的较小值相关,默认0.2\n
|
||
|
* "exp": alpha exp, 默认1.0\n
|
||
|
*/
|
||
|
JCMediaDeviceEffectTypeDepthOfField = 8, /**< @brief 拖动控制景深 */
|
||
|
/**
|
||
|
* 将等角转换为直线\n
|
||
|
* 可选的 JSON 参数:\n
|
||
|
* "status": 打开或关闭特效,同时重置所有参数\n
|
||
|
* 0: 关闭\n
|
||
|
* 1: 打开\n
|
||
|
* "yaw": 几何中心的方位角,范围[0,360],默认0度\n
|
||
|
* "pitch": 几何中心的高程角度,范围[-180,180],默认0度\n
|
||
|
* "roll": 围绕几何轴的滚动角度,范围[0,360],默认0度\n
|
||
|
* "fov": 水平视场角度范围,范围(0,180),默认90度\n
|
||
|
* 警告: fov 太接近0将大大减少图像分辨率\n
|
||
|
* fov 太接近180会大大扭曲图像\n
|
||
|
* 建议范围: 45-135\n
|
||
|
* 如果没有指定,会依据图像宽度使用2:1的宽高比自动计算\n
|
||
|
* "reset": 重置参数至默认值,有效值:任意数字\n
|
||
|
*/
|
||
|
JCMediaDeviceEffectTypeErtToRect = 9, /**< @brief 远端全景视频 */
|
||
|
};
|
||
|
|
||
|
/// @}
|