Open lyclyc171 opened 1 year ago
@lyclyc171 yeah i had this problem long time ago, and i think it was because of this RemoveSender method in SignalingHandlerBase which was probably removing the track for that one user, then recreating a new track which wrongfully flips the texture again for the other users. So I commented it out: and i also updated the SetTransceiver method in StreamSenderBase too Now, this might get things working for you, but I'm not fully sure if I'm fully cleaning up everything memory-wise, so insights here would be appreciated.
@lyclyc171 How about the google chrome?
@JohnnyNgo Is this issue already fixed by #925 ?
@karasusan I'm using Render Streaming 3.1.0-exp.6 for reference, so I don't think I have tried that solution. I never had the issue of inputs or resolution changes as mentioned in #925, probably because I don't use Broadcast.cs (I made my own custom script to handle removing/adding senders/channels to each users)
So I'd say my solution here is more specific to the Vertical Flipping part and is not already fixed.
@lyclyc171 How about the google chrome?
No, it doesn't work
@lyclyc171 yeah i had this problem long time ago, and i think it was because of this RemoveSender method in SignalingHandlerBase which was probably removing the track for that one user, then recreating a new track which wrongfully flips the texture again for the other users. So I commented it out: and i also updated the SetTransceiver method in StreamSenderBase too Now, this might get things working for you, but I'm not fully sure if I'm fully cleaning up everything memory-wise, so insights here would be appreciated.
@JohnnyNgo Does the screen image turn to normal after you comment out "RemoveTrack"? Actually my debugging result tell me "OnStroppedStream" ( in your second pic ) is the reason who calls Dispose().
Anyway, thanks for your clue, I will try to comment RemoveTrack out to check result.
memo: URS-624
Hey I have a similar issue in 3.1.0-exp.7. When I have multiple tabs open and close one the image for the others is distorted.
Just changing the SetTransceiver method to how @JohnnyNgo commented
seems to fix it for me. (Or just never calling RemoveSender to begin with)
Are there already plans to implement this or sth similar @karasusan and if yes do you know when this might happen?
Package version
3.1.0-exp.6
Environment
Steps To Reproduce
Current Behavior
Expected Behavior
screen and user interface all going well
Anything else?
Actually I have find the reason by debugging. BroadCast.Disconnect() will be called when close a tab, then following functions RemoveSender and RemoveChannel are called subsequently.
RemoveSender lead to call Dispose() in VideoStreamSourceScreen, then mscreenCopyTexture will be destroyed which is the reference to sourceTexture in VideoTrackSource so the sourceTexture_ is null and Graphics.Blit will copy a correct screen texture to upside down.
As for RemoveChannel, I think there is already a commit to fix it: https://github.com/Unity-Technologies/UnityRenderStreaming/pull/925