sign: Refactor AbstractPort::setStreamSatsTracking
Move start/stop stream stats tracking inside setStreamStatsTracking. In future, maybe convert setStreamStatsTracking to virtual function?
This commit is contained in:
parent
387e6700cd
commit
028843c55a
@ -105,22 +105,12 @@ bool AbstractPort::modify(const OstProto::Port &port)
|
||||
data_.set_transmit_mode(port.transmit_mode());
|
||||
|
||||
if (port.has_track_stream_stats())
|
||||
setTrackStreamStats(port.track_stream_stats());
|
||||
ret |= setTrackStreamStats(port.track_stream_stats());
|
||||
|
||||
if (port.has_user_name()) {
|
||||
data_.set_user_name(port.user_name());
|
||||
}
|
||||
|
||||
if (port.has_track_stream_stats()) {
|
||||
bool val = port.track_stream_stats() ?
|
||||
startStreamStatsTracking() : stopStreamStatsTracking();
|
||||
|
||||
if (val)
|
||||
data_.set_track_stream_stats(port.track_stream_stats());
|
||||
|
||||
ret |= val;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -192,7 +182,12 @@ void AbstractPort::addNote(QString note)
|
||||
|
||||
bool AbstractPort::setTrackStreamStats(bool enable)
|
||||
{
|
||||
bool val = enable ? startStreamStatsTracking() : stopStreamStatsTracking();
|
||||
|
||||
if (val)
|
||||
data_.set_track_stream_stats(enable);
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
AbstractPort::Accuracy AbstractPort::rateAccuracy()
|
||||
|
Loading…
Reference in New Issue
Block a user