Crate pipewire_sys[−][src]
Structs
\addtogroup pw_array {
Client events
The client information. Extra information can be added in later versions
Client methods
information about a buffer
\ref pw_client_node events
\ref pw_client_node methods
\addtogroup pw_context @{
context events emitted by the context object added with \ref pw_context_add_listener
\addtogroup pw_control {
Port events, use \ref pw_control_add_listener
\struct pw_core_events \brief Core events \ingroup pw_core_interface The pw_core interface
The core information. Extra information can be added in later versions
\struct pw_core_methods \brief Core methods
\addtogroup pw_data_loop {
Loop events, use \ref pw_data_loop_add_listener to add a listener
Device events
The device information. Extra information can be added in later versions
Device methods
data for registering export functions
Factory events
The factory information. Extra information can be added in later versions
Factory methods
\addtogroup pw_filter {
Events for a filter. These events are always called from the mainloop unless explicitly documented otherwise.
\addtogroup pw_global {
Global events, use \ref pw_global_add_listener
\page page_implementation_api Implementation API
The events that a client can emit
\addtogroup pw_impl_core {
Factory events, listen to them with \ref pw_impl_core_add_listener
\addtogroup pw_impl_device {
Device events, listen to them with \ref pw_impl_device_add_listener
\addtogroup pw_impl_factory {
Factory events, listen to them with \ref pw_impl_factory_add_listener
\addtogroup pw_impl_link {
link events added with \ref pw_impl_link_add_listener
\addtogroup pw_impl_metadata {
Metadata events, listen to them with \ref pw_impl_metadata_add_listener
\addtogropu pw_impl_module {
Module events added with \ref pw_impl_module_add_listener
\defgroup pw_impl_node Node
Node events, listen to them with \ref pw_impl_node_add_listener
\addtogroup pw_impl_port {
Port events, use \ref pw_impl_port_add_listener
Link events
The link information. Extra information can be added in later versions
Link methods
\addtogroup pw_loop {
A main loop object
Events of the main loop
A map
parameters to map a memory range
Memory block structure
a mapped region of a pw_memblock
A memory pool is a collection of pw_memblocks
\ref pw_metadata events
\ref pw_metadata methods
Module events
The module information. Extra information can be added in later versions
Module methods
Node events
The node information. Extra information can be added in later versions
Node methods
Port events
Port methods
\ref pw_profiler events
\ref pw_profiler methods
\addtogroup pw_properties {
\addtogroup pw_protocol {
\ref pw_protocol_native_ext methods
\addtogroup pw_proxy {
Proxy events, use \ref pw_proxy_add_listener
Registry events
Registry methods
\addtogroup pw_resource {
Resource events
\addtogroup pw_stream {
Events for a stream. These events are always called from the mainloop unless explicitly documented otherwise.
\addtogroup pw_thread_loop {
Thread loop events
A time structure
\addtogroup pw_work_queue {
Constants
< don’t call the default latency algorithm but emit the param_changed event for the ports when Latency params are received.
< be a driver
< start the filter inactive, pw_filter_set_active() needs to be called explicitly
< no flags
< call process from the realtime thread
< the application will allocate buffer memory. In the add_buffer event, the data of the buffer should be set
< mmap the buffers except DmaBuf
< connection is in progress
< the stream is in error
< filter is connected and paused
< filter is streaming
< unconnected
< the port is ready for format negotiation
< the port is in error
< the port is being created
< the port is paused
< the port is ready for buffer allocation
< the link is active
< the link is allocating buffers
< the link is in error
< the link is initialized
< the link is negotiating formats
< the link is paused
< the link is unlinked
< don’t close fd
< don’t notify events
< mmap the fd
< memory is readable
< seal the fd
< memory is writable
< lock the memory into RAM
< writes will be private
< map in read mode
< map the same area twice after each other, creating a circular ringbuffer
< map in write mode
< the node is being created
< error state
< the node is running but there is no active port
< the node is running
< the node is suspended, the device might be closed
< the application will allocate buffer memory. In the add_buffer event, the data of the buffer should be set
< try to automatically connect this stream
< don’t try to reconnect this stream when the sink/source is removed
< be a driver
< require exclusive access to the device
< start the stream inactive, pw_stream_set_active() needs to be called explicitly
< mmap the buffers except DmaBuf
< no flags
< don’t convert format
< call process from the realtime thread. You MUST use RT safe functions in the process callback.
< connection is in progress
< the stream is in error
< streaming
< unconnected
Statics
\addtogroup pw_log {
Functions
Free a \ref pw_client_info
Update and existing \ref pw_client_info with \a update
Add a new event listener to a context
add a spa library for the given factory_name regex
Connect to a PipeWire instance \return a \ref pw_core on success or NULL with errno set on error. The core will have an id of PW_ID_CORE (0)
Connect to a PipeWire instance on the given socket \param context a \ref pw_context \param fd the connected socket to use, the socket will be closed automatically on disconnect or error. \param properties optional properties, ownership of the properties is taken. \param user_data_size extra user data size \return a \ref pw_core on success or NULL with errno set on error
Connect to a given PipeWire instance \return a \ref pw_core on success or NULL with errno set on error
Create a new client. This is mainly used by protocols.
Make a new link between two ports \return a newly allocated link
Create a new node
Create a new port \return a newly allocated port
destroy a context object, all resources except the main_loop will be destroyed
find information about registered export type
Find a factory by name
Find a context global by id
find the library name for a spa factory
Iterate the globals of the context. The callback should return 0 to fetch the next item, any other value stops the iteration and returns the value. When all callbacks return 0, this function returns 0 when all globals are iterated.
Get a config section for this context. Since 0.3.22
get the context main loop
get an object from the context
Get the context properties
Get the context support objects
Get the context user data
Get the work queue from the context: Since 0.3.26
Make a new context object for a given main_loop. Ownership of the properties is taken
register a type that can be exported on a context_proxy. This is usually used by extension modules
add an object to the context
Update the context properties
Add an event listener on the control
Get the control parent port or NULL when not set
disconnect and destroy a core
Export an object into the PipeWire instance associated with core
Get the proxy with the given id
Get the client proxy of the connected core. This will have the id of PW_ID_CLIENT (1)
Get the context object used to created this core
Get the core mempool object
Get properties from the core
Get the user_data. It is of the size specified when this object was constructed
Free a \ref pw_core_info
Update and existing \ref pw_core_info with \a update
Pause or resume the core. When the core is paused, no new events will be dispatched until the core is resumed again.
Steal the fd of the core connection or < 0 on error. The core will be disconnected after this call.
Update the core properties. This updates the properties of the associated client. \return the number of properties that were updated
Add an event listener to loop
Destroy the loop
make sure the thread will exit. Can be called from a loop callback
Get the loop implementation of this data loop
Get the thread object
Check if the current thread is the processing thread
invoke func in the context of the thread or in the caller thread when the loop is not running. Since 0.3.3
Make a new loop.
Start the processing thread
Stop the processing thread
wait for activity on the loop up to \a timeout milliseconds. Should be called from the loop function
Free a \ref pw_device_info
Update and existing \ref pw_device_info with \a update
Convert a \ref pw_direction to a readable string
add a port to the filter, returns user data of port_data_size.
Connect a filter for processing. \return 0 on success < 0 on error.
Get a buffer that can be filled for output ports or consumed for input ports.
Destroy a filter
Disconnect \a filter
Flush a filter. When \a drain is true, the drained callback will be called when all data is played or recorded
Get a data pointer to the buffer data
Get the node ID of the filter. \return node ID.
get properties, port_data of NULL will give global properties
Query the time on the filter
Create a new unconneced \ref pw_filter \return a newly allocated \ref pw_filter
Submit a buffer for playback or recycle a buffer for capture.
remove a port from the filter
Activate or deactivate the filter
Set the filter in error state
Convert a filter state to a readable string
Update params, use NULL port_data for global filter params
Update properties, use NULL port_data for global filter properties
Return the version of the library the current application is linked to.
Add an event listener on the global
Add a resource to a global
Let a client bind to a global
Destroy a global
Iterate all resources added to the global The callback should return 0 to fetch the next item, any other value stops the iteration and returns the value. When all callbacks return 0, this function returns 0 when all items are iterated.
Get the context object of this global
Get the unique id of the global
Get the object associated with the global. This depends on the type of the global
Get the permissions of the global for a given client
Get the global properties
Get the global type
Get the global version
Check a global type
Create a new global object
Register a global object to the context registry
Update the global properties, must be done when unregistered
listen to events from this client
check if a client has permissions for global_id, Since 0.3.9
Destroy a previously created client
Get a resource with the given id
Get the context used to create this client
Get the client core resource
Get the global associated with this client
Get the client information
Get the client properties
Get the protocol used to create this client
Get the client user data
Finish configuration and register a client
Mark the client busy. This can be used when an asynchronous operation is started and no further processing is allowed to happen for the client
Update the client permissions
Update the client properties
Add an event listener
Get the global of this core
Get the core information
Get the core properties
Update the core properties
Add an event listener
Get the global of this device
Get the device implementation
Set the device implementation
Add an event listener
Get the global of this factory
Get the factory info
Get the factory properties
Update the factory properties
Add an event listener to \a link
Destroy a link
Find the link between 2 ports
Get the context of a link
Get the global of the link
Get the link info
Get the input port of the link
Get the output port of the link
Get the user_data of a link, the size of the memory is given when constructing the link
Finish link configuration and register
Add an event listener
Get the global of this metadata
Get the metadata properties
Set a property
Add an event listener to a module
Destroy a module
Get the context of a module
Get the global of a module
Get the module info
Get the node properties
Update the module properties
Add an event listener
Destroy a node
Find the port with direction and port_id or NULL when not found. Passing PW_ID_ANY for port_id will return any port, preferably an unlinked one.
Iterate the ports in the given direction. The callback should return 0 to fetch the next item, any other value stops the iteration and returns the value. When all callbacks return 0, this function returns 0 when all items are iterated.
Get the context of this node
Get a free unused port_id from the node
Get the global of this node
Get the node implementation
Get the node info
Get the node properties
Get node user_data. The size of the memory was given in \ref pw_context_create_node
Check if a node is active
Complete initialization of the node and register
Set a node active. This will start negotiation with all linked active nodes and start data transport
Set the node implementation
Update the node properties
Add a port to a node
Add an event listener on the port
Get the port direction
Get the port id
Get the port info
Get the port parent node or NULL when not yet set
Get the port properties
check is a port has links, return 0 if not, 1 if it is linked
Update the port properties
Convert a \ref pw_link_state to a readable string
Get the log interface
Log a message
Log a message
Configure a logging module. This is usually done automatically in pw_init() but you can install a custom logger before calling pw_init().
Configure the logging level
Add an event listener
Destroy a loop
Get the loop implementation
Create a new main loop.
Quit a main loop
Run a main loop. This blocks until \ref pw_main_loop_quit is called
Free a memblock regardless of the refcount and destroy all mappings
Map a region of a memory block
Unmap a region
Listen for events
Allocate a memory block from the pool
Clear a pool
Clear and destroy a pool
Find memblock for given \a fd
Find memblock for given \a id
Find memblock for given \a ptr
find a map with the given tag
Import an fd into the pool
Import a block from another pool
Map a region of a memory block with \a id
Create a new memory pool
Remove a memblock for given \a id
Free a \ref pw_module_info
Update and existing \ref pw_module_info with \a update
Convert a \ref pw_node_state to a readable string
Add an event listener to proxy
Add a listener for the events received from the remote object. The events depend on the type of the remote object type.
destroy a proxy
Generate an error for a proxy
Get the global id bound to this proxy of SPA_ID_INVALID when not bound to a global
Get the local id of the proxy
Get the marshal functions for the proxy
Get the listener of proxy
Get the protocol used for the proxy
Get the type and version of the proxy
Get the user_data. The size was given in \ref pw_proxy_new
Install a marshal function on a proxy
Make a new proxy object. The id can be used to bind to a remote object and can be retrieved with \ref pw_proxy_get_id .
Set the global id this proxy is bound to. This is usually used internally and will also emit the bound event
Generate an sync method for a proxy. This will generate a done event with the same seq number of the reply.
Add an event listener
Set the resource implementation.
Destroy a resource
Generate an error for a resource
Get the global id this resource is bound to or SPA_ID_INVALID when not bound
Get the client owning this resource
Get the unique id of this resource
Get the marshal functions for the resource
Get the list of object listeners from a resource
Get the permissions of this resource
Get the protocol used for this resource
Get the type and optionally the version of this resource
Get the user data for the resource, the size was given in \ref pw_resource_new
install a marshal function on a resource
Make a new resource for client
Generate an ping event for a resource. This will generate a pong event with the same \a sequence number in the return value.
Remove a resource, like pw_resource_destroy but without sending a remove_id message to the client
Notify global id this resource is bound to
Connect a stream for input or output on \a port_path. \return 0 on success < 0 on error.
Get a buffer that can be filled for playback streams or consumed for capture streams.
Destroy a stream
Disconnect \a stream
Flush a stream. When \a drain is true, the drained callback will be called when all data is played or recorded
Get the node ID of the stream. \return node ID.
Query the time on the stream
Create a new unconneced \ref pw_stream \return a newly allocated \ref pw_stream
Submit a buffer for playback or recycle a buffer for capture.
Activate or deactivate the stream
Set control values
Set the stream in error state
Convert a stream state to a readable string
Complete the negotiation process with result code \a res
Signal all threads executing \ref pw_thread_loop_signal with wait_for_accept
Add an event listener
Destroy a thread loop
Get the loop implementation of the thread loop
Get a struct timespec suitable for \ref pw_thread_loop_timed_wait_full. Since: 0.3.7
Check if inside the thread
Lock the loop. This ensures exclusive ownership of the loop
Make a new thread loop with the given name and optional properties.
Make a new thread loop with the given loop, name and optional properties. When \a loop is NULL, a new loop will be created.
Signal all threads waiting with \ref pw_thread_loop_wait
Start the thread loop
Stop the thread loop
Release the lock and wait a maximum of ‘wait_max_sec’ seconds until some thread calls \ref pw_thread_loop_signal or time out
Release the lock and wait up to \a abstime until some thread calls \ref pw_thread_loop_signal. Use \ref pw_thread_loop_get_time to make a timeout. Since: 0.3.7
Unlock the loop
Release the lock and wait until some thread calls \ref pw_thread_loop_signal
Type Definitions
\addtogroup pw_type {
a function to destroy an item
\enum pw_filter_flags Extra flags that can be used in \ref pw_filter_connect()
\enum pw_filter_state The state of a filter
Module init function signature
\enum pw_link_state The different link states
Flags passed to \ref pw_mempool_alloc()
\enum pw_node_state The different node states
\enum pw_stream_flags Extra flags that can be used in \ref pw_stream_connect()
\enum pw_stream_state The state of a stream
Unions
An entry in the map