From 4105ebb6ed85aaffec5e4469a939945fb9eea066 Mon Sep 17 00:00:00 2001 From: athenian200 Date: Tue, 1 Oct 2019 18:28:10 -0500 Subject: MoonchildProductions#1251 - Part 4: Core build system changes, lots of libevent/IPC junk. This is mostly ifdefs, but as you can see, Solaris is actually a lot like Linux. They're both more SysV than BSD at core, and most of the differences have more to do with Solaris not using glibc than anything else. I still need to audit a lot of these changes and understand why they're needed and what the alternative approaches are. After this patch, most of the core functionality needed to build Solaris is here. --- dom/media/AudioStream.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'dom/media') diff --git a/dom/media/AudioStream.h b/dom/media/AudioStream.h index acc38b93d..13cbb0c75 100644 --- a/dom/media/AudioStream.h +++ b/dom/media/AudioStream.h @@ -17,6 +17,10 @@ #include "mozilla/UniquePtr.h" #include "CubebUtils.h" #include "soundtouch/SoundTouchFactory.h" +#if defined(XP_SOLARIS) +#include "soundtouch/SoundTouch.h" +#endif + namespace mozilla { -- cgit v1.2.3 From 687a798e6dedacb8b42826debcd8e89baa69ce94 Mon Sep 17 00:00:00 2001 From: athenian200 Date: Sat, 19 Oct 2019 14:24:49 -0500 Subject: MoonchildProductions#1251 - Part 27: Fix ifdef style. This should do it for all the commits to files I changed, but while I'm in here I could probably go ahead and turn ALL the singular if defined statements into ifdef statements by using grep/find on the tree. On the other hand, perhaps we should do that as a separate issue so that this doesn't become a case of scope creep. --- dom/media/AudioStream.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dom/media') diff --git a/dom/media/AudioStream.h b/dom/media/AudioStream.h index 13cbb0c75..199314d4b 100644 --- a/dom/media/AudioStream.h +++ b/dom/media/AudioStream.h @@ -17,7 +17,7 @@ #include "mozilla/UniquePtr.h" #include "CubebUtils.h" #include "soundtouch/SoundTouchFactory.h" -#if defined(XP_SOLARIS) +#ifdef XP_SOLARIS #include "soundtouch/SoundTouch.h" #endif -- cgit v1.2.3 From 22b35fa8e923d52a3fa785993c28c3e63cd1ee1e Mon Sep 17 00:00:00 2001 From: Gaming4JC Date: Sat, 2 Nov 2019 11:59:57 -0400 Subject: Issue #1267 - Part 2: fix libcubeb bindings in dom --- dom/media/CubebUtils.cpp | 4 +++- dom/media/GraphDriver.cpp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'dom/media') diff --git a/dom/media/CubebUtils.cpp b/dom/media/CubebUtils.cpp index 0f0167d9c..8f1ea0179 100644 --- a/dom/media/CubebUtils.cpp +++ b/dom/media/CubebUtils.cpp @@ -55,6 +55,7 @@ bool sCubebPlaybackLatencyPrefSet; bool sCubebMSGLatencyPrefSet; bool sAudioStreamInitEverSucceeded = false; StaticAutoPtr sBrandName; +StaticAutoPtr sCubebBackendName; const char kBrandBundleURL[] = "chrome://branding/locale/brand.properties"; @@ -226,7 +227,7 @@ cubeb* GetCubebContextUnlocked() sBrandName, "Did not initialize sbrandName, and not on the main thread?"); } - int rv = cubeb_init(&sCubebContext, sBrandName); + int rv = cubeb_init(&sCubebContext, sBrandName, sCubebBackendName); NS_WARNING_ASSERTION(rv == CUBEB_OK, "Could not get a cubeb context."); sCubebState = (rv == CUBEB_OK) ? CubebState::Initialized : CubebState::Uninitialized; @@ -292,6 +293,7 @@ void ShutdownLibrary() sCubebContext = nullptr; } sBrandName = nullptr; + sCubebBackendName = nullptr; // This will ensure we don't try to re-create a context. sCubebState = CubebState::Shutdown; } diff --git a/dom/media/GraphDriver.cpp b/dom/media/GraphDriver.cpp index 37c692a4b..aa75918f1 100644 --- a/dom/media/GraphDriver.cpp +++ b/dom/media/GraphDriver.cpp @@ -656,7 +656,7 @@ AudioCallbackDriver::Init() if (latencyPref) { latency_frames = latencyPref.value(); } else { - if (cubeb_get_min_latency(cubebContext, output, &latency_frames) != CUBEB_OK) { + if (cubeb_get_min_latency(cubebContext, &output, &latency_frames) != CUBEB_OK) { NS_WARNING("Could not get minimal latency from cubeb."); } } -- cgit v1.2.3 From 732fe36241032a1793e09209ccc06cb720225b9e Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Sun, 3 Nov 2019 14:14:19 -0500 Subject: Revert "Issue #1267 - Part 2: fix libcubeb bindings in dom" This reverts commit 22b35fa8e923d52a3fa785993c28c3e63cd1ee1e. --- dom/media/CubebUtils.cpp | 4 +--- dom/media/GraphDriver.cpp | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'dom/media') diff --git a/dom/media/CubebUtils.cpp b/dom/media/CubebUtils.cpp index 8f1ea0179..0f0167d9c 100644 --- a/dom/media/CubebUtils.cpp +++ b/dom/media/CubebUtils.cpp @@ -55,7 +55,6 @@ bool sCubebPlaybackLatencyPrefSet; bool sCubebMSGLatencyPrefSet; bool sAudioStreamInitEverSucceeded = false; StaticAutoPtr sBrandName; -StaticAutoPtr sCubebBackendName; const char kBrandBundleURL[] = "chrome://branding/locale/brand.properties"; @@ -227,7 +226,7 @@ cubeb* GetCubebContextUnlocked() sBrandName, "Did not initialize sbrandName, and not on the main thread?"); } - int rv = cubeb_init(&sCubebContext, sBrandName, sCubebBackendName); + int rv = cubeb_init(&sCubebContext, sBrandName); NS_WARNING_ASSERTION(rv == CUBEB_OK, "Could not get a cubeb context."); sCubebState = (rv == CUBEB_OK) ? CubebState::Initialized : CubebState::Uninitialized; @@ -293,7 +292,6 @@ void ShutdownLibrary() sCubebContext = nullptr; } sBrandName = nullptr; - sCubebBackendName = nullptr; // This will ensure we don't try to re-create a context. sCubebState = CubebState::Shutdown; } diff --git a/dom/media/GraphDriver.cpp b/dom/media/GraphDriver.cpp index aa75918f1..37c692a4b 100644 --- a/dom/media/GraphDriver.cpp +++ b/dom/media/GraphDriver.cpp @@ -656,7 +656,7 @@ AudioCallbackDriver::Init() if (latencyPref) { latency_frames = latencyPref.value(); } else { - if (cubeb_get_min_latency(cubebContext, &output, &latency_frames) != CUBEB_OK) { + if (cubeb_get_min_latency(cubebContext, output, &latency_frames) != CUBEB_OK) { NS_WARNING("Could not get minimal latency from cubeb."); } } -- cgit v1.2.3