mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-08 16:35:40 +00:00
pulsesink: add 24bit sample formats
Add check for pulseaudio 0.9.15 and enable 24bits samples in that case.
This commit is contained in:
parent
4732b9bfa4
commit
ab3bed81a5
3 changed files with 28 additions and 1 deletions
|
@ -759,6 +759,10 @@ AG_GST_CHECK_FEATURE(PULSE, [pulseaudio plug-in], pulseaudio, [
|
||||||
if test x$HAVE_PULSE_0_9_13 = xyes; then
|
if test x$HAVE_PULSE_0_9_13 = xyes; then
|
||||||
AC_DEFINE(HAVE_PULSE_0_9_13, 1, [defined if pulseaudio >= 0.9.13 is available])
|
AC_DEFINE(HAVE_PULSE_0_9_13, 1, [defined if pulseaudio >= 0.9.13 is available])
|
||||||
fi
|
fi
|
||||||
|
AG_GST_PKG_CHECK_MODULES(PULSE_0_9_15, libpulse >= 0.9.15)
|
||||||
|
if test x$HAVE_PULSE_0_9_15 = xyes; then
|
||||||
|
AC_DEFINE(HAVE_PULSE_0_9_15, 1, [defined if pulseaudio >= 0.9.15 is available])
|
||||||
|
fi
|
||||||
])
|
])
|
||||||
|
|
||||||
dnl *** dv1394 ***
|
dnl *** dv1394 ***
|
||||||
|
|
|
@ -516,7 +516,6 @@ gst_pulsering_stream_underflow_cb (pa_stream * s, void *userdata)
|
||||||
GST_WARNING_OBJECT (psink, "Got underflow");
|
GST_WARNING_OBJECT (psink, "Got underflow");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_pulsering_stream_overflow_cb (pa_stream * s, void *userdata)
|
gst_pulsering_stream_overflow_cb (pa_stream * s, void *userdata)
|
||||||
{
|
{
|
||||||
|
@ -1320,8 +1319,22 @@ gst_pulsesink_base_init (gpointer g_class)
|
||||||
"signed = (boolean) TRUE, "
|
"signed = (boolean) TRUE, "
|
||||||
"width = (int) 32, "
|
"width = (int) 32, "
|
||||||
"depth = (int) 32, "
|
"depth = (int) 32, "
|
||||||
|
"rate = (int) [ 1, MAX ], " "channels = (int) [ 1, 32 ];"
|
||||||
|
#if HAVE_PULSE_0_9_15
|
||||||
|
"audio/x-raw-int, "
|
||||||
|
"endianness = (int) { " ENDIANNESS " }, "
|
||||||
|
"signed = (boolean) TRUE, "
|
||||||
|
"width = (int) 24, "
|
||||||
|
"depth = (int) 24, "
|
||||||
"rate = (int) [ 1, MAX ], "
|
"rate = (int) [ 1, MAX ], "
|
||||||
"channels = (int) [ 1, 32 ];"
|
"channels = (int) [ 1, 32 ];"
|
||||||
|
"audio/x-raw-int, "
|
||||||
|
"endianness = (int) { " ENDIANNESS " }, "
|
||||||
|
"signed = (boolean) TRUE, "
|
||||||
|
"width = (int) 32, "
|
||||||
|
"depth = (int) 24, "
|
||||||
|
"rate = (int) [ 1, MAX ], " "channels = (int) [ 1, 32 ];"
|
||||||
|
#endif
|
||||||
"audio/x-raw-int, "
|
"audio/x-raw-int, "
|
||||||
"signed = (boolean) FALSE, "
|
"signed = (boolean) FALSE, "
|
||||||
"width = (int) 8, "
|
"width = (int) 8, "
|
||||||
|
|
|
@ -91,6 +91,16 @@ gst_pulse_fill_sample_spec (GstRingBufferSpec * spec, pa_sample_spec * ss)
|
||||||
ss->format = PA_SAMPLE_S32LE;
|
ss->format = PA_SAMPLE_S32LE;
|
||||||
else if (spec->format == GST_S32_BE && spec->width == 32)
|
else if (spec->format == GST_S32_BE && spec->width == 32)
|
||||||
ss->format = PA_SAMPLE_S32BE;
|
ss->format = PA_SAMPLE_S32BE;
|
||||||
|
#if HAVE_PULSE_0_9_15
|
||||||
|
else if (spec->format == GST_S24_3LE && spec->width == 24)
|
||||||
|
ss->format = PA_SAMPLE_S24LE;
|
||||||
|
else if (spec->format == GST_S24_3BE && spec->width == 24)
|
||||||
|
ss->format = PA_SAMPLE_S24BE;
|
||||||
|
else if (spec->format == GST_S24_LE && spec->width == 32)
|
||||||
|
ss->format = PA_SAMPLE_S24_32LE;
|
||||||
|
else if (spec->format == GST_S24_BE && spec->width == 32)
|
||||||
|
ss->format = PA_SAMPLE_S24_32BE;
|
||||||
|
#endif
|
||||||
else
|
else
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue