internal override int EnableVideoFrameCache(int width, int height, uint uid, string channel_id = "") { if (_agoraRtcEngine == null) { AgoraLog.LogError(string.Format("EnableVideoFrameCache ret: ${0}", ERROR_CODE_TYPE.ERR_NOT_INITIALIZED)); return((int)ERROR_CODE_TYPE.ERR_NOT_INITIALIZED); } IntPtr irisEngine = (_agoraRtcEngine as AgoraRtcEngine).GetNativeHandler(); if (irisEngine != IntPtr.Zero) { var rawDataPtr = AgoraRtcNative.GetIrisRtcRawData(irisEngine); var renderPtr = AgoraRtcNative.GetIrisRtcRenderer(rawDataPtr); _renderCacheConfig = new IrisRtcCRendererCacheConfigNative { type = (int)VIDEO_FRAME_TYPE.FRAME_TYPE_RGBA, OnVideoFrameReceived = IntPtr.Zero, resize_width = width, resize_height = height }; _irisRtcRendererCacheConfigHandle = AgoraRtcNative.EnableVideoFrameCache(renderPtr, ref _renderCacheConfig, uid, channel_id); return((int)ERROR_CODE_TYPE.ERR_OK); } return((int)ERROR_CODE_TYPE.ERR_NOT_INITIALIZED); }
internal static extern IrisRtcRendererCacheConfigHandle EnableVideoFrameCache(IrisRtcRendererPtr renderer_ptr, ref IrisRtcCRendererCacheConfigNative cacheConfigNative, uint uid = 0, string channel_id = "");