public interface AlivcMediaRecorder
限定符和类型 | 方法和说明 |
---|---|
void |
addFlag(int flag)
增加效果 如:美颜,闪光灯
|
void |
autoFocus(float xRatio,
float yRatio)
对焦
|
void |
focusing(float xRatio,
float yRatio)
已过时。
|
AlivcRecordReporter |
getRecordReporter()
This method only can be called after
init(Context)
and before release() , otherwise ,will return null. |
void |
init(android.content.Context context)
初始化推流器
|
boolean |
isFlagSupported(int flag) |
void |
prepare(java.util.Map<java.lang.String,java.lang.Object> params,
android.view.Surface surface)
已过时。
|
void |
release()
释放资源
|
void |
removeFlag(int flag)
移除效果 如:美颜,闪光灯
|
void |
reset()
推流重置
|
void |
setBeautyLevel(int level)
设置美颜级别
|
void |
setOnNetworkStatusListener(OnNetworkStatusListener listener) |
void |
setOnRecordErrorListener(OnLiveRecordErrorListener listener) |
void |
setOnRecordStatusListener(OnRecordStatusListener listener) |
void |
setPreviewSize(int width,
int height)
设置预览界面大小
|
void |
setZoom(float scaleFactor)
缩放
|
void |
setZoom(float scaleFactor,
com.duanqu.qupai.android.camera.CaptureRequest.OnCaptureRequestResultListener listener)
已过时。
use
setZoom(float) |
void |
startRecord(java.lang.String outputUrl)
开始推流
必须在
prepare(Map, Surface) 之后调用 |
void |
stopRecord()
停止推流
必须在
reset() 之前调用 |
void |
subscribeEvent(com.alibaba.livecloud.event.AlivcEventSubscriber subscriber)
subscribe an event
|
int |
switchCamera()
切换摄像头
|
void |
unSubscribeEvent(int eventType)
unsubscribe an event
|
void init(android.content.Context context)
context
- 上下文release()
@Deprecated void prepare(java.util.Map<java.lang.String,java.lang.Object> params, android.view.Surface surface)
init(Context)
完成之后调用)params
- 准备参数 AlivcMediaFormat
surface
- 预览的surfacestartRecord(String)
,
reset()
void startRecord(java.lang.String outputUrl)
prepare(Map, Surface)
之后调用outputUrl
- 推流地址stopRecord()
int switchCamera()
void stopRecord()
reset()
之前调用startRecord(String)
void reset()
prepare(Map, Surface)
@Deprecated void focusing(float xRatio, float yRatio)
xRatio
- 横向坐标点所占的比例yRatio
- 纵向坐标点所占的比例
instead by autoFocus(float, float)
void autoFocus(float xRatio, float yRatio)
xRatio
- 横向坐标点所占的比例yRatio
- 纵向坐标点所占的比例void setBeautyLevel(int level)
level
- AlivcMediaFormat#BEAUTY_LEVEL_ONE}
see {@link AlivcMediaFormat#BEAUTY_LEVEL_TWO}
see {@link AlivcMediaFormat#BEAUTY_LEVEL_THREE}
see {@link AlivcMediaFormat#BEAUTY_LEVEL_FOUR}
see {@link AlivcMediaFormat#BEAUTY_LEVEL_FIVE}
see {@link AlivcMediaFormat#BEAUTY_LEVEL_SIX}
see {@link AlivcMediaFormat#BEAUTY_LEVEL_SEVEN}
boolean isFlagSupported(int flag)
flag
- @Deprecated void setZoom(float scaleFactor, com.duanqu.qupai.android.camera.CaptureRequest.OnCaptureRequestResultListener listener)
setZoom(float)
scaleFactor
- 缩放比例void setZoom(float scaleFactor)
scaleFactor
- 缩放比例(0-100)void setPreviewSize(int width, int height)
width
- height
- void addFlag(int flag)
flag
- AlivcMediaFormat.FLAG_BEAUTY_ON
,
AlivcMediaFormat.FLAG_AUTO_FOCUS_ON
void removeFlag(int flag)
flag
- AlivcMediaFormat.FLAG_BEAUTY_ON
,
AlivcMediaFormat.FLAG_AUTO_FOCUS_ON
void release()
init(Context)
void setOnRecordErrorListener(OnLiveRecordErrorListener listener)
listener
- void setOnRecordStatusListener(OnRecordStatusListener listener)
listener
- void setOnNetworkStatusListener(OnNetworkStatusListener listener)
listener
- AlivcRecordReporter getRecordReporter()
init(Context)
and before release()
, otherwise ,will return null.void subscribeEvent(com.alibaba.livecloud.event.AlivcEventSubscriber subscriber)
subscriber
- void unSubscribeEvent(int eventType)
eventType
-