mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-17 08:56:49 -05:00
Rework formats
Use a POD for the format body. This allows us to more easily build and copy the formats. Remove obsolete code to make video and audio formats. Use SpaVideo/AudioInfo to keep track of formats. Make functions to parse the format into the structures. Update plugins
This commit is contained in:
parent
7fc73953cd
commit
16b62de53a
34 changed files with 1096 additions and 1579 deletions
|
|
@ -35,6 +35,7 @@ extern "C" {
|
|||
#include <spa/loop.h>
|
||||
#include <spa/ringbuffer.h>
|
||||
#include <spa/audio/format.h>
|
||||
#include <spa/format-builder.h>
|
||||
|
||||
typedef struct _SpaALSAState SpaALSAState;
|
||||
typedef struct _SpaALSABuffer SpaALSABuffer;
|
||||
|
|
@ -89,8 +90,9 @@ struct _SpaALSAState {
|
|||
snd_pcm_t *hndl;
|
||||
|
||||
bool have_format;
|
||||
SpaFormatAudio query_format;
|
||||
SpaFormatAudio current_format;
|
||||
SpaAudioInfo current_format;
|
||||
uint8_t format_buffer[1024];
|
||||
|
||||
snd_pcm_sframes_t buffer_frames;
|
||||
snd_pcm_sframes_t period_frames;
|
||||
snd_pcm_format_t format;
|
||||
|
|
@ -125,7 +127,7 @@ struct _SpaALSAState {
|
|||
};
|
||||
|
||||
int spa_alsa_set_format (SpaALSAState *state,
|
||||
SpaFormatAudio *fmt,
|
||||
SpaAudioInfo *info,
|
||||
SpaPortFormatFlags flags);
|
||||
|
||||
SpaResult spa_alsa_start (SpaALSAState *state, bool xrun_recover);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue