Hi Tomasz,
there are several scenarios to consider here:
SPACES_THREAD_TYPE_RENDERER_WORKER
could adversely affect the XR experience by taking priority away from rendering threads and can cause decreased FPS, increased latency, reduced stability etc. "
Tomasz. wozniak. mosina
Hi,
We are trying to solve issue with overheating and battery consumption of the Argo device during videocall.
please tell me, how to use Advanced Android Thread Performance with webRtc Unity Plugin?
We are trying something like this, but there is no video (only audio works).
public IObservable<Tuple<RoomToken, CallSession>> StartCall(CreateCallRequest createCallRequest)
{
CurrentCallState.Value = CallState.Connecting;
_invitedUsersCount = createCallRequest.InvitedUsers.Count;
Observable.Timer(TimeSpan.FromSeconds(1))
.SelectMany(_ =>
Observable.Start(() =>
{
SpacesThreadUtility.SetThreadHint(SpacesThreadType.SPACES_THREAD_TYPE_RENDERER_WORKER);
while (true)
{
WebRTC.Update();
Task.Delay(33).Wait();
}
}).SubscribeOn(Scheduler.ThreadPool)
).Subscribe();
InitTracks();
return new CreateCall(createCallRequest).Execute()
.SelectMany(call =>
{
return new GetIceServers().Execute()
.Select(iceServers => new Tuple<IceServers, CallSession>(iceServers, call));
})
.SelectMany(iceServersAndCallSessionData =>
{
SaveIceServers(iceServersAndCallSessionData.Item1);
return new GetRoomToken(iceServersAndCallSessionData.Item2.Id).Execute()
.Select(roomToken =>
new Tuple<RoomToken, CallSession>(roomToken, iceServersAndCallSessionData.Item2));
});
}