cn.tee3.avd_SDK-Objectc  2.1.0
AVDLivecast.h
浏览该文件的文档.
1 //
2 // AVDLivecast.h
3 // avd_sdk
4 //
5 // Created by skin on 15-7-21.
6 // Copyright (c) 2015年 t3ee. All rights reserved.
7 //
8 
9 #ifndef avd_sdk_AVDLivecast_h
10 #define avd_sdk_AVDLivecast_h
11 
12 #import "AVDCommon.h"
13 #import "AVDVideoView.h"
14 #import "AVDEasyRoom.h"
15 #import "AVDFakeVideoCapturer.h"
16 #import "AVDFakeAudioCapturer.h"
17 
39 };
40 
46 @protocol AVDLivecastDelegate<NSObject>
48 
53 - (void) onStatus:(enum AVDLivecastStatus)status;
58 - (void) onConnectionStatus:(enum AVDConnectionStatus)status;
64 - (void) onError:(AVDResult)error message:(NSString*)message;
65 
66 @end
67 @protocol AVDStreamStatsDelegate<NSObject>
69 
74 - (void) onStreamlast3Stats:(NSUInteger)videofps avbps:(NSUInteger)avbps;
75 
76 @end
77 
83 @interface AVDLivecast : NSObject
84 @property (nonatomic,weak) id <AVDLivecastDelegate> delegate;
85 @property (nonatomic,weak) id <AVDStreamStatsDelegate> streamStatsdelegate;
86 @property (nonatomic,retain) AVDVideoParams *videoParams;
87 @property (nonatomic,retain) AVDAudioParams *audioParams;
88 @property (nonatomic,assign,readonly) enum AVDLivecastStatus status;
89 @property (nonatomic,assign,readonly) BOOL isMicrophoneMute;
95 + (AVDResult)setLivecastId:(AVDRoomId)castId;
101 + (AVDLivecast*) instance;
104 + (void) destory;
105 
116 - (AVDResult) uninit;
117 
118 
124 - (AVDResult) setDisplayView:(id<AVDVideoRenderer>)render;
125 
132 - (AVDResult) setVideoSource:(AVDFakeVideoCapturer*)vcapturer;
139 - (AVDResult) setAudioSource:(AVDFakeAudioCapturer*)acapturer;
140 
153 
162 
170 - (AVDResult) captureImage:(NSInteger)quality;
171 
177 - (AVDResult) publisRTMP:(NSString*)pushUrl;
182 - (AVDResult) unpublish;
183 
184 
188 - (BOOL) isInRoom;
199 - (AVDResult) attachRoom:(AVDEasyRoom*)room;
204 
205 
212 - (AVDResult) setOption:(enum AVDRoomOption)type value:(NSString*)svalue;
218 - (NSString*) getOption:(enum AVDRoomOption)type;
219 
220 #ifndef DOXYGEN_SHOULD_SKIP_THIS
221 // Disallow init and don't add to documentation
222 - (id)init __attribute__((
223  unavailable("init is not a supported initializer for this class.")));
224 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
225 
226 @end
227 
228 #endif
AVDResult initContext()
直播对象初始化
正在与服务器重连接
Definition: AVDLivecast.h:38
简易房间接口类
Definition: AVDEasyRoom.h:153
正在连接服务器
Definition: AVDLivecast.h:35
AVDVideoParams * videoParams
视频参数
Definition: AVDLivecast.h:86
AVDResult muteMicrophone()
本地麦克风静默
视频可以预览,准备好可以直播
Definition: AVDLivecast.h:36
音频参数信息结构.
Definition: AVDAudioParams.h:16
AVDResult uninit()
直播对象反初始化
AVDResult unpublish()
停止直播
(unavailable("init is not a supported initializer for this class." __attribute__()
NSInteger AVDResult
Definition: AVDCommon.h:14
NSString * AVDRoomId
Definition: AVDCommon.h:16
Definition: AVDVideoRenderer.h:27
视频流导入接口.
Definition: AVDFakeVideoCapturer.h:49
AVDConnectionStatus
房间网络状态
Definition: AVDRoomInfo.h:35
AVDResult detachRoom()
直播停止连麦
初始状态
Definition: AVDLivecast.h:34
void destory()
释放直播接口
id< AVDStreamStatsDelegate > streamStatsdelegate
直播推流状态回调代理
Definition: AVDLivecast.h:85
AVDResult stopPreview()
取消预览缺省摄像头视频
直播接口类
Definition: AVDLivecast.h:83
AVDLivecast * instance()
获取直播接口
视频参数信息结构.
Definition: AVDVideoParams.h:17
BOOL isMicrophoneMute
麦克风是否mute状态
Definition: AVDLivecast.h:89
音频流导入接口.
Definition: AVDFakeAudioCapturer.h:20
直播回调接口类
Definition: AVDLivecast.h:46
AVDResult switchCamera()
视频切换摄像头
id< AVDLivecastDelegate > delegate
直播回调代理
Definition: AVDLivecast.h:84
初始状态
Definition: AVDRoomInfo.h:37
正在直播
Definition: AVDLivecast.h:37
AVDResult startPreview()
预览本地缺省摄像头视频
Definition: AVDLivecast.h:67
BOOL isInRoom()
判断是否正在连麦中
enum AVDLivecastStatus status
直播状态
Definition: AVDLivecast.h:88
AVDResult unmuteMicrophone()
本地麦克风静默取消
AVDRoomOption
房间选项
Definition: AVDRoom.h:24
AVDLivecastStatus
客户端直播状态定义
Definition: AVDLivecast.h:33
AVDAudioParams * audioParams
音频参数
Definition: AVDLivecast.h:87