private static void OnMediaDownloadToMemoryResultCallback(int id, Int64 requestId, IntPtr memory, Int64 length, DOWNLOAD_MEDIA_ERR_CODE code) { if (clientEventHandlerHandlerDic.ContainsKey(id) && clientEventHandlerHandlerDic[id].OnMediaDownloadToMemoryResult != null) { if (AgoraCallbackObject.GetInstance()._CallbackQueue != null) { byte[] memoryData = new byte[length]; Marshal.Copy(memory, memoryData, 0, (int)length); AgoraCallbackObject.GetInstance()._CallbackQueue.EnQueue(() => { if (clientEventHandlerHandlerDic.ContainsKey(id) && clientEventHandlerHandlerDic[id].OnMediaDownloadToMemoryResult != null) { clientEventHandlerHandlerDic[id].OnMediaDownloadToMemoryResult(id, requestId, memoryData, length, code); } }); } } }
private static void OnMediaDownloadToFileResultCallback(int id, Int64 requestId, DOWNLOAD_MEDIA_ERR_CODE code) { if (clientEventHandlerHandlerDic.ContainsKey(id) && clientEventHandlerHandlerDic[id].OnMediaDownloadToFileResult != null) { if (AgoraCallbackObject.GetInstance()._CallbackQueue != null) { AgoraCallbackObject.GetInstance()._CallbackQueue.EnQueue(() => { if (clientEventHandlerHandlerDic.ContainsKey(id) && clientEventHandlerHandlerDic[id].OnMediaDownloadToFileResult != null) { clientEventHandlerHandlerDic[id].OnMediaDownloadToFileResult(id, requestId, code); } }); } } }
void OnMediaDownloadToMemoryResultHandler(int id, long requestId, byte[] memory, long length, DOWNLOAD_MEDIA_ERR_CODE code) { Debug.Log("OnMediaDownloadToMemoryResultHandler requestId = " + requestId + " ,length = " + length); //messageDisplay.AddImageToDisplay(memory, RcvImageMessage.GetWidth(), RcvImageMessage.GetHight()); messageDisplay.AddImageToDisplay(memory); }
void OnMediaDownloadToFileResultHandler(int id, long requestId, DOWNLOAD_MEDIA_ERR_CODE code) { Debug.LogFormat("Download id:{0} requestId:{1} errorCode:{2}", id, requestId, code); }
void OnMediaDownloadToMemoryResultHandler2(int id, Int64 requestId, byte[] memory, Int64 length, DOWNLOAD_MEDIA_ERR_CODE code) { Debug.Log("OnMediaDownloadToMemoryResultHandler2 requestId = " + requestId + " ,length = " + length); }
void OnMediaDownloadToFileResultHandler2(int id, Int64 requestId, DOWNLOAD_MEDIA_ERR_CODE code) { Debug.Log("OnMediaDownloadToFileResultHandler2 requestId = " + requestId + " error = " + code); }