Skip to content

Commit

Permalink
scons fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
baranovmv committed Dec 4, 2024
1 parent 73448d9 commit 8fc59cd
Show file tree
Hide file tree
Showing 9 changed files with 126 additions and 103 deletions.
6 changes: 3 additions & 3 deletions src/internal_modules/roc_pipeline/receiver_session_group.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ ReceiverSessionGroup::create_control_pipeline(ReceiverEndpoint* control_endpoint
// We pass this as implementation of rtcp::IParticipant.
// rtcp::Communicator will call our methods right now (in constructor)
// and later when we call generate_packets() or process_packets().
rtcp_communicator_.reset(new(rtcp_communicator_) rtcp::Communicator(
source_config_.common.rtcp, *this, *control_endpoint->outbound_writer(),
*control_endpoint->outbound_composer(), packet_factory_, arena_, dumper_));
rtcp_communicator_.reset(new (rtcp_communicator_) rtcp::Communicator(
source_config_.common.rtcp, *this, *control_endpoint->outbound_writer(),
*control_endpoint->outbound_composer(), packet_factory_, arena_, dumper_));

const status::StatusCode code = rtcp_communicator_->init_status();
if (code != status::StatusOK) {
Expand Down
6 changes: 3 additions & 3 deletions src/internal_modules/roc_pipeline/sender_session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,9 @@ SenderSession::create_control_pipeline(SenderEndpoint* control_endpoint) {

rtcp_outbound_addr_ = control_endpoint->outbound_address();

rtcp_communicator_.reset(new(rtcp_communicator_) rtcp::Communicator(
sink_config_.rtcp, *this, control_endpoint->outbound_writer(),
control_endpoint->outbound_composer(), packet_factory_, arena_, dumper_));
rtcp_communicator_.reset(new (rtcp_communicator_) rtcp::Communicator(
sink_config_.rtcp, *this, control_endpoint->outbound_writer(),
control_endpoint->outbound_composer(), packet_factory_, arena_, dumper_));

const status::StatusCode code = rtcp_communicator_->init_status();
if (code != status::StatusOK) {
Expand Down
14 changes: 9 additions & 5 deletions src/internal_modules/roc_rtcp/communicator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,13 @@ const core::nanoseconds_t LogInterval = core::Second * 30;

} // namespace

Communicator::Communicator(const Config &config, IParticipant &participant, packet::IWriter &packet_writer,
packet::IComposer &packet_composer, packet::PacketFactory &packet_factory,
core::IArena &arena, dbgio::CsvDumper* dumper)
Communicator::Communicator(const Config& config,
IParticipant& participant,
packet::IWriter& packet_writer,
packet::IComposer& packet_composer,
packet::PacketFactory& packet_factory,
core::IArena& arena,
dbgio::CsvDumper* dumper)
: packet_factory_(packet_factory)
, packet_writer_(packet_writer)
, packet_composer_(packet_composer)
Expand Down Expand Up @@ -87,8 +91,8 @@ status::StatusCode Communicator::process_packet(const packet::PacketPtr& packet,
return status::StatusOK;
}

status::StatusCode status =
reporter_.begin_processing(packet->udp()->src_addr, packet->udp()->receive_timestamp);
status::StatusCode status = reporter_.begin_processing(
packet->udp()->src_addr, packet->udp()->receive_timestamp);
roc_log(LogTrace, "rtcp communicator: begin_processing(): status=%s",
status::code_to_str(status));

Expand Down
10 changes: 7 additions & 3 deletions src/internal_modules/roc_rtcp/communicator.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,13 @@ namespace rtcp {
class Communicator : public core::NonCopyable<> {
public:
//! Initialize.
Communicator(const Config &config, IParticipant &participant, packet::IWriter &packet_writer,
packet::IComposer &packet_composer, packet::PacketFactory &packet_factory,
core::IArena &arena, dbgio::CsvDumper* dumper);
Communicator(const Config& config,
IParticipant& participant,
packet::IWriter& packet_writer,
packet::IComposer& packet_composer,
packet::PacketFactory& packet_factory,
core::IArena& arena,
dbgio::CsvDumper* dumper);

//! Check if the object was successfully constructed.
status::StatusCode init_status() const;
Expand Down
9 changes: 6 additions & 3 deletions src/internal_modules/roc_rtcp/reporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@
namespace roc {
namespace rtcp {

Reporter::Reporter(const Config &config, IParticipant &participant, core::IArena &arena, dbgio::CsvDumper *dumper)
Reporter::Reporter(const Config& config,
IParticipant& participant,
core::IArena& arena,
dbgio::CsvDumper* dumper)
: arena_(arena)
, participant_(participant)
, local_source_id_(0)
Expand Down Expand Up @@ -1400,8 +1403,8 @@ Reporter::find_stream_(packet::stream_source_t source_id, CreateMode mode) {
roc_log(LogDebug, "rtcp reporter: creating stream: ssrc=%lu",
(unsigned long)source_id);

stream =
new(stream_pool_) Stream(arena_, stream_pool_, source_id, report_time_, config_.rtt, dumper_);
stream = new (stream_pool_)
Stream(arena_, stream_pool_, source_id, report_time_, config_.rtt, dumper_);
if (!stream) {
report_error_ = status::StatusNoMem;
return NULL;
Expand Down
14 changes: 10 additions & 4 deletions src/internal_modules/roc_rtcp/reporter.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "roc_core/shared_ptr.h"
#include "roc_core/slab_pool.h"
#include "roc_core/time.h"
#include "roc_dbgio/csv_dumper.h"
#include "roc_packet/ntp.h"
#include "roc_packet/units.h"
#include "roc_rtcp/cname.h"
Expand All @@ -34,7 +35,6 @@
#include "roc_rtcp/rtt_estimator.h"
#include "roc_rtcp/sdes.h"
#include "roc_status/status_code.h"
#include "roc_dbgio/csv_dumper.h"

namespace roc {
namespace rtcp {
Expand Down Expand Up @@ -91,7 +91,10 @@ namespace rtcp {
class Reporter : public core::NonCopyable<> {
public:
//! Initialize.
Reporter(const Config &config, IParticipant &participant, core::IArena &arena, dbgio::CsvDumper *dumper);
Reporter(const Config& config,
IParticipant& participant,
core::IArena& arena,
dbgio::CsvDumper* dumper);
~Reporter();

//! Check if the object was successfully constructed.
Expand Down Expand Up @@ -262,9 +265,12 @@ class Reporter : public core::NonCopyable<> {
struct Stream : core::RefCounted<Stream, core::PoolAllocation>,
core::HashmapNode<>,
core::ListNode<> {
Stream(core::IArena &arena, core::IPool &pool, packet::stream_source_t source_id,
Stream(core::IArena& arena,
core::IPool& pool,
packet::stream_source_t source_id,
core::nanoseconds_t report_time,
const RttConfig &rtt_config, dbgio::CsvDumper *dumper)
const RttConfig& rtt_config,
dbgio::CsvDumper* dumper)
: core::RefCounted<Stream, core::PoolAllocation>(pool)
, source_id(source_id)
, has_remote_recv_report(false)
Expand Down
10 changes: 7 additions & 3 deletions src/internal_modules/roc_rtcp/rtt_estimator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
namespace roc {
namespace rtcp {

RttEstimator::RttEstimator(core::IArena &arena, const RttConfig &config, dbgio::CsvDumper *dumper)
RttEstimator::RttEstimator(core::IArena& arena,
const RttConfig& config,
dbgio::CsvDumper* dumper)
: config_(config)
, metrics_()
, has_metrics_(false)
Expand Down Expand Up @@ -100,8 +102,10 @@ void RttEstimator::update(core::nanoseconds_t local_report_ts,
}
}

void RttEstimator::dump_(core::nanoseconds_t local_report_ts, core::nanoseconds_t remote_report_ts,
core::nanoseconds_t remote_reply_ts, core::nanoseconds_t local_reply_ts) {
void RttEstimator::dump_(core::nanoseconds_t local_report_ts,
core::nanoseconds_t remote_report_ts,
core::nanoseconds_t remote_reply_ts,
core::nanoseconds_t local_reply_ts) {
dbgio::CsvEntry e;
e.type = 'r';
e.n_fields = 7;
Expand Down
12 changes: 7 additions & 5 deletions src/internal_modules/roc_rtcp/rtt_estimator.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
#define ROC_RTCP_RTT_ESTIMATOR_H_

#include "roc_core/time.h"
#include "roc_packet/units.h"
#include "roc_dbgio/csv_dumper.h"
#include "roc_packet/units.h"
#include "roc_stat/mov_quantile.h"

namespace roc {
Expand Down Expand Up @@ -53,7 +53,7 @@ struct RttMetrics {
class RttEstimator {
public:
//! Initialize.
RttEstimator(core::IArena &arena, const RttConfig &config, dbgio::CsvDumper *dumper);
RttEstimator(core::IArena& arena, const RttConfig& config, dbgio::CsvDumper* dumper);

//! Check whether metrics are already available.
bool has_metrics() const;
Expand All @@ -73,8 +73,10 @@ class RttEstimator {
core::nanoseconds_t local_reply_ts);

private:
void dump_(core::nanoseconds_t local_report_ts, core::nanoseconds_t remote_report_ts,
core::nanoseconds_t remote_reply_ts, core::nanoseconds_t local_reply_ts);
void dump_(core::nanoseconds_t local_report_ts,
core::nanoseconds_t remote_report_ts,
core::nanoseconds_t remote_reply_ts,
core::nanoseconds_t local_reply_ts);

const RttConfig config_;
RttMetrics metrics_;
Expand All @@ -83,7 +85,7 @@ class RttEstimator {
core::nanoseconds_t first_report_ts_;
core::nanoseconds_t last_report_ts_;

dbgio::CsvDumper *dumper_;
dbgio::CsvDumper* dumper_;
stat::MovQuantile<core::nanoseconds_t> rtt_stats_;
stat::MovQuantile<core::nanoseconds_t> clock_offset_stats_;
};
Expand Down
Loading

0 comments on commit 8fc59cd

Please sign in to comment.