void Start() { CallPCL.callStart(); Parallel.For(0, VERTICES_MAX / 6, j => { indicesMax[6 * j + 0] = 6 * j + 0; indicesMax[6 * j + 1] = 6 * j + 1; indicesMax[6 * j + 2] = 6 * j + 2; indicesMax[6 * j + 3] = 6 * j + 3; indicesMax[6 * j + 4] = 6 * j + 4; indicesMax[6 * j + 5] = 6 * j + 5; trisMax[12 * j + 0] = 6 * j + 0; trisMax[12 * j + 1] = 6 * j + 5; trisMax[12 * j + 2] = 6 * j + 3; trisMax[12 * j + 3] = 6 * j + 3; trisMax[12 * j + 4] = 6 * j + 4; trisMax[12 * j + 5] = 6 * j + 1; trisMax[12 * j + 6] = 6 * j + 5; trisMax[12 * j + 7] = 6 * j + 2; trisMax[12 * j + 8] = 6 * j + 4; trisMax[12 * j + 9] = 6 * j + 3; trisMax[12 * j + 10] = 6 * j + 5; trisMax[12 * j + 11] = 6 * j + 4; }); thread = new Thread(subThread); thread.Start(); }
public void OnCall(CallArgs e) { StateOfCurrentCall = e.CallState; CurrentCall = e.LCall; Debug.WriteLine("Call state changed: " + StateOfCurrentCall); call_status.Text = "Call state changed: " + StateOfCurrentCall; if (StateOfCurrentCall == CallStatePCL.IncomingReceived) { var page = new OnCallPage(); page.RefuseCall += (s, args) => { LinphoneManager.TerminateAllCalls(); }; page.AcceptCall += (s, args) => { LinphoneManager.AcceptCall(); }; page.SetVideoView(CurrentCall, LinphoneManager); Navigation.PushAsync(page); } else if (StateOfCurrentCall == CallStatePCL.IncomingEarlyMedia) { } else if (StateOfCurrentCall == CallStatePCL.StreamsRunning) { if (isOutgoingCall) { call.Text = "Terminate"; if (!CurrentCall.IsVideoEnabled) { LinphoneManager.SetViewCallOutgoing(CurrentCall); } } } else if (StateOfCurrentCall == CallStatePCL.Error || StateOfCurrentCall == CallStatePCL.End) { call.Text = "Start Call"; var stack = Navigation.NavigationStack; // remove on call page if (stack != null && stack.Count == 2) { Navigation.PopAsync(); } if (isOutgoingCall) { isOutgoingCall = false; contentViewVideo.IsVisible = false; contentViewVideo.Content = null; } } }
void OnDestroy() { thread.Abort(); while (thread.IsAlive) { Thread.Sleep(1); } CallPCL.callStop(); Debug.Log("Stop"); }
void Update() { CallPCL.getMesh(ref meshList, verticesMax); Generate(); if (Input.GetKey(KeyCode.R)) { CallPCL.callRegistration(); } if (Input.GetKey(KeyCode.B)) { CallPCL.callSetBackground(); } if (Input.GetKey(KeyCode.S)) { CallPCL.callSaveScene(); } }
private void OnCall(Core lc, Call lcall, CallState state, string message) { try { if (state == CallState.End || state == CallState.Error) { LastCall = null; } if ((state == CallState.IncomingReceived || state == CallState.OutgoingInit) && LastCall != null) { linphoneCore.TerminateCall(LastCall); LastCall = null; } if ((state == CallState.IncomingReceived || state == CallState.OutgoingInit) && LastCall == null) { LastCall = lcall; } CallPCL call = new CallPCL { UsernameCaller = lcall.RemoteAddress.Username }; CallParams param = linphoneCore.CreateCallParams(lcall); lock (LinphoneListeners) { for (int i = 0; i < LinphoneListeners.Count; i++) { try { var listener = LinphoneListeners[i]; listener.OnCall(new CallArgs(call, (int)state, message, param.VideoEnabled)); } catch (Exception ex) { Log("error with listenner, OnCall"); } } } } catch (Exception ex) { } }
void subThread() { while (true) { CallPCL.kernelUpdate(); Voice.startTiming(); if (turn == 0) { CallPCL.getMesh(ref meshList0, VERTICES_MAX); meshList = meshList0; turn = 1; } else { CallPCL.getMesh(ref meshList1, VERTICES_MAX); meshList = meshList1; turn = 0; } ShowFPS.udpateFrame(); } }
public void SetViewCallOutgoing(CallPCL call) { if (linphoneCore.CallsNb > 0) { Call currentCall = linphoneCore.Calls.Where(lcall => lcall.RemoteAddress.Username == call.UsernameCaller).FirstOrDefault(); if (currentCall != null) { linphoneCore.VideoDisplayEnabled = true; linphoneCore.VideoAdaptiveJittcompEnabled = true; CallParams param = linphoneCore.CreateCallParams(currentCall); param.VideoEnabled = true; param.VideoDirection = MediaDirection.RecvOnly; param.AudioDirection = MediaDirection.SendRecv; linphoneCore.UpdateCall(currentCall, param); } else { Log($"SetViewCallOutgoing()_Android, call from: {call.UsernameCaller} is not call in linphoneCore"); } //lc.UpdateCall(call, param); } }
void OnDestroy() { CallPCL.callStop(); }
void Start() { CallPCL.callStart(); }
public void SetViewCallOutgoing(CallPCL call) { LinphoneEngine.SetViewCallOutgoing(call); }
public void SetViewCall(CallPCL call) { LinphoneEngine.SetViewCall(call); }
public void SetVideoView(CallPCL call, ILinphoneManager linphone) { contentViewVideo.IsVisible = true; contentViewVideo.Content = new LinphoneVideoView(); linphone.SetViewCall(call); }