Skip to content

Commit

Permalink
Backed out 4 changesets (bug 1882824, bug 1878798) for causing perfdo…
Browse files Browse the repository at this point in the history
…cs lint failures in /gecko/None CLOSED TREE

Backed out changeset efdc6eb50c75 (bug 1882824)
Backed out changeset b302a6f7096a (bug 1882824)
Backed out changeset df4ea918b1fd (bug 1878798)
Backed out changeset f6034e5f8856 (bug 1878798)
  • Loading branch information
Cristian Tuns committed Mar 1, 2024
1 parent 961186c commit 8eaa1c0
Show file tree
Hide file tree
Showing 39 changed files with 38,657 additions and 38,653 deletions.
8 changes: 1 addition & 7 deletions dom/media/webrtc/third_party_build/prep_repo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,6 @@ rm -f *.patch
CHERRY_PICK_BASE=`git merge-base branch-heads/$MOZ_PRIOR_UPSTREAM_BRANCH_HEAD_NUM master`
echo "common commit: $CHERRY_PICK_BASE"

# find the last upstream commit used by the previous update, so we don't
# accidentally grab release branch commits that were added after we started
# the previous update.
LAST_UPSTREAM_COMMIT_SHA=`tail -1 $CURRENT_DIR/third_party/libwebrtc/README.moz-ff-commit`
echo "previous update's last commit: $LAST_UPSTREAM_COMMIT_SHA"

# create a new branch at the common commit and checkout the new branch
ERROR_HELP=$"
Unable to create branch '$MOZ_LIBWEBRTC_BRANCH'. This probably means
Expand All @@ -95,7 +89,7 @@ git checkout $MOZ_LIBWEBRTC_BRANCH
rm -f $TMP_DIR/*.patch $TMP_DIR/*.patch.bak

# grab the patches for all the commits in chrome's release branch for libwebrtc
git format-patch -o $TMP_DIR -k $CHERRY_PICK_BASE..$LAST_UPSTREAM_COMMIT_SHA
git format-patch -o $TMP_DIR -k $CHERRY_PICK_BASE..branch-heads/$MOZ_PRIOR_UPSTREAM_BRANCH_HEAD_NUM
# tweak the release branch commit summaries to show they were cherry picked
sed -i.bak -e "/^Subject: / s/^Subject: /Subject: (cherry-pick-branch-heads\/$MOZ_PRIOR_UPSTREAM_BRANCH_HEAD_NUM) /" $TMP_DIR/*.patch
git am $TMP_DIR/*.patch # applies to branch mozpatches
Expand Down
16 changes: 8 additions & 8 deletions dom/media/webrtc/third_party_build/verify_vendoring.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ echo "MOZ_LIBWEBRTC_SRC: $MOZ_LIBWEBRTC_SRC"
echo "MOZ_LIBWEBRTC_BRANCH: $MOZ_LIBWEBRTC_BRANCH"
echo "MOZ_FASTFORWARD_BUG: $MOZ_FASTFORWARD_BUG"

CURRENT_SHA=`hg id -r . | awk '{ print $1; }'`
echo "CURRENT_SHA: $CURRENT_SHA"
TIP_SHA=`hg id -r tip | awk '{ print $1; }'`
echo "TIP_SHA: $TIP_SHA"

# we grab the entire firstline description for convenient logging
LAST_PATCHSTACK_UPDATE_COMMIT=`hg log -r ::. --template "{node|short} {desc|firstline}\n" \
--include "third_party/libwebrtc/moz-patch-stack/*.patch" | tail -1`
LAST_PATCHSTACK_UPDATE_COMMIT=`hg log --template "{node|short} {desc|firstline}\n" \
--include "third_party/libwebrtc/moz-patch-stack/*.patch" | head -1`
echo "LAST_PATCHSTACK_UPDATE_COMMIT: $LAST_PATCHSTACK_UPDATE_COMMIT"

LAST_PATCHSTACK_UPDATE_COMMIT_SHA=`echo $LAST_PATCHSTACK_UPDATE_COMMIT \
Expand All @@ -31,17 +31,17 @@ echo "LAST_PATCHSTACK_UPDATE_COMMIT_SHA: $LAST_PATCHSTACK_UPDATE_COMMIT_SHA"

# grab the oldest, non "Vendor from libwebrtc" line
OLDEST_CANDIDATE_COMMIT=`hg log --template "{node|short} {desc|firstline}\n" \
-r $LAST_PATCHSTACK_UPDATE_COMMIT_SHA::. \
-r $LAST_PATCHSTACK_UPDATE_COMMIT_SHA::tip \
| grep -v "Vendor libwebrtc from" | head -1`
echo "OLDEST_CANDIDATE_COMMIT: $OLDEST_CANDIDATE_COMMIT"

OLDEST_CANDIDATE_SHA=`echo $OLDEST_CANDIDATE_COMMIT \
| awk '{ print $1; }'`
echo "OLDEST_CANDIDATE_SHA: $OLDEST_CANDIDATE_SHA"

EXTRACT_COMMIT_RANGE="{start-commit-sha}::."
if [ "x$CURRENT_SHA" != "x$OLDEST_CANDIDATE_SHA" ]; then
EXTRACT_COMMIT_RANGE="$OLDEST_CANDIDATE_SHA::."
EXTRACT_COMMIT_RANGE="{start-commit-sha}::tip"
if [ "x$TIP_SHA" != "x$OLDEST_CANDIDATE_SHA" ]; then
EXTRACT_COMMIT_RANGE="$OLDEST_CANDIDATE_SHA::tip"
echo "EXTRACT_COMMIT_RANGE: $EXTRACT_COMMIT_RANGE"
fi

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,24 @@
#define BUF_LEN ( 1024 * ( EVENT_SIZE + 16 ) )
#endif

// These defines are here to support building on kernel 3.16 which some
// downstream projects, e.g. Firefox, use.
// TODO(apehrson): Remove them and their undefs when no longer needed.
#ifndef V4L2_PIX_FMT_ABGR32
#define ABGR32_OVERRIDE 1
#define V4L2_PIX_FMT_ABGR32 v4l2_fourcc('A', 'R', '2', '4')
#endif

#ifndef V4L2_PIX_FMT_ARGB32
#define ARGB32_OVERRIDE 1
#define V4L2_PIX_FMT_ARGB32 v4l2_fourcc('B', 'A', '2', '4')
#endif

#ifndef V4L2_PIX_FMT_RGBA32
#define RGBA32_OVERRIDE 1
#define V4L2_PIX_FMT_RGBA32 v4l2_fourcc('A', 'B', '2', '4')
#endif

namespace webrtc {
namespace videocapturemodule {
#ifdef WEBRTC_LINUX
Expand Down
67 changes: 24 additions & 43 deletions third_party/libwebrtc/moz-patch-stack/0030.patch
Original file line number Diff line number Diff line change
Expand Up @@ -55,21 +55,13 @@ Bug 1774628 - re-enable support for Windows.Graphics.Capture APIs in libwebrtc.

Differential Revision: https://phabricator.services.mozilla.com/D186862
Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/08567f4539a12b54202aecbf554ec6540fb99ab2

Bug 1876843 - (fix-082cb56ee7) remove mozilla dependency on pc:media_factory.

Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/136b3fc0377be6dcaa302469d27968f445e0355e

Bug 1876843 - (fix-b29ff000da) remove mozilla dependency on api:enable_media

Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/7f403ee038e9797a1aff6161fc70a2d92769851f
---
.gn | 2 +
BUILD.gn | 46 ++++++++++++++++++-
api/BUILD.gn | 36 ++++++++++++++-
BUILD.gn | 45 ++++++++++++++++++-
api/BUILD.gn | 33 +++++++++++++-
api/rtp_sender_interface.h | 4 +-
api/rtp_sender_setparameters_callback.cc | 27 +++++++++++
api/rtp_sender_setparameters_callback.h | 28 +++++++++++
api/rtp_sender_setparameters_callback.h | 28 ++++++++++++
api/task_queue/BUILD.gn | 2 +
api/transport/BUILD.gn | 2 +
call/BUILD.gn | 14 +++++-
Expand All @@ -78,24 +70,24 @@ Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/7f403ee038e9797a1
common_audio/BUILD.gn | 4 --
common_audio/fir_filter_avx2.cc | 2 +
common_audio/intrin.h | 8 ++++
media/BUILD.gn | 35 +++++++++++++-
media/BUILD.gn | 35 ++++++++++++++-
media/base/media_channel.h | 4 --
media/base/media_channel_impl.cc | 13 ------
modules/audio_coding/BUILD.gn | 2 +-
modules/audio_device/BUILD.gn | 17 +++++--
modules/audio_processing/aec3/BUILD.gn | 13 ++----
modules/audio_processing/aec3/BUILD.gn | 13 +++---
.../aec3/adaptive_fir_filter_avx2.cc | 2 +-
.../audio_processing/agc2/rnn_vad/BUILD.gn | 2 +-
modules/desktop_capture/BUILD.gn | 29 +-----------
modules/portal/BUILD.gn | 24 ++++++++++
modules/utility/BUILD.gn | 4 ++
modules/video_capture/BUILD.gn | 11 +----
rtc_base/BUILD.gn | 30 +++++++++++-
rtc_base/BUILD.gn | 30 ++++++++++++-
rtc_base/system/BUILD.gn | 2 +-
test/BUILD.gn | 10 ++++
test/BUILD.gn | 10 +++++
video/BUILD.gn | 4 +-
webrtc.gni | 32 ++++++++-----
31 files changed, 315 insertions(+), 98 deletions(-)
31 files changed, 311 insertions(+), 98 deletions(-)
create mode 100644 api/rtp_sender_setparameters_callback.cc
create mode 100644 api/rtp_sender_setparameters_callback.h
create mode 100644 common_audio/intrin.h
Expand All @@ -114,7 +106,7 @@ index b9948d2fcd..77cfa94d8a 100644
# TODO(https://bugs.webrtc.org/14437): Remove this section if general
# Chromium fix resolves the problem.
diff --git a/BUILD.gn b/BUILD.gn
index 571049f3e4..f393179bbb 100644
index 571049f3e4..24341e7216 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -33,7 +33,7 @@ if (is_android) {
Expand Down Expand Up @@ -149,14 +141,13 @@ index 571049f3e4..f393179bbb 100644

if (!build_with_chromium) {
# Target to build all the WebRTC production code.
@@ -533,6 +539,34 @@ if (!build_with_chromium) {
@@ -533,6 +539,33 @@ if (!build_with_chromium) {
"sdk",
"video",
]
+ if (build_with_mozilla) {
+ deps -= [
+ "api:create_peerconnection_factory",
+ "api:enable_media",
+ "api:rtc_error",
+ "api:transport_api",
+ "api/crypto",
Expand Down Expand Up @@ -184,7 +175,7 @@ index 571049f3e4..f393179bbb 100644

if (rtc_include_builtin_audio_codecs) {
deps += [
@@ -545,6 +579,16 @@ if (!build_with_chromium) {
@@ -545,6 +578,16 @@ if (!build_with_chromium) {
deps += [
"api/video:video_frame",
"api/video:video_rtp_headers",
Expand All @@ -202,20 +193,10 @@ index 571049f3e4..f393179bbb 100644
} else {
deps += [
diff --git a/api/BUILD.gn b/api/BUILD.gn
index ee162577c8..10a4c8c95f 100644
index ee162577c8..e3df28ad89 100644
--- a/api/BUILD.gn
+++ b/api/BUILD.gn
@@ -49,6 +49,9 @@ rtc_source_set("enable_media") {
"../rtc_base/system:rtc_export",
"environment",
]
+ if (build_with_mozilla) {
+ deps -= [ "../pc:media_factory" ]
+ }
}

rtc_source_set("enable_media_with_defaults") {
@@ -75,7 +78,7 @@ rtc_source_set("enable_media_with_defaults") {
@@ -75,7 +75,7 @@ rtc_source_set("enable_media_with_defaults") {
]
}

Expand All @@ -224,7 +205,7 @@ index ee162577c8..10a4c8c95f 100644
rtc_library("create_peerconnection_factory") {
visibility = [ "*" ]
allow_poison = [ "environment_construction" ]
@@ -228,6 +231,10 @@ rtc_source_set("ice_transport_interface") {
@@ -228,6 +228,10 @@ rtc_source_set("ice_transport_interface") {
}

rtc_library("dtls_transport_interface") {
Expand All @@ -235,15 +216,15 @@ index ee162577c8..10a4c8c95f 100644
visibility = [ "*" ]

sources = [
@@ -244,6 +251,7 @@ rtc_library("dtls_transport_interface") {
@@ -244,6 +248,7 @@ rtc_library("dtls_transport_interface") {
]
absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
}
+}

rtc_library("dtmf_sender_interface") {
visibility = [ "*" ]
@@ -256,6 +264,10 @@ rtc_library("dtmf_sender_interface") {
@@ -256,6 +261,10 @@ rtc_library("dtmf_sender_interface") {
}

rtc_library("rtp_sender_interface") {
Expand All @@ -254,7 +235,7 @@ index ee162577c8..10a4c8c95f 100644
visibility = [ "*" ]

sources = [
@@ -270,16 +282,31 @@ rtc_library("rtp_sender_interface") {
@@ -270,16 +279,31 @@ rtc_library("rtp_sender_interface") {
":ref_count",
":rtc_error",
":rtp_parameters",
Expand Down Expand Up @@ -286,55 +267,55 @@ index ee162577c8..10a4c8c95f 100644
visibility = [ "*" ]
cflags = []
sources = [
@@ -396,6 +423,7 @@ rtc_library("libjingle_peerconnection_api") {
@@ -396,6 +420,7 @@ rtc_library("libjingle_peerconnection_api") {
"//third_party/abseil-cpp/absl/types:optional",
]
}
+}

rtc_source_set("frame_transformer_interface") {
visibility = [ "*" ]
@@ -568,6 +596,7 @@ rtc_source_set("peer_network_dependencies") {
@@ -568,6 +593,7 @@ rtc_source_set("peer_network_dependencies") {
}

rtc_source_set("peer_connection_quality_test_fixture_api") {
+if (!build_with_mozilla) {
visibility = [ "*" ]
testonly = true
sources = [ "test/peerconnection_quality_test_fixture.h" ]
@@ -618,6 +647,7 @@ rtc_source_set("peer_connection_quality_test_fixture_api") {
@@ -618,6 +644,7 @@ rtc_source_set("peer_connection_quality_test_fixture_api") {
"//third_party/abseil-cpp/absl/types:optional",
]
}
+}

rtc_source_set("frame_generator_api") {
visibility = [ "*" ]
@@ -736,6 +766,7 @@ rtc_library("create_frame_generator") {
@@ -736,6 +763,7 @@ rtc_library("create_frame_generator") {
absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
}

+if (!build_with_mozilla) {
rtc_library("create_peer_connection_quality_test_frame_generator") {
visibility = [ "*" ]
testonly = true
@@ -752,6 +783,7 @@ rtc_library("create_peer_connection_quality_test_frame_generator") {
@@ -752,6 +780,7 @@ rtc_library("create_peer_connection_quality_test_frame_generator") {
]
absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
}
+}

rtc_source_set("libjingle_logging_api") {
visibility = [ "*" ]
@@ -926,6 +958,7 @@ rtc_source_set("refcountedbase") {
@@ -926,6 +955,7 @@ rtc_source_set("refcountedbase") {
]
}

+if (!build_with_mozilla) {
rtc_library("ice_transport_factory") {
visibility = [ "*" ]
sources = [
@@ -944,6 +977,7 @@ rtc_library("ice_transport_factory") {
@@ -944,6 +974,7 @@ rtc_library("ice_transport_factory") {
"rtc_event_log:rtc_event_log",
]
}
Expand Down
2 changes: 1 addition & 1 deletion third_party/libwebrtc/moz-patch-stack/0041.patch
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/58f47eacaf10d12e2
11 files changed, 27 insertions(+), 27 deletions(-)

diff --git a/BUILD.gn b/BUILD.gn
index f393179bbb..d2ede84941 100644
index 24341e7216..168f0d4395 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -427,12 +427,12 @@ config("common_config") {
Expand Down
2 changes: 1 addition & 1 deletion third_party/libwebrtc/moz-patch-stack/0053.patch
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/0300b32b7de70fb89
5 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/BUILD.gn b/BUILD.gn
index d2ede84941..f595a2951a 100644
index 168f0d4395..efe75a8874 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -221,6 +221,9 @@ config("common_inherited_config") {
Expand Down
7 changes: 2 additions & 5 deletions third_party/libwebrtc/moz-patch-stack/0061.patch
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,12 @@ From: Michael Froman <[email protected]>
Date: Tue, 21 Jun 2022 11:17:46 -0500
Subject: Bug 1772380 - to upstream - ref count this in lambda capture

Bug 1876843 - (fix-23cecc1d43) drop rtc:: prefix on scoped_ptr

Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/2e4867d8cc9813869bd80f5201d3f7d84afcd412
---
modules/video_capture/linux/video_capture_v4l2.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/video_capture/linux/video_capture_v4l2.cc b/modules/video_capture/linux/video_capture_v4l2.cc
index 00cede01cb..97cd9a70eb 100644
index 00cede01cb..d6813b13fd 100644
--- a/modules/video_capture/linux/video_capture_v4l2.cc
+++ b/modules/video_capture/linux/video_capture_v4l2.cc
@@ -296,8 +296,8 @@ int32_t VideoCaptureModuleV4L2::StartCapture(
Expand All @@ -19,7 +16,7 @@ index 00cede01cb..97cd9a70eb 100644
_captureThread = rtc::PlatformThread::SpawnJoinable(
- [this] {
- while (CaptureProcess()) {
+ [self = scoped_refptr(this)] {
+ [self = rtc::scoped_refptr(this)] {
+ while (self->CaptureProcess()) {
}
},
Expand Down
4 changes: 2 additions & 2 deletions third_party/libwebrtc/moz-patch-stack/0066.patch
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/b0658888969395dca
2 files changed, 10 insertions(+)

diff --git a/BUILD.gn b/BUILD.gn
index f595a2951a..7feca08e60 100644
index efe75a8874..0b42b2e049 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -603,6 +603,10 @@ if (!build_with_chromium) {
@@ -602,6 +602,10 @@ if (!build_with_chromium) {
]
}

Expand Down
Loading

0 comments on commit 8eaa1c0

Please sign in to comment.