Skip to content

Conversation

@BitRate27
Copy link
Contributor

The problem exists because an output would be created even when no main output was selected. When the user went to change the color format in the OBS Settings->Advanced dialog, or any setting in OBS Settings ->Video, this would invalidate the video output in DistroAV NDI Settings. Then when Main output was turned back on, OBS would crash because output->video is corrupted.

This makes the changes to main-output look big but it was mainly removing an indented if condition. In summary we always call main_output_deinit in main_output_init, and then if it is not enabled, we return, otherwise we create the output and start it every time it is enabled.

This fixes:
#1147
#1195

@Trouffman Trouffman self-requested a review February 10, 2025 03:05
@Trouffman
Copy link
Collaborator

When testing I get Tried to reset when already active in the log.

Also result in a black screen after changing the profile.

Can you check that the merge from master was correct?

@BitRate27
Copy link
Contributor Author

BitRate27 commented Feb 10, 2025 via email

@BitRate27
Copy link
Contributor Author

The Tried to reset when already active message was in the code before the PR. The resolution not changing when a new profile is chosen, while main output is active, is because we never responded to the OBS_FRONTEND_EVENT_PROFILE_CHANGING and OBS_FRONTEND_EVENT_PROFILE_CHANGED events. When these event types are added to the event callback for the plugin, and proper action is taken (calling main_output_deinit and main_output_init respectively), the main NDI output resolution changes, and as a bonus, we no longer get the Tried to reset when already active messages in the log.
This should when pulled this should also resolve: #1196 and #1195.

@Trouffman Trouffman added the Seeking Testers PRs with this label will package the plugin so that others can test label Feb 25, 2025
@Trouffman
Copy link
Collaborator

Tested on Mac. Seems to fit the bill.
Changed between profiles (1080P / 4K) > the output is recreated as expected.

In case of issues it solves :
#1147 : this will show an error in the log file, avoid a crash but still have the "output enabled" ticked.
This could be improved with #1148

#1195 : TBC

@Trouffman Trouffman self-assigned this Mar 10, 2025
@Trouffman Trouffman merged commit e002a81 into DistroAV:master Mar 10, 2025
6 checks passed
@BitRate27
Copy link
Contributor Author

BitRate27 commented Mar 14, 2025

Seems with this PR, we are no longer outputting Preview scenes. The preview shows up as a NDI source, but it doesn't output anything. Will try and address it in PR 1148 I believe it is related to Preview and Main using the same OBS output.

@Trouffman
Copy link
Collaborator

The issue introduced by this PR is fixed by : #1237

Note for future self looking here : "try to keep the codebase between main output and preview output logic as close as possible!"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Seeking Testers PRs with this label will package the plugin so that others can test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants