mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
Use the DSP format for dsp formats
Use the DSP media subtype to describe DSP formats. DSP formats don't include the rate, channels and channel position in the format and must use the rate and duration from the position io. This makes it possible to later change the samplerate dynamically without having to renegotiate the graph. The same goes for the video DSP format, which uses the io_video_size from the io_position to get the size/stride. Set this up in the node based on the defaults from the context. Make it possible to define defaults in the daemon config file, such as samplerate, quantum, video size and framerate. This is stored in the context and used for the DSP formats.
This commit is contained in:
parent
5a6da7d5e1
commit
852ac043d3
20 changed files with 402 additions and 270 deletions
|
|
@ -82,8 +82,17 @@ enum spa_audio_format {
|
|||
SPA_AUDIO_FORMAT_F32P,
|
||||
SPA_AUDIO_FORMAT_F64P,
|
||||
|
||||
SPA_AUDIO_FORMAT_START_Other = 0x300,
|
||||
/* other formats start here */
|
||||
SPA_AUDIO_FORMAT_START_Other = 0x400,
|
||||
|
||||
/* Aliases */
|
||||
|
||||
/* DSP formats */
|
||||
SPA_AUDIO_FORMAT_DSP_S32 = SPA_AUDIO_FORMAT_S24_32P,
|
||||
SPA_AUDIO_FORMAT_DSP_F32 = SPA_AUDIO_FORMAT_F32P,
|
||||
SPA_AUDIO_FORMAT_DSP_F64 = SPA_AUDIO_FORMAT_F64P,
|
||||
|
||||
/* native endian */
|
||||
#if __BYTE_ORDER == __BIG_ENDIAN
|
||||
SPA_AUDIO_FORMAT_S16 = SPA_AUDIO_FORMAT_S16_BE,
|
||||
SPA_AUDIO_FORMAT_U16 = SPA_AUDIO_FORMAT_U16_BE,
|
||||
|
|
@ -210,6 +219,11 @@ struct spa_audio_info_raw {
|
|||
|
||||
#define SPA_KEY_AUDIO_CHANNEL "audio.channel" /**< an audio channel as string,
|
||||
* Ex. "FL" */
|
||||
struct spa_audio_info_dsp {
|
||||
enum spa_audio_format format; /*< format, one of the DSP formats in enum spa_audio_format_dsp */
|
||||
};
|
||||
|
||||
#define SPA_AUDIO_INFO_DSP_INIT(...) (struct spa_audio_info_dsp) { __VA_ARGS__ }
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue