JLChen
2021-04-01 bf7f42bc3b63a0c2cec5a5adfb44feffab47a077
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
//
//  ESError.h
//  ESVideoPhoneSDk
//
//  Created by eTouchSky on 2019/12/14.
//  Copyright © 2019 eTouchSky. All rights reserved.
//
//  ESVideoPhone的ESVideoPhoneDelegate方法“- (void)getAErrorForESVideoPhone:(NSString *)errorStr type:(NSUInteger) errortype” 中errortype的类型
 
 
#import <Foundation/Foundation.h>
//视频采集,会导致门口机看不到App的视频(监控状态时,门口机是看不到App的视频的)
//App需要处理 LMPVideoCaptureErrorGetDevice与LMPVideoCaptureErrorNotAuthorized 类型的错误
typedef NS_ENUM (NSUInteger, LMPVideoCaptureError){
    LMPVideoCaptureErrorGetDevice                      = 0,//获取摄像头失败
    LMPVideoCaptureErrorGetInput                       = 1,//获取视频输入错误,从error中获取具体信息
    LMPVideoCaptureErrorAddInput                       = 2,//AddInputVideo错误
    LMPVideoCaptureErrorAddOutput                      = 3,//AddOutputVideo错误
    LMPVideoCaptureErrorNotAuthorized                  = 4,//没有授权,授权处理由App实现
    LMPVideoCaptureErrorSetSessionPreset               = 5,//SetSessionPreset失败
};
//openGl视频渲染,会导致门口机看不到App的视频(监控状态时,门口机是看不到App的视频的)
typedef NS_ENUM (NSUInteger, LMPOpenglError){
    LMPOpenglErrorSetCurrentContext                      = 0,//EAGLContext上下文创建失败
    LMPOpenglErrorRenderbuffer                           = 1,//OpenGL attach渲染缓冲区失败
    LMPOpenglErrorGenTextures                            = 2,//OpenGL 纹理创建失败
    LMPOpenglErrorShaderConnection                       = 3,//OpenGL 着色器连接失败
    LMPOpenglErrorLoadShader                             = 4,//OpenGL 加载着色器失败
    LMPOpenglErrorShaderCompilation                      = 5,//OpenGL 着色器编译失败
};
/**视频解码,会导致App看不到门口机的视频
debug模式下,断点可能导致出现LMPH264HwDecoderErrorKVTInvalidSessionErr的错误
前台后切换,来电等原因的中断可能会出现LMPH264HwDecoderErrorKVTInvalidSessionErr的错误(已经修复,注意测试过程中是否还会出现)
*/
typedef NS_ENUM (NSUInteger, LMPH264HwDecoderError){
    LMPH264HwDecoderErrorInitH264HardwareDecoder                     = 0,//InitH264HardwareDecoderErr
    LMPH264HwDecoderErrorKVTVideoDecoderMalfunction                  = 1,//kVTVideoDecoderMalfunctionErr
    LMPH264HwDecoderErrorKVTInvalidSessionErr                        = 2,//kVTInvalidSessionErr
    LMPH264HwDecoderErrorKVTVideoDecoderBadDataErr                   = 3,//kVTVideoDecoderBadDataErr
    LMPH264HwDecoderErrorDecodeOtherErr                              = 4,//硬解码其他错误
    LMPH264HwDecoderErrorCVPixelBufferRefPlantErr                    = 5,//CVPixelBufferRef中数据为空
    LMPH264HwDecoderErrorCVPixelBufferRefYUVErr                      = 6,//CVPixelBufferRef中取出YUV失败
};
//视频编码,会导致门口机看不到App的视频(监控状态时,门口机是看不到App的视频的)
typedef NS_ENUM (NSUInteger, LMPH264EncoderError){
    LMPH264EncoderErrorVTCompressionSessionCreate                    = 0,//VTCompressionSessionCreateErr
    LMPH264EncoderErrorVideoCompressonOutputCallback                 = 1,//编码回调失败
};
//音频采集,会导致不能采集音频,对方听不到App的声音(监控状态时,门口机是听不到App的声音的)
typedef NS_ENUM (NSUInteger, LMPAudioCaptureError){
    LMPAudioCaptureErrorGetNew                         = 0,//AudioComponentInstanceNew失败
    LMPAudioCaptureErrorStreamFormat                   = 1,//kAudioUnitProperty_StreamFormat失败
    LMPAudioCaptureErrorEnableRecord                   = 2,//打开录音失败
    LMPAudioCaptureErrorEnablePlay                     = 3,//关闭播放失败
    LMPAudioCaptureErrorSetInputCallback               = 4,//AudioUnitSetCallback失败
    LMPAudioCaptureErrorShouldAllocateBuffer           = 5,//使用自己的缓存失败
    LMPAudioCaptureErrorBypassVoiceProcessing          = 6,//打开回声消除功能失败
    LMPAudioCaptureErrorAudioUnitInitialize          = 7,//AudioUnitInitialize失败
};
//音频播放,会导致不能播放音频,听不到对方的声音
typedef NS_ENUM (NSUInteger, LMPAudioPlayError){
    LMPAudioPlayErrorGetNew                         = 0,//AudioPlay_AudioComponentInstanceNew失败
    LMPAudioPlayErrorStreamFormat                   = 1,//AudioPlay_kAudioUnitProperty_StreamFormat失败
    LMPAudioPlayErrorEnableRecord                   = 2,//AudioPlay_关闭录音失败
    LMPAudioPlayErrorEnablePlay                     = 3,//AudioPlay_打开播放失败
    LMPAudioPlayErrorSetRenderCallback              = 4,//AudioPlay_AudioUnitSetRenderCallback失败
    LMPAudioPlayErrorShouldAllocateBuffer           = 5,//使用自己的缓存失败
    LMPAudioPlayErrorBypassVoiceProcessing          = 6,//AudioPlay_打开回声消除功能失败
    LMPAudioPlayErrorAudioUnitInitialize            = 7,//AudioPlay_AudioUnitInitialize失败
};
//音频重采样,会导致不能发送播放音频。
typedef NS_ENUM (NSUInteger, LMPAudioConverterError){
    LMPAudioConverterErrorGetNew                   = 0,//GetNew失败
    LMPAudioConverterErrorRecord                   = 1,//Record失败
};
 
@interface ESError : NSObject
 
@end