Skip to content

Commit

Permalink
[apps] Replace functions in UDT namespace by functions in srt namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
quink-black authored and maxsharabayko committed May 6, 2021
1 parent 97445fc commit 41348e8
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions apps/srt-file-transmit.cpp
Expand Up @@ -321,7 +321,7 @@ bool DoUpload(UriParser& ut, string path, string filename,
<< tar->GetSRTSocket() << endl;
goto exit;
}
UDT::setstreamid(tar->GetSRTSocket(), filename);
srt::setstreamid(tar->GetSRTSocket(), filename);
}

s = tar->GetSRTSocket();
Expand Down Expand Up @@ -539,7 +539,7 @@ bool DoDownload(UriParser& us, string directory, string filename,
cerr << "Failed to add SRT client to poll" << endl;
goto exit;
}
id = UDT::getstreamid(s);
id = srt::getstreamid(s);
cerr << "Source connected (listener), id ["
<< id << "]" << endl;
connected = true;
Expand All @@ -550,7 +550,7 @@ bool DoDownload(UriParser& us, string directory, string filename,
{
if (!connected)
{
id = UDT::getstreamid(s);
id = srt::getstreamid(s);
cerr << "Source connected (caller), id ["
<< id << "]" << endl;
connected = true;
Expand Down Expand Up @@ -714,7 +714,7 @@ int main(int argc, char** argv)
}
else
{
UDT::setlogstream(logfile_stream);
srt::setlogstream(logfile_stream);
}
}

Expand Down
2 changes: 1 addition & 1 deletion apps/srt-live-transmit.cpp
Expand Up @@ -434,7 +434,7 @@ int main(int argc, char** argv)
}
else
{
UDT::setlogstream(logfile_stream);
srt::setlogstream(logfile_stream);
}
}

Expand Down
8 changes: 4 additions & 4 deletions apps/srt-tunnel.cpp
Expand Up @@ -1115,21 +1115,21 @@ int main( int argc, char** argv )
string loglevel = Option<OutString>(params, "error", o_loglevel);
string logfa = Option<OutString>(params, "", o_logfa);
srt_logging::LogLevel::type lev = SrtParseLogLevel(loglevel);
UDT::setloglevel(lev);
srt::setloglevel(lev);
if (logfa == "")
{
UDT::addlogfa(SRT_LOGFA_APP);
srt::addlogfa(SRT_LOGFA_APP);
}
else
{
// Add only selected FAs
set<string> unknown_fas;
set<srt_logging::LogFA> fas = SrtParseLogFA(logfa, &unknown_fas);
UDT::resetlogfa(fas);
srt::resetlogfa(fas);

// The general parser doesn't recognize the "app" FA, we check it here.
if (unknown_fas.count("app"))
UDT::addlogfa(SRT_LOGFA_APP);
srt::addlogfa(SRT_LOGFA_APP);
}

string verbo = Option<OutString>(params, "no", o_verbose);
Expand Down
4 changes: 2 additions & 2 deletions apps/transmitmedia.cpp
Expand Up @@ -624,7 +624,7 @@ void SrtModel::Establish(std::string& w_name)
if (w_name != "")
{
Verb() << "Connect with requesting stream [" << w_name << "]";
UDT::setstreamid(m_sock, w_name);
srt::setstreamid(m_sock, w_name);
}
else
{
Expand Down Expand Up @@ -667,7 +667,7 @@ void SrtModel::Establish(std::string& w_name)
Verb() << "Accepting a client...";
AcceptNewClient();
// This rewrites m_sock with a new SRT socket ("accepted" socket)
w_name = UDT::getstreamid(m_sock);
w_name = srt::getstreamid(m_sock);
Verb() << "... GOT CLIENT for stream [" << w_name << "]";
}
}
Expand Down

0 comments on commit 41348e8

Please sign in to comment.