Skip to content
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

Make background steams build-optional #7129

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

xif-fr
Copy link

@xif-fr xif-fr commented Nov 27, 2021

Added a build option ENABLE_BACKGROUND_STREAMS. When disabled, removes background streams (hypnotoad, rain, enterprise) code from the UI and engine with a bunch of #ifdef. Stays enabled by default. Both option values have been tested.

This is simply to make it possible to remove these potentially unwanted features.

#else
ui_->action_rain->setVisible(false);
ui_->action_hypnotoad->setVisible(false);
ui_->action_enterprise->setVisible(false);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could these be removed from mainwindow.ui and added to the extras menu dynamically?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be a cleaner solution indeed, but I'm not sure how to deal with the translations of the menus, given that the translations are managed automatically.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. I'm still unsure about the translation files because there are remaining #: ../bin/src/ui_mainwindow.h:748 which don't match (now it's used in mainwindow.cpp). I don't know if it could break something. At least it compiles and works fine.

@@ -860,7 +864,9 @@ shared_ptr<GstEnginePipeline> GstEngine::CreatePipeline(
qLog(Error) << "Could not initialize pipeline" << kEnterprisePipeline;
ret.reset();
}
} else {
} else
#endif // HAVE_BACKGROUND_STREAMS
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe cleaner to return in the two if blocks above and get rid of the else?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants