Bug 1552342 - Update libcubeb to b9e2c50. r=padenot
authorMatthew Gregan <kinetik@flim.org>
Fri, 17 May 2019 09:27:50 +1200
changeset 474185 28587715459e4541e26e5f0986d20b0479fda083
parent 474184 3235df2518146938b504428a4a63242535cf90a4
child 474186 3d36061643f440a3f06380e690bf38cfbe89892b
push id36026
push usermalexandru@mozilla.com
push dateFri, 17 May 2019 09:30:40 +0000
treeherdermozilla-central@839cdad764d7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspadenot
bugs1552342
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1552342 - Update libcubeb to b9e2c50. r=padenot
media/libcubeb/disable-device-switching.patch
media/libcubeb/moz.yaml
media/libcubeb/update.sh
deleted file mode 100644
--- a/media/libcubeb/disable-device-switching.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-diff --git a/media/libcubeb/src/cubeb_wasapi.cpp b/media/libcubeb/src/cubeb_wasapi.cpp
---- a/media/libcubeb/src/cubeb_wasapi.cpp
-+++ b/media/libcubeb/src/cubeb_wasapi.cpp
-@@ -1829,21 +1829,26 @@ wasapi_stream_init(cubeb * context, cube
-        assert that the lock is held in the function. */
-     auto_lock lock(stm->stream_reset_lock);
-     rv = setup_wasapi_stream(stm.get());
-   }
-   if (rv != CUBEB_OK) {
-     return rv;
-   }
- 
--  HRESULT hr = register_notification_client(stm.get());
--  if (FAILED(hr)) {
--    /* this is not fatal, we can still play audio, but we won't be able
--       to keep using the default audio endpoint if it changes. */
--    LOG("failed to register notification client, %lx", hr);
-+  if (!((input_stream_params ?
-+         (input_stream_params->prefs & CUBEB_STREAM_PREF_DISABLE_DEVICE_SWITCHING) : 0) ||
-+        (output_stream_params ?
-+         (output_stream_params->prefs & CUBEB_STREAM_PREF_DISABLE_DEVICE_SWITCHING) : 0))) {
-+    HRESULT hr = register_notification_client(stm.get());
-+    if (FAILED(hr)) {
-+      /* this is not fatal, we can still play audio, but we won't be able
-+         to keep using the default audio endpoint if it changes. */
-+      LOG("failed to register notification client, %lx", hr);
-+    }
-   }
- 
-   *stream = stm.release();
- 
-   LOG("Stream init succesfull (%p)", *stream);
-   return CUBEB_OK;
- }
- 
-@@ -1879,17 +1884,19 @@ void wasapi_stream_destroy(cubeb_stream 
-   // Only free stm->emergency_bailout if we could join the thread.
-   // If we could not join the thread, stm->emergency_bailout is true
-   // and is still alive until the thread wakes up and exits cleanly.
-   if (stop_and_join_render_thread(stm)) {
-     delete stm->emergency_bailout.load();
-     stm->emergency_bailout = nullptr;
-   }
- 
--  unregister_notification_client(stm);
-+  if (stm->notification_client) {
-+    unregister_notification_client(stm);
-+  }
- 
-   CloseHandle(stm->reconfigure_event);
-   CloseHandle(stm->refill_event);
-   CloseHandle(stm->input_available_event);
- 
-   // The variables intialized in wasapi_stream_init,
-   // must be destroyed in wasapi_stream_destroy.
-   stm->linear_input_buffer.reset();
-diff --git a/media/libcubeb/include/cubeb.h b/media/libcubeb/include/cubeb.h
---- a/media/libcubeb/include/cubeb.h
-+++ a/media/libcubeb/include/cubeb.h
-@@ -222,16 +222,19 @@
- 
- /** Miscellaneous stream preferences. */
- typedef enum {
-   CUBEB_STREAM_PREF_NONE     = 0x00, /**< No stream preferences are requested. */
-   CUBEB_STREAM_PREF_LOOPBACK = 0x01, /**< Request a loopback stream. Should be
-                                          specified on the input params and an
-                                          output device to loopback from should
-                                          be passed in place of an input device. */
-+  CUBEB_STREAM_PREF_DISABLE_DEVICE_SWITCHING = 0x02, /**< Disable switching
-+                                                          default device on OS
-+                                                          changes. */
-   CUBEB_STREAM_PREF_VOICE = 0x04  /**< This stream is going to transport voice data.
-                                        Depending on the backend and platform, this can
-                                        change the audio input or output devices
-                                        selected, as well as the quality of the stream,
-                                        for example to accomodate bluetooth SCO modes on
-                                        bluetooth devices. */
- } cubeb_stream_prefs;
- 
--- a/media/libcubeb/moz.yaml
+++ b/media/libcubeb/moz.yaml
@@ -14,10 +14,10 @@ bugzilla:
 origin:
   name: "cubeb"
   description: "Cross platform audio library"
 
   url: "https://github.com/kinetiknz/cubeb"
   license: "ISC"
 
   # update.sh will update this value
-  release: "64aa80f330a3dc510b1e3ac0e92cc6bed129a9a6 (2019-04-25 17:32:33 +0200)"
+  release: "b9e2c50e51fc58b31b553b5364efacec24ebb76e (2019-05-17 09:21:59 +1200)"
 
--- a/media/libcubeb/update.sh
+++ b/media/libcubeb/update.sh
@@ -85,11 +85,8 @@ if [ -n "$rev" ]; then
   rm moz.yaml.bak
   [[ -n "$commits" ]] && echo -e "Pick commits:\n$commits"
 else
   echo "Remember to update moz.yaml with the version details."
 fi
 
 echo "Applying disable-assert.patch on top of $rev"
 patch -p3 < disable-assert.patch
-
-echo "Applying disable-device-switching.patch on top of $rev"
-patch -p3 < disable-device-switching.patch