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

Putting global objects with short names under a namespace #576

Merged
merged 4 commits into from
Feb 15, 2019

Conversation

ethouris
Copy link
Collaborator

This fix provides the following changes:

  1. All log-related global objects are put into logging namespace. This should keep away any name conflicts with other libraries. This exactly case was believed to cause problems when added to ffmpeg linked to OBS Studio.
  2. The blog logger is commented out (it was the one caught with suspected name conflict). This isn't in use, but it was commented out just so that the existing FA can be reused for something else in future.
  3. The use of std::string was removed from the initialization of the global objects. Although it wasn't causing problems with building OBS Studio, as it was initially suspected, keeping the solution using only C standard library keeps it safe against any future problems concerning the order of initialization.

@maxsharabayko maxsharabayko added Priority: High [core] Area: Changes in SRT library core labels Feb 15, 2019
@maxsharabayko maxsharabayko added this to the v.1.3.2 milestone Feb 15, 2019
Copy link
Collaborator

@maxsharabayko maxsharabayko left a comment

Choose a reason for hiding this comment

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

Fixes #545

srtcore/core.cpp Outdated Show resolved Hide resolved

// If the size of the FA name together with severity exceeds the size,
// just skip the former.
if (logger_pfx && strlen(prefix) + strlen(logger_pfx) < MAX_PREFIX_SIZE)
Copy link
Collaborator

Choose a reason for hiding this comment

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

+1 for ":"

src_config(&config)
{
// XXX stpcpy desired, but not enough portable
// Composing the exact prefix is not critical, so simply
// cut the prefix, if the lenght is exceeded
Copy link
Collaborator

Choose a reason for hiding this comment

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

s/lenght/length/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[core] Area: Changes in SRT library core Priority: High
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants