mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-06 13:30:01 -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
|
|
@ -48,9 +48,14 @@ struct ucred {
|
|||
#define spa_debug pw_log_trace
|
||||
#endif
|
||||
|
||||
#define DEFAULT_QUANTUM 1024u
|
||||
#define MIN_QUANTUM 32u
|
||||
#define MAX_QUANTUM 8192u
|
||||
struct defaults {
|
||||
uint32_t clock_rate;
|
||||
uint32_t clock_quantum;
|
||||
uint32_t clock_min_quantum;
|
||||
uint32_t clock_max_quantum;
|
||||
struct spa_rectangle video_size;
|
||||
struct spa_fraction video_rate;
|
||||
};
|
||||
|
||||
#define MAX_PARAMS 32
|
||||
|
||||
|
|
@ -228,6 +233,8 @@ struct pw_context {
|
|||
|
||||
struct pw_properties *properties; /**< properties of the context */
|
||||
|
||||
struct defaults defaults; /**< default parameters */
|
||||
|
||||
struct pw_mempool *pool; /**< global memory pool */
|
||||
|
||||
struct pw_map globals; /**< map of globals */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue