mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 23:36:38 +00:00
/me attempts to fix stuff that BBB apparently never compiled
Original commit message from CVS: /me attempts to fix stuff that BBB apparently never compiled
This commit is contained in:
parent
b005531324
commit
eff9a150cd
1 changed files with 7 additions and 8 deletions
|
@ -1329,7 +1329,7 @@ gst_alsa_formats_match (GstAlsaFormat *one, GstAlsaFormat *two)
|
||||||
static GstCaps *
|
static GstCaps *
|
||||||
gst_alsa_get_caps_internal (snd_pcm_format_t format)
|
gst_alsa_get_caps_internal (snd_pcm_format_t format)
|
||||||
{
|
{
|
||||||
gchar *name = snd_pcm_format_name (format);
|
const gchar *name = snd_pcm_format_name (format);
|
||||||
|
|
||||||
if (format == SND_PCM_FORMAT_A_LAW) {
|
if (format == SND_PCM_FORMAT_A_LAW) {
|
||||||
return GST_CAPS_NEW (name, "audio/x-alaw",
|
return GST_CAPS_NEW (name, "audio/x-alaw",
|
||||||
|
@ -1370,7 +1370,7 @@ gst_alsa_get_caps_internal (snd_pcm_format_t format)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return GST_CAPS_NEW (name, "audio/x-raw-int", props);
|
return gst_caps_new (name, "audio/x-raw-int", props);
|
||||||
} else if (snd_pcm_format_float (format)) {
|
} else if (snd_pcm_format_float (format)) {
|
||||||
/* no float with non-platform endianness */
|
/* no float with non-platform endianness */
|
||||||
if (!snd_pcm_format_cpu_endian (format))
|
if (!snd_pcm_format_cpu_endian (format))
|
||||||
|
@ -1433,7 +1433,7 @@ gst_alsa_caps (snd_pcm_format_t format, gint rate, gint channels)
|
||||||
|
|
||||||
/* can be NULL, because not all alsa formats can be specified as caps */
|
/* can be NULL, because not all alsa formats can be specified as caps */
|
||||||
if (temp != NULL && temp->properties != NULL) {
|
if (temp != NULL && temp->properties != NULL) {
|
||||||
add_channels (temp->props, rate, -1, channels, -1);
|
add_channels (temp->properties, rate, -1, channels, -1);
|
||||||
ret_caps = gst_caps_append (ret_caps, temp);
|
ret_caps = gst_caps_append (ret_caps, temp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1488,12 +1488,11 @@ gst_alsa_get_caps (GstPad *pad, GstCaps *caps)
|
||||||
snd_pcm_hw_params_get_format_mask (hw_params, mask);
|
snd_pcm_hw_params_get_format_mask (hw_params, mask);
|
||||||
for (i = 0; i <= SND_PCM_FORMAT_LAST; i++) {
|
for (i = 0; i <= SND_PCM_FORMAT_LAST; i++) {
|
||||||
if (snd_pcm_format_mask_test (mask, i)) {
|
if (snd_pcm_format_mask_test (mask, i)) {
|
||||||
GstProps *props = gst_alsa_get_props (i);
|
GstCaps *caps = gst_alsa_get_caps_internal (i);
|
||||||
/* we can never use a format we can't set caps for */
|
/* we can never use a format we can't set caps for */
|
||||||
if (props != NULL) {
|
if (caps->properties != NULL) {
|
||||||
add_channels (props, min_rate, max_rate, min_channels, max_channels);
|
add_channels (caps->properties, min_rate, max_rate, min_channels, max_channels);
|
||||||
ret = gst_caps_append (ret, gst_caps_new (g_strdup (snd_pcm_format_name (i)),
|
ret = gst_caps_append (ret, caps);
|
||||||
"audio/raw", props));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue