PipeWire 0.3.65
src/pipewire/buffers.h
Go to the documentation of this file.
1/* PipeWire
2 *
3 * Copyright © 2019 Wim Taymans
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the "Software"),
7 * to deal in the Software without restriction, including without limitation
8 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 * and/or sell copies of the Software, and to permit persons to whom the
10 * Software is furnished to do so, subject to the following conditions:
11 *
12 * The above copyright notice and this permission notice (including the next
13 * paragraph) shall be included in all copies or substantial portions of the
14 * Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 * DEALINGS IN THE SOFTWARE.
23 */
24
25#ifndef PIPEWIRE_BUFFERS_H
26#define PIPEWIRE_BUFFERS_H
27
28#include <spa/node/node.h>
29
30#include <pipewire/context.h>
31#include <pipewire/mem.h>
32
33#ifdef __cplusplus
34extern "C" {
35#endif
36
46#define PW_BUFFERS_FLAG_NONE 0
47#define PW_BUFFERS_FLAG_NO_MEM (1<<0)
48#define PW_BUFFERS_FLAG_SHARED (1<<1)
49#define PW_BUFFERS_FLAG_DYNAMIC (1<<2)
50#define PW_BUFFERS_FLAG_SHARED_MEM (1<<3)
51#define PW_BUFFERS_FLAG_IN_PRIORITY (1<<4)
53struct pw_buffers {
54 struct pw_memblock *mem;
56 uint32_t n_buffers;
57 uint32_t flags;
58};
60int pw_buffers_negotiate(struct pw_context *context, uint32_t flags,
61 struct spa_node *outnode, uint32_t out_port_id,
62 struct spa_node *innode, uint32_t in_port_id,
63 struct pw_buffers *result);
65void pw_buffers_clear(struct pw_buffers *buffers);
71#ifdef __cplusplus
72}
73#endif
74
75#endif /* PIPEWIRE_BUFFERS_H */
int pw_buffers_negotiate(struct pw_context *context, uint32_t flags, struct spa_node *outnode, uint32_t out_port_id, struct spa_node *innode, uint32_t in_port_id, struct pw_buffers *result)
Definition: buffers.c:235
void pw_buffers_clear(struct pw_buffers *buffers)
Definition: buffers.c:361
spa/node/node.h
pipewire/context.h
pipewire/mem.h
Definition: src/pipewire/buffers.h:63
uint32_t flags
flags
Definition: src/pipewire/buffers.h:67
uint32_t n_buffers
number of port buffers
Definition: src/pipewire/buffers.h:66
struct spa_buffer ** buffers
port buffers
Definition: src/pipewire/buffers.h:65
struct pw_memblock * mem
allocated buffer memory
Definition: src/pipewire/buffers.h:64
Memory block structure.
Definition: src/pipewire/mem.h:83
A Buffer.
Definition: buffer/buffer.h:109
Definition: spa/include/spa/node/node.h:61