mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-20 04:56:24 +00:00
audio: expose API to convert channel array to a mask
This commit is contained in:
parent
f8ae2a0d5b
commit
dd43d0697e
2 changed files with 20 additions and 0 deletions
|
@ -1084,6 +1084,23 @@ gst_audio_check_valid_channel_positions (const GstAudioChannelPosition *
|
|||
return check_valid_channel_positions (position, channels, force_order, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_audio_channel_positions_to_mask:
|
||||
* @position: The %GstAudioChannelPositions
|
||||
* @channels: The number of channels.
|
||||
* @channel_mask: the output channel mask
|
||||
*
|
||||
* Convert the @position array of @channels channels to a bitmask.
|
||||
*
|
||||
* Returns: %TRUE if the channel positions are valid and could be converted.
|
||||
*/
|
||||
gboolean
|
||||
gst_audio_channel_positions_to_mask (const GstAudioChannelPosition * position,
|
||||
gint channels, guint64 * channel_mask)
|
||||
{
|
||||
return check_valid_channel_positions (position, channels, TRUE, channel_mask);
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_audio_get_channel_reorder_map:
|
||||
* @channels: The number of channels.
|
||||
|
|
|
@ -553,6 +553,9 @@ gboolean gst_audio_channel_positions_to_valid_order (GstAudioChannelPositi
|
|||
gboolean gst_audio_check_valid_channel_positions (const GstAudioChannelPosition *position,
|
||||
gint channels, gboolean force_order);
|
||||
|
||||
gboolean gst_audio_channel_positions_to_mask (const GstAudioChannelPosition *position,
|
||||
gint channels, guint64 *channel_mask);
|
||||
|
||||
gboolean gst_audio_get_channel_reorder_map (gint channels,
|
||||
const GstAudioChannelPosition * from,
|
||||
const GstAudioChannelPosition * to,
|
||||
|
|
Loading…
Reference in a new issue