Bug 1288980 - Add libcubeb backend to about:support. r=felipc
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
#ifdef MOZ_FMP4
|
||||
#include "MP4Decoder.h"
|
||||
#endif
|
||||
#include "CubebUtils.h"
|
||||
|
||||
#include "nsIScrollableFrame.h"
|
||||
|
||||
@@ -2326,6 +2327,13 @@ nsDOMWindowUtils::GetSupportsHardwareH264Decoding(JS::MutableHandle<JS::Value> a
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMWindowUtils::GetCurrentAudioBackend(nsAString& aBackend)
|
||||
{
|
||||
CubebUtils::GetCurrentBackend(aBackend);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMWindowUtils::StartFrameTimeRecording(uint32_t *startIndex)
|
||||
{
|
||||
|
||||
@@ -1400,6 +1400,11 @@ interface nsIDOMWindowUtils : nsISupports {
|
||||
*/
|
||||
readonly attribute jsval supportsHardwareH264Decoding;
|
||||
|
||||
/**
|
||||
* Returns the current audio backend as a free-form string.
|
||||
*/
|
||||
readonly attribute AString currentAudioBackend;
|
||||
|
||||
/**
|
||||
* Record (and return) frame-intervals for frames which were presented
|
||||
* between calling StartFrameTimeRecording and StopFrameTimeRecording.
|
||||
|
||||
@@ -296,5 +296,15 @@ cubeb_stream_type ConvertChannelToCubebType(dom::AudioChannel aChannel)
|
||||
}
|
||||
#endif
|
||||
|
||||
void GetCurrentBackend(nsAString& aBackend)
|
||||
{
|
||||
const char* backend = cubeb_get_backend_id(GetCubebContext());
|
||||
if (!backend) {
|
||||
aBackend.AssignLiteral("unknown");
|
||||
return;
|
||||
}
|
||||
aBackend.AssignASCII(backend);
|
||||
}
|
||||
|
||||
} // namespace CubebUtils
|
||||
} // namespace mozilla
|
||||
|
||||
@@ -46,6 +46,7 @@ bool CubebLatencyPrefSet();
|
||||
#if defined(__ANDROID__) && defined(MOZ_B2G)
|
||||
cubeb_stream_type ConvertChannelToCubebType(dom::AudioChannel aChannel);
|
||||
#endif
|
||||
void GetCurrentBackend(nsAString& aBackend);
|
||||
|
||||
} // namespace CubebUtils
|
||||
} // namespace mozilla
|
||||
|
||||
@@ -368,6 +368,7 @@ var snapshotFormatters = {
|
||||
addRowFromKey("features", "webglRenderer");
|
||||
addRowFromKey("features", "webgl2Renderer");
|
||||
addRowFromKey("features", "supportsHardwareH264", "hardwareH264");
|
||||
addRowFromKey("features", "currentAudioBackend", "audioBackend");
|
||||
addRowFromKey("features", "direct2DEnabled", "#Direct2D");
|
||||
|
||||
if ("directWriteEnabled" in data) {
|
||||
|
||||
@@ -57,6 +57,7 @@ clearTypeParameters = ClearType Parameters
|
||||
|
||||
compositing = Compositing
|
||||
hardwareH264 = Hardware H264 Decoding
|
||||
audioBackend = Audio Backend
|
||||
mainThreadNoOMTC = main thread, no OMTC
|
||||
yes = Yes
|
||||
no = No
|
||||
|
||||
@@ -367,6 +367,8 @@ var dataProviders = {
|
||||
});
|
||||
promises.push(promise);
|
||||
|
||||
data.currentAudioBackend = winUtils.currentAudioBackend;
|
||||
|
||||
if (!data.numAcceleratedWindows && gfxInfo) {
|
||||
let win = AppConstants.platform == "win";
|
||||
let feature = win ? gfxInfo.FEATURE_DIRECT3D_9_LAYERS :
|
||||
|
||||
@@ -228,6 +228,9 @@ const SNAPSHOT_SCHEMA = {
|
||||
supportsHardwareH264: {
|
||||
type: "string",
|
||||
},
|
||||
currentAudioBackend: {
|
||||
type: "string",
|
||||
},
|
||||
numAcceleratedWindowsMessage: {
|
||||
type: "array",
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user