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

[apps] Fixed logfa handling in srt-live-transmit #1647

Merged
merged 2 commits into from
Nov 10, 2020

Conversation

maxsharabayko
Copy link
Collaborator

If a functional area or several areas are provided, the list has to be reset before adding those FAs.

@maxsharabayko maxsharabayko added Type: Bug Indicates an unexpected problem or unintended behavior [apps] Area: Test applications related improvements labels Nov 9, 2020
@maxsharabayko maxsharabayko added this to the v1.4.3 milestone Nov 9, 2020
@@ -401,8 +401,12 @@ int main(int argc, char** argv)
// Set SRT log levels and functional areas
//
srt_setloglevel(cfg.loglevel);
for (set<srt_logging::LogFA>::iterator i = cfg.logfas.begin(); i != cfg.logfas.end(); ++i)
srt_addlogfa(*i);
if (!cfg.logfas.empty())
Copy link
Collaborator

Choose a reason for hiding this comment

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

That makes the usage different to what's in srt-test-live. At least add some explanation at the option help text.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

srt-live-transmit is the main external sample application, and its behavior around FAs is already different from srt-test-live.

This PR does not change the behavior much. It just assumes if you provide -logfa:que-recv, then you want only this FA to be enabled.
In srt-test-live the same will be achieved by disabling all FAs first, then enabling the desired FAs, which I find a bit trickier:
-logfa ~all +que-recv

Copy link
Collaborator

Choose a reason for hiding this comment

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

It's ok that this app works differently. Just explain this in the help text. It's important because it's a user application.

Copy link
Collaborator

@ethouris ethouris left a comment

Choose a reason for hiding this comment

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

Consider adding the information to -h logging that if -logfa are specified, then all default enabled logfa will be now disabled.

@maxsharabayko
Copy link
Collaborator Author

maxsharabayko commented Nov 9, 2020

TODO to consider

  • Update help on -logfa in the app
  • Update help on -logfa in srt-live-transmit.md
  • List available FAs in the app via -h logging?

@maxsharabayko maxsharabayko merged commit 8270f80 into Haivision:master Nov 10, 2020
@maxsharabayko maxsharabayko deleted the hotfix/stransmit-logfa branch November 10, 2020 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[apps] Area: Test applications related improvements Type: Bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants