Changeset View
Changeset View
Standalone View
Standalone View
www/firefox/files/patch-bug1021761
Show First 20 Lines • Show All 683 Lines • ▼ Show 20 Lines | |||||
#endif | #endif | ||||
}; | }; | ||||
int i; | int i; | ||||
diff --git media/libcubeb/src/cubeb_oss.c media/libcubeb/src/cubeb_oss.c | diff --git media/libcubeb/src/cubeb_oss.c media/libcubeb/src/cubeb_oss.c | ||||
new file mode 100644 | new file mode 100644 | ||||
index 000000000000..7d96168b9ea6 | index 000000000000..7d96168b9ea6 | ||||
--- /dev/null | --- /dev/null | ||||
+++ media/libcubeb/src/cubeb_oss.c | +++ media/libcubeb/src/cubeb_oss.c | ||||
@@ -0,0 +1,454 @@ | @@ -0,0 +1,453 @@ | ||||
+/* | +/* | ||||
+ * Copyright © 2014 Mozilla Foundation | + * Copyright © 2014 Mozilla Foundation | ||||
+ * | + * | ||||
+ * This program is made available under an ISC-style license. See the | + * This program is made available under an ISC-style license. See the | ||||
+ * accompanying file LICENSE for details. | + * accompanying file LICENSE for details. | ||||
+ */ | + */ | ||||
+#if defined(HAVE_SYS_SOUNDCARD_H) | +#if defined(HAVE_SYS_SOUNDCARD_H) | ||||
+#include <sys/soundcard.h> | +#include <sys/soundcard.h> | ||||
▲ Show 20 Lines • Show All 420 Lines • ▼ Show 20 Lines | |||||
+} | +} | ||||
+ | + | ||||
+static struct cubeb_ops const oss_ops = { | +static struct cubeb_ops const oss_ops = { | ||||
+ .init = oss_init, | + .init = oss_init, | ||||
+ .get_backend_id = oss_get_backend_id, | + .get_backend_id = oss_get_backend_id, | ||||
+ .get_max_channel_count = oss_get_max_channel_count, | + .get_max_channel_count = oss_get_max_channel_count, | ||||
+ .get_min_latency = oss_get_min_latency, | + .get_min_latency = oss_get_min_latency, | ||||
+ .get_preferred_sample_rate = oss_get_preferred_sample_rate, | + .get_preferred_sample_rate = oss_get_preferred_sample_rate, | ||||
+ .get_preferred_channel_layout = NULL, | |||||
+ .enumerate_devices = NULL, | + .enumerate_devices = NULL, | ||||
+ .device_collection_destroy = NULL, | + .device_collection_destroy = NULL, | ||||
+ .destroy = oss_destroy, | + .destroy = oss_destroy, | ||||
+ .stream_init = oss_stream_init, | + .stream_init = oss_stream_init, | ||||
+ .stream_destroy = oss_stream_destroy, | + .stream_destroy = oss_stream_destroy, | ||||
+ .stream_start = oss_stream_start, | + .stream_start = oss_stream_start, | ||||
+ .stream_stop = oss_stream_stop, | + .stream_stop = oss_stream_stop, | ||||
+ .stream_reset_default_device = NULL, | + .stream_reset_default_device = NULL, | ||||
Show All 18 Lines | |||||
+ SOURCES += [ | + SOURCES += [ | ||||
+ 'cubeb_oss.c', | + 'cubeb_oss.c', | ||||
+ ] | + ] | ||||
+ DEFINES['USE_OSS'] = True | + DEFINES['USE_OSS'] = True | ||||
+ | + | ||||
if CONFIG['MOZ_PULSEAUDIO'] or CONFIG['MOZ_JACK']: | if CONFIG['MOZ_PULSEAUDIO'] or CONFIG['MOZ_JACK']: | ||||
SOURCES += [ | SOURCES += [ | ||||
'cubeb_resampler.cpp', | 'cubeb_resampler.cpp', | ||||
@@ -88,6 +94,7 @@ if CONFIG['OS_TARGET'] == 'Android': | @@ -89,6 +95,7 @@ FINAL_LIBRARY = 'gkmedias' | ||||
FINAL_LIBRARY = 'gkmedias' | |||||
CFLAGS += CONFIG['MOZ_ALSA_CFLAGS'] | CFLAGS += CONFIG['MOZ_ALSA_CFLAGS'] | ||||
CFLAGS += CONFIG['MOZ_JACK_CFLAGS'] | |||||
+CFLAGS += CONFIG['MOZ_OSS_CFLAGS'] | +CFLAGS += CONFIG['MOZ_OSS_CFLAGS'] | ||||
CFLAGS += CONFIG['MOZ_PULSEAUDIO_CFLAGS'] | CFLAGS += CONFIG['MOZ_PULSEAUDIO_CFLAGS'] | ||||
# We allow warnings for third-party code that can be updated from upstream. | # We allow warnings for third-party code that can be updated from upstream. | ||||
diff --git media/libcubeb/update.sh media/libcubeb/update.sh | diff --git media/libcubeb/update.sh media/libcubeb/update.sh | ||||
index 0bb6345c9fa9..78a102dc47cb 100755 | index 0bb6345c9fa9..78a102dc47cb 100755 | ||||
--- media/libcubeb/update.sh | --- media/libcubeb/update.sh | ||||
+++ media/libcubeb/update.sh | +++ media/libcubeb/update.sh | ||||
▲ Show 20 Lines • Show All 69 Lines • ▼ Show 20 Lines | |||||
+fi | +fi | ||||
+CFLAGS=$_SAVE_CFLAGS | +CFLAGS=$_SAVE_CFLAGS | ||||
+LIBS=$_SAVE_LIBS | +LIBS=$_SAVE_LIBS | ||||
+ | + | ||||
+AC_SUBST(MOZ_OSS) | +AC_SUBST(MOZ_OSS) | ||||
+AC_SUBST_LIST(MOZ_OSS_CFLAGS) | +AC_SUBST_LIST(MOZ_OSS_CFLAGS) | ||||
+AC_SUBST_LIST(MOZ_OSS_LIBS) | +AC_SUBST_LIST(MOZ_OSS_LIBS) | ||||
+ | + | ||||
dnl ================================== | dnl ======================================================== | ||||
dnl = Check alsa availability on Linux | dnl NegotiateAuth | ||||
dnl ================================== | dnl ======================================================== | ||||
diff --git toolkit/library/moz.build toolkit/library/moz.build | diff --git toolkit/library/moz.build toolkit/library/moz.build | ||||
index e06592daa265..ce016b96c2bc 100644 | index e06592daa265..ce016b96c2bc 100644 | ||||
--- toolkit/library/moz.build | --- toolkit/library/moz.build | ||||
+++ toolkit/library/moz.build | +++ toolkit/library/moz.build | ||||
@@ -247,6 +247,9 @@ if CONFIG['MOZ_SYSTEM_LIBVPX']: | @@ -247,6 +247,9 @@ if CONFIG['MOZ_SYSTEM_LIBVPX']: | ||||
if not CONFIG['MOZ_TREE_PIXMAN']: | if not CONFIG['MOZ_TREE_PIXMAN']: | ||||
OS_LIBS += CONFIG['MOZ_PIXMAN_LIBS'] | OS_LIBS += CONFIG['MOZ_PIXMAN_LIBS'] | ||||
+if CONFIG['MOZ_OSS']: | +if CONFIG['MOZ_OSS']: | ||||
+ OS_LIBS += CONFIG['MOZ_OSS_LIBS'] | + OS_LIBS += CONFIG['MOZ_OSS_LIBS'] | ||||
+ | + | ||||
if CONFIG['HAVE_CLOCK_MONOTONIC']: | if CONFIG['HAVE_CLOCK_MONOTONIC']: | ||||
OS_LIBS += CONFIG['REALTIME_LIBS'] | OS_LIBS += CONFIG['REALTIME_LIBS'] | ||||