20 #ifndef __PIPEWIRE_STREAM_H__ 21 #define __PIPEWIRE_STREAM_H__ 165 #include <spa/buffer.h> 166 #include <spa/format.h> 184 #define PW_VERSION_STREAM_EVENTS 0 244 struct spa_hook *listener,
253 #define PW_STREAM_PROP_IS_LIVE "pipewire.latency.is-live" 255 #define PW_STREAM_PROP_LATENCY_MIN "pipewire.latency.min" 257 #define PW_STREAM_PROP_LATENCY_MAX "pipewire.latency.max" 271 const char *port_path,
274 uint32_t n_possible_formats,
275 const struct spa_format **possible_formats );
294 struct spa_param **params,
A collection of key/value pairs.
Definition: properties.h:38
void(* format_changed)(void *data, struct spa_format *format)
when the format changed.
Definition: stream.h:194
void pw_stream_set_active(struct pw_stream *stream, bool active)
Definition: stream.c:1064
bool pw_stream_connect(struct pw_stream *stream, enum pw_direction direction, enum pw_stream_mode mode, const char *port_path, enum pw_stream_flags flags, uint32_t n_possible_formats, const struct spa_format **possible_formats)
Definition: stream.c:973
paused, fully configured but not processing data yet
Definition: stream.h:177
try to automatically connect this stream
Definition: stream.h:213
int64_t now
the monotonic time
Definition: stream.h:228
A time structure.
Definition: stream.h:227
void(* new_buffer)(void *data, uint32_t id)
when a buffer can be reused (for playback streams) or is filled (for capture streams ...
Definition: stream.h:202
uint32_t pw_stream_get_node_id(struct pw_stream *stream)
Definition: stream.c:1017
uint32_t pw_stream_get_empty_buffer(struct pw_stream *stream)
Definition: stream.c:1086
Events for a stream.
Definition: stream.h:183
pw_stream_state
The state of a stream.
Definition: stream.h:171
int64_t ticks
the ticks at now
Definition: stream.h:229
bool pw_stream_get_time(struct pw_stream *stream, struct pw_time *time)
Definition: stream.c:1070
stream is ready
Definition: stream.h:176
void pw_stream_destroy(struct pw_stream *stream)
Definition: stream.c:349
streaming
Definition: stream.h:179
PipeWire stream object class.
pw_stream_mode
The method for transfering data for a stream.
Definition: stream.h:221
enum pw_stream_state pw_stream_get_state(struct pw_stream *stream, const char **error)
Definition: stream.c:254
the strean is in error
Definition: stream.h:172
data is placed in buffers
Definition: stream.h:222
struct pw_stream * pw_stream_new(struct pw_remote *remote, const char *name, struct pw_properties *props)
Definition: stream.c:202
Represents a connection with a remote PipeWire instance.
void(* destroy)(void *data)
Definition: stream.h:187
start the stream inactive
Definition: stream.h:217
a ringbuffer is used to exchange data
Definition: stream.h:223
bool pw_stream_send_buffer(struct pw_stream *stream, uint32_t id)
Definition: stream.c:1134
const char * pw_stream_get_name(struct pw_stream *stream)
Definition: stream.c:261
const struct pw_properties * pw_stream_get_properties(struct pw_stream *stream)
Definition: stream.c:266
pw_stream_flags
Extra flags that can be used in pw_stream_connect()
Definition: stream.h:211
void pw_stream_add_listener(struct pw_stream *stream, struct spa_hook *listener, const struct pw_stream_events *events, void *data)
Definition: stream.c:271
void(* state_changed)(void *data, enum pw_stream_state old, enum pw_stream_state state, const char *error)
when the stream state changes
Definition: stream.h:189
void(* need_buffer)(void *data)
when a buffer is needed (for playback streams)
Definition: stream.h:204
void pw_stream_finish_format(struct pw_stream *stream, int res, struct spa_param **params, uint32_t n_params)
Definition: stream.c:1023
void(* remove_buffer)(void *data, uint32_t id)
when a buffer was destroyed for this stream
Definition: stream.h:199
void(* add_buffer)(void *data, uint32_t id)
when a new buffer was created for this stream
Definition: stream.h:197
connection is in progress
Definition: stream.h:174
request periodic clock updates for this stream
Definition: stream.h:215
struct spa_buffer * pw_stream_peek_buffer(struct pw_stream *stream, uint32_t id)
Definition: stream.c:1124
const char * pw_stream_state_as_string(enum pw_stream_state state)
Definition: stream.c:181
uint32_t version
Definition: stream.h:185
int32_t rate
the rate of ticks
Definition: stream.h:230
unconnected
Definition: stream.h:173
bool pw_stream_recycle_buffer(struct pw_stream *stream, uint32_t id)
Definition: stream.c:1099
stream is being configured
Definition: stream.h:175
no flags
Definition: stream.h:212
pw_direction
The direction of a port.
Definition: introspect.h:47
void pw_stream_disconnect(struct pw_stream *stream)
Definition: stream.c:1046