summaryrefslogtreecommitdiff
path: root/toolkit/modules/Troubleshoot.jsm
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/modules/Troubleshoot.jsm')
-rw-r--r--toolkit/modules/Troubleshoot.jsm46
1 files changed, 4 insertions, 42 deletions
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();