mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-04 23:46:43 +00:00
audioconvert: Support converting >64 channels
There's nothing requiring <= 64 channels except for getting the reorder map and creating a channel mixing matrix, but those won't be possible to call anyway as channel positions can only express up to 64 channels. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6829>
This commit is contained in:
parent
9a2aa2ca77
commit
b7d4ccd7f2
2 changed files with 3 additions and 5 deletions
|
@ -833,8 +833,6 @@ gst_audio_channel_mixer_new_with_matrix (GstAudioChannelMixerFlags flags,
|
|||
|| format == GST_AUDIO_FORMAT_S32
|
||||
|| format == GST_AUDIO_FORMAT_F32
|
||||
|| format == GST_AUDIO_FORMAT_F64, NULL);
|
||||
g_return_val_if_fail (in_channels > 0 && in_channels <= 64, NULL);
|
||||
g_return_val_if_fail (out_channels > 0 && out_channels <= 64, NULL);
|
||||
|
||||
mix = g_slice_new0 (GstAudioChannelMixer);
|
||||
mix->in_channels = in_channels;
|
||||
|
@ -995,8 +993,6 @@ gst_audio_channel_mixer_new (GstAudioChannelMixerFlags flags,
|
|||
|| format == GST_AUDIO_FORMAT_S32
|
||||
|| format == GST_AUDIO_FORMAT_F32
|
||||
|| format == GST_AUDIO_FORMAT_F64, NULL);
|
||||
g_return_val_if_fail (in_channels > 0 && in_channels <= 64, NULL);
|
||||
g_return_val_if_fail (out_channels > 0 && out_channels <= 64, NULL);
|
||||
|
||||
matrix =
|
||||
gst_audio_channel_mixer_setup_matrix (flags, in_channels, in_position,
|
||||
|
|
|
@ -222,7 +222,6 @@ gst_audio_reorder_channels (gpointer data, gsize size, GstAudioFormat format,
|
|||
g_return_val_if_fail (info->width <= 8 * 64, FALSE);
|
||||
g_return_val_if_fail (size % ((info->width * channels) / 8) == 0, FALSE);
|
||||
g_return_val_if_fail (channels > 0, FALSE);
|
||||
g_return_val_if_fail (channels <= 64, FALSE);
|
||||
|
||||
if (size == 0)
|
||||
return TRUE;
|
||||
|
@ -230,6 +229,8 @@ gst_audio_reorder_channels (gpointer data, gsize size, GstAudioFormat format,
|
|||
if (gst_audio_channel_positions_equal (from, to, channels))
|
||||
return TRUE;
|
||||
|
||||
g_return_val_if_fail (channels <= 64, FALSE);
|
||||
|
||||
if (!gst_audio_get_channel_reorder_map (channels, from, to, reorder_map))
|
||||
return FALSE;
|
||||
|
||||
|
@ -454,6 +455,7 @@ gst_audio_get_channel_reorder_map (gint channels,
|
|||
|
||||
g_return_val_if_fail (reorder_map != NULL, FALSE);
|
||||
g_return_val_if_fail (channels > 0, FALSE);
|
||||
g_return_val_if_fail (channels <= 64, FALSE);
|
||||
g_return_val_if_fail (from != NULL, FALSE);
|
||||
g_return_val_if_fail (to != NULL, FALSE);
|
||||
g_return_val_if_fail (check_valid_channel_positions (from, channels, FALSE,
|
||||
|
|
Loading…
Reference in a new issue