void LateUpdate()
 {
     Loom.QueueOnMainThread(() => {
         foreach (VTextInterface vText in m_vTextInterface)
         {
             if (null != vText)
             {
                 vText.RenderText = keyboard.text;
             }
         }
     });
 }
Beispiel #2
0
 public void EntCartRoom(RSP_CreateRoom result)
 {
     Loom.QueueOnMainThread(() => {
         Host     = result.ServerHost;
         Port     = result.ServerPort;
         Password = result.Password;
         SeatID   = result.SeatID;
         RoomID   = result.RoomID;
         Debuger.Log(result.ServerHost);
         KWXFrom.GetIns.InitGameFrom(result.ServerHost, result.ServerPort);
     });
 }
Beispiel #3
0
 public void reConnectServer()
 {
     //Debug.Log("start reConnectServer"+ entry_host +  entry_port);
     if (ServerManager.getInstance().entry_port == -1)
     {
         show(1);
         return;
     }
     ServerManager.getInstance().connectServer(
         ServerManager.getInstance().entry_host,
         ServerManager.getInstance().entry_port,
         (data) => {
         Debug.Log("reConnectServer ok");
         //Entry ();
         JsonObject userMessage = new JsonObject();
         userMessage.Add("token", "lmj");
         userMessage.Add("rid", 2);
         userMessage.Add("username", ServerManager.getInstance().usename);
         userMessage.Add("passwd", ServerManager.getInstance().passward);
         //if (pclient != null) {
         ServerManager.getInstance().request("connector.entryHandler.entry", userMessage, (data2) => {
             Debug.Log(data2.ToString());
             if (int.Parse(data2["code"].ToString()) == 200)
             {
                 JsonObject userMessage3 = new JsonObject();
                 //userMessage.Add ("name", playerName.text);
                 //if (pclient != null) {
                 ServerManager.getInstance().request("area.playerHandler.enterScene", userMessage3, (data3) => {
                     Debug.Log(data3.ToString());
                     if (data.ContainsKey("code") && data["code"].ToString() == "500")
                     {
                         Debug.Log("角色名已经被占用!!");
                     }
                     else
                     {
                         DataManager.playerData = data3;                            //["curPlayer"] as JsonObject;
                         hide();
                         Loom.QueueOnMainThread(() => {
                             ServerManager.getInstance().onUpgrade();
                         });
                     }
                 });
             }
             else
             {
                 //Loom.QueueOnMainThread(()=>{
                 show(1);
                 //});
             }
         });
     });
 }
Beispiel #4
0
    public void DismisseMessage(NTF_Dismiss result)
    {
        Loom.QueueOnMainThread(() =>
        {
            CreatCard.GetInstance_.jieSan_view.SetActive(true);
            for (int i = 0; i < result.Action.Count; i++)
            {
                UIDismissRoom.Inst.player[i].textName.text = CreatCard.GetInstance_.UserInfoS[GetViewSeatID((uint)i)].Nick.text;
                switch (result.Action[i])
                {
                case 0:
                    UIDismissRoom.Inst.player[i].textStatus.text = "等待确认";
                    if (i == SeatID)
                    {
                        UIDismissRoom.Inst.btnAgree.interactable  = true;
                        UIDismissRoom.Inst.btnReject.interactable = true;
                    }
                    break;

                case 1:
                    UIDismissRoom.Inst.player[i].textStatus.text = "申请解散";
                    if (i == SeatID)
                    {
                        UIDismissRoom.Inst.btnAgree.interactable  = false;
                        UIDismissRoom.Inst.btnReject.interactable = false;
                    }
                    break;

                case 2:
                    UIDismissRoom.Inst.player[i].textStatus.text = "同意解散";
                    if (i == SeatID)
                    {
                        UIDismissRoom.Inst.btnAgree.interactable  = false;
                        UIDismissRoom.Inst.btnReject.interactable = false;
                    }
                    break;

                case 3:
                    UIDismissRoom.Inst.player[i].textStatus.text = "拒绝解散";
                    if (i == SeatID)
                    {
                        UIDismissRoom.Inst.btnAgree.interactable  = false;
                        UIDismissRoom.Inst.btnReject.interactable = false;
                    }
                    break;

                default:
                    break;
                }
            }
        });
    }
Beispiel #5
0
        private void RPLidarA3_DataResponseContentProcess_SCAN(byte[] responseData)
        {
            CacheBuffer.AddRange(responseData);

            if (CacheBuffer.Count > 2)
            {
                if (CacheBuffer[0] == 0xA5 && CacheBuffer[1] == 0x5A && !isFrist)
                {
                    CacheBuffer.RemoveAt(0);
                    CacheBuffer.RemoveAt(1);
                    isFrist = true;
                }
            }
            CalcNum = CacheBuffer.Count / StructLen - 1;
            //Debug.Log(
            //    "buffer.Count: " + CacheBuffer.Count +
            //    //"  data: " + SerialCommunicationUtility.ByteToHexString(responseData) +
            //    "  all.data:[" + SerialCommunicationUtility.ByteToHexString(CacheBuffer.ToArray()) + "]" +
            //    "  StructLen:" + StructLen +
            //    "  CalcNum:" + CalcNum
            //);
            if (CalcNum > 5)
            {
                CacheBufferLen = CalcNum * StructLen;
                TempBuffer     = CacheBuffer.GetRange(0, CacheBufferLen);
                for (int i = 0; i < CalcNum; i++)
                {
                    _res   = Convert.ToInt32(SerialCommunicationUtility.BinaryConversion(TempBuffer[i * StructLen + 2], TempBuffer[i * StructLen + 1]), 16);
                    _angle = (_res >> 1) / 64f;
                    _dis   = Convert.ToInt32(SerialCommunicationUtility.BinaryConversion(TempBuffer[i * StructLen + 4], TempBuffer[i * StructLen + 3]), 16) / 4f;
                    if (_dis > 10)
                    {
                        SerialDatas.Add(new SerialData()
                        {
                            angle = _angle, distance = _dis
                        });
                    }
                }
                CacheBuffer.RemoveRange(0, CacheBufferLen);
                if (UpdateSerialData != null)
                {
                    Loom.RunAsync(() =>
                    {
                        Loom.QueueOnMainThread(() =>
                        {
                            UpdateSerialData(SerialDatas);
                            SerialDatas.Clear();
                        });
                    });
                }
            }
        }
Beispiel #6
0
        private static void OnCompletePhone(DownloadItem downloadItem)
        {
            _downloadingWindow.HindCancelBtn();
            _downloadingWindow.Content  = I18NManager.Get("Download_Unzip");
            _downloadingWindow.Progress = I18NManager.Get("Download_Progress", 0);

            bool isEnd = false;

            progress = 0;
            Tweener tween = DOTween.To(() => progress, val => progress = val, 100, 1.5f);

            tween.onUpdate = () =>
            {
                _downloadingWindow.SetProgress(progress);
                // _downloadingWindow.Content = I18NManager.Get("Download_Unzip");
                _downloadingWindow.Progress = I18NManager.Get("Download_Progress", progress);
            };

            tween.onComplete = () =>
            {
                if (isEnd == false)
                {
                    isEnd = true;
                }
                else
                {
                    _downloadingWindow.Close();
                    _onComplete?.Invoke(_tag);
                }
            };

            Loom.RunAsync(() =>
            {
                if (downloadItem.FileType == FileType.Zip)
                {
                    ZipUtil.Unzip(downloadItem.LocalPath, AssetLoader.ExternalHotfixPath + "/" + _releasePath);
                }

                Loom.QueueOnMainThread(() =>
                {
                    if (isEnd == false)
                    {
                        isEnd = true;
                    }
                    else
                    {
                        _downloadingWindow.Close();
                        _onComplete?.Invoke(_tag);
                    }
                });
            });
        }
Beispiel #7
0
    public void onHit(int _demage, int num = 1)
    {
        float _delay = 0.0f;

        for (int i = 0; i < num; i++)
        {
            Loom.QueueOnMainThread(() => {
                if (PropertyDic [Property.HP] > 0)
                {
                    Bleed bleed = (Bleed)PoolManager.getInstance().getGameObject("Bleed");
                    if (_demage > 0)
                    {
                        iTween.ShakePosition(style.gameObject, new Vector3(5.0f, 5.0f, 0.0f), 0.2f);
                        bleed.blood.color = DataManager.getInstance().getColor("red");
                    }
                    else
                    {
                        //加血
                        bleed.blood.color = DataManager.getInstance().getColor("green");
                    }
                    int buffhp = PropertyAddByBuffDic [Property.HP];                    //护盾
                    buffhp     = buffhp - _demage;
                    PropertyAddByBuffDic [Property.HP] = buffhp < 0 ? 0 : buffhp;
                    if (buffhp < 0 || _demage < 0)
                    {
                        int hp                    = PropertyDic [Property.HP];
                        int maxhp                 = PropertyDic [Property.MAXHP];
                        hp                        = hp + buffhp;
                        hp                        = hp >= 0 ? hp : 0;
                        hp                        = hp >= maxhp ? maxhp : hp;
                        float xscale              = (float)hp / (float)maxhp;
                        HP.transform.localScale   = new Vector3(xscale, 1, 1);
                        HPTxt.text                = (Math.Ceiling(xscale * 100)).ToString() + "%";
                        PropertyDic [Property.HP] = hp;
                    }
                    else
                    {
                        buffhp = 0;
                    }
                    bleed.transform.SetParent(this.transform);
                    bleed.show(buffhp, () => {
                        if (PropertyDic [Property.HP] == 0)
                        {
                            onDead();
                        }
                        pvescene.checkBout();
                    });
                }
            }, _delay);
            _delay += 0.3f;
        }
    }
        public void handle(CloudLandClient client, IMessage messageReceived)
        {
            ServerRemoveEntityMessage message = (ServerRemoveEntityMessage)messageReceived;

            Loom.QueueOnMainThread(() =>
            {
                Transform t = client.getClientComponent().entitiesParent.Find("entity|" + message.EntityId);
                if (t != null)
                {
                    ClientComponent.INSTANCE.entityManager.destroy(t.GetComponent <Entity>());
                }
            });
        }
Beispiel #9
0
        void OnAssetsUpdateCmp()
        {
            View.setState(LaunchPage.LaunchPageState.UpdateOver);

            Loom.QueueOnMainThread(() =>
            {
                Debug.LogWarning("更新成功!");

                Facade.SendNotification(NotificationType.M2M_ResourceUpdateOver);
                /* 跳转到 loading */
                //asyncOperation = SceneManager.LoadSceneAsync(1, LoadSceneMode.Single);
            });
        }
Beispiel #10
0
    private void LoomTest()
    {
        string str = "我是一个bug!";

        Loom.RunAsync(delegate
        {
            str = "好了";
            Loom.QueueOnMainThread(delegate
            {
                Debug.LogWarning(str);
            });
        });
    }
Beispiel #11
0
        public void handle(CloudLandClient client, IMessage messageReceived)
        {
            ServerCursorItemMessage msg = (ServerCursorItemMessage)messageReceived;

            if (msg.Item.Id == 0 && msg.Item.Count == 0)
            {
                Loom.QueueOnMainThread(() => WindowManager.INSTANCE.cursorItem = null);
            }
            else
            {
                Loom.QueueOnMainThread(() => WindowManager.INSTANCE.cursorItem = msg.Item);
            }
        }
Beispiel #12
0
 private void OnMouseDown()
 {
     JSONLevelSerializer.SaveObjectTreeToServer("ftp://whydoidoit.net/SavedData" + this.id.ToString() + ".json", base.gameObject, "testserializer", "T3sts3rializer", delegate(Exception error)
     {
         Debug.Log("Uploaded!" + error);
     });
     UnityEngine.Object.Destroy(base.gameObject);
     Loom.QueueOnMainThread(delegate
     {
         Debug.Log("Downloading");
         JSONLevelSerializer.LoadObjectTreeFromServer("http://whydoidoit.net/testserializer/SavedData" + this.id.ToString() + ".json", null, null);
     }, 6f);
 }
 public void GenerateLinearChunks()
 {
     Loom.QueueAsyncTask(WorldThreadName, () =>
     {
         Vector3Int[] chunkPositions = GetLinearChunkLocations();
         chunksInQueue = chunkPositions.Length;
         Loom.QueueOnMainThread(() =>
         {
             SpawnChunks(chunkPositions);
             GenerateChunks(chunkPositions, null);
         });
     });
 }
Beispiel #14
0
    private void doShowConfirmDialog(object obj)
    {
        List <System.Object> paramList = (List <System.Object>)obj;
        string   title    = (string)paramList[0];
        string   msg      = (string)paramList[1];
        Listener listener = (Listener)paramList[2];

        Loom.QueueOnMainThread((param) =>
        {
            activeConfirmDialogPanel();
            GameObject.Find(_panelName_confirmDialog).GetComponent <ControlConfirmDialog>().ShowConfirmDialog(title, msg, listener);
        }, null);
    }
Beispiel #15
0
    public void request(string rute, JsonObject msg, System.Action <JsonObject> callBack)
    {
        TipManager.instance.showReconnectPanel(0);
        bool isReturnData = false;

        pclient.request(rute, msg, (data) => {
            Loom.QueueOnMainThread(() => {
                TipManager.instance.hideReconnectPanel();
                callBack(data);
            }
                                   );
        });
    }
Beispiel #16
0
        public void handle(CloudLandClient client, IMessage messageReceived)
        {
            ServerRemoveEntityMessage message = (ServerRemoveEntityMessage)messageReceived;

            Loom.QueueOnMainThread(() =>
            {
                Transform t = client.getClientComponent().entitiesParent.Find("entity|" + message.EntityId);
                if (t != null)
                {
                    GameObject.Destroy(t.gameObject);
                }
            });
        }
Beispiel #17
0
 public void UnPause(int id)
 {
     Loom.QueueOnMainThread(() => {
         if (soundCache.ContainsKey(id))
         {
             AudioSource aso = soundCache[id];
             if (aso != null)
             {
                 soundCache[id].UnPause();
             }
         }
     });
 }
Beispiel #18
0
 public void GenerateSpherical(Vector3Int center, Action onComplete)
 {
     Loom.QueueAsyncTask(WorldThreadName, () =>
     {
         Vector3Int[] chunkPositions = GetChunkLocationsAroundPoint(center);
         chunksInQueue = chunkPositions.Length;
         Loom.QueueOnMainThread(() =>
         {
             SpawnChunks(chunkPositions);
             GenerateChunks(chunkPositions, onComplete);
         });
     });
 }
Beispiel #19
0
 public void OnRoomDismissed(NTF_RoomDismissed result)
 {
     Loom.QueueOnMainThread(() =>
     {
         if (jieSanLe != null)
         {
             jieSanLe(result);
         }
         else
         {
         }
     });
 }
Beispiel #20
0
    /// <summary>
    ///网络状态监测
    /// </summary>
    private void CheckReachable()
    {
        Thread.Sleep(CheckReachabilityTime);

        Loom.QueueOnMainThread(() => {
            if (
                Application.internetReachability != _Reachability)
            {
                _Reachability = Application.internetReachability;
                RecoverConnect();
            }
        });
    }
Beispiel #21
0
    // Use this for initialization
    void OnMouseDown()
    {
//		var data = JSONLevelSerializer.SaveObjectTree(gameObject);
        JSONLevelSerializer.SaveObjectTreeToServer("ftp://whydoidoit.net/SavedData" + id.ToString() + ".json", gameObject, "testserializer", "T3sts3rializer", (error) => {
            Debug.Log("Uploaded!" + error);
        });
        //data.WriteToFile("test_json.txt");
        Destroy(gameObject);
        Loom.QueueOnMainThread(() => {
            Debug.Log("Downloading");
            JSONLevelSerializer.LoadObjectTreeFromServer("http://whydoidoit.net/testserializer/SavedData" + id.ToString() + ".json", null, null);
        }, 6f);
    }
Beispiel #22
0
 public void idling()
 {
     string[] idle = new string[] { "looks around", "enjoys view", "is observing", "is listening" };
     Loom.QueueOnMainThread(() =>
     {
         int i = Random.Range(0, 4);
         AttachToLog(idle[i]);
     });
     if (GetRobotControl().movement != null)
     {
         GetRobotControl().movement.Idling();
     }
 }
 static void HandleWebClientUploadDataCompleted(object sender, UploadDataCompletedEventArgs e)
 {
     lock (Guard)
     {
         uploadCount--;
     }
     Loom.QueueOnMainThread(() => {
         if (e.UserState is Action <Exception> )
         {
             (e.UserState as Action <Exception>)(e.Error);
         }
     });
 }
        //mChen add, for HideSeek WangHu
        public void OnSocketGFSubHeartBeat(byte[] data, ushort wDataSize)
        {
            Loom.QueueOnMainThread(() =>
            {
                GameManager gameMgr = GameManager.GetInstance();
                if (gameMgr != null)
                {
                    gameMgr.OnSubHeartBeat_WangHu(data, wDataSize);
                }
            });

            return;
        }
Beispiel #25
0
    protected internal override void OnInit(object userData)
    {
        base.OnInit(userData);

        //Log.Debug("loading init");

        GameEntry.UIEvent.AddOnClickHandler(searchBtn, (obj) =>
        {
            statusText.text = "搜索中...";
            UdpRecv.Instance.Init(new IPEndPoint(IPAddress.Any, 7777));
            UdpRecv.Instance.ReceiveEventHandler = (bytes, endPoint) =>
            {
                string info = System.Text.Encoding.UTF8.GetString(bytes);
                Log.Debug("{0} {1} ----- {2}", endPoint.Address.ToString(), endPoint, info);

                string targetIp = "172.16.4.112";
                if (targetInput.text.Length > 0)
                {
                    targetIp = targetInput.text;
                }
                if (endPoint.Address.ToString().Equals(targetIp))
                {
                    string[] array = info.Split('-');

                    string ip   = array[0];
                    string port = array[1];
                    //string type = array[2]  //盒子型号

                    targetEndPoint = new IPEndPoint(IPAddress.Parse(ip), int.Parse(port));

                    Log.Debug("search finish");
                    Loom.QueueOnMainThread(() =>
                    {
                        statusText.text = "搜索成功";
                    });
                    UdpRecv.Instance.Dispose();
                }
            };
        });

        GameEntry.UIEvent.AddOnClickHandler(connectBtn, (obj) =>
        {
            statusText.text = "";
            UDPManager.Instance.Connect(targetEndPoint);
        });

        GameEntry.UIEvent.AddOnClickHandler(basketBallBtn, (obj) =>
        {
            GameEntry.Event.Fire(this, EnterGameEventArgs.Create(SceneId.BowlingPhone));
        });
    }
    public void createnewaccount(ParseFile file)
    {
        Loom.QueueOnMainThread(() => {
            if (name.value != null && password.value != null && place.value != null && passwordconfirm.value != null)
            {
                //if(password.value==passwordconfirm.value){
                var user = new ParseUser()
                {
                    Username = email.value,
                    Password = password.value,
                    Email    = email.value
                };
                user ["file"]  = file;
                user ["name"]  = name.value;
                user ["place"] = place.value;

                if (password.value == passwordconfirm.value)
                {
                    Task signUpTask = user.SignUpAsync().ContinueWith(t =>
                    {
                        Loom.QueueOnMainThread(() => {
                            if (t.IsFaulted || t.IsCanceled)
                            {
                                // The login failed. Check t.Exception to see why.
                                Debug.Log("Parse Registration failed!");
                                Debug.Log(t.Exception);
                                failed.SetActive(true);
                            }
                            else
                            {
                                Debug.Log("Parse Registration was successful!");

                                /*TweenTransform transform=GameObject.Find("SignUp").GetComponent<TweenTransform>();
                                 * transform.ResetToBeginning();*/

                                success.SetActive(true);
                            }
                        });
                    });
                }
                else
                {
                    Debug.Log("passwordfailed");
                }
                //}
                //if(password!=passwordconfirm){
                //	Debug.Log("password!=passwordconfirm");
                //}
            }
        });
    }
Beispiel #27
0
 //数据同步
 private void SyncUnlockedPets()
 {
     if (this.actionDatas.Count > 0)
     {
         ActionData actionData = this.actionDatas[0];
         Debug.LogFormat("--------UnlockedPetsUtils.SyncUnlockedPets--------Header: {0}, Body: {1}, SendTimes: {2}", actionData.Header, actionData.Body, actionData.SendTimes);
         mNativeOkHttpMethodWrapper.post(this.UrlProvider.GetUnlockedPets(this.LocalChildInfoAgent.getChildSN(), CupBuild.getCupSn()), actionData.Header, actionData.Body, (result) =>
         {
             Debug.LogFormat("--------UnlockedPetsUtils.SyncUnlockedPets.GotResponse--------{0}", result);
             RemotePetsInfo remotePetsInfo = this.JsonUtils.String2Json <RemotePetsInfo>(result);
             this.LocalUnlockedPetsAgent.SaveUnlockedPets(remotePetsInfo.pets);
             if (actionData.OnSuccess != null)
             {
                 Loom.QueueOnMainThread(() => actionData.OnSuccess(Result.Success(result)));
             }
             Debug.LogFormat("--------UnlockedPetsUtils.SyncUnlockedPets.Success--------\n{0}", result);
             //检查数据
             if (this.actionDatas.Count > 0)
             {
                 this.actionDatas.RemoveAt(0);   //移除已经执行成功的数据
                 if (this.actionDatas.Count > 0) //执行下一条数据
                 {
                     this.SyncUnlockedPets();
                 }
             }
         }, (errorResult) =>
         {
             Debug.LogFormat("--------UnlockedPetsUtils.SyncUnlockedPets.Error--------{0}", Result.Error(errorResult.ErrorInfo));
             if (actionData.OnFailed != null)
             {
                 Loom.QueueOnMainThread(() => actionData.OnFailed(Result.Error(errorResult.ErrorInfo)));
             }
             //检查数据
             if (this.actionDatas.Count > 0)
             {
                 if (this.actionDatas[0].SendTimes > 0)
                 {//重复上传(最多3次)
                     this.actionDatas[0].SendTimes -= 1;
                     Debug.LogFormat("--------UnlockedPetsUtils.SyncUnlockedPets.Repeat--------SendTimes: {0}, Body: {1}", actionData.SendTimes, actionData.Body);
                     this.SyncUnlockedPets();
                 }
                 else
                 {//3次重传失败放弃
                     this.actionDatas.RemoveAt(0);
                     Debug.LogFormat("--------UnlockedPetsUtils.SyncUnlockedPets.Abandon--------SendTimes: {0}, Body: {1}", actionData.SendTimes, actionData.Body);
                 }
             }
         });
     }
 }
 static void DoWhenReady(Action upload)
 {
     lock (Guard)
     {
         if (uploadCount > 0)
         {
             Loom.QueueOnMainThread(() => DoWhenReady(upload), 0.4f);
         }
         else
         {
             upload();
         }
     }
 }
        private static void onPoseChange(int pose)
        {
            Debug.Log("<><>CupMotionManager onPoseChange<><>");

            Debug.Log("<><>" + Thread.CurrentThread.Name);
            /*Debug.unityLogger.Log("CLD", Thread.CurrentThread.Name);*/

            Loom.QueueOnMainThread(() =>
            {
                Debug.Log("<><>" + Thread.CurrentThread.Name);
                /*Debug.unityLogger.Log("CLD", Thread.CurrentThread.Name);*/
                PoseListenerEvent(pose);
            });
        }
Beispiel #30
0
    private void RunFFmpegExe(object obj)
    {
        DatasStruct data = obj as DatasStruct;
        Process     p    = new Process();

        p.StartInfo.FileName = GameManager.FFMpegPath;
        Debug.Log(data.outVideoFileName);
        string exName = Path.GetExtension(data.outVideoFileName);

        switch (exName)
        {
        case ".mp4":
            p.StartInfo.Arguments = $"-i {data.inputMovFileName} -vf  \"scale=trunc(iw/2)*2:trunc(ih/2)*2\" -vf \"split[a], pad = iw * 2:ih[b], [a] alphaextract, [b] overlay=w\" -b {codeRate}k -r {frameRate} -y {data.outVideoFileName}";
            break;

        case ".webm":
            //-i text.mov -auto-alt-ref 0 -c:v libvpx -b 1000k  export.webm  //-y是覆盖原来的视频
            p.StartInfo.Arguments = $"-i {data.inputMovFileName} -auto-alt-ref 0 -c:v libvpx  -r {frameRate} -b {codeRate}k -y {data.outVideoFileName}";
            break;

        case ".mov":
            //ffmpeg -i input.mov -vcodec hap -format hap_alpha output-hap.mov
            if (!data.addChunk4)
            {
                p.StartInfo.Arguments = $"-i {data.inputMovFileName} -vcodec hap -format hap_alpha -r {frameRate} -y {data.outVideoFileName}";
            }
            else
            {
                p.StartInfo.Arguments = $"-i {data.inputMovFileName} -vcodec hap -format hap_alpha -chunks 4 -r {frameRate} -y {data.outVideoFileName}";
            }
            break;
        }

        //scale=trunc(iw/2)*2:trunc(ih/2)*2 否则可能遇到“width not divisible by 2”

        Debug.Log("ffmeeg 信息:  " + p.StartInfo.Arguments);
        p.StartInfo.CreateNoWindow         = false;
        p.StartInfo.UseShellExecute        = false;
        p.StartInfo.RedirectStandardOutput = true;
        p.Start();
        Debug.Log("ffmeeg 信息: 开始转换");
        p.WaitForExit();
        Debug.Log("ffmeeg 信息: 转换结束");
        p.Close();
        if (data.showEndDialog)
        {
            Loom.QueueOnMainThread(() => ShowDiglog());
        }
        data.thread.Abort();
    }