Skip to content

Commit

Permalink
[sp] roc-streaminggh-183 Update todo comments
Browse files Browse the repository at this point in the history
Sponsored-by: waspd
  • Loading branch information
gavv committed Jun 20, 2024
1 parent b5fec7c commit 0884e43
Showing 10 changed files with 30 additions and 30 deletions.
4 changes: 2 additions & 2 deletions src/internal_modules/roc_node/receiver_decoder.cpp
Original file line number Diff line number Diff line change
@@ -44,14 +44,14 @@ ReceiverDecoder::ReceiverDecoder(Context& context,
pipeline::ReceiverLoop::Tasks::CreateSlot slot_task(slot_config);
if (!pipeline_.schedule_and_wait(slot_task)) {
roc_log(LogError, "receiver decoder node: failed to create slot");
// TODO(gh-183): forward status
// TODO(gh-183): forward status (control ops)
return;
}

slot_ = slot_task.get_handle();
if (!slot_) {
roc_log(LogError, "receiver decoder node: failed to create slot");
// TODO(gh-183): forward status
// TODO(gh-183): forward status (control ops)
return;
}

4 changes: 2 additions & 2 deletions src/internal_modules/roc_node/sender_encoder.cpp
Original file line number Diff line number Diff line change
@@ -43,14 +43,14 @@ SenderEncoder::SenderEncoder(Context& context,
pipeline::SenderLoop::Tasks::CreateSlot slot_task(slot_config);
if (!pipeline_.schedule_and_wait(slot_task)) {
roc_log(LogError, "sender encoder node: failed to create slot");
// TODO(gh-183): forward status
// TODO(gh-183): forward status (control ops)
return;
}

slot_ = slot_task.get_handle();
if (!slot_) {
roc_log(LogError, "sender encoder node: failed to create slot");
// TODO(gh-183): forward status
// TODO(gh-183): forward status (control ops)
return;
}

2 changes: 1 addition & 1 deletion src/internal_modules/roc_pipeline/receiver_loop.cpp
Original file line number Diff line number Diff line change
@@ -255,7 +255,7 @@ uint64_t ReceiverLoop::tid_imp() const {
}

status::StatusCode ReceiverLoop::process_subframe_imp(audio::Frame& frame) {
// TODO(gh-183): forward status from refresh()
// TODO(gh-183): forward status (refresh)
// TODO: handle returned deadline and schedule refresh
source_.refresh(core::timestamp(core::ClockUnix));

12 changes: 6 additions & 6 deletions src/internal_modules/roc_pipeline/receiver_session_group.cpp
Original file line number Diff line number Diff line change
@@ -104,7 +104,7 @@ ReceiverSessionGroup::refresh_sessions(core::nanoseconds_t current_time) {
// in particular query_recv_streams().
const status::StatusCode code =
rtcp_communicator_->generate_reports(current_time);
// TODO(gh-183): forward status
// TODO(gh-183): forward status (refresh)
roc_panic_if(code != status::StatusOK);

next_deadline = rtcp_communicator_->generation_deadline(current_time);
@@ -337,7 +337,7 @@ ReceiverSessionGroup::route_transport_packet_(const packet::PacketPtr& packet) {
return create_session_(packet);
}

// TODO(gh-183): return status
// TODO(gh-183): return status (routing)
return status::StatusOK;
}

@@ -367,14 +367,14 @@ ReceiverSessionGroup::create_session_(const packet::PacketPtr& packet) {
if (!packet->rtp()) {
roc_log(LogError,
"session group: can't create session, unexpected non-rtp packet");
// TODO(gh-183): return status
// TODO(gh-183): return status (control ops)
return status::StatusOK;
}

if (!packet->udp()) {
roc_log(LogError,
"session group: can't create session, unexpected non-udp packet");
// TODO(gh-183): return status
// TODO(gh-183): return status (routing)
return status::StatusOK;
}

@@ -406,7 +406,7 @@ ReceiverSessionGroup::create_session_(const packet::PacketPtr& packet) {
LogError,
"session group: can't create session, can't handle first packet: status=%s",
status::code_to_str(code));
// TODO(gh-183): handle and return status
// TODO(gh-183): handle and return status (routing)
return status::StatusOK;
}

@@ -415,7 +415,7 @@ ReceiverSessionGroup::create_session_(const packet::PacketPtr& packet) {
roc_log(LogError,
"session group: can't create session, can't create route: status=%s",
status::code_to_str(code));
// TODO(gh-183): handle and return status
// TODO(gh-183): handle and return status (routing)
return status::StatusOK;
}

14 changes: 7 additions & 7 deletions src/internal_modules/roc_pipeline/receiver_slot.cpp
Original file line number Diff line number Diff line change
@@ -78,19 +78,19 @@ core::nanoseconds_t ReceiverSlot::refresh(core::nanoseconds_t current_time) {

if (source_endpoint_) {
const status::StatusCode code = source_endpoint_->pull_packets(current_time);
// TODO(gh-183): forward status
// TODO(gh-183): forward status (refresh)
roc_panic_if(code != status::StatusOK);
}

if (repair_endpoint_) {
const status::StatusCode code = repair_endpoint_->pull_packets(current_time);
// TODO(gh-183): forward status
// TODO(gh-183): forward status (refresh)
roc_panic_if(code != status::StatusOK);
}

if (control_endpoint_) {
const status::StatusCode code = control_endpoint_->pull_packets(current_time);
// TODO(gh-183): forward status
// TODO(gh-183): forward status (refresh)
roc_panic_if(code != status::StatusOK);
}

@@ -145,7 +145,7 @@ ReceiverSlot::create_source_endpoint_(address::Protocol proto,
outbound_writer, arena()));

if (!source_endpoint_ || source_endpoint_->init_status() != status::StatusOK) {
// TODO(gh-183): forward status
// TODO(gh-183): forward status (control ops)
roc_log(LogError, "receiver slot: can't create source endpoint");
source_endpoint_.reset(NULL);
return NULL;
@@ -178,7 +178,7 @@ ReceiverSlot::create_repair_endpoint_(address::Protocol proto,
outbound_writer, arena()));

if (!repair_endpoint_ || repair_endpoint_->init_status() != status::StatusOK) {
// TODO(gh-183): forward status
// TODO(gh-183): forward status (control ops)
roc_log(LogError, "receiver slot: can't create repair endpoint");
repair_endpoint_.reset(NULL);
return NULL;
@@ -205,15 +205,15 @@ ReceiverSlot::create_control_endpoint_(address::Protocol proto,
outbound_writer, arena()));

if (!control_endpoint_ || control_endpoint_->init_status() != status::StatusOK) {
// TODO(gh-183): forward status
// TODO(gh-183): forward status (control ops)
roc_log(LogError, "receiver slot: can't create control endpoint");
control_endpoint_.reset(NULL);
return NULL;
}

if (session_group_.create_control_pipeline(control_endpoint_.get())
!= status::StatusOK) {
// TODO(gh-183): forward status
// TODO(gh-183): forward status (control ops)
roc_log(LogError, "receiver slot: can't create control pipeline");
control_endpoint_.reset(NULL);
return NULL;
2 changes: 1 addition & 1 deletion src/internal_modules/roc_pipeline/receiver_source.cpp
Original file line number Diff line number Diff line change
@@ -83,7 +83,7 @@ ReceiverSlot* ReceiverSource::create_slot(const ReceiverSlotConfig& slot_config)
if (!slot || slot->init_status() != status::StatusOK) {
roc_log(LogError, "receiver source: can't create slot: status=%s",
status::code_to_str(slot->init_status()));
// TODO(gh-183): forward status
// TODO(gh-183): forward status (control ops)
return NULL;
}

2 changes: 1 addition & 1 deletion src/internal_modules/roc_pipeline/sender_loop.cpp
Original file line number Diff line number Diff line change
@@ -250,7 +250,7 @@ uint64_t SenderLoop::tid_imp() const {
status::StatusCode SenderLoop::process_subframe_imp(audio::Frame& frame) {
const status::StatusCode status = sink_.write(frame);

// TODO(gh-183): forward status from refresh()
// TODO(gh-183): forward status (refresh)
// TODO: handle returned deadline and schedule refresh
sink_.refresh(core::timestamp(core::ClockUnix));

2 changes: 1 addition & 1 deletion src/internal_modules/roc_pipeline/sender_session.cpp
Original file line number Diff line number Diff line change
@@ -264,7 +264,7 @@ core::nanoseconds_t SenderSession::refresh(core::nanoseconds_t current_time) {
if (has_send_stream()) {
const status::StatusCode code =
rtcp_communicator_->generate_reports(current_time);
// TODO(gh-183): forward status
// TODO(gh-183): forward status (refresh)
roc_panic_if(code != status::StatusOK);
}

2 changes: 1 addition & 1 deletion src/internal_modules/roc_pipeline/sender_sink.cpp
Original file line number Diff line number Diff line change
@@ -74,7 +74,7 @@ SenderSlot* SenderSink::create_slot(const SenderSlotConfig& slot_config) {
if (!slot || slot->init_status() != status::StatusOK) {
roc_log(LogError, "sender sink: can't create slot: status=%s",
status::code_to_str(slot->init_status()));
// TODO(gh-183): forward status
// TODO(gh-183): forward status (control ops)
return NULL;
}

16 changes: 8 additions & 8 deletions src/internal_modules/roc_pipeline/sender_slot.cpp
Original file line number Diff line number Diff line change
@@ -95,7 +95,7 @@ SenderEndpoint* SenderSlot::add_endpoint(address::Interface iface,
if (session_.create_transport_pipeline(source_endpoint_.get(),
repair_endpoint_.get())
!= status::StatusOK) {
// TODO(gh-183): forward status
// TODO(gh-183): forward status (control ops)
return NULL;
}
}
@@ -111,7 +111,7 @@ SenderEndpoint* SenderSlot::add_endpoint(address::Interface iface,
if (control_endpoint_) {
if (session_.create_control_pipeline(control_endpoint_.get())
!= status::StatusOK) {
// TODO(gh-183): forward status
// TODO(gh-183): forward status (control ops)
return NULL;
}
}
@@ -129,19 +129,19 @@ core::nanoseconds_t SenderSlot::refresh(core::nanoseconds_t current_time) {

if (source_endpoint_) {
const status::StatusCode code = source_endpoint_->pull_packets(current_time);
// TODO(gh-183): forward status
// TODO(gh-183): forward status (refresh)
roc_panic_if(code != status::StatusOK);
}

if (repair_endpoint_) {
const status::StatusCode code = repair_endpoint_->pull_packets(current_time);
// TODO(gh-183): forward status
// TODO(gh-183): forward status (refresh)
roc_panic_if(code != status::StatusOK);
}

if (control_endpoint_) {
const status::StatusCode code = control_endpoint_->pull_packets(current_time);
// TODO(gh-183): forward status
// TODO(gh-183): forward status (refresh)
roc_panic_if(code != status::StatusOK);
}

@@ -187,7 +187,7 @@ SenderSlot::create_source_endpoint_(address::Protocol proto,
source_endpoint_.reset(new (source_endpoint_) SenderEndpoint(
proto, state_tracker_, session_, outbound_address, outbound_writer, arena()));
if (!source_endpoint_ || source_endpoint_->init_status() != status::StatusOK) {
// TODO(gh-183): forward status
// TODO(gh-183): forward status (control ops)
roc_log(LogError, "sender slot: can't create source endpoint");
source_endpoint_.reset(NULL);
return NULL;
@@ -223,7 +223,7 @@ SenderSlot::create_repair_endpoint_(address::Protocol proto,
repair_endpoint_.reset(new (repair_endpoint_) SenderEndpoint(
proto, state_tracker_, session_, outbound_address, outbound_writer, arena()));
if (!repair_endpoint_ || repair_endpoint_->init_status() != status::StatusOK) {
// TODO(gh-183): forward status
// TODO(gh-183): forward status (control ops)
roc_log(LogError, "sender slot: can't create repair endpoint");
repair_endpoint_.reset(NULL);
return NULL;
@@ -248,7 +248,7 @@ SenderSlot::create_control_endpoint_(address::Protocol proto,
control_endpoint_.reset(new (control_endpoint_) SenderEndpoint(
proto, state_tracker_, session_, outbound_address, outbound_writer, arena()));
if (!control_endpoint_ || control_endpoint_->init_status() != status::StatusOK) {
// TODO(gh-183): forward status
// TODO(gh-183): forward status (control ops)
roc_log(LogError, "sender slot: can't create control endpoint");
control_endpoint_.reset(NULL);
return NULL;

0 comments on commit 0884e43

Please sign in to comment.