被 com.juphoon.cloud.jrtc.JRTCAdvancedImpl 继承.
|
abstract int | enableVideoFile (boolean enable) |
|
abstract int | inputVideoFileFrame (byte[] data, @VideoPixelFormat int format, int width, int height, int angle, int mirror, boolean keyFrame) |
|
abstract int | inputCustomAudioData (int sampleRateHz, int channels, ByteBuffer byteBuffer, int playDelayMS, int recDelayMS, int clockDrift) |
|
abstract int | getAudioOutputData (int sampleRateHz, int channels, ByteBuffer byteBuffer) |
|
abstract int | setLocalCaptureAngle (int angle) |
|
abstract int | setRenderMirror (JRTCVideoCanvas videoCanvas, RenderMirrorType renderMirror) |
|
abstract int | setRenderEffect (JRTCVideoCanvas videoCanvas, @RenderEffectType String enEffectType, String strJson, Object[] extraObjs) |
|
abstract int | freezeRenderEffect (JRTCVideoCanvas videoCanvas, boolean enable) |
|
abstract int | takeOnceSnapshot (JRTCVideoCanvas videoCanvas, int width, int height, String filePath) |
|
abstract int | setRenderAngle (JRTCVideoCanvas jrtcVideoCanvas, @VideoAngle int angle) |
|
abstract int | getMinExposureCompensation () |
|
abstract int | getMaxExposureCompensation () |
|
abstract float | getExposureCompensationStep () |
|
◆ enableVideoFile()
abstract int com.juphoon.cloud.jrtc.JRTCAdvanced.enableVideoFile |
( |
boolean |
enable | ) |
|
|
abstract |
启动视频文件输入源
- 作用是关闭原camera采集,内部状态设置成文件视频源开启状态
- 若调用此方法时文件视频源已开启,则不会收到回调
- 若调用此方法时文件视频源还未开启,则会收到 onCameraUpdate 回调
- 文件和摄像头作为视频输入源只能存在一种,如果当前摄像头已开启的话会关闭摄像头
- 参数
-
- 返回
- 调用是否成功
◆ inputVideoFileFrame()
abstract int com.juphoon.cloud.jrtc.JRTCAdvanced.inputVideoFileFrame |
( |
byte[] |
data, |
|
|
@VideoPixelFormat int |
format, |
|
|
int |
width, |
|
|
int |
height, |
|
|
int |
angle, |
|
|
int |
mirror, |
|
|
boolean |
keyFrame |
|
) |
| |
|
abstract |
将视频输入数据输入到媒体层
调用此方法时要保证文件视频源已开启
- 参数
-
data | 画面二进制数据 |
format | 视频像素格式 |
width | 宽 |
height | 高 |
angle | 旋转角度,要求是 90 的倍数 |
mirror | 是否水平镜像
|
keyFrame | 是否为关键帧,针对 format 为 H264 格式 或者 H264_SVC 格式
|
- 返回
- 调用是否成功
- 注解
- 当 format 为 H264 格式 或者 H264_SVC 格式, 并且是关键帧时:
- 第一帧一定要包含关键帧,并且需要将 0x67 0x68 0x65 的数据作为完整一帧传入,其中0x67,0x68为pps,0x65为关键帧标识
- 后续P帧以 0x41 数据形式传入
- 关键帧要以固定间隔传入,例如5秒,否则一开始可能有几秒对端无法显示视频
◆ inputCustomAudioData()
abstract int com.juphoon.cloud.jrtc.JRTCAdvanced.inputCustomAudioData |
( |
int |
sampleRateHz, |
|
|
int |
channels, |
|
|
ByteBuffer |
byteBuffer, |
|
|
int |
playDelayMS, |
|
|
int |
recDelayMS, |
|
|
int |
clockDrift |
|
) |
| |
|
abstract |
将音频输入数据输入到媒体层
当 autoStartAudioInputDevice 为 false 时才可以将音频输入数据输入到媒体层。 建议在成功加入频道后,在子线程不断的调用此方法传入音频数据
- 参数
-
sampleRateHz | 外部输入源的采样频率,取值范围:8000,16000,32000,44100,48000 |
channels | 外部输入源的采样通道数,取值范围:1或2 |
byteBuffer | 外部采集数据源,需要传入 DirectByteBuffer 对象。格式为PCM |
playDelayMS | 播放延时 一般设为0 |
recDelayMS | 采集延时 一般设为0 |
clockDrift | 时钟漂移 一般设为0 |
- 返回
- 调用是否成功
◆ getAudioOutputData()
abstract int com.juphoon.cloud.jrtc.JRTCAdvanced.getAudioOutputData |
( |
int |
sampleRateHz, |
|
|
int |
channels, |
|
|
ByteBuffer |
byteBuffer |
|
) |
| |
|
abstract |
获取音频输出数据
当 autoStartAudioOutputDevice 为 false 时才可以获取到音频输出数据。 建议在成功加入频道后,在子线程不断的调用此方法获取音频输出数据
- 参数
-
sampleRateHz | 输出源的采集频率,取值范围:8000,16000,32000,44100,48000 |
channels | 输出源的采样通道数,取值范围:1或2 |
byteBuffer | 字节缓冲区,从媒体层获取的音频输出数据将被存入此缓冲区,需要传入 DirectByteBuffer 对象。缓冲区的容量为(采样频率*采样通道数/100)。格式为PCM |
- 返回
- 调用是否成功
◆ setLocalCaptureAngle()
abstract int com.juphoon.cloud.jrtc.JRTCAdvanced.setLocalCaptureAngle |
( |
int |
angle | ) |
|
|
abstract |
设置本地视频采集窗体角度–设置本地采集的视频角度
- 参数
-
- 返回
- 调用是否成功
◆ setRenderMirror()
设置本地渲染的画面镜像
- 参数
-
videoCanvas | 渲染对象 |
renderMirror | 镜像类型枚举对象 |
- 返回
- 调用是否成功
◆ setRenderEffect()
abstract int com.juphoon.cloud.jrtc.JRTCAdvanced.setRenderEffect |
( |
JRTCVideoCanvas |
videoCanvas, |
|
|
@RenderEffectType String |
enEffectType, |
|
|
String |
strJson, |
|
|
Object[] |
extraObjs |
|
) |
| |
|
abstract |
◆ freezeRenderEffect()
abstract int com.juphoon.cloud.jrtc.JRTCAdvanced.freezeRenderEffect |
( |
JRTCVideoCanvas |
videoCanvas, |
|
|
boolean |
enable |
|
) |
| |
|
abstract |
是否冻结渲染
渲染特效后的静态展示(某一帧画面)
- 参数
-
videoCanvas | 渲染对象 |
enable | 是否冻结渲染 |
- 返回
- 调用是否成功
◆ takeOnceSnapshot()
abstract int com.juphoon.cloud.jrtc.JRTCAdvanced.takeOnceSnapshot |
( |
JRTCVideoCanvas |
videoCanvas, |
|
|
int |
width, |
|
|
int |
height, |
|
|
String |
filePath |
|
) |
| |
|
abstract |
视频通话截图
调用此方法时需要保证该视频对象正在渲染,否则将调用失败
- 参数
-
videoCanvas | 渲染对象 |
width | 截屏宽度像素,-1为视频源像素 |
height | 截屏高度像素,-1为视频源像素 |
filePath | 文件路径,需精确到文件名及格式,例如:/sdcard/emulated/0/picture.png。请确保目录存在且可写。推荐格式: jpg 或者 png |
- 返回
- 调用是否成功
◆ setRenderAngle()
abstract int com.juphoon.cloud.jrtc.JRTCAdvanced.setRenderAngle |
( |
JRTCVideoCanvas |
jrtcVideoCanvas, |
|
|
@VideoAngle int |
angle |
|
) |
| |
|
abstract |
旋转角度,必须是90的倍数,该角度表示与屏幕正方向旋转后的夹角
- 参数
-
jrtcVideoCanvas | 渲染对象 |
angle | 视频旋转角度:
|
- 返回
- 调用是否成功
◆ getMinExposureCompensation()
abstract int com.juphoon.cloud.jrtc.JRTCAdvanced.getMinExposureCompensation |
( |
| ) |
|
|
abstract |
获取摄像头曝光补偿最小值,单位EV
- 返回
- 最小曝光补偿:
◆ getMaxExposureCompensation()
abstract int com.juphoon.cloud.jrtc.JRTCAdvanced.getMaxExposureCompensation |
( |
| ) |
|
|
abstract |
获取摄像头曝光补偿值,单位EV
- 返回
- 最大曝光补偿:
◆ getExposureCompensationStep()
abstract float com.juphoon.cloud.jrtc.JRTCAdvanced.getExposureCompensationStep |
( |
| ) |
|
|
abstract |
◆ I420
final int com.juphoon.cloud.jrtc.JRTCAdvanced.I420 = 1 |
|
static |
◆ IYUV
final int com.juphoon.cloud.jrtc.JRTCAdvanced.IYUV = 2 |
|
static |
◆ RGB24
final int com.juphoon.cloud.jrtc.JRTCAdvanced.RGB24 = 3 |
|
static |
◆ ABGR
final int com.juphoon.cloud.jrtc.JRTCAdvanced.ABGR = 4 |
|
static |
◆ ARGB
final int com.juphoon.cloud.jrtc.JRTCAdvanced.ARGB = 5 |
|
static |
◆ ARGB444
final int com.juphoon.cloud.jrtc.JRTCAdvanced.ARGB444 = 6 |
|
static |
◆ RGB565
final int com.juphoon.cloud.jrtc.JRTCAdvanced.RGB565 = 7 |
|
static |
◆ ARGB1555
final int com.juphoon.cloud.jrtc.JRTCAdvanced.ARGB1555 = 8 |
|
static |
◆ YUY2
final int com.juphoon.cloud.jrtc.JRTCAdvanced.YUY2 = 9 |
|
static |
◆ YV12
final int com.juphoon.cloud.jrtc.JRTCAdvanced.YV12 = 10 |
|
static |
◆ UYVY
final int com.juphoon.cloud.jrtc.JRTCAdvanced.UYVY = 11 |
|
static |
◆ MJPG
final int com.juphoon.cloud.jrtc.JRTCAdvanced.MJPG = 12 |
|
static |
◆ NV21
final int com.juphoon.cloud.jrtc.JRTCAdvanced.NV21 = 13 |
|
static |
◆ NV12
final int com.juphoon.cloud.jrtc.JRTCAdvanced.NV12 = 14 |
|
static |
◆ BGRA
final int com.juphoon.cloud.jrtc.JRTCAdvanced.BGRA = 15 |
|
static |
◆ H264
final int com.juphoon.cloud.jrtc.JRTCAdvanced.H264 = 100 |
|
static |
◆ H264_SVC
final int com.juphoon.cloud.jrtc.JRTCAdvanced.H264_SVC = 101 |
|
static |
◆ VIDEO_ANGLE_AUTO
final int com.juphoon.cloud.jrtc.JRTCAdvanced.VIDEO_ANGLE_AUTO = ZmfVideo.ROTATION_FIXED_SCREEN |
|
static |
◆ VIDEO_ANGLE_0
final int com.juphoon.cloud.jrtc.JRTCAdvanced.VIDEO_ANGLE_0 = ZmfVideo.ROTATION_ANGLE_0 |
|
static |
◆ VIDEO_ANGLE_90
final int com.juphoon.cloud.jrtc.JRTCAdvanced.VIDEO_ANGLE_90 = ZmfVideo.ROTATION_ANGLE_90 |
|
static |
◆ VIDEO_ANGLE_180
final int com.juphoon.cloud.jrtc.JRTCAdvanced.VIDEO_ANGLE_180 = ZmfVideo.ROTATION_ANGLE_180 |
|
static |
◆ VIDEO_ANGLE_270
final int com.juphoon.cloud.jrtc.JRTCAdvanced.VIDEO_ANGLE_270 = ZmfVideo.ROTATION_ANGLE_270 |
|
static |
◆ VIDEO_SOURCE_PEER
final int com.juphoon.cloud.jrtc.JRTCAdvanced.VIDEO_SOURCE_PEER = 0 |
|
static |
◆ VIDEO_SOURCE_CAPTURE
final int com.juphoon.cloud.jrtc.JRTCAdvanced.VIDEO_SOURCE_CAPTURE = 1 |
|
static |
◆ VIDEO_SOURCE_FILE
final int com.juphoon.cloud.jrtc.JRTCAdvanced.VIDEO_SOURCE_FILE = 2 |
|
static |
◆ RENDER_EFFECT_NONE
final String com.juphoon.cloud.jrtc.JRTCAdvanced.RENDER_EFFECT_NONE = "None" |
|
static |
◆ RENDER_EFFECT_BLUR
final String com.juphoon.cloud.jrtc.JRTCAdvanced.RENDER_EFFECT_BLUR = "Blur" |
|
static |
◆ RENDER_EFFECT_GREY
final String com.juphoon.cloud.jrtc.JRTCAdvanced.RENDER_EFFECT_GREY = "Grey" |
|
static |
◆ RENDER_EFFECT_MASK
final String com.juphoon.cloud.jrtc.JRTCAdvanced.RENDER_EFFECT_MASK = "Mask" |
|
static |
◆ RENDER_EFFECT_MAGNIFIER
final String com.juphoon.cloud.jrtc.JRTCAdvanced.RENDER_EFFECT_MAGNIFIER = "Magnifier" |
|
static |
该类的文档由以下文件生成:
- JRTCKit/src/main/java/com/juphoon/cloud/jrtc/JRTCAdvanced.java