summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2022-04-05 17:00:28 +0200
committerMoonchild <moonchild@palemoon.org>2022-04-05 17:00:28 +0200
commit3b575dfced55cf78871937b6bd41942374c95390 (patch)
treea56f756f47a7ae3e45d66ccf02279ac2d22f0d1f /toolkit
parent0bc66e3b04e77af307b62371ae9f4be70b2b19b7 (diff)
downloaduxp-3b575dfced55cf78871937b6bd41942374c95390.tar.gz
Revert "Merge pull request 'Update libcubeb to latest version' (#1812) from athenian200/UXP:libcubeb_final into master"
This reverts commit 0bc66e3b04e77af307b62371ae9f4be70b2b19b7, reversing changes made to 6e6b5d89964ea726b264c711bdf6f02fe0c006f5.
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/content/aboutSupport.js106
-rw-r--r--toolkit/content/aboutSupport.xhtml85
-rw-r--r--toolkit/locales/en-US/chrome/global/aboutSupport.dtd13
-rw-r--r--toolkit/locales/en-US/chrome/global/aboutSupport.properties6
-rw-r--r--toolkit/modules/Troubleshoot.jsm46
5 files changed, 6 insertions, 250 deletions
diff --git a/toolkit/content/aboutSupport.js b/toolkit/content/aboutSupport.js
index 86f1fa35b7..f9a0abcb0e 100644
--- a/toolkit/content/aboutSupport.js
+++ b/toolkit/content/aboutSupport.js
@@ -310,6 +310,7 @@ var snapshotFormatters = {
addRowFromKey("features", "webgl2DriverExtensions");
addRowFromKey("features", "webgl2Extensions");
addRowFromKey("features", "supportsHardwareH264", "hardwareH264");
+ addRowFromKey("features", "currentAudioBackend", "audioBackend");
addRowFromKey("features", "direct2DEnabled", "#Direct2D");
if ("directWriteEnabled" in data) {
@@ -461,111 +462,6 @@ var snapshotFormatters = {
}
},
- media: function media(data) {
- let strings = stringBundle();
-
- function insertBasicInfo(key, value) {
- function createRow(key, value) {
- let th = $.new("th", strings.GetStringFromName(key), "column");
- let td = $.new("td", value);
- td.style["white-space"] = "pre-wrap";
- return $.new("tr", [th, td]);
- }
- $.append($("media-info-tbody"), [createRow(key, value)]);
- }
-
- function createDeviceInfoRow(device) {
- let deviceInfo = Ci.nsIAudioDeviceInfo;
-
- let states = {};
- states[deviceInfo.STATE_DISABLED] = "Disabled";
- states[deviceInfo.STATE_UNPLUGGED] = "Unplugged";
- states[deviceInfo.STATE_ENABLED] = "Enabled";
-
- let preferreds = {};
- preferreds[deviceInfo.PREF_NONE] = "None";
- preferreds[deviceInfo.PREF_MULTIMEDIA] = "Multimedia";
- preferreds[deviceInfo.PREF_VOICE] = "Voice";
- preferreds[deviceInfo.PREF_NOTIFICATION] = "Notification";
- preferreds[deviceInfo.PREF_ALL] = "All";
-
- let formats = {};
- formats[deviceInfo.FMT_S16LE] = "S16LE";
- formats[deviceInfo.FMT_S16BE] = "S16BE";
- formats[deviceInfo.FMT_F32LE] = "F32LE";
- formats[deviceInfo.FMT_F32BE] = "F32BE";
-
- function toPreferredString(preferred) {
- if (preferred == deviceInfo.PREF_NONE) {
- return preferreds[deviceInfo.PREF_NONE];
- } else if (preferred & deviceInfo.PREF_ALL) {
- return preferreds[deviceInfo.PREF_ALL];
- }
- let str = "";
- for (let pref of [deviceInfo.PREF_MULTIMEDIA,
- deviceInfo.PREF_VOICE,
- deviceInfo.PREF_NOTIFICATION]) {
- if (preferred & pref) {
- str += " " + preferreds[pref];
- }
- }
- return str;
- }
-
- function toFromatString(dev) {
- let str = "default: " + formats[dev.defaultFormat] + ", support:";
- for (let fmt of [deviceInfo.FMT_S16LE,
- deviceInfo.FMT_S16BE,
- deviceInfo.FMT_F32LE,
- deviceInfo.FMT_F32BE]) {
- if (dev.supportedFormat & fmt) {
- str += " " + formats[fmt];
- }
- }
- return str;
- }
-
- function toRateString(dev) {
- return "default: " + dev.defaultRate +
- ", support: " + dev.minRate + " - " + dev.maxRate;
- }
-
- function toLatencyString(dev) {
- return dev.minLatency + " - " + dev.maxLatency;
- }
-
- return $.new("tr", [$.new("td", device.name),
- $.new("td", device.groupId),
- $.new("td", device.vendor),
- $.new("td", states[device.state]),
- $.new("td", toPreferredString(device.preferred)),
- $.new("td", toFromatString(device)),
- $.new("td", device.maxChannels),
- $.new("td", toRateString(device)),
- $.new("td", toLatencyString(device))]);
- }
-
- function insertDeviceInfo(side, devices) {
- let rows = [];
- for (let dev of devices) {
- rows.push(createDeviceInfoRow(dev));
- }
- $.append($("media-" + side + "-devices-tbody"), rows);
- }
-
- // Basic information
- insertBasicInfo("audioBackend", data.currentAudioBackend);
- insertBasicInfo("maxAudioChannels", data.currentMaxAudioChannels);
- insertBasicInfo("sampleRate", data.currentPreferredSampleRate);
-
- // Output devices information
- insertDeviceInfo("output", data.audioOutputDevices);
-
- // Input devices information
- insertDeviceInfo("input", data.audioInputDevices);
- },
-
-
javaScript: function javaScript(data) {
$("javascript-incremental-gc").textContent = data.incrementalGCEnabled;
},
diff --git a/toolkit/content/aboutSupport.xhtml b/toolkit/content/aboutSupport.xhtml
index 7772f6497a..4ae9927399 100644
--- a/toolkit/content/aboutSupport.xhtml
+++ b/toolkit/content/aboutSupport.xhtml
@@ -346,91 +346,6 @@
<!-- - - - - - - - - - - - - - - - - - - - - -->
<h2 class="major-section">
- &aboutSupport.mediaTitle;
- </h2>
- <table>
- <tbody id="media-info-tbody">
- </tbody>
-
- <tbody id="media-output-devices-tbody">
- <tr>
- <th colspan="10" class="title-column">
- &aboutSupport.mediaOutputDevicesTitle;
- </th>
- </tr>
- <tr>
- <th>
- &aboutSupport.mediaDeviceName;
- </th>
- <th>
- &aboutSupport.mediaDeviceGroup;
- </th>
- <th>
- &aboutSupport.mediaDeviceVendor;
- </th>
- <th>
- &aboutSupport.mediaDeviceState;
- </th>
- <th>
- &aboutSupport.mediaDevicePreferred;
- </th>
- <th>
- &aboutSupport.mediaDeviceFormat;
- </th>
- <th>
- &aboutSupport.mediaDeviceChannels;
- </th>
- <th>
- &aboutSupport.mediaDeviceRate;
- </th>
- <th>
- &aboutSupport.mediaDeviceLatency;
- </th>
- </tr>
- </tbody>
-
- <tbody id="media-input-devices-tbody">
- <tr>
- <th colspan="10" class="title-column">
- &aboutSupport.mediaInputDevicesTitle;
- </th>
- </tr>
- <tr>
- <th>
- &aboutSupport.mediaDeviceName;
- </th>
- <th>
- &aboutSupport.mediaDeviceGroup;
- </th>
- <th>
- &aboutSupport.mediaDeviceVendor;
- </th>
- <th>
- &aboutSupport.mediaDeviceState;
- </th>
- <th>
- &aboutSupport.mediaDevicePreferred;
- </th>
- <th>
- &aboutSupport.mediaDeviceFormat;
- </th>
- <th>
- &aboutSupport.mediaDeviceChannels;
- </th>
- <th>
- &aboutSupport.mediaDeviceRate;
- </th>
- <th>
- &aboutSupport.mediaDeviceLatency;
- </th>
- </tr>
- </tbody>
-
- </table>
-
- <!-- - - - - - - - - - - - - - - - - - - - - -->
-
- <h2 class="major-section">
&aboutSupport.modifiedKeyPrefsTitle;
</h2>
diff --git a/toolkit/locales/en-US/chrome/global/aboutSupport.dtd b/toolkit/locales/en-US/chrome/global/aboutSupport.dtd
index b4da6bc774..02eb34664a 100644
--- a/toolkit/locales/en-US/chrome/global/aboutSupport.dtd
+++ b/toolkit/locales/en-US/chrome/global/aboutSupport.dtd
@@ -121,16 +121,3 @@ variant of aboutSupport.showDir.label. -->
<!ENTITY aboutSupport.graphicsDecisionLogTitle "Decision Log">
<!ENTITY aboutSupport.graphicsCrashGuardsTitle "Crash Guard Disabled Features">
<!ENTITY aboutSupport.graphicsWorkaroundsTitle "Workarounds">
-
-<!ENTITY aboutSupport.mediaTitle "Media">
-<!ENTITY aboutSupport.mediaOutputDevicesTitle "Output Devices">
-<!ENTITY aboutSupport.mediaInputDevicesTitle "Input Devices">
-<!ENTITY aboutSupport.mediaDeviceName "Name">
-<!ENTITY aboutSupport.mediaDeviceGroup "Group">
-<!ENTITY aboutSupport.mediaDeviceVendor "Vendor">
-<!ENTITY aboutSupport.mediaDeviceState "State">
-<!ENTITY aboutSupport.mediaDevicePreferred "Preferred">
-<!ENTITY aboutSupport.mediaDeviceFormat "Format">
-<!ENTITY aboutSupport.mediaDeviceChannels "Channels">
-<!ENTITY aboutSupport.mediaDeviceRate "Rate">
-<!ENTITY aboutSupport.mediaDeviceLatency "Latency">
diff --git a/toolkit/locales/en-US/chrome/global/aboutSupport.properties b/toolkit/locales/en-US/chrome/global/aboutSupport.properties
index 751a3f096e..46e445f66d 100644
--- a/toolkit/locales/en-US/chrome/global/aboutSupport.properties
+++ b/toolkit/locales/en-US/chrome/global/aboutSupport.properties
@@ -59,6 +59,7 @@ clearTypeParameters = ClearType Parameters
compositing = Compositing
hardwareH264 = Hardware H264 Decoding
+audioBackend = Audio Backend
mainThreadNoOMTC = main thread, no OMTC
yes = Yes
no = No
@@ -97,11 +98,6 @@ glcontextCrashGuard = OpenGL
resetOnNextRestart = Reset on Next Restart
gpuProcessKillButton = Terminate GPU Process
-audioBackend = Audio Backend
-maxAudioChannels = Max Channels
-channelLayout = Preferred Channel Layout
-sampleRate = Preferred Sample Rate
-
minLibVersions = Expected minimum version
loadedLibVersions = Version in use
diff --git a/toolkit/modules/Troubleshoot.jsm b/toolkit/modules/Troubleshoot.jsm
index d8f485d2c0..8ff6be30ba 100644
--- a/toolkit/modules/Troubleshoot.jsm
+++ b/toolkit/modules/Troubleshoot.jsm
@@ -332,6 +332,9 @@ var dataProviders = {
data.numAcceleratedWindows++;
}
+ let winUtils = Services.wm.getMostRecentWindow("").
+ QueryInterface(Ci.nsIInterfaceRequestor).
+ getInterface(Ci.nsIDOMWindowUtils)
data.supportsHardwareH264 = "Unknown";
try {
// After restart - data may not be available
@@ -342,6 +345,7 @@ var dataProviders = {
promises.push(promise);
} catch (e) {}
+ data.currentAudioBackend = winUtils.currentAudioBackend;
if (!data.numAcceleratedWindows && gfxInfo) {
#ifdef XP_WIN
@@ -488,48 +492,6 @@ var dataProviders = {
completed();
},
- media: function media(done) {
- function convertDevices(devices) {
- if (!devices) {
- return undefined;
- }
- let infos = [];
- for (let i = 0; i < devices.length; ++i) {
- let device = devices.queryElementAt(i, Ci.nsIAudioDeviceInfo);
- infos.push({
- name: device.name,
- groupId: device.groupId,
- vendor: device.vendor,
- type: device.type,
- state: device.state,
- preferred: device.preferred,
- supportedFormat: device.supportedFormat,
- defaultFormat: device.defaultFormat,
- maxChannels: device.maxChannels,
- defaultRate: device.defaultRate,
- maxRate: device.maxRate,
- minRate: device.minRate,
- maxLatency: device.maxLatency,
- minLatency: device.minLatency
- });
- }
- return infos;
- }
-
- let data = {};
- let winUtils = Services.wm.getMostRecentWindow("").
- QueryInterface(Ci.nsIInterfaceRequestor).
- getInterface(Ci.nsIDOMWindowUtils);
- data.currentAudioBackend = winUtils.currentAudioBackend;
- data.currentMaxAudioChannels = winUtils.currentMaxAudioChannels;
- data.currentPreferredSampleRate = winUtils.currentPreferredSampleRate;
- data.audioOutputDevices = convertDevices(winUtils.audioDevices(Ci.nsIDOMWindowUtils.AUDIO_OUTPUT).
- QueryInterface(Ci.nsIArray));
- data.audioInputDevices = convertDevices(winUtils.audioDevices(Ci.nsIDOMWindowUtils.AUDIO_INPUT).
- QueryInterface(Ci.nsIArray));
- done(data);
- },
-
javaScript: function javaScript(done) {
let data = {};
let winEnumer = Services.ww.getWindowEnumerator();