PipeWire: buffers.h Source File

PipeWire 0.3.66

Loading...
Searching...
No Matches
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)
53 struct pw_buffers {
54 struct pw_memblock *mem;
55 struct spa_buffer **buffers;
56 uint32_t n_buffers;
57 uint32_t flags;
58};
59
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);
64
65 void pw_buffers_clear(struct pw_buffers *buffers);
66
71#ifdef __cplusplus
72}
73#endif
74
75#endif /* PIPEWIRE_BUFFERS_H */
pw_buffers_negotiate
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
pw_buffers_clear
void pw_buffers_clear(struct pw_buffers *buffers)
Definition: buffers.c:361
node.h
spa/node/node.h
context.h
pipewire/context.h
mem.h
pipewire/mem.h
pw_buffers
Definition: src/pipewire/buffers.h:63
pw_buffers::flags
uint32_t flags
flags
Definition: src/pipewire/buffers.h:67
pw_buffers::n_buffers
uint32_t n_buffers
number of port buffers
Definition: src/pipewire/buffers.h:66
pw_buffers::buffers
struct spa_buffer ** buffers
port buffers
Definition: src/pipewire/buffers.h:65
pw_buffers::mem
struct pw_memblock * mem
allocated buffer memory
Definition: src/pipewire/buffers.h:64
pw_context
pw_memblock
Memory block structure.
Definition: src/pipewire/mem.h:83
spa_buffer
A Buffer.
Definition: buffer/buffer.h:109
spa_node
Definition: spa/include/spa/node/node.h:61