publishCustomVideoStream

public void publishCustomVideoStream(String tag, PublishCallBack callBack)

发布自定义音视频流

发布自定义音视频流 ,该方法必须在通话过程中设置有效,如:IRongCallListener#onCallConnected(RongCallSession, SurfaceView) 回调中

Parameters

tag

自定义视频流唯一标示,不允许带下划线;

callBack

发布回调,请在成功回调中调用 RongRTCAVOutputStream#writeByteBuffer 或 RongRTCAVOutputStream#writeTextureFrame 写入流

                                                    //发送YUV数据,当前仅支持 NV21 格式。                                                    data     NV21 格式的视频数据                                                    width    视频的实际宽度                                                    height   视频的实际高度                                                    rotation 旋转角度。一般为 90° 或 270° ,取决于设备。                                                    RongRTCAVOutputStream#writeByteBuffer(byte[] data, int width, int height, int rotation)                                                    //发送texture数据 android.opengl.GLES11Ext#GL_TEXTURE_EXTERNAL_OES 类型                                                    width           视频的实际宽度                                                    height          视频的实际高度                                                    oesTextureId    纹理 id android.opengl.GLES11Ext#GL_TEXTURE_EXTERNAL_OES 类型                                                    transformMatrix 矩阵                                                    rotation        旋转角度                                                    timestamp       当前时间戳:surfaceTexture.getTimestamp()                                                    RongRTCAVOutputStream#writeTextureFrame(int width, int height, int oesTextureId, float[] transformMatrix, int rotation, long timestamp)

See also

IRongCallListener#onCallConnected(RongCallSession, SurfaceView)
cn.rongcloud.rtc.center.stream.RCFileVideoOutStreamImpl#writeTexture(int, int, int, * float[], int, long, Handler)
cn.rongcloud.rtc.center.stream.RCFileVideoOutStreamImpl#writeYuvData(byte[], int, int, * int)