summaryrefslogtreecommitdiff
path: root/chromium/content/browser/webrtc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/content/browser/webrtc')
-rw-r--r--chromium/content/browser/webrtc/resources/resources.grd2
-rw-r--r--chromium/content/browser/webrtc/resources/webrtc_internals.html37
-rw-r--r--chromium/content/browser/webrtc/webrtc_browsertest.cc10
-rw-r--r--chromium/content/browser/webrtc/webrtc_content_browsertest_base.cc6
-rw-r--r--chromium/content/browser/webrtc/webrtc_internals.cc5
-rw-r--r--chromium/content/browser/webrtc/webrtc_internals_unittest.cc8
-rw-r--r--chromium/content/browser/webrtc/webrtc_video_capture_service_browsertest.cc14
7 files changed, 56 insertions, 26 deletions
diff --git a/chromium/content/browser/webrtc/resources/resources.grd b/chromium/content/browser/webrtc/resources/resources.grd
index 8f316b169d2..b1386c8df35 100644
--- a/chromium/content/browser/webrtc/resources/resources.grd
+++ b/chromium/content/browser/webrtc/resources/resources.grd
@@ -14,12 +14,10 @@
file="webrtc_internals.html"
flattenhtml="true"
allowexternalscript="true"
- compress="gzip"
type="BINDATA" />
<include name="IDR_WEBRTC_INTERNALS_JS"
file="webrtc_internals.js"
flattenhtml="true"
- compress="gzip"
type="BINDATA" />
</includes>
</release>
diff --git a/chromium/content/browser/webrtc/resources/webrtc_internals.html b/chromium/content/browser/webrtc/resources/webrtc_internals.html
index 76a818fe3c0..5da5d5bf2d4 100644
--- a/chromium/content/browser/webrtc/resources/webrtc_internals.html
+++ b/chromium/content/browser/webrtc/resources/webrtc_internals.html
@@ -8,7 +8,40 @@
<script src="webrtc_internals.js"></script>
</head>
<body>
- <p id="content-root">
- </p>
+ <p id="content-root"></p>
+ <template id="td2-template"><td></td><td></td></template>
+ <template id="summary-template"><td><details><summary></summary></details></td></template>
+ <template id="container-template"><div></div><div><canvas></canvas></div></template>
+ <template id="summary-span-template"><summary><span></span></summary></template>
+ <template id="checkbox-template"><input type=checkbox checked></template>
+ <template id="trth-template"><tbody><tr><th colspan=2></th></tr></tbody></template>
+ <template id="td-colspan-template"><td colspan=2></td></template>
+ <template id="time-event-template"><tbody><tr><th>Time</th><th class="update-log-header-event">Event</th></tr></tbody></template>
+ <template id="dump-template">
+ <div>
+ <a>
+ <button>Download the PeerConnection updates and stats data</button>
+ </a>
+ </div>
+ <p>
+ <label>
+ <input type="checkbox">Enable diagnostic audio recordings
+ </label>
+ </p>
+ <p class="audio-diagnostic-dumps-info">A diagnostic audio recording is used for analyzing audio problems. It consists of several files and contains the audio played out to the speaker (output) and captured from the microphone (input). The data is saved locally. Checking this box will enable recordings of all ongoing input and output audio streams (including non-WebRTC streams) and for future audio streams. When the box is unchecked or this page is closed, all ongoing recordings will be stopped and this recording functionality disabled. Recording audio from multiple tabs is supported as well as multiple recordings from the same tab.</p>
+ <p>When enabling, select a base filename to which the following suffixes will be added:</p>
+ <div>&lt;base filename&gt;.&lt;render process ID&gt;.aec_dump.&lt;AEC dump recording ID&gt;</div>
+ <div>&lt;base filename&gt;.input.&lt;stream recording ID&gt;.wav</div>
+ <div>&lt;base filename&gt;.output.&lt;stream recording ID&gt;.wav</div>
+ <p class="audio-diagnostic-dumps-info">It is recommended to choose a new base filename each time the feature is enabled to avoid ending up with partially overwritten or unusable audio files.</p>
+ <p>
+ <label>
+ <input type="checkbox" disabled>Enable diagnostic packet and event recording
+ </label>
+ </p>
+ <p class="audio-diagnostic-dumps-info">A diagnostic packet and event recording can be used for analyzing various issues related to thread starvation, jitter buffers or bandwidth estimation. Two types of data are logged. First, incoming and outgoing RTP headers and RTCP packets are logged. These do not include any audio or video information, nor any other types of personally identifiable information (so no IP addresses or URLs). Checking this box will enable the recording for ongoing WebRTC calls and for future WebRTC calls. When the box is unchecked or this page is closed, all ongoing recordings will be stopped and this recording functionality will be disabled for future WebRTC calls. Recording in multiple tabs or multiple recordings in the same tab will cause multiple log files to be created. When enabling, a filename for the recording can be entered. The entered filename is used as a base, to which the following suffixes will be appended.</p>
+ <p>&lt;base filename&gt;_&lt;date&gt;_&lt;timestamp&gt;_&lt;render process ID&gt;_&lt;recording ID&gt;</p>
+ <p class="audio-diagnostic-dumps-info">If a file with the same name already exists, it will be overwritten. No more than 5 logfiles will be created, and each of them is limited to 60MB of storage. On Android these limits are 3 files of at most 10MB each. When the limit is reached, the checkbox must be unchecked and rechecked to resume logging.</p>
+ </template>
</body>
</html>
diff --git a/chromium/content/browser/webrtc/webrtc_browsertest.cc b/chromium/content/browser/webrtc/webrtc_browsertest.cc
index 0799ad37635..a8bf7c382ee 100644
--- a/chromium/content/browser/webrtc/webrtc_browsertest.cc
+++ b/chromium/content/browser/webrtc/webrtc_browsertest.cc
@@ -61,7 +61,15 @@ IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest, CanSetupAudioAndVideoCall) {
MakeTypicalPeerConnectionCall("call({video: true, audio: true});");
}
-IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest, NetworkProcessCrashRecovery) {
+#if defined(OS_ANDROID)
+// Flaky on Android https://crbug.com/1099365
+#define MAYBE_NetworkProcessCrashRecovery DISABLED_NetworkProcessCrashRecovery
+#else
+#define MAYBE_NetworkProcessCrashRecovery NetworkProcessCrashRecovery
+#endif
+
+IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest,
+ MAYBE_NetworkProcessCrashRecovery) {
if (!IsOutOfProcessNetworkService())
return;
MakeTypicalPeerConnectionCall("call({video: true, audio: true});");
diff --git a/chromium/content/browser/webrtc/webrtc_content_browsertest_base.cc b/chromium/content/browser/webrtc/webrtc_content_browsertest_base.cc
index 741087b84fb..043945e05de 100644
--- a/chromium/content/browser/webrtc/webrtc_content_browsertest_base.cc
+++ b/chromium/content/browser/webrtc/webrtc_content_browsertest_base.cc
@@ -31,12 +31,6 @@ void WebRtcContentBrowserTestBase::SetUpCommandLine(
base::CommandLine* command_line) {
base::CommandLine::ForCurrentProcess()->AppendSwitch(
switches::kEnforceWebRtcIPPermissionCheck);
-#if defined(OS_LINUX)
- // Due to problems with PulseAudio failing to start, use a fake audio
- // stream. crbug.com/1047655#c70
- base::CommandLine::ForCurrentProcess()->AppendSwitch(
- switches::kDisableAudioOutput);
-#endif
// Loopback interface is the non-default local address. They should only be in
// the candidate list if the ip handling policy is "default" AND the media
diff --git a/chromium/content/browser/webrtc/webrtc_internals.cc b/chromium/content/browser/webrtc/webrtc_internals.cc
index 030e602ee42..8f2b4edbe2a 100644
--- a/chromium/content/browser/webrtc/webrtc_internals.cc
+++ b/chromium/content/browser/webrtc/webrtc_internals.cc
@@ -12,7 +12,6 @@
#include "base/bind.h"
#include "base/command_line.h"
#include "base/strings/string_number_conversions.h"
-#include "base/task/post_task.h"
#include "build/build_config.h"
#include "content/browser/renderer_host/render_process_host_impl.h"
#include "content/browser/web_contents/web_contents_view.h"
@@ -455,8 +454,8 @@ void WebRTCInternals::SendUpdate(const char* command,
pending_updates_.push(PendingUpdate(command, std::move(value)));
if (queue_was_empty) {
- base::PostDelayedTask(
- FROM_HERE, {BrowserThread::UI},
+ GetUIThreadTaskRunner({})->PostDelayedTask(
+ FROM_HERE,
base::BindOnce(&WebRTCInternals::ProcessPendingUpdates,
weak_factory_.GetWeakPtr()),
base::TimeDelta::FromMilliseconds(aggregate_updates_ms_));
diff --git a/chromium/content/browser/webrtc/webrtc_internals_unittest.cc b/chromium/content/browser/webrtc/webrtc_internals_unittest.cc
index 979567ccc9b..8bd500c11e5 100644
--- a/chromium/content/browser/webrtc/webrtc_internals_unittest.cc
+++ b/chromium/content/browser/webrtc/webrtc_internals_unittest.cc
@@ -9,11 +9,11 @@
#include <utility>
#include "base/run_loop.h"
-#include "base/task/post_task.h"
#include "base/values.h"
#include "content/browser/webrtc/webrtc_internals_connections_observer.h"
#include "content/browser/webrtc/webrtc_internals_ui_observer.h"
#include "content/public/browser/browser_task_traits.h"
+#include "content/public/browser/browser_thread.h"
#include "content/public/test/browser_task_environment.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/receiver.h"
@@ -175,7 +175,7 @@ TEST_F(WebRtcInternalsTest, AddRemoveObserver) {
webrtc_internals.OnAddPeerConnection(0, 3, 4, kUrl, kRtcConfiguration,
kContraints);
- base::PostTask(FROM_HERE, {BrowserThread::UI}, loop.QuitClosure());
+ GetUIThreadTaskRunner({})->PostTask(FROM_HERE, loop.QuitClosure());
loop.Run();
EXPECT_EQ("", observer.command());
@@ -191,7 +191,7 @@ TEST_F(WebRtcInternalsTest, EnsureNoLogWhenNoObserver) {
webrtc_internals.OnAddPeerConnection(0, 3, 4, kUrl, kRtcConfiguration,
kContraints);
webrtc_internals.OnUpdatePeerConnection(3, 4, "update_type", "update_value");
- base::PostTask(FROM_HERE, {BrowserThread::UI}, loop.QuitClosure());
+ GetUIThreadTaskRunner({})->PostTask(FROM_HERE, loop.QuitClosure());
loop.Run();
// Make sure we don't have a log entry since there was no observer.
@@ -220,7 +220,7 @@ TEST_F(WebRtcInternalsTest, EnsureLogIsRemovedWhenObserverIsRemoved) {
webrtc_internals.OnAddPeerConnection(0, 3, 4, kUrl, kRtcConfiguration,
kContraints);
webrtc_internals.OnUpdatePeerConnection(3, 4, "update_type", "update_value");
- base::PostTask(FROM_HERE, {BrowserThread::UI}, loop.QuitClosure());
+ GetUIThreadTaskRunner({})->PostTask(FROM_HERE, loop.QuitClosure());
loop.Run();
// Make sure we have a log entry since there was an observer.
diff --git a/chromium/content/browser/webrtc/webrtc_video_capture_service_browsertest.cc b/chromium/content/browser/webrtc/webrtc_video_capture_service_browsertest.cc
index c13ef7cf5a9..59cf98c3a29 100644
--- a/chromium/content/browser/webrtc/webrtc_video_capture_service_browsertest.cc
+++ b/chromium/content/browser/webrtc/webrtc_video_capture_service_browsertest.cc
@@ -151,16 +151,15 @@ class TextureDeviceExerciser : public VirtualDeviceExerciser {
access_permission_proxy.InitWithNewPipeAndPassReceiver());
media::VideoFrameMetadata metadata;
- metadata.SetDouble(media::VideoFrameMetadata::FRAME_RATE, kDummyFrameRate);
- metadata.SetTimeTicks(media::VideoFrameMetadata::REFERENCE_TIME,
- base::TimeTicks::Now());
+ metadata.frame_rate = kDummyFrameRate;
+ metadata.reference_time = base::TimeTicks::Now();
media::mojom::VideoFrameInfoPtr info = media::mojom::VideoFrameInfo::New();
info->timestamp = timestamp;
info->pixel_format = media::PIXEL_FORMAT_ARGB;
info->coded_size = kDummyFrameCodedSize;
info->visible_rect = gfx::Rect(kDummyFrameCodedSize);
- info->metadata = metadata.GetInternalValues().Clone();
+ info->metadata = metadata;
frame_being_consumed_[dummy_frame_index_] = true;
virtual_device_->OnFrameReadyInBuffer(dummy_frame_index_,
@@ -300,16 +299,15 @@ class SharedMemoryDeviceExerciser : public VirtualDeviceExerciser,
return;
media::VideoFrameMetadata metadata;
- metadata.SetDouble(media::VideoFrameMetadata::FRAME_RATE, kDummyFrameRate);
- metadata.SetTimeTicks(media::VideoFrameMetadata::REFERENCE_TIME,
- base::TimeTicks::Now());
+ metadata.frame_rate = kDummyFrameRate;
+ metadata.reference_time = base::TimeTicks::Now();
media::mojom::VideoFrameInfoPtr info = media::mojom::VideoFrameInfo::New();
info->timestamp = timestamp;
info->pixel_format = media::PIXEL_FORMAT_I420;
info->coded_size = kDummyFrameCodedSize;
info->visible_rect = kDummyFrameVisibleRect;
- info->metadata = metadata.GetInternalValues().Clone();
+ info->metadata = metadata;
info->strides = strides_.Clone();
const base::WritableSharedMemoryMapping& outgoing_buffer =