mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-31 11:09:04 -05:00
format: improve format parsing
This commit is contained in:
parent
94019fb1f5
commit
29cb7bf39a
30 changed files with 459 additions and 406 deletions
|
|
@ -50,8 +50,21 @@ spa_type_format_audio_map (SpaTypeMap *map, SpaTypeFormatAudio *type)
|
|||
}
|
||||
}
|
||||
|
||||
SpaResult spa_format_audio_parse (const SpaFormat *format,
|
||||
SpaAudioInfo *info);
|
||||
static inline bool
|
||||
spa_format_audio_raw_parse (const SpaFormat *format,
|
||||
SpaAudioInfoRaw *info,
|
||||
SpaTypeFormatAudio *type)
|
||||
{
|
||||
spa_format_query (format,
|
||||
type->format, SPA_POD_TYPE_ID, &info->format,
|
||||
type->flags, SPA_POD_TYPE_INT, &info->flags,
|
||||
type->layout, SPA_POD_TYPE_INT, &info->layout,
|
||||
type->rate, SPA_POD_TYPE_INT, &info->rate,
|
||||
type->channels, SPA_POD_TYPE_INT, &info->channels,
|
||||
type->channel_mask, SPA_POD_TYPE_INT, &info->channel_mask,
|
||||
0);
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue