20 #ifndef __PIPEWIRE_STREAM_H__ 21 #define __PIPEWIRE_STREAM_H__ 149 #include <spa/buffer/buffer.h> 150 #include <spa/param/param.h> 178 #define PW_VERSION_STREAM_EVENTS 0 181 void (*destroy) (
void *data);
188 void (*format_changed) (
void *data,
const struct spa_pod *format);
199 void (*process) (
void *data);
238 struct spa_hook *listener,
249 #define PW_STREAM_PROP_IS_LIVE "pipewire.latency.is-live" 251 #define PW_STREAM_PROP_LATENCY_MIN "pipewire.latency.min" 253 #define PW_STREAM_PROP_LATENCY_MAX "pipewire.latency.max" 265 const char *port_path,
268 const struct spa_pod **params,
290 const struct spa_pod **params,
297 #define PW_STREAM_CONTROL_VOLUME "volume" 300 #define PW_STREAM_CONTROL_CONTRAST "contrast" 301 #define PW_STREAM_CONTROL_BRIGHTNESS "brightness" 302 #define PW_STREAM_CONTROL_HUE "hue" 303 #define PW_STREAM_CONTROL_SATURATION "saturation" 316 struct spa_fraction rate;
int pw_stream_queue_buffer(struct pw_stream *stream, struct pw_buffer *buffer)
Submit a buffer for playback or recycle a buffer for capture.
Definition: stream.c:1404
uint64_t delay
delay to device, add to ticks for INPUT streams and subtract from ticks for OUTPUT streams to get the...
Definition: stream.h:319
uint64_t ticks
the ticks at now.
Definition: stream.h:317
A collection of key/value pairs.
Definition: properties.h:38
int pw_stream_set_control(struct pw_stream *stream, const char *name, float value)
Set a control value.
Definition: stream.c:1380
void pw_stream_finish_format(struct pw_stream *stream, int res, const struct spa_pod **params, uint32_t n_params)
Definition: stream.c:1308
require exclusive access to the device
Definition: stream.h:216
paused, fully configured but not processing data yet
Definition: stream.h:161
try to automatically connect this stream
Definition: stream.h:208
int64_t now
the monotonic time
Definition: stream.h:315
PipeWire loop object provides an implementation of the spa loop interfaces.
Definition: loop.h:37
A time structure.
Definition: stream.h:314
uint32_t pw_stream_get_node_id(struct pw_stream *stream)
Definition: stream.c:1302
Events for a stream.
Definition: stream.h:177
int pw_stream_get_control(struct pw_stream *stream, const char *name, float *value)
Get a control value.
Definition: stream.c:1385
pw_stream_state
The state of a stream.
Definition: stream.h:155
mmap the buffers
Definition: stream.h:211
int pw_stream_disconnect(struct pw_stream *stream)
Definition: stream.c:1332
stream is ready
Definition: stream.h:160
uint64_t queued
data queued in the stream, this is the sum of the size fields in the pw_buffer that are currently que...
Definition: stream.h:322
int pw_stream_set_active(struct pw_stream *stream, bool active)
Definition: stream.c:1349
void pw_stream_destroy(struct pw_stream *stream)
Definition: stream.c:529
streaming
Definition: stream.h:163
PipeWire stream object class.
enum pw_stream_state pw_stream_get_state(struct pw_stream *stream, const char **error)
Definition: stream.c:433
don't convert format
Definition: stream.h:215
be a driver
Definition: stream.h:212
the strean is in error
Definition: stream.h:156
struct pw_stream * pw_stream_new(struct pw_remote *remote, const char *name, struct pw_properties *props)
Definition: stream.c:373
Represents a connection with a remote PipeWire instance.
int pw_stream_connect(struct pw_stream *stream, enum pw_direction direction, const char *port_path, enum pw_stream_flags flags, const struct spa_pod **params, uint32_t n_params)
Definition: stream.c:1256
struct pw_stream * pw_stream_new_simple(struct pw_loop *loop, const char *name, struct pw_properties *props, const struct pw_stream_events *events, void *data)
Definition: stream.c:427
struct pw_buffer * pw_stream_dequeue_buffer(struct pw_stream *stream)
Get a buffer that can be filled for playback streams or consumed for capture streams.
Definition: stream.c:1390
uint64_t size
Definition: stream.h:169
start the stream inactive
Definition: stream.h:210
const char * pw_stream_get_name(struct pw_stream *stream)
Definition: stream.c:440
const struct pw_properties * pw_stream_get_properties(struct pw_stream *stream)
Definition: stream.c:445
pw_stream_flags
Extra flags that can be used in pw_stream_connect()
Definition: stream.h:206
void pw_stream_add_listener(struct pw_stream *stream, struct spa_hook *listener, const struct pw_stream_events *events, void *data)
Definition: stream.c:450
call process from the realtime thread
Definition: stream.h:213
struct spa_buffer * buffer
Definition: stream.h:167
connection is in progress
Definition: stream.h:158
struct pw_remote * pw_stream_get_remote(struct pw_stream *stream)
Definition: stream.c:1296
int pw_stream_get_time(struct pw_stream *stream, struct pw_time *time)
Definition: stream.c:1361
const char * pw_stream_state_as_string(enum pw_stream_state state)
Definition: stream.c:352
uint32_t version
Definition: stream.h:179
unconnected
Definition: stream.h:157
stream is being configured
Definition: stream.h:159
void * user_data
Definition: stream.h:168
no flags
Definition: stream.h:207
pw_direction
The direction of a port.
Definition: introspect.h:47