PipeWire 0.2.6

Functions
stream.c File Reference
Include dependency graph for stream.c:

## Functions
SPA_EXPORT const char * | pw_stream_state_as_string (enum pw_stream_state state)
SPA_EXPORT struct pw_stream * | pw_stream_new (struct pw_remote *remote, const char *name, struct pw_properties *props)
SPA_EXPORT 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)
SPA_EXPORT enum pw_stream_state | pw_stream_get_state (struct pw_stream *stream, const char **error)
SPA_EXPORT const char * | pw_stream_get_name (struct pw_stream *stream)
SPA_EXPORT const struct pw_properties * | pw_stream_get_properties (struct pw_stream *stream)
SPA_EXPORT void | pw_stream_add_listener (struct pw_stream *stream, struct spa_hook *listener, const struct pw_stream_events *events, void *data)
SPA_EXPORT void | pw_stream_destroy (struct pw_stream *stream)
SPA_EXPORT 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)
SPA_EXPORT struct pw_remote * | pw_stream_get_remote (struct pw_stream *stream)
SPA_EXPORT uint32_t | pw_stream_get_node_id (struct pw_stream *stream)
SPA_EXPORT void | pw_stream_finish_format (struct pw_stream *stream, int res, const struct spa_pod **params, uint32_t n_params)
SPA_EXPORT int | pw_stream_disconnect (struct pw_stream *stream)
SPA_EXPORT int | pw_stream_set_active (struct pw_stream *stream, bool active)
SPA_EXPORT int | pw_stream_get_time (struct pw_stream *stream, struct pw_time *time)
SPA_EXPORT int | pw_stream_set_control (struct pw_stream *stream, const char *name, float value)
| Set a control value. More...
SPA_EXPORT int | pw_stream_get_control (struct pw_stream *stream, const char *name, float *value)
| Get a control value. More...
SPA_EXPORT 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...
SPA_EXPORT 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...

## Function Documentation

## ◆ pw_stream_add_listener()

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

## ◆ pw_stream_connect()

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

References PW_DIRECTION_INPUT.

## ◆ pw_stream_dequeue_buffer()

SPA_EXPORT 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_destroy()

SPA_EXPORT void pw_stream_destroy | ( | struct pw_stream * | stream | ) |

References pw_log::pw_log_debug(), and pw_stream::pw_stream_disconnect().

## ◆ pw_stream_disconnect()

SPA_EXPORT int pw_stream_disconnect | ( | struct pw_stream * | stream | ) |

References pw_log::pw_log_debug().

## ◆ pw_stream_finish_format()

SPA_EXPORT void pw_stream_finish_format | ( | struct pw_stream * | stream,
|  | int | res,
|  | const struct spa_pod ** | params,
|  | uint32_t | n_params
| ) |  |

References pw_log::pw_log_debug().

## ◆ pw_stream_get_control()

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

Get a control value.

## ◆ pw_stream_get_name()

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

## ◆ pw_stream_get_node_id()

SPA_EXPORT uint32_t pw_stream_get_node_id | ( | struct pw_stream * | stream | ) |

## ◆ pw_stream_get_properties()

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

## ◆ pw_stream_get_remote()

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

## ◆ pw_stream_get_state()

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

## ◆ pw_stream_get_time()

SPA_EXPORT int pw_stream_get_time | ( | struct pw_stream * | stream,
|  | struct pw_time * | time
| ) |  |

References pw_time::queued.

## ◆ pw_stream_new()

SPA_EXPORT struct pw_stream* pw_stream_new | ( | struct pw_remote * | remote,
|  | const char * | name,
|  | struct pw_properties * | props
| ) |  |

References pw_log::pw_log_debug(), pw_properties::pw_properties_get(), pw_properties::pw_properties_new(), pw_properties::pw_properties_set(), and impl::this.

## ◆ pw_stream_new_simple()

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

SPA_EXPORT 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_active()

SPA_EXPORT int pw_stream_set_active | ( | struct pw_stream * | stream,
|  | bool | active
| ) |  |

## ◆ pw_stream_set_control()

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

Set a control value.

## ◆ pw_stream_state_as_string()

SPA_EXPORT const char* pw_stream_state_as_string | ( | enum pw_stream_state | state | ) |

References PW_STREAM_STATE_CONFIGURE, PW_STREAM_STATE_CONNECTING, PW_STREAM_STATE_ERROR, PW_STREAM_STATE_PAUSED, PW_STREAM_STATE_READY, PW_STREAM_STATE_STREAMING, and PW_STREAM_STATE_UNCONNECTED.