Eliminate unnecessary RTC_TRACE_EVENTS_ENABLED
Bug: webrtc:14073 Change-Id: I6365cc17393be52c11312dfa954783a3e135cb8c Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262263 Reviewed-by: Erik Språng <sprang@webrtc.org> Reviewed-by: Johannes Kron <kron@webrtc.org> Commit-Queue: Harald Alvestrand <hta@webrtc.org> Reviewed-by: Henrik Boström <hbos@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/main@{#36929}
This commit is contained in:
committed by
WebRTC LUCI CQ
parent
d68a06aedf
commit
b1ba85385e
@ -57,6 +57,7 @@ rtc_library("pacing") {
|
|||||||
"../../rtc_base:timeutils",
|
"../../rtc_base:timeutils",
|
||||||
"../../rtc_base/experiments:field_trial_parser",
|
"../../rtc_base/experiments:field_trial_parser",
|
||||||
"../../rtc_base/synchronization:mutex",
|
"../../rtc_base/synchronization:mutex",
|
||||||
|
"../../rtc_base/system:unused",
|
||||||
"../../rtc_base/task_utils:to_queued_task",
|
"../../rtc_base/task_utils:to_queued_task",
|
||||||
"../../system_wrappers",
|
"../../system_wrappers",
|
||||||
"../../system_wrappers:metrics",
|
"../../system_wrappers:metrics",
|
||||||
|
|||||||
@ -23,6 +23,7 @@
|
|||||||
#include "modules/rtp_rtcp/source/rtp_rtcp_interface.h"
|
#include "modules/rtp_rtcp/source/rtp_rtcp_interface.h"
|
||||||
#include "rtc_base/checks.h"
|
#include "rtc_base/checks.h"
|
||||||
#include "rtc_base/logging.h"
|
#include "rtc_base/logging.h"
|
||||||
|
#include "rtc_base/system/unused.h"
|
||||||
#include "rtc_base/time_utils.h"
|
#include "rtc_base/time_utils.h"
|
||||||
#include "rtc_base/trace_event.h"
|
#include "rtc_base/trace_event.h"
|
||||||
|
|
||||||
@ -214,14 +215,13 @@ std::vector<std::unique_ptr<RtpPacketToSend>> PacketRouter::GeneratePadding(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if RTC_TRACE_EVENTS_ENABLED
|
|
||||||
for (auto& packet : padding_packets) {
|
for (auto& packet : padding_packets) {
|
||||||
|
RTC_UNUSED(packet);
|
||||||
TRACE_EVENT2(TRACE_DISABLED_BY_DEFAULT("webrtc"),
|
TRACE_EVENT2(TRACE_DISABLED_BY_DEFAULT("webrtc"),
|
||||||
"PacketRouter::GeneratePadding::Loop", "sequence_number",
|
"PacketRouter::GeneratePadding::Loop", "sequence_number",
|
||||||
packet->SequenceNumber(), "rtp_timestamp",
|
packet->SequenceNumber(), "rtp_timestamp",
|
||||||
packet->Timestamp());
|
packet->Timestamp());
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
return padding_packets;
|
return padding_packets;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,6 +18,7 @@
|
|||||||
#include "rtc_base/checks.h"
|
#include "rtc_base/checks.h"
|
||||||
#include "rtc_base/experiments/field_trial_parser.h"
|
#include "rtc_base/experiments/field_trial_parser.h"
|
||||||
#include "rtc_base/experiments/field_trial_units.h"
|
#include "rtc_base/experiments/field_trial_units.h"
|
||||||
|
#include "rtc_base/system/unused.h"
|
||||||
#include "rtc_base/trace_event.h"
|
#include "rtc_base/trace_event.h"
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
@ -129,16 +130,15 @@ void TaskQueuePacedSender::SetPacingRates(DataRate pacing_rate,
|
|||||||
|
|
||||||
void TaskQueuePacedSender::EnqueuePackets(
|
void TaskQueuePacedSender::EnqueuePackets(
|
||||||
std::vector<std::unique_ptr<RtpPacketToSend>> packets) {
|
std::vector<std::unique_ptr<RtpPacketToSend>> packets) {
|
||||||
#if RTC_TRACE_EVENTS_ENABLED
|
|
||||||
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("webrtc"),
|
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("webrtc"),
|
||||||
"TaskQueuePacedSender::EnqueuePackets");
|
"TaskQueuePacedSender::EnqueuePackets");
|
||||||
for (auto& packet : packets) {
|
for (auto& packet : packets) {
|
||||||
|
RTC_UNUSED(packet);
|
||||||
TRACE_EVENT2(TRACE_DISABLED_BY_DEFAULT("webrtc"),
|
TRACE_EVENT2(TRACE_DISABLED_BY_DEFAULT("webrtc"),
|
||||||
"TaskQueuePacedSender::EnqueuePackets::Loop",
|
"TaskQueuePacedSender::EnqueuePackets::Loop",
|
||||||
"sequence_number", packet->SequenceNumber(), "rtp_timestamp",
|
"sequence_number", packet->SequenceNumber(), "rtp_timestamp",
|
||||||
packet->Timestamp());
|
packet->Timestamp());
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
task_queue_.PostTask([this, packets_ = std::move(packets)]() mutable {
|
task_queue_.PostTask([this, packets_ = std::move(packets)]() mutable {
|
||||||
RTC_DCHECK_RUN_ON(&task_queue_);
|
RTC_DCHECK_RUN_ON(&task_queue_);
|
||||||
@ -224,10 +224,8 @@ void TaskQueuePacedSender::MaybeProcessPackets(
|
|||||||
Timestamp scheduled_process_time) {
|
Timestamp scheduled_process_time) {
|
||||||
RTC_DCHECK_RUN_ON(&task_queue_);
|
RTC_DCHECK_RUN_ON(&task_queue_);
|
||||||
|
|
||||||
#if RTC_TRACE_EVENTS_ENABLED
|
|
||||||
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("webrtc"),
|
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("webrtc"),
|
||||||
"TaskQueuePacedSender::MaybeProcessPackets");
|
"TaskQueuePacedSender::MaybeProcessPackets");
|
||||||
#endif
|
|
||||||
|
|
||||||
if (is_shutdown_ || !is_started_) {
|
if (is_shutdown_ || !is_started_) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -35,9 +35,7 @@
|
|||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
[[maybe_unused]] const char* FrameTypeToString(AudioFrameType frame_type) {
|
||||||
#if RTC_TRACE_EVENTS_ENABLED
|
|
||||||
const char* FrameTypeToString(AudioFrameType frame_type) {
|
|
||||||
switch (frame_type) {
|
switch (frame_type) {
|
||||||
case AudioFrameType::kEmptyFrame:
|
case AudioFrameType::kEmptyFrame:
|
||||||
return "empty";
|
return "empty";
|
||||||
@ -48,7 +46,6 @@ const char* FrameTypeToString(AudioFrameType frame_type) {
|
|||||||
}
|
}
|
||||||
RTC_CHECK_NOTREACHED();
|
RTC_CHECK_NOTREACHED();
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
constexpr char kIncludeCaptureClockOffset[] =
|
constexpr char kIncludeCaptureClockOffset[] =
|
||||||
"WebRTC-IncludeCaptureClockOffset";
|
"WebRTC-IncludeCaptureClockOffset";
|
||||||
@ -166,10 +163,8 @@ bool RTPSenderAudio::SendAudio(AudioFrameType frame_type,
|
|||||||
const uint8_t* payload_data,
|
const uint8_t* payload_data,
|
||||||
size_t payload_size,
|
size_t payload_size,
|
||||||
int64_t absolute_capture_timestamp_ms) {
|
int64_t absolute_capture_timestamp_ms) {
|
||||||
#if RTC_TRACE_EVENTS_ENABLED
|
|
||||||
TRACE_EVENT_ASYNC_STEP1("webrtc", "Audio", rtp_timestamp, "Send", "type",
|
TRACE_EVENT_ASYNC_STEP1("webrtc", "Audio", rtp_timestamp, "Send", "type",
|
||||||
FrameTypeToString(frame_type));
|
FrameTypeToString(frame_type));
|
||||||
#endif
|
|
||||||
|
|
||||||
// From RFC 4733:
|
// From RFC 4733:
|
||||||
// A source has wide latitude as to how often it sends event updates. A
|
// A source has wide latitude as to how often it sends event updates. A
|
||||||
|
|||||||
@ -97,8 +97,7 @@ bool IsBaseLayer(const RTPVideoHeader& video_header) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if RTC_TRACE_EVENTS_ENABLED
|
[[maybe_unused]] const char* FrameTypeToString(VideoFrameType frame_type) {
|
||||||
const char* FrameTypeToString(VideoFrameType frame_type) {
|
|
||||||
switch (frame_type) {
|
switch (frame_type) {
|
||||||
case VideoFrameType::kEmptyFrame:
|
case VideoFrameType::kEmptyFrame:
|
||||||
return "empty";
|
return "empty";
|
||||||
@ -111,7 +110,6 @@ const char* FrameTypeToString(VideoFrameType frame_type) {
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
bool IsNoopDelay(const VideoPlayoutDelay& delay) {
|
bool IsNoopDelay(const VideoPlayoutDelay& delay) {
|
||||||
return delay.min_ms == -1 && delay.max_ms == -1;
|
return delay.min_ms == -1 && delay.max_ms == -1;
|
||||||
@ -477,10 +475,8 @@ bool RTPSenderVideo::SendVideo(
|
|||||||
rtc::ArrayView<const uint8_t> payload,
|
rtc::ArrayView<const uint8_t> payload,
|
||||||
RTPVideoHeader video_header,
|
RTPVideoHeader video_header,
|
||||||
absl::optional<int64_t> expected_retransmission_time_ms) {
|
absl::optional<int64_t> expected_retransmission_time_ms) {
|
||||||
#if RTC_TRACE_EVENTS_ENABLED
|
|
||||||
TRACE_EVENT_ASYNC_STEP1("webrtc", "Video", capture_time_ms, "Send", "type",
|
TRACE_EVENT_ASYNC_STEP1("webrtc", "Video", capture_time_ms, "Send", "type",
|
||||||
FrameTypeToString(video_header.frame_type));
|
FrameTypeToString(video_header.frame_type));
|
||||||
#endif
|
|
||||||
RTC_CHECK_RUNS_SERIALIZED(&send_checker_);
|
RTC_CHECK_RUNS_SERIALIZED(&send_checker_);
|
||||||
|
|
||||||
if (video_header.frame_type == VideoFrameType::kEmptyFrame)
|
if (video_header.frame_type == VideoFrameType::kEmptyFrame)
|
||||||
|
|||||||
Reference in New Issue
Block a user