PipeWire  0.3.33
stream.c File Reference

Data Structures

struct  buffer
 
struct  queue
 
struct  data
 user data to add to an object More...
 
struct  param
 
struct  control
 
struct  stream
 

Macros

#define NAME   "stream"
 
#define MAX_BUFFERS   64
 
#define MASK_BUFFERS   (MAX_BUFFERS-1)
 
#define MAX_PORTS   1
 
#define BUFFER_FLAG_MAPPED   (1 << 0)
 
#define BUFFER_FLAG_QUEUED   (1 << 1)
 
#define BUFFER_FLAG_ADDED   (1 << 2)
 
#define PARAM_FLAG_LOCKED   (1 << 0)
 
#define IDX_EnumFormat   0
 
#define IDX_Meta   1
 
#define IDX_IO   2
 
#define IDX_Format   3
 
#define IDX_Buffers   4
 
#define IDX_Latency   5
 
#define N_PORT_PARAMS   6
 
#define IDX_Props   0
 
#define N_NODE_PARAMS   1
 

Functions

struct pw_stream * pw_stream_new (struct pw_core *core, const char *name, struct pw_properties *props)
 Create a new unconneced Stream Object. More...
 
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)
 
const char * pw_stream_state_as_string (enum pw_stream_state state)
 Convert a stream state to a readable string. More...
 
void pw_stream_destroy (struct pw_stream *stream)
 Destroy a stream. More...
 
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)
 
const struct pw_propertiespw_stream_get_properties (struct pw_stream *stream)
 
int pw_stream_update_properties (struct pw_stream *stream, const struct spa_dict *dict)
 
struct pw_core * pw_stream_get_core (struct pw_stream *stream)
 
int pw_stream_connect (struct pw_stream *stream, enum pw_direction direction, uint32_t target_id, enum pw_stream_flags flags, const struct spa_pod **params, uint32_t n_params)
 Connect a stream for input or output on port_path. More...
 
uint32_t pw_stream_get_node_id (struct pw_stream *stream)
 Get the node ID of the stream. More...
 
int pw_stream_disconnect (struct pw_stream *stream)
 Disconnect stream
More...
 
int pw_stream_set_error (struct pw_stream *stream, int res, const char *error,...)
 
int pw_stream_update_params (struct pw_stream *stream, const struct spa_pod **params, uint32_t n_params)
 Complete the negotiation process with result code res. More...
 
int pw_stream_set_control (struct pw_stream *stream, uint32_t id, uint32_t n_values, float *values,...)
 Set control values. More...
 
const struct pw_stream_controlpw_stream_get_control (struct pw_stream *stream, uint32_t id)
 
int pw_stream_set_active (struct pw_stream *stream, bool active)
 Activate or deactivate the stream. More...
 
int pw_stream_get_time (struct pw_stream *stream, struct pw_time *time)
 Query the time on the stream
More...
 
struct pw_bufferpw_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...
 
int pw_stream_flush (struct pw_stream *stream, bool drain)
 Flush a stream. More...
 
bool pw_stream_is_driving (struct pw_stream *stream)
 Check if the stream is driving. More...
 
int pw_stream_trigger_process (struct pw_stream *stream)
 Trigger a push/pull on the stream. More...
 

Macro Definition Documentation

◆ BUFFER_FLAG_ADDED

#define BUFFER_FLAG_ADDED   (1 << 2)

◆ BUFFER_FLAG_MAPPED

#define BUFFER_FLAG_MAPPED   (1 << 0)

◆ BUFFER_FLAG_QUEUED

#define BUFFER_FLAG_QUEUED   (1 << 1)

◆ IDX_Buffers

#define IDX_Buffers   4

◆ IDX_EnumFormat

#define IDX_EnumFormat   0

◆ IDX_Format

#define IDX_Format   3

◆ IDX_IO

#define IDX_IO   2

◆ IDX_Latency

#define IDX_Latency   5

◆ IDX_Meta

#define IDX_Meta   1

◆ IDX_Props

#define IDX_Props   0

◆ MASK_BUFFERS

#define MASK_BUFFERS   (MAX_BUFFERS-1)

◆ MAX_BUFFERS

#define MAX_BUFFERS   64

◆ MAX_PORTS

#define MAX_PORTS   1

◆ N_NODE_PARAMS

#define N_NODE_PARAMS   1

◆ N_PORT_PARAMS

#define N_PORT_PARAMS   6

◆ NAME

#define NAME   "stream"

◆ PARAM_FLAG_LOCKED

#define PARAM_FLAG_LOCKED   (1 << 0)

Function Documentation

◆ pw_stream_get_control()

const struct pw_stream_control* pw_stream_get_control ( struct pw_stream *  stream,
uint32_t  id 
)

◆ pw_stream_set_error()

int pw_stream_set_error ( struct pw_stream *  stream,
int  res,
const char *  error,
  ... 
)

References pw_proxy_error().