public class LPRecorderImpl extends java.lang.Object implements LPRecorder, IDebugLink
限定符和类型 | 字段和说明 |
---|---|
LPKVOSubject<java.lang.Boolean> |
mObservableDebugStateUI |
LPKVOSubject<byte[]> |
observableOfAudioData |
LPKVOSubject<java.lang.Boolean> |
observableOfBeautyFilter |
LPKVOSubject<java.lang.Boolean> |
observableOfCameraOn |
LPKVOSubject<java.lang.Boolean> |
observableOfMicOn |
java.lang.String |
publishSession |
限定符和类型 | 方法和说明 |
---|---|
void |
attachAudio()
打开音频
|
void |
attachAVideo()
保证同时打开音视频只发一次media_publish
|
void |
attachVideo()
打开视频
|
void |
changeMusicModeOn(boolean isOpen)
设置音乐模式
|
void |
closeBeautyFilter()
avsdk only
关闭美颜模式
|
void |
closeFlashLight()
avsdk only
关闭闪光灯
|
void |
detachAudio()
关闭音频
|
void |
detachAVideo()
保证同时关闭音视频只发一次media_publish
|
void |
detachVideo()
关闭视频
|
void |
enableDualStreamMode(boolean enable)
开/关视频双流模式
|
float |
getBeautyLevel()
获取简易美颜级别
|
int |
getCameraCount()
获得系统摄像头数量
|
boolean |
getCameraOrientation()
摄像头方向,默认true为前置,false为后置
|
LPCameraView |
getCameraView()
获取上行视频采集的LPCameraView
|
io.reactivex.subjects.PublishSubject<DebugInfo> |
getDebugPublishSubject()
获取Debug的Subject
|
com.baijiayun.bjyrtcengine.Defines.BJYRtcCommon.VideoMirrorMode |
getEncodeVideoMirrorMode()
获取推流镜像模式
|
LPConstants.LPLinkType |
getLinkType()
avsdk only
获取上行链路流Id
|
com.baijia.baijiashilian.liveplayer.LivePlayer |
getLivePlayer() |
com.baijiayun.bjyrtcengine.Defines.BJYRtcCommon.VideoMirrorMode |
getLocalVideoMirrorMode()
获取本地预览镜像模式
|
LPConstants.LPResolutionType |
getMaxVideoDefinition()
获得最高分辨率
|
io.reactivex.subjects.PublishSubject<LPResRoomMediaControlModel> |
getMediaControlModelPublishDenySubject() |
io.reactivex.subjects.PublishSubject<LPResRoomMediaControlModel> |
getMediaControlModelPublishSubject() |
io.reactivex.Flowable<java.lang.Boolean> |
getObservableDebugStateUI()
获取Debug信令设置(UI展示使用)
|
io.reactivex.Observable<byte[]> |
getObservableOfAudioData()
avsdk only
音视频数据PCM
|
io.reactivex.Flowable<java.lang.Boolean> |
getObservableOfBeautyFilterChange()
avsdk only
美颜开启状态回调
|
io.reactivex.Flowable<java.lang.Boolean> |
getObservableOfCameraOn()
摄像头是否打开回调
|
io.reactivex.Flowable<LPConstants.LPLinkType> |
getObservableOfLinkType()
avsdk only
链路类型改变回调
|
io.reactivex.Flowable<java.lang.Boolean> |
getObservableOfMicOn()
麦克风是否打开回调
|
io.reactivex.Observable<LPConstants.LPScreenShareState> |
getObservableOfScreenShareState()
屏幕分享状态回调
|
io.reactivex.Flowable<com.baijiayun.bjyrtcengine.BJYRtcEventObserver.LocalStreamStats> |
getObservableOfUpPacketLossRate()
上行丢包率
|
io.reactivex.Flowable<LPConstants.LPResolutionType> |
getObservableOfVideoDefinition()
分辨率改变回调
|
io.reactivex.Flowable<LPVideoScreenshot> |
getObservableOfVideoScreenshot()
视频截图
|
io.reactivex.Flowable<LPConstants.VolumeLevel> |
getObservableOfVolume()
音量大小回调
|
View |
getPreview()
获得上行视频采集的view
|
int |
getPublishIndex()
avsdk only
获取推流节点下标
|
java.lang.String |
getPublishSession()
avsdk only
|
LPMediaResolutionModel |
getResolution()
获取视频
|
int |
getStreamId()
avsdk only
|
java.lang.String |
getStreamName()
avsdk only
|
LPIpAddress |
getUpLinkServer()
推流服务器信息,仅avsdk和bjy webrtc
|
com.baijia.baijiashilian.liveplayer.LivePlayerInfo |
getUpStreamInfo(int streamId)
avsdk only
获取上行链路流
|
LPConstants.LPResolutionType |
getVideoDefinition()
获得分辨率
|
float |
getWhitenessLevel()
获取美白级别
|
void |
invalidVideo()
avsdk only
重绘
|
boolean |
isAudioAttached() |
boolean |
isBeautyFilterOn()
avsdk only
是否开启美颜
|
boolean |
isMusicModeOn()
获取音乐模式状态
|
boolean |
isPublishing() |
boolean |
isScreenSharing()
是否正在屏幕分享
|
boolean |
isVideoAttached() |
void |
leaveRoom()
退出房间
|
void |
onLinkTypeForceChange(LPResRoomLinkTypeChangeModel model) |
void |
openBeautyFilter()
avsdk only
开启美颜模式
|
void |
openFlashLight()
avsdk only
打开闪光灯
|
void |
pauseScreenCapture()
暂停屏幕分享
|
void |
publish()
发布上行流
麦克风、摄像头授权后publish才有效
|
void |
release()
销毁并释放资源
|
void |
resumeScreenCapture()
恢复屏幕分享
|
void |
setAudioFrameListener(org.brtc.sdk.BRTCListener.BRTCAudioFrameListener audioFrameListener)
设置音频数据回调
本地采集并经过音频模块前处理后的音频数据回调
onCapturedRawAudioFrame(BRTCDef.BRTCAudioFrame audioFrame)
本地采集并经过音频模块前处理、音效处理和混 BGM 后的音频数据回调
onLocalProcessedAudioFrame(BRTCDef.BRTCAudioFrame audioFrame)
暂未实现
onCustomAudioRenderingFrame(BRTCDef.BRTCAudioFrame audioFrame)
|
void |
setAudioPcmEnable(boolean enable)
avsdk only
设置avsdk音频pcm是否开启
|
void |
setBeautyLevel(float level)
设置简易美颜级别
|
LPError |
setCaptureVideoDefinition(LPConstants.LPResolutionType definition)
设置分辨率
|
void |
setEncVideoMirrorMode(com.baijiayun.bjyrtcengine.Defines.BJYRtcCommon.VideoMirrorMode mode)
设置推流镜像
|
boolean |
setLinkType(LPConstants.LPLinkType linkType)
avsdk only
设置上行链路类型
|
void |
setLocalVideoMirrorMode(com.baijiayun.bjyrtcengine.Defines.BJYRtcCommon.VideoMirrorMode mode)
设置本地预览是否镜像
|
void |
setMaxVideoDefinition(LPConstants.LPResolutionType definition)
设置最高分辨率
|
void |
setPreview(boolean isFrontCamera,
LPCameraView cameraView)
设置本地摄像头预览
|
void |
setPreview(LPCameraView cameraView)
设置本地摄像头预览
|
boolean |
setTcpWithCdn(java.lang.String tag)
设TCP置上行链路首选CDN
|
void |
setWebrtcEngine(com.baijiayun.bjyrtcengine.BJYRtcEngine bjyRtcEngine)
更新BJYRtcEngine示例
|
void |
setWhitenessLevel(float level)
设置美白级别
|
boolean |
startScreenCapture(View view)
启动屏幕分享
|
void |
stopPublishing()
关闭上行流
|
void |
stopScreenCapture()
停止屏幕分享
|
void |
switchCamera()
切换摄像头(如果有)
|
void |
switchUDPLink(java.lang.String ip,
int port)
avsdk only
切换推流地址
|
void |
takeVideoScreenshot(java.lang.String uid)
视频截图
|
public LPKVOSubject<java.lang.Boolean> observableOfCameraOn
public LPKVOSubject<java.lang.Boolean> observableOfMicOn
public LPKVOSubject<java.lang.Boolean> observableOfBeautyFilter
public LPKVOSubject<byte[]> observableOfAudioData
public java.lang.String publishSession
public LPKVOSubject<java.lang.Boolean> mObservableDebugStateUI
public io.reactivex.subjects.PublishSubject<LPResRoomMediaControlModel> getMediaControlModelPublishSubject()
getMediaControlModelPublishSubject
在接口中 LPRecorder
public io.reactivex.subjects.PublishSubject<LPResRoomMediaControlModel> getMediaControlModelPublishDenySubject()
public View getPreview()
LPRecorder
getPreview
在接口中 LPRecorder
public void setPreview(LPCameraView cameraView)
setPreview
在接口中 LPRecorder
cameraView
- cameraViewpublic void setPreview(boolean isFrontCamera, LPCameraView cameraView)
LPRecorder
setPreview
在接口中 LPRecorder
isFrontCamera
- 是否是前置摄像头public LPCameraView getCameraView()
LPRecorder
getCameraView
在接口中 LPRecorder
public java.lang.String getPublishSession()
LPRecorder
getPublishSession
在接口中 LPRecorder
public com.baijia.baijiashilian.liveplayer.LivePlayer getLivePlayer()
public com.baijia.baijiashilian.liveplayer.LivePlayerInfo getUpStreamInfo(int streamId)
LPRecorder
getUpStreamInfo
在接口中 LPRecorder
public int getStreamId()
LPRecorder
getStreamId
在接口中 LPRecorder
public java.lang.String getStreamName()
LPRecorder
getStreamName
在接口中 LPRecorder
public void attachVideo()
LPRecorder
attachVideo
在接口中 LPRecorder
public void detachVideo()
LPRecorder
detachVideo
在接口中 LPRecorder
public void attachAudio()
LPRecorder
attachAudio
在接口中 LPRecorder
public void detachAudio()
LPRecorder
detachAudio
在接口中 LPRecorder
public boolean isVideoAttached()
isVideoAttached
在接口中 LPRecorder
public boolean isAudioAttached()
isAudioAttached
在接口中 LPRecorder
public void attachAVideo()
attachAVideo
在接口中 LPRecorder
public void detachAVideo()
detachAVideo
在接口中 LPRecorder
public io.reactivex.Flowable<java.lang.Boolean> getObservableOfCameraOn()
LPRecorder
getObservableOfCameraOn
在接口中 LPRecorder
public io.reactivex.Flowable<java.lang.Boolean> getObservableOfMicOn()
LPRecorder
getObservableOfMicOn
在接口中 LPRecorder
public void switchCamera()
LPRecorder
switchCamera
在接口中 LPRecorder
public int getCameraCount()
LPRecorder
getCameraCount
在接口中 LPRecorder
public void publish()
LPRecorder
publish
在接口中 LPRecorder
public LPConstants.LPLinkType getLinkType()
LPRecorder
getLinkType
在接口中 LPRecorder
public void onLinkTypeForceChange(LPResRoomLinkTypeChangeModel model)
public boolean setLinkType(LPConstants.LPLinkType linkType)
LPRecorder
setLinkType
在接口中 LPRecorder
public boolean setTcpWithCdn(java.lang.String tag)
setTcpWithCdn
在接口中 LPRecorder
tag
- tagpublic boolean isPublishing()
isPublishing
在接口中 LPRecorder
public void stopPublishing()
LPRecorder
stopPublishing
在接口中 LPRecorder
public LPError setCaptureVideoDefinition(LPConstants.LPResolutionType definition)
LPRecorder
setCaptureVideoDefinition
在接口中 LPRecorder
definition
- 分辨率public void setMaxVideoDefinition(LPConstants.LPResolutionType definition)
LPRecorder
setMaxVideoDefinition
在接口中 LPRecorder
public LPConstants.LPResolutionType getVideoDefinition()
LPRecorder
getVideoDefinition
在接口中 LPRecorder
public LPConstants.LPResolutionType getMaxVideoDefinition()
LPRecorder
getMaxVideoDefinition
在接口中 LPRecorder
public io.reactivex.Flowable<LPConstants.LPResolutionType> getObservableOfVideoDefinition()
LPRecorder
getObservableOfVideoDefinition
在接口中 LPRecorder
public void openBeautyFilter()
LPRecorder
openBeautyFilter
在接口中 LPRecorder
public void closeBeautyFilter()
LPRecorder
closeBeautyFilter
在接口中 LPRecorder
public boolean isBeautyFilterOn()
LPRecorder
isBeautyFilterOn
在接口中 LPRecorder
public io.reactivex.Flowable<java.lang.Boolean> getObservableOfBeautyFilterChange()
LPRecorder
getObservableOfBeautyFilterChange
在接口中 LPRecorder
public int getPublishIndex()
LPRecorder
getPublishIndex
在接口中 LPRecorder
public LPIpAddress getUpLinkServer()
LPRecorder
getUpLinkServer
在接口中 LPRecorder
public void invalidVideo()
LPRecorder
invalidVideo
在接口中 LPRecorder
public void openFlashLight()
LPRecorder
openFlashLight
在接口中 LPRecorder
public void closeFlashLight()
LPRecorder
closeFlashLight
在接口中 LPRecorder
public io.reactivex.Flowable<LPConstants.VolumeLevel> getObservableOfVolume()
LPRecorder
getObservableOfVolume
在接口中 LPRecorder
public io.reactivex.Flowable<com.baijiayun.bjyrtcengine.BJYRtcEventObserver.LocalStreamStats> getObservableOfUpPacketLossRate()
LPRecorder
getObservableOfUpPacketLossRate
在接口中 LPRecorder
public boolean getCameraOrientation()
getCameraOrientation
在接口中 LPRecorder
public void takeVideoScreenshot(java.lang.String uid)
LPRecorder
takeVideoScreenshot
在接口中 LPRecorder
uid
- 要视频截图的userId,传0表示截自己的public io.reactivex.Flowable<LPVideoScreenshot> getObservableOfVideoScreenshot()
LPRecorder
getObservableOfVideoScreenshot
在接口中 LPRecorder
public LPMediaResolutionModel getResolution()
LPRecorder
getResolution
在接口中 LPRecorder
public void switchUDPLink(java.lang.String ip, int port)
LPRecorder
switchUDPLink
在接口中 LPRecorder
public io.reactivex.Flowable<LPConstants.LPLinkType> getObservableOfLinkType()
LPRecorder
getObservableOfLinkType
在接口中 LPRecorder
public io.reactivex.Observable<byte[]> getObservableOfAudioData()
LPRecorder
getObservableOfAudioData
在接口中 LPRecorder
public void release()
LPRecorder
release
在接口中 LPRecorder
public boolean startScreenCapture(View view)
LPRecorder
startScreenCapture
在接口中 LPRecorder
public void stopScreenCapture()
LPRecorder
stopScreenCapture
在接口中 LPRecorder
public void pauseScreenCapture()
LPRecorder
pauseScreenCapture
在接口中 LPRecorder
public void resumeScreenCapture()
LPRecorder
resumeScreenCapture
在接口中 LPRecorder
public io.reactivex.Observable<LPConstants.LPScreenShareState> getObservableOfScreenShareState()
LPRecorder
getObservableOfScreenShareState
在接口中 LPRecorder
public boolean isScreenSharing()
LPRecorder
isScreenSharing
在接口中 LPRecorder
public void setBeautyLevel(float level)
LPRecorder
setBeautyLevel
在接口中 LPRecorder
level
- [0.0,1.0]public float getBeautyLevel()
LPRecorder
getBeautyLevel
在接口中 LPRecorder
public void setWhitenessLevel(float level)
LPRecorder
setWhitenessLevel
在接口中 LPRecorder
level
- [0.0,1.0]public float getWhitenessLevel()
LPRecorder
getWhitenessLevel
在接口中 LPRecorder
public void setLocalVideoMirrorMode(com.baijiayun.bjyrtcengine.Defines.BJYRtcCommon.VideoMirrorMode mode)
LPRecorder
setLocalVideoMirrorMode
在接口中 LPRecorder
public void changeMusicModeOn(boolean isOpen)
LPRecorder
changeMusicModeOn
在接口中 LPRecorder
public boolean isMusicModeOn()
LPRecorder
isMusicModeOn
在接口中 LPRecorder
public void setAudioFrameListener(org.brtc.sdk.BRTCListener.BRTCAudioFrameListener audioFrameListener)
LPRecorder
setAudioFrameListener
在接口中 LPRecorder
public com.baijiayun.bjyrtcengine.Defines.BJYRtcCommon.VideoMirrorMode getLocalVideoMirrorMode()
LPRecorder
getLocalVideoMirrorMode
在接口中 LPRecorder
public com.baijiayun.bjyrtcengine.Defines.BJYRtcCommon.VideoMirrorMode getEncodeVideoMirrorMode()
LPRecorder
getEncodeVideoMirrorMode
在接口中 LPRecorder
public void setEncVideoMirrorMode(com.baijiayun.bjyrtcengine.Defines.BJYRtcCommon.VideoMirrorMode mode)
LPRecorder
setEncVideoMirrorMode
在接口中 LPRecorder
public void enableDualStreamMode(boolean enable)
LPRecorder
enableDualStreamMode
在接口中 LPRecorder
public void setWebrtcEngine(com.baijiayun.bjyrtcengine.BJYRtcEngine bjyRtcEngine)
LPRecorder
setWebrtcEngine
在接口中 LPRecorder
public void leaveRoom()
LPRecorder
leaveRoom
在接口中 LPRecorder
public void setAudioPcmEnable(boolean enable)
LPRecorder
setAudioPcmEnable
在接口中 LPRecorder
public io.reactivex.subjects.PublishSubject<DebugInfo> getDebugPublishSubject()
IDebugLink
getDebugPublishSubject
在接口中 IDebugLink
public io.reactivex.Flowable<java.lang.Boolean> getObservableDebugStateUI()
IDebugLink
getObservableDebugStateUI
在接口中 IDebugLink