PipeWire: stream.h File Reference

PipeWire 0.2.6

Data Structures | Macros | Enumerations | Functions
stream.h File Reference
Include dependency graph for stream.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Data Structures
struct | pw_buffer
struct | pw_stream_events
| Events for a stream. More...
struct | pw_time
| A time structure. More...

## Macros
#define | PW_VERSION_STREAM_EVENTS 0
#define | PW_STREAM_PROP_IS_LIVE "pipewire.latency.is-live"
| Indicates that the stream is live, boolean default false. More...
#define | PW_STREAM_PROP_LATENCY_MIN "pipewire.latency.min"
| The minimum latency of the stream, int, default 0. More...
#define | PW_STREAM_PROP_LATENCY_MAX "pipewire.latency.max"
| The maximum latency of the stream, int default MAXINT. More...
#define | PW_STREAM_CONTROL_VOLUME "volume"
| Audio controls. More...
#define | PW_STREAM_CONTROL_CONTRAST "contrast"
| Video controls. More...
#define | PW_STREAM_CONTROL_BRIGHTNESS "brightness"
#define | PW_STREAM_CONTROL_HUE "hue"
#define | PW_STREAM_CONTROL_SATURATION "saturation"

## Enumerations
enum | pw_stream_state { PW_STREAM_STATE_ERROR = -1, PW_STREAM_STATE_UNCONNECTED = 0, PW_STREAM_STATE_CONNECTING = 1, PW_STREAM_STATE_CONFIGURE = 2, PW_STREAM_STATE_READY = 3, PW_STREAM_STATE_PAUSED = 4, PW_STREAM_STATE_STREAMING = 5 }
| The state of a stream. More...
enum | pw_stream_flags { PW_STREAM_FLAG_NONE = 0, PW_STREAM_FLAG_AUTOCONNECT = (1 << 0), PW_STREAM_FLAG_INACTIVE = (1 << 1), PW_STREAM_FLAG_MAP_BUFFERS = (1 << 2), PW_STREAM_FLAG_DRIVER = (1 << 3), PW_STREAM_FLAG_RT_PROCESS = (1 << 4), PW_STREAM_FLAG_NO_CONVERT = (1 << 5), PW_STREAM_FLAG_EXCLUSIVE = (1 << 6) }
| Extra flags that can be used in pw_stream_connect() More...

## Functions
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)
void | pw_stream_add_listener (struct pw_stream *stream, struct spa_hook *listener, const struct pw_stream_events *events, void *data)
enum pw_stream_state | pw_stream_get_state (struct pw_stream *stream, const char **error)
const char * | pw_stream_get_name (struct pw_stream *stream)
struct pw_remote * | pw_stream_get_remote (struct pw_stream *stream)
const struct pw_properties * | pw_stream_get_properties (struct pw_stream *stream)
int | pw_stream_set_control (struct pw_stream *stream, const char *name, float value)
| Set a control value. More...
int | pw_stream_get_control (struct pw_stream *stream, const char *name, float *value)
| Get a control value. More...
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. More...
int | pw_stream_queue_buffer (struct pw_stream *stream, struct pw_buffer *buffer)
| Submit a buffer for playback or recycle a buffer for capture. More...

## Macro Definition Documentation

## ◆ PW_STREAM_CONTROL_BRIGHTNESS

#define PW_STREAM_CONTROL_BRIGHTNESS "brightness"

## ◆ PW_STREAM_CONTROL_CONTRAST

#define PW_STREAM_CONTROL_CONTRAST "contrast"

Video controls.

## ◆ PW_STREAM_CONTROL_HUE

#define PW_STREAM_CONTROL_HUE "hue"

## ◆ PW_STREAM_CONTROL_SATURATION

#define PW_STREAM_CONTROL_SATURATION "saturation"

## ◆ PW_STREAM_CONTROL_VOLUME

#define PW_STREAM_CONTROL_VOLUME "volume"

Audio controls.

## ◆ PW_STREAM_PROP_IS_LIVE

#define PW_STREAM_PROP_IS_LIVE "pipewire.latency.is-live"

Indicates that the stream is live, boolean default false.

## ◆ PW_STREAM_PROP_LATENCY_MAX

#define PW_STREAM_PROP_LATENCY_MAX "pipewire.latency.max"

The maximum latency of the stream, int default MAXINT.

## ◆ PW_STREAM_PROP_LATENCY_MIN

#define PW_STREAM_PROP_LATENCY_MIN "pipewire.latency.min"

The minimum latency of the stream, int, default 0.

## ◆ PW_VERSION_STREAM_EVENTS

#define PW_VERSION_STREAM_EVENTS 0

## Enumeration Type Documentation

## ◆ pw_stream_flags

enum pw_stream_flags

Extra flags that can be used in pw_stream_connect()

Enumerator
PW_STREAM_FLAG_NONE | no flags
PW_STREAM_FLAG_AUTOCONNECT | try to automatically connect this stream
PW_STREAM_FLAG_INACTIVE | start the stream inactive
PW_STREAM_FLAG_MAP_BUFFERS | mmap the buffers
PW_STREAM_FLAG_DRIVER | be a driver
PW_STREAM_FLAG_RT_PROCESS | call process from the realtime thread
PW_STREAM_FLAG_NO_CONVERT | don't convert format
PW_STREAM_FLAG_EXCLUSIVE | require exclusive access to the device

## ◆ pw_stream_state

enum pw_stream_state

The state of a stream.

Enumerator
PW_STREAM_STATE_ERROR | the strean is in error
PW_STREAM_STATE_UNCONNECTED | unconnected
PW_STREAM_STATE_CONNECTING | connection is in progress
PW_STREAM_STATE_CONFIGURE | stream is being configured
PW_STREAM_STATE_READY | stream is ready
PW_STREAM_STATE_PAUSED | paused, fully configured but not processing data yet
PW_STREAM_STATE_STREAMING | streaming

## Function Documentation

## ◆ pw_stream_add_listener()

void pw_stream_add_listener | ( | struct pw_stream * | stream,
|  | struct spa_hook * | listener,
|  | const struct pw_stream_events * | events,
|  | void * | data
| ) |  |

## ◆ pw_stream_dequeue_buffer()

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.

## ◆ pw_stream_get_control()

int pw_stream_get_control | ( | struct pw_stream * | stream,
|  | const char * | name,
|  | float * | value
| ) |  |

Get a control value.

## ◆ pw_stream_get_name()

const char* pw_stream_get_name | ( | struct pw_stream * | stream | ) |

## ◆ pw_stream_get_properties()

const struct pw_properties* pw_stream_get_properties | ( | struct pw_stream * | stream | ) |

## ◆ pw_stream_get_remote()

struct pw_remote* pw_stream_get_remote | ( | struct pw_stream * | stream | ) |

## ◆ pw_stream_get_state()

enum pw_stream_state pw_stream_get_state | ( | struct pw_stream * | stream,
|  | const char ** | error
| ) |  |

## ◆ pw_stream_new_simple()

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
| ) |  |

Parameters

  loop | a pw_loop to use
  name | a stream name
  props | stream properties, ownership is taken
  events | stream events
  data | data passed to events

## ◆ pw_stream_queue_buffer()

int pw_stream_queue_buffer | ( | struct pw_stream * | stream,
|  | struct pw_buffer * | buffer
| ) |  |

Submit a buffer for playback or recycle a buffer for capture.

## ◆ pw_stream_set_control()

int pw_stream_set_control | ( | struct pw_stream * | stream,
|  | const char * | name,
|  | float | value
| ) |  |

Set a control value.