Skip to content

Commit

Permalink
app: refactor name transmit_total_stats
Browse files Browse the repository at this point in the history
  • Loading branch information
lars18th committed Jan 31, 2018
1 parent e4b567f commit 3314544
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion apps/srt-file-transmit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ int main( int argc, char** argv )

string sfull = Option<OutString>(params, "no", o_fullstats);
if (sfull == "" || !false_names.count(sfull))
::total_stats = true;
::transmit_total_stats = true;

string source = args[0];
string target = args[1];
Expand Down
2 changes: 1 addition & 1 deletion apps/srt-live-transmit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ int main( int argc, char** argv )
string logfile = Option("", "logfile");
bool internal_log = Option("no", "loginternal") != "no";
bool skip_flushing = Option("no", "S", "skipflush") != "no";
total_stats = Option("no", "f", "full-stats") != "no";
transmit_total_stats = Option("no", "f", "full-stats") != "no";

// Options that require integer conversion
unsigned long bandwidth;
Expand Down
2 changes: 1 addition & 1 deletion common/transmitbase.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

typedef std::vector<char> bytevector;
extern bool transmit_verbose;
extern bool total_stats;
extern bool transmit_total_stats;
extern volatile bool transmit_throw_on_interrupt;
extern unsigned long transmit_bw_report;
extern unsigned long transmit_stats_report;
Expand Down
8 changes: 4 additions & 4 deletions common/transmitmedia.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
using namespace std;

bool transmit_verbose = false;
bool total_stats = false;
bool transmit_total_stats = false;
bool clear_stats = false;
std::ostream* transmit_cverb = nullptr;
volatile bool transmit_throw_on_interrupt = false;
Expand Down Expand Up @@ -726,7 +726,7 @@ bytevector SrtSource::Read(size_t chunk)
if ( transmit_stats_report && (counter % transmit_stats_report) == transmit_stats_report - 1)
{
PrintSrtStats(m_sock, perf);
clear_stats = !total_stats;
clear_stats = !transmit_total_stats;
}

++counter;
Expand Down Expand Up @@ -754,7 +754,7 @@ int SrtTarget::ConfigurePre(SRTSOCKET sock)

void SrtTarget::Write(const bytevector& data)
{
static unsigned long counter = 1;
static unsigned long counter = 1;

::transmit_throw_on_interrupt = true;

Expand Down Expand Up @@ -782,7 +782,7 @@ void SrtTarget::Write(const bytevector& data)
if ( transmit_stats_report && (counter % transmit_stats_report) == transmit_stats_report - 1)
{
PrintSrtStats(m_sock, perf);
clear_stats = !total_stats;
clear_stats = !transmit_total_stats;
}

++counter;
Expand Down

0 comments on commit 3314544

Please sign in to comment.