diff options
Diffstat (limited to 'repo/qt5-qtwebengine/sndio.patch')
-rw-r--r-- | repo/qt5-qtwebengine/sndio.patch | 142 |
1 files changed, 142 insertions, 0 deletions
diff --git a/repo/qt5-qtwebengine/sndio.patch b/repo/qt5-qtwebengine/sndio.patch new file mode 100644 index 0000000..771e630 --- /dev/null +++ b/repo/qt5-qtwebengine/sndio.patch @@ -0,0 +1,142 @@ +from void-packages, 0101,0102-sndio.patch +--- a/src/core/configure.json 2020-03-24 10:16:30.000000000 +0100 ++++ - 2020-04-06 14:28:00.591236926 +0200 +@@ -21,6 +21,7 @@ + "webengine-printing-and-pdf": "boolean", + "webengine-proprietary-codecs": "boolean", + "webengine-pulseaudio": "boolean", ++ "webengine-sndio": "boolean", + "webengine-spellchecker": "boolean", + "webengine-native-spellchecker": "boolean", + "webengine-extensions": "boolean", +@@ -31,6 +32,7 @@ + "webengine-kerberos": "boolean", + "alsa": { "type": "boolean", "name": "webengine-alsa" }, + "pulseaudio": { "type": "boolean", "name": "webengine-pulseaudio" }, ++ "sndio": { "type": "boolean", "name": "webengine-sndio" }, + "ffmpeg": { "type": "enum", "name": "webengine-system-ffmpeg", "values": { "system": "yes", "qt": "no" } }, + "opus": { "type": "enum", "name": "webengine-system-opus", "values": { "system": "yes", "qt": "no" } }, + "webp": { "type": "enum", "name": "webengine-system-libwebp", "values": { "system": "yes", "qt": "no" } }, +@@ -68,7 +70,13 @@ + "sources": [ + { "type": "pkgConfig", "args": "libpulse >= 0.9.10 libpulse-mainloop-glib" } + ] +- } ++ }, ++ "sndio": { ++ "label": "sndio", ++ "sources": [ ++ { "type": "pkgConfig", "args": "libsndio >= 1.5.0 libsndio" } ++ ] ++ } + }, + "tests" : { + "webengine-host-compiler": { +@@ -136,6 +144,10 @@ + "condition": "libs.webengine-pulseaudio", + "output": [ "privateFeature" ] + }, ++ "webengine-sndio": { ++ "label": "Use sndio", ++ "output": [ "privateFeature" ] ++ }, + "webengine-pepper-plugins": { + "label": "Pepper Plugins", + "purpose": "Enables use of Pepper Flash plugins.", +@@ -308,6 +320,11 @@ + "condition": "config.unix" + }, + { ++ "type": "feature", ++ "args": "webengine-sndio", ++ "condition": "config.unix" ++ }, ++ { + "type": "feature", + "args": "webengine-sanitizer", + "condition": "config.sanitizer" +--- a/src/3rdparty/chromium/media/audio/linux/audio_manager_linux.cc ++++ b/src/3rdparty/chromium/media/audio/linux/audio_manager_linux.cc +@@ -20,6 +20,10 @@ + #include "media/audio/pulse/audio_manager_pulse.h" + #include "media/audio/pulse/pulse_util.h" + #endif ++#if defined(USE_SNDIO) ++#include <sndio.h> ++#include "media/audio/openbsd/audio_manager_openbsd.h" ++#endif + + namespace media { + +@@ -27,7 +31,8 @@ enum LinuxAudioIO { + kPulse, + kAlsa, + kCras, +- kAudioIOMax = kCras // Must always be equal to largest logged entry. ++ kSndio, ++ kAudioIOMax = kSndio // Must always be equal to largest logged entry. + }; + + std::unique_ptr<media::AudioManager> CreateAudioManager( +@@ -41,6 +46,17 @@ std::unique_ptr<media::AudioManager> CreateAudioManager( + } + #endif + ++#if defined(USE_SNDIO) ++ struct sio_hdl * hdl = NULL; ++ if ((hdl=sio_open(SIO_DEVANY, SIO_PLAY, 1)) != NULL) { ++ sio_close(hdl); ++ UMA_HISTOGRAM_ENUMERATION("Media.LinuxAudioIO", kSndio, kAudioIOMax +1); ++ return std::make_unique<AudioManagerOpenBSD>(std::move(audio_thread), ++ audio_log_factory); ++ } ++ DVLOG(1) << "Sndio is not available on the OS"; ++#endif ++ + #if defined(USE_PULSEAUDIO) + pa_threaded_mainloop* pa_mainloop = nullptr; + pa_context* pa_context = nullptr; +--- a/src/3rdparty/chromium/media/BUILD.gn 2020-03-24 10:16:30.000000000 +0100 ++++ - 2020-04-06 14:32:27.960817513 +0200 +@@ -65,6 +65,9 @@ + if (use_cras) { + defines += [ "USE_CRAS" ] + } ++ if (use_sndio) { ++ defines += [ "USE_SNDIO" ] ++ } + } + + # Internal grouping of the configs necessary to support sub-folders having their +--- a/src/3rdparty/chromium/media/media_options.gni 2020-03-24 10:16:30.000000000 +0100 ++++ - 2020-04-06 14:29:22.958630783 +0200 +@@ -114,6 +114,9 @@ + # Enables runtime selection of ALSA library for audio. + use_alsa = false + ++ # Enables runtime selection of sndio library for audio. ++ use_sndio = false ++ + # Alsa should be used on non-Android, non-Mac POSIX systems. + # Alsa should be used on desktop Chromecast and audio-only Chromecast builds. + if (is_posix && !is_android && !is_mac && +--- a/src/3rdparty/chromium/media/audio/BUILD.gn 2021-02-23 16:36:59.000000000 +0100 ++++ - 2021-03-07 22:00:34.889682069 +0100 +@@ -238,6 +238,17 @@ + sources += [ "linux/audio_manager_linux.cc" ] + } + ++ if (use_sndio) { ++ libs += [ "sndio" ] ++ sources += [ ++ "openbsd/audio_manager_openbsd.cc", ++ "sndio/sndio_input.cc", ++ "sndio/sndio_input.h", ++ "sndio/sndio_output.cc", ++ "sndio/sndio_output.h" ++ ] ++ } ++ + if (use_alsa) { + libs += [ "asound" ] + sources += [ |