spa: add helpers to parse and create iec958 formats

This commit is contained in:
Wim Taymans 2021-08-12 15:16:00 +02:00
parent 9dfe35b17c
commit 5feb88575c
3 changed files with 41 additions and 0 deletions

View file

@ -25,6 +25,8 @@
#ifndef SPA_AUDIO_IEC958_H
#define SPA_AUDIO_IEC958_H
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
@ -48,6 +50,14 @@ enum spa_audio_iec958_codec {
SPA_AUDIO_IEC958_CODEC_DTSHD, /**< DTS-HD Master Audio */
};
struct spa_audio_info_iec958 {
enum spa_audio_iec958_codec codec; /*< format, one of the DSP formats in enum spa_audio_format_dsp */
uint32_t flags; /*< extra flags */
uint32_t rate; /*< sample rate */
};
#define SPA_AUDIO_INFO_IEC958_INIT(...) (struct spa_audio_info_iec958) { __VA_ARGS__ }
/**
* \}
*/