-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UI: Keep weak stream output ref in status bar #10680
UI: Keep weak stream output ref in status bar #10680
Conversation
If pulling commits out of #10633 isn't helpful, we can close this. I find it easier to review small PRs and had offered to start pulling commits out of that PR, so I wanted to start working towards that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems sane. If we’re not holding a strong reference we should not access the pointer (and if we were holding one we should listen to the appropriate signals to release it).
That said, this same thing should probably be applied to recordOutput too (even if it’s not causing crashes right now). I’d even consider this in-scope for this PR seeing how similar it is.
If you are doing this for the streaming output, you should also do the recording output. |
Regarding the recording output, while I initially had the same thought, the original commit in #10633 only addresses streaming output. I don't want to expand scope too much. I just want to trim down that PR. I can make a follow-up PR for recording output later. |
d93a2fa
to
835b746
Compare
The status bar doesn't currently own its references to outputs, which can be a problem if streaming outputs are released soon after stream stop. The Multitrack Video output does exactly that, so the status bar will sometimes try to access an invalid pointer for updating its stats. Keeping a weak reference around and upgrading it to collect stats, similar to how the stats window behaves.
835b746
to
8d6d7e2
Compare
Description
The status bar doesn't currently own its references to outputs, which can be a problem if streaming outputs are released soon after stream stop. The Multitrack Video output does exactly that, so the status bar will sometimes try to access an invalid pointer for updating its stats. Keeping a weak reference around and upgrading it to collect stats, similar to how the stats window behaves.
Motivation and Context
Picked from #10633. Want to pull some commits out of that PR to make that PR smaller.
How Has This Been Tested?
This has been tested in the Twitch Enhanced Broadcasting beta.
Types of changes
Checklist: