Skip to content

Commit

Permalink
Remove TRACE_ASYNC without matching TRACE_BEGIN in rtc_sender_audio
Browse files Browse the repository at this point in the history
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 <[email protected]>
Commit-Queue: Evan Shrubsole <[email protected]>
Cr-Commit-Position: refs/heads/main@{#41892}
  • Loading branch information
eshrubs authored and WebRTC LUCI CQ committed Mar 13, 2024
1 parent 6417bbf commit b8abf51
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions modules/rtp_rtcp/source/rtp_sender_audio.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit b8abf51

Please sign in to comment.