Files
Michael Froman 06e90addc7 Bug 1952339 - Vendor libwebrtc from 995688c8e8
We already cherry-picked this when we vendored f30c044cf9.

Upstream commit: https://webrtc.googlesource.com/src/+/995688c8e85b520d50961486abbe0cc03eae9558
    Revert "more p2p cleanups"

    This reverts commit f30c044cf9bd06f91017c171d98690094ce6d88b.

    Reason for revert: breaks roll to chromium: https://ci.chromium.org/ui/p/chromium/builders/try/mac_chromium_compile_dbg_ng/2290104/overview

    Original change's description:
    > more p2p cleanups
    >
    > Move test code from p2p/base and rtc_base/ into p2p/test/
    > This p2p/base much less crowded and
    > clarifies that the rtc_base/nat* is in fact only test code.
    >
    > BUG=webrtc:0
    >
    > Change-Id: I4d14fae24cb0eff6783962f4b4483b560367ca5d
    > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/378900
    > Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
    > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
    > Auto-Submit: Jonas Oreland <jonaso@webrtc.org>
    > Cr-Commit-Position: refs/heads/main@{#43995}

    Bug: webrtc:0
    Change-Id: I6c79fa85f53fdb9a1dacbe38911771f9a4289c76
    No-Presubmit: true
    No-Tree-Checks: true
    No-Try: true
    Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/379040
    Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
    Owners-Override: Ilya Nikolaevskiy <ilnik@webrtc.org>
    Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
    Cr-Commit-Position: refs/heads/main@{#43999}

Differential Revision: https://phabricator.services.mozilla.com/D244009
2025-03-07 16:59:33 -06:00

60 lines
2.5 KiB
Diff

From: Michael Froman <mfroman@mozilla.com>
Date: Fri, 21 Jun 2024 16:28:00 -0500
Subject: Bug 1903098 - (fix-cd09858f4a) disable perfetto usage to avoid new
third_party library.
Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/b050c455caa1d24a0cfa4933ac8cd82c9cd3c347
---
BUILD.gn | 2 ++
modules/video_coding/generic_decoder.cc | 10 +++++-----
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/BUILD.gn b/BUILD.gn
index b5b4ca9a01..1d7bcfee98 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -279,6 +279,7 @@ config("rtc_prod_config") {
}
group("tracing") {
+if (!build_with_mozilla) {
all_dependent_configs = [ "//third_party/perfetto/gn:public_config" ]
if (rtc_use_perfetto) {
if (build_with_chromium) {
@@ -295,6 +296,7 @@ group("tracing") {
[ "//third_party/perfetto/include/perfetto/tracing" ]
}
}
+}
if (rtc_use_perfetto) {
rtc_library("webrtc_libperfetto") {
diff --git a/modules/video_coding/generic_decoder.cc b/modules/video_coding/generic_decoder.cc
index 4b2b7de2ee..fe1abc2b7c 100644
--- a/modules/video_coding/generic_decoder.cc
+++ b/modules/video_coding/generic_decoder.cc
@@ -109,9 +109,9 @@ void VCMDecodedFrameCallback::Decoded(VideoFrame& decodedImage,
std::optional<int32_t> decode_time_ms,
std::optional<uint8_t> qp) {
RTC_DCHECK(_receiveCallback) << "Callback must not be null at this point";
- TRACE_EVENT(
- "webrtc", "VCMDecodedFrameCallback::Decoded",
- perfetto::TerminatingFlow::ProcessScoped(decodedImage.rtp_timestamp()));
+ TRACE_EVENT_INSTANT1("webrtc", "VCMDecodedFrameCallback::Decoded",
+ TRACE_EVENT_SCOPE_GLOBAL, "timestamp",
+ decodedImage.rtp_timestamp());
// TODO(holmer): We should improve this so that we can handle multiple
// callbacks from one call to Decode().
std::optional<FrameInfo> frame_info;
@@ -319,8 +319,8 @@ int32_t VCMGenericDecoder::Decode(
const std::optional<
absl::variant<FrameInstrumentationSyncData, FrameInstrumentationData>>&
frame_instrumentation_data) {
- TRACE_EVENT("webrtc", "VCMGenericDecoder::Decode",
- perfetto::Flow::ProcessScoped(frame.RtpTimestamp()));
+ TRACE_EVENT1("webrtc", "VCMGenericDecoder::Decode", "timestamp",
+ frame.RtpTimestamp());
FrameInfo frame_info;
frame_info.rtp_timestamp = frame.RtpTimestamp();
frame_info.decode_start = now;