PipeWire 1.2.7
Loading...
Searching...
No Matches
pw_stream_events Struct Reference

Events for a stream. More...

#include <pipewire/stream.h>

Data Fields

uint32_t version
 
void(* destroy )(void *data)
 
void(* state_changed )(void *data, enum pw_stream_state old, enum pw_stream_state state, const char *error)
 when the stream state changes
 
void(* control_info )(void *data, uint32_t id, const struct pw_stream_control *control)
 Notify information about a control.
 
void(* io_changed )(void *data, uint32_t id, void *area, uint32_t size)
 when io changed on the stream.
 
void(* param_changed )(void *data, uint32_t id, const struct spa_pod *param)
 when a parameter changed
 
void(* add_buffer )(void *data, struct pw_buffer *buffer)
 when a new buffer was created for this stream
 
void(* remove_buffer )(void *data, struct pw_buffer *buffer)
 when a buffer was destroyed for this stream
 
void(* process )(void *data)
 when a buffer can be queued (for playback streams) or dequeued (for capture streams).
 
void(* drained )(void *data)
 The stream is drained.
 
void(* command )(void *data, const struct spa_command *command)
 A command notify, Since 0.3.39:1.
 
void(* trigger_done )(void *data)
 a trigger_process completed.
 

Detailed Description

Events for a stream.

These events are always called from the mainloop unless explicitly documented otherwise.

Examples
audio-capture.c, audio-src.c, tutorial4.c, tutorial5.c, video-dsp-src.c, video-play-fixate.c, video-play-pull.c, video-play-reneg.c, video-play.c, video-src-alloc.c, video-src-fixate.c, video-src-reneg.c, and video-src.c.

Field Documentation

◆ version

uint32_t pw_stream_events::version

◆ destroy

void(* pw_stream_events::destroy) (void *data)

◆ state_changed

void(* pw_stream_events::state_changed) (void *data, enum pw_stream_state old, enum pw_stream_state state, const char *error)

when the stream state changes

Examples
video-play-fixate.c, video-play-pull.c, video-play-reneg.c, and video-play.c.

◆ control_info

void(* pw_stream_events::control_info) (void *data, uint32_t id, const struct pw_stream_control *control)

Notify information about a control.


◆ io_changed

void(* pw_stream_events::io_changed) (void *data, uint32_t id, void *area, uint32_t size)

when io changed on the stream.

◆ param_changed

void(* pw_stream_events::param_changed) (void *data, uint32_t id, const struct spa_pod *param)

when a parameter changed

Examples
audio-capture.c, and tutorial5.c.

◆ add_buffer

void(* pw_stream_events::add_buffer) (void *data, struct pw_buffer *buffer)

when a new buffer was created for this stream

◆ remove_buffer

void(* pw_stream_events::remove_buffer) (void *data, struct pw_buffer *buffer)

when a buffer was destroyed for this stream

◆ process

void(* pw_stream_events::process) (void *data)

when a buffer can be queued (for playback streams) or dequeued (for capture streams).

This is normally called from the mainloop but can also be called directly from the realtime data thread if the user is prepared to deal with this.

Examples
audio-src.c, tutorial4.c, video-dsp-src.c, video-src-alloc.c, video-src-fixate.c, video-src-reneg.c, and video-src.c.

◆ drained

void(* pw_stream_events::drained) (void *data)

The stream is drained.

◆ command

void(* pw_stream_events::command) (void *data, const struct spa_command *command)

A command notify, Since 0.3.39:1.

◆ trigger_done

void(* pw_stream_events::trigger_done) (void *data)

a trigger_process completed.

Since version 0.3.40:2. This is normally called from the mainloop but since 1.1.0 it can also be called directly from the realtime data thread if the user is prepared to deal with this.


The documentation for this struct was generated from the following file: