Remove TRACE_ASYNC without matching TRACE_BEGIN in rtc_sender_audio

This seems to confuse perfetto, and the data ends up on its own track
and the end event is just ignored. As it was invalid, I am assuming it
is not used, and can be simply removed.

#rtc_fixit


Bug: webrtc:15867
Change-Id: I77e59adcd35c51911474446a5f92505bf6b860f4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/342780
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@google.com>
Cr-Commit-Position: refs/heads/main@{#41892}
This commit is contained in:
Evan Shrubsole 2024-03-12 14:56:01 +00:00 committed by WebRTC LUCI CQ
parent 6417bbfd80
commit b8abf5199a

View File

@ -31,26 +31,10 @@
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
#include "rtc_base/numerics/safe_conversions.h"
#include "rtc_base/trace_event.h"
#include "system_wrappers/include/ntp_time.h"
namespace webrtc {
namespace {
[[maybe_unused]] const char* FrameTypeToString(AudioFrameType frame_type) {
switch (frame_type) {
case AudioFrameType::kEmptyFrame:
return "empty";
case AudioFrameType::kAudioFrameSpeech:
return "audio_speech";
case AudioFrameType::kAudioFrameCN:
return "audio_cn";
}
RTC_CHECK_NOTREACHED();
}
} // namespace
RTPSenderAudio::RTPSenderAudio(Clock* clock, RTPSender* rtp_sender)
: clock_(clock),
rtp_sender_(rtp_sender),
@ -145,8 +129,6 @@ bool RTPSenderAudio::MarkerBit(AudioFrameType frame_type, int8_t payload_type) {
bool RTPSenderAudio::SendAudio(const RtpAudioFrame& frame) {
RTC_DCHECK_GE(frame.payload_id, 0);
RTC_DCHECK_LE(frame.payload_id, 127);
TRACE_EVENT_ASYNC_STEP1("webrtc", "Audio", frame.rtp_timestamp, "Send",
"type", FrameTypeToString(frame.type));
// From RFC 4733:
// A source has wide latitude as to how often it sends event updates. A
@ -279,9 +261,6 @@ bool RTPSenderAudio::SendAudio(const RtpAudioFrame& frame) {
MutexLock lock(&send_audio_mutex_);
last_payload_type_ = frame.payload_id;
}
TRACE_EVENT_ASYNC_END2("webrtc", "Audio", frame.rtp_timestamp, "timestamp",
packet->Timestamp(), "seqnum",
packet->SequenceNumber());
packet->set_packet_type(RtpPacketMediaType::kAudio);
packet->set_allow_retransmission(true);
std::vector<std::unique_ptr<RtpPacketToSend>> packets(1);