예제 #1
0
 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);
                 }
             });
         }
     }
 }
예제 #2
0
 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);
                 }
             });
         }
     }
 }
예제 #3
0
 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);
 }
예제 #4
0
 void OnMediaDownloadToFileResultHandler(int id, long requestId, DOWNLOAD_MEDIA_ERR_CODE code)
 {
     Debug.LogFormat("Download id:{0} requestId:{1} errorCode:{2}", id, requestId, code);
 }
예제 #5
0
 void OnMediaDownloadToMemoryResultHandler2(int id, Int64 requestId, byte[] memory, Int64 length, DOWNLOAD_MEDIA_ERR_CODE code)
 {
     Debug.Log("OnMediaDownloadToMemoryResultHandler2 requestId = " + requestId + " ,length = " + length);
 }
예제 #6
0
 void OnMediaDownloadToFileResultHandler2(int id, Int64 requestId, DOWNLOAD_MEDIA_ERR_CODE code)
 {
     Debug.Log("OnMediaDownloadToFileResultHandler2 requestId = " + requestId + " error = " + code);
 }