mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-06 13:30:01 -05:00
buffer: don't use ringbuffer in chunk
We can't use a ringbuffer on the chunk because it implies the consumer would write to it to update the read position, which we can't do because the chunk is read-only and might even be shared. Go back to offset/size pairs, which can sortof do the same thing if we want later when we keep a non-shared read pointer in the consumer. Keep alsa timestamp around and filled state for future. mmap the input port meta/data/chunk as read-only. Only do clock update requests when asked.
This commit is contained in:
parent
2ad722b579
commit
4288a634f4
25 changed files with 165 additions and 126 deletions
|
|
@ -25,7 +25,6 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
#include <spa/utils/defs.h>
|
||||
#include <spa/utils/ringbuffer.h>
|
||||
#include <spa/buffer/meta.h>
|
||||
#include <spa/support/type-map.h>
|
||||
|
||||
|
|
@ -65,8 +64,12 @@ static inline void spa_type_data_map(struct spa_type_map *map, struct spa_type_d
|
|||
|
||||
/** Chunk of memory */
|
||||
struct spa_chunk {
|
||||
struct spa_ringbuffer area; /**< ringbuffer with valid memory */
|
||||
int32_t stride; /**< stride of ringbuffer increment */
|
||||
uint32_t offset; /**< offset of valid data. Should be taken
|
||||
* modulo the data maxsize to get the offset
|
||||
* in the data memory. */
|
||||
uint32_t size; /**< size of valid data. Should be clamped to
|
||||
* maxsize. */
|
||||
int32_t stride; /**< stride of valid data */
|
||||
};
|
||||
|
||||
/** Data for a buffer */
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
#include <spa/utils/defs.h>
|
||||
#include <spa/utils/ringbuffer.h>
|
||||
#include <spa/support/type-map.h>
|
||||
|
||||
/** \page page_meta Metadata
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue