Skip to content

Commit

Permalink
Merge mozilla-central to autoland on a CLOSED TREE
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristian Tuns committed Oct 2, 2023
2 parents 7983ab7 + 37d9d6f commit e51bf33
Show file tree
Hide file tree
Showing 417 changed files with 14,010 additions and 12,992 deletions.
2 changes: 1 addition & 1 deletion CLOBBER
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
# changes to stick? As of bug 928195, this shouldn't be necessary! Please
# don't change CLOBBER for WebIDL changes any more.

Modified build files in third_party/libwebrtc - Bug 1832465 - remove libXtst usage from libwebrtc
Modified build files in third_party/libwebrtc - Bug 1851693 (MOZ) - Moved flexfec_03_header_reader_writer.cc back under non-unified sources to fix build after rename from upstream change ade07ca45e.
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ int32_t VideoCaptureAndroid::Init(const char* deviceUniqueIdUTF8) {
const int nameLength = strlen(deviceUniqueIdUTF8);
if (nameLength >= kVideoCaptureUniqueNameLength) return -1;

RTC_DCHECK_RUN_ON(&api_checker_);
// Store the device name
RTC_LOG(LS_INFO) << "VideoCaptureAndroid::Init: " << deviceUniqueIdUTF8;
_deviceUniqueId = new char[nameLength + 1];
Expand Down Expand Up @@ -203,6 +204,7 @@ int32_t VideoCaptureAndroid::StartCapture(
int min_mfps = 0;
int max_mfps = 0;
{
RTC_DCHECK_RUN_ON(&api_checker_);
MutexLock lock(&api_lock_);

if (_deviceInfo.GetBestMatchedCapability(_deviceUniqueId, capability,
Expand All @@ -229,6 +231,7 @@ int32_t VideoCaptureAndroid::StartCapture(
bool started = env->CallBooleanMethod(_jCapturer, j_start, width, height,
min_mfps, max_mfps, j_this);
if (started) {
RTC_DCHECK_RUN_ON(&api_checker_);
MutexLock lock(&api_lock_);
_requestedCapability = capability;
_captureStarted = true;
Expand All @@ -240,6 +243,7 @@ int32_t VideoCaptureAndroid::StopCapture() {
AttachThreadScoped ats(g_jvm_capture);
JNIEnv* env = ats.env();
{
RTC_DCHECK_RUN_ON(&api_checker_);
MutexLock lock(&api_lock_);

memset(&_requestedCapability, 0, sizeof(_requestedCapability));
Expand All @@ -261,6 +265,7 @@ bool VideoCaptureAndroid::CaptureStarted() {
}

int32_t VideoCaptureAndroid::CaptureSettings(VideoCaptureCapability& settings) {
RTC_DCHECK_RUN_ON(&api_checker_);
MutexLock lock(&api_lock_);
settings = _requestedCapability;
return 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
const int32_t name_length = strlen(deviceUniqueIdUTF8);
if (name_length >= kVideoCaptureUniqueNameLength) return nullptr;

RTC_DCHECK_RUN_ON(&capture_module->api_checker_);
capture_module->_deviceUniqueId = new char[name_length + 1];
strncpy(capture_module->_deviceUniqueId, deviceUniqueIdUTF8, name_length + 1);
capture_module->_deviceUniqueId[name_length] = '\0';
Expand Down
15 changes: 7 additions & 8 deletions dom/media/webrtc/jsapi/RTCRtpReceiver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ nsTArray<RefPtr<RTCStatsPromise>> RTCRtpReceiver::GetStatsInternal(
return;
}

if (!audioStats->last_packet_received_timestamp_ms) {
if (!audioStats->last_packet_received.has_value()) {
// By spec: "The lifetime of all RTP monitored objects starts
// when the RTP stream is first used: When the first RTP packet
// is sent or received on the SSRC it represents"
Expand Down Expand Up @@ -400,12 +400,12 @@ nsTArray<RefPtr<RTCStatsPromise>> RTCRtpReceiver::GetStatsInternal(
local.mConcealedSamples.Construct(audioStats->concealed_samples);
local.mSilentConcealedSamples.Construct(
audioStats->silent_concealed_samples);
if (audioStats->last_packet_received_timestamp_ms) {
if (audioStats->last_packet_received.has_value()) {
local.mLastPacketReceivedTimestamp.Construct(
RTCStatsTimestamp::FromNtp(
aConduit->GetTimestampMaker(),
webrtc::Timestamp::Millis(
*audioStats->last_packet_received_timestamp_ms) +
audioStats->last_packet_received->ms()) +
webrtc::TimeDelta::Seconds(webrtc::kNtpJan1970))
.ToDom());
}
Expand Down Expand Up @@ -444,7 +444,7 @@ nsTArray<RefPtr<RTCStatsPromise>> RTCRtpReceiver::GetStatsInternal(
return;
}

if (!videoStats->rtp_stats.last_packet_received_timestamp_ms) {
if (!videoStats->rtp_stats.last_packet_received.has_value()) {
// By spec: "The lifetime of all RTP monitored objects starts
// when the RTP stream is first used: When the first RTP packet
// is sent or received on the SSRC it represents"
Expand Down Expand Up @@ -510,7 +510,7 @@ nsTArray<RefPtr<RTCStatsPromise>> RTCRtpReceiver::GetStatsInternal(
videoStats->frame_counts.key_frames +
videoStats->frame_counts.delta_frames);
local.mJitterBufferDelay.Construct(
videoStats->jitter_buffer_delay_seconds);
videoStats->jitter_buffer_delay.seconds<double>());
local.mJitterBufferEmittedCount.Construct(
videoStats->jitter_buffer_emitted_count);

Expand All @@ -523,13 +523,12 @@ nsTArray<RefPtr<RTCStatsPromise>> RTCRtpReceiver::GetStatsInternal(
videoStats->total_inter_frame_delay);
local.mTotalSquaredInterFrameDelay.Construct(
videoStats->total_squared_inter_frame_delay);
if (videoStats->rtp_stats.last_packet_received_timestamp_ms) {
if (videoStats->rtp_stats.last_packet_received.has_value()) {
local.mLastPacketReceivedTimestamp.Construct(
RTCStatsTimestamp::FromNtp(
aConduit->GetTimestampMaker(),
webrtc::Timestamp::Millis(
*videoStats->rtp_stats
.last_packet_received_timestamp_ms) +
videoStats->rtp_stats.last_packet_received->ms()) +
webrtc::TimeDelta::Seconds(webrtc::kNtpJan1970))
.ToDom());
}
Expand Down
3 changes: 2 additions & 1 deletion dom/media/webrtc/jsapi/RTCRtpSender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,8 @@ nsTArray<RefPtr<dom::RTCStatsPromise>> RTCRtpSender::GetStatsInternal(
}
});

if (streamStats->rtp_stats.first_packet_time_ms == -1) {
if (streamStats->rtp_stats.first_packet_time ==
webrtc::Timestamp::PlusInfinity()) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion dom/media/webrtc/tests/mochitests/stats.js
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ function pedanticChecks(report) {
let avgJitterBufferDelay =
stat.jitterBufferDelay / stat.jitterBufferEmittedCount;
ok(
avgJitterBufferDelay > 0.01 && avgJitterBufferDelay < 10,
avgJitterBufferDelay > 0.001 && avgJitterBufferDelay < 10,
`${stat.type}.jitterBufferDelay is a sane number for a short ` +
`${stat.kind} test. value=${stat.jitterBufferDelay}/${stat.jitterBufferEmittedCount}=${avgJitterBufferDelay}`
);
Expand Down
20 changes: 10 additions & 10 deletions dom/media/webrtc/third_party_build/default_config_env
Original file line number Diff line number Diff line change
Expand Up @@ -5,41 +5,41 @@
export MOZ_LIBWEBRTC_SRC=$STATE_DIR/moz-libwebrtc

# The previous fast-forward bug number is used for some error messaging.
export MOZ_PRIOR_FASTFORWARD_BUG="1839451"
export MOZ_PRIOR_FASTFORWARD_BUG="1847074"

# Fast-forwarding each Chromium version of libwebrtc should be done
# under a separate bugzilla bug. This bug number is used when crafting
# the commit summary as each upstream commit is vendored into the
# mercurial repository. The bug used for the v106 fast-forward was
# 1800920.
export MOZ_FASTFORWARD_BUG="1847074"
export MOZ_FASTFORWARD_BUG="1851693"

# MOZ_NEXT_LIBWEBRTC_MILESTONE and MOZ_NEXT_FIREFOX_REL_TARGET are
# not used during fast-forward processing, but facilitate generating this
# default config. To generate an default config for the next update, run
# bash dom/media/webrtc/third_party_build/update_default_config_env.sh
export MOZ_NEXT_LIBWEBRTC_MILESTONE=115
export MOZ_NEXT_FIREFOX_REL_TARGET=119
export MOZ_NEXT_LIBWEBRTC_MILESTONE=116
export MOZ_NEXT_FIREFOX_REL_TARGET=120

# For Chromium release branches, see:
# https://chromiumdash.appspot.com/branches

# Chromium's v114 release branch was 5735. This is used to pre-stack
# Chromium's v115 release branch was 5790. This is used to pre-stack
# the previous release branch's commits onto the appropriate base commit
# (the first common commit between trunk and the release branch).
export MOZ_PRIOR_UPSTREAM_BRANCH_HEAD_NUM="5735"
export MOZ_PRIOR_UPSTREAM_BRANCH_HEAD_NUM="5790"

# New target release branch for v115 is branch-heads/5790. This is used
# New target release branch for v116 is branch-heads/5845. This is used
# to calculate the next upstream commit.
export MOZ_TARGET_UPSTREAM_BRANCH_HEAD="branch-heads/5790"
export MOZ_TARGET_UPSTREAM_BRANCH_HEAD="branch-heads/5845"

# For local development 'mozpatches' is fine for a branch name, but when
# pushing the patch stack to github, it should be named something like
# 'moz-mods-chr115-for-rel119'.
# 'moz-mods-chr116-for-rel120'.
export MOZ_LIBWEBRTC_BRANCH="mozpatches"

# After elm has been merged to mozilla-central, the patch stack in
# moz-libwebrtc should be pushed to github. The script
# push_official_branch.sh uses this branch name when pushing to the
# public repo.
export MOZ_LIBWEBRTC_OFFICIAL_BRANCH="moz-mods-chr115-for-rel119"
export MOZ_LIBWEBRTC_OFFICIAL_BRANCH="moz-mods-chr116-for-rel120"
2 changes: 1 addition & 1 deletion dom/media/webrtc/third_party_build/gn-configs/webrtc.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"third_party/libwebrtc/modules/desktop_capture/win/screen_capturer_win_gdi.cc",
"third_party/libwebrtc/modules/pacing/prioritized_packet_queue.cc",
"third_party/libwebrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.cc",
"third_party/libwebrtc/modules/rtp_rtcp/source/flexfec_header_reader_writer2.cc",
"third_party/libwebrtc/modules/rtp_rtcp/source/flexfec_03_header_reader_writer.cc",
"third_party/libwebrtc/modules/rtp_rtcp/source/flexfec_receiver.cc",
"third_party/libwebrtc/modules/rtp_rtcp/source/rtcp_packet/tmmbn.cc",
"third_party/libwebrtc/modules/rtp_rtcp/source/rtcp_packet/tmmbr.cc",
Expand Down
24 changes: 22 additions & 2 deletions third_party/libwebrtc/.vpython3
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,28 @@ wheel: <
version: "version:3.20.0"
>
wheel: <
name: "infra/python/wheels/requests-py2_py3"
version: "version:2.13.0"
name: "infra/python/wheels/requests-py3"
version: "version:2.31.0"
>
wheel: <
name: "infra/python/wheels/idna-py2_py3"
version: "version:2.8"
>
wheel: <
name: "infra/python/wheels/urllib3-py2_py3"
version: "version:1.26.6"
>
wheel: <
name: "infra/python/wheels/certifi-py2_py3"
version: "version:2020.11.8"
>
wheel: <
name: "infra/python/wheels/charset_normalizer-py3"
version: "version:2.0.4"
>
wheel: <
name: "infra/python/wheels/brotli/${vpython_platform}"
version: "version:1.0.9"
>

# Used by:
Expand Down
1 change: 1 addition & 0 deletions third_party/libwebrtc/AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ Robert Bares <[email protected]>
Robert Mader <[email protected]>
Robert Nagy <[email protected]>
Ryan Yoakum <[email protected]>
Samuel Attard <[email protected]>
Sarah Thompson <[email protected]>
Satender Saroha <[email protected]>
Saul Kravitz <[email protected]>
Expand Down
22 changes: 0 additions & 22 deletions third_party/libwebrtc/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -102,17 +102,13 @@ if (!build_with_chromium && !build_with_mozilla) {
}
if (rtc_enable_protobuf) {
deps += [
"audio:low_bandwidth_audio_perf_test",
"logging:rtc_event_log_rtp_dump",
"tools_webrtc/perf:webrtc_dashboard_upload",
]
}
if ((is_linux || is_chromeos) && rtc_use_pipewire) {
deps += [ "modules/desktop_capture:shared_screencast_stream_test" ]
}
if (is_fuchsia) {
deps += [ ":fuchsia_perf_tests" ]
}
}
if (target_os == "android") {
deps += [ "tools_webrtc:binary_version_check" ]
Expand Down Expand Up @@ -784,24 +780,6 @@ if (rtc_include_tests && !build_with_chromium) {
}
}

if (is_fuchsia) {
rtc_test("fuchsia_perf_tests") {
testonly = true
deps = [
#TODO(fxbug.dev/115601) - Enable when fixed
"call:call_perf_tests",
"modules/audio_coding:audio_coding_perf_tests",
"modules/audio_processing:audio_processing_perf_tests",
"pc:peerconnection_perf_tests",
"test:test_main",
"video:video_full_stack_tests",
"video:video_pc_full_stack_tests",
]

data = webrtc_perf_tests_resources
}
}

rtc_test("webrtc_nonparallel_tests") {
testonly = true
deps = [ "rtc_base:rtc_base_nonparallel_tests" ]
Expand Down
Loading

0 comments on commit e51bf33

Please sign in to comment.