PipeWire: impl-link.c File Reference

PipeWire 0.3.26

Macros | Functions
impl-link.c File Reference
Include dependency graph for impl-link.c:

## Macros
#define | NAME "link"
#define | pw_link_resource_info(r, ...) pw_resource_call(r,struct pw_link_events,info,0,__VA_ARGS__)

## Functions
int | pw_impl_link_activate (struct pw_impl_link *this)
int | pw_impl_link_prepare (struct pw_impl_link *this)
int | pw_impl_link_deactivate (struct pw_impl_link *this)
SPA_EXPORT struct pw_impl_link * | pw_context_create_link (struct pw_context *context, struct pw_impl_port *output, struct pw_impl_port *input, struct spa_pod *format_filter, struct pw_properties *properties, size_t user_data_size)
SPA_EXPORT int | pw_impl_link_register (struct pw_impl_link *link, struct pw_properties *properties)
| Finish link configuration and register. More...
SPA_EXPORT void | pw_impl_link_destroy (struct pw_impl_link *link)
SPA_EXPORT void | pw_impl_link_add_listener (struct pw_impl_link *link, struct spa_hook *listener, const struct pw_impl_link_events *events, void *data)
| Add an event listener to link. More...
struct pw_impl_link * | pw_impl_link_find (struct pw_impl_port *output_port, struct pw_impl_port *input_port)
SPA_EXPORT struct pw_context * | pw_impl_link_get_context (struct pw_impl_link *link)
| Get the context of a link. More...
SPA_EXPORT void * | pw_impl_link_get_user_data (struct pw_impl_link *link)
| Get the user_data of a link, the size of the memory is given when constructing the link. More...
SPA_EXPORT const struct pw_link_info * | pw_impl_link_get_info (struct pw_impl_link *link)
| Get the link info. More...
SPA_EXPORT struct pw_global * | pw_impl_link_get_global (struct pw_impl_link *link)
| Get the global of the link. More...
SPA_EXPORT struct pw_impl_port * | pw_impl_link_get_output (struct pw_impl_link *link)
| Get the output port of the link. More...
SPA_EXPORT struct pw_impl_port * | pw_impl_link_get_input (struct pw_impl_link *link)
| Get the input port of the link. More...

## Macro Definition Documentation

## ◆ NAME

#define NAME "link"

## ◆ pw_link_resource_info

#define pw_link_resource_info | ( |  | r,
|  |  | ...
| ) |  | pw_resource_call(r,struct pw_link_events,info,0,__VA_ARGS__)

## Function Documentation

## ◆ pw_context_create_link()

SPA_EXPORT struct pw_impl_link* pw_context_create_link | ( | struct pw_context * | context,
|  | struct pw_impl_port * | output,
|  | struct pw_impl_port * | input,
|  | struct spa_pod * | format_filter,
|  | struct pw_properties * | properties,
|  | size_t | user_data_size
| ) |  |

## ◆ pw_impl_link_activate()

int pw_impl_link_activate | ( | struct pw_impl_link * | this | ) |

References NAME, pw_link_state_as_string(), pw_log::pw_log_debug, res, and impl::this.

## ◆ pw_impl_link_add_listener()

SPA_EXPORT void pw_impl_link_add_listener | ( | struct pw_impl_link * | link,
|  | struct spa_hook * | listener,
|  | const struct pw_impl_link_events * | events,
|  | void * | data
| ) |  |

Add an event listener to link.

References NAME, and pw_log::pw_log_debug.

## ◆ pw_impl_link_deactivate()

int pw_impl_link_deactivate | ( | struct pw_impl_link * | this | ) |

References NAME, pw_log::pw_log_debug, and pw_loop_invoke.

Referenced by pw_impl_link::pw_impl_link_destroy().

## ◆ pw_impl_link_destroy()

SPA_EXPORT void pw_impl_link_destroy | ( | struct pw_impl_link * | link | ) |

## ◆ pw_impl_link_find()

struct pw_impl_link* pw_impl_link_find | ( | struct pw_impl_port * | output_port,
|  | struct pw_impl_port * | input_port
| ) |  |

## ◆ pw_impl_link_get_context()

SPA_EXPORT struct pw_context* pw_impl_link_get_context | ( | struct pw_impl_link * | link | ) |

Get the context of a link.

## ◆ pw_impl_link_get_global()

SPA_EXPORT struct pw_global* pw_impl_link_get_global | ( | struct pw_impl_link * | link | ) |

Get the global of the link.

## ◆ pw_impl_link_get_info()

SPA_EXPORT const struct pw_link_info* pw_impl_link_get_info | ( | struct pw_impl_link * | link | ) |

Get the link info.

## ◆ pw_impl_link_get_input()

SPA_EXPORT struct pw_impl_port* pw_impl_link_get_input | ( | struct pw_impl_link * | link | ) |

Get the input port of the link.

## ◆ pw_impl_link_get_output()

SPA_EXPORT struct pw_impl_port* pw_impl_link_get_output | ( | struct pw_impl_link * | link | ) |

Get the output port of the link.

## ◆ pw_impl_link_get_user_data()

SPA_EXPORT void* pw_impl_link_get_user_data | ( | struct pw_impl_link * | link | ) |

Get the user_data of a link, the size of the memory is given when constructing the link.

## ◆ pw_impl_link_prepare()

int pw_impl_link_prepare | ( | struct pw_impl_link * | this | ) |

References NAME, pw_log::pw_log_debug, and pw_work_queue::pw_work_queue_add().

## ◆ pw_impl_link_register()

SPA_EXPORT int pw_impl_link_register | ( | struct pw_impl_link * | link,
|  | struct pw_properties * | properties
| ) |  |

Finish link configuration and register.

Parameters

  link | the link to register
  properties | extra properties

References pw_global::pw_global_new(), PW_KEY_CLIENT_ID, PW_KEY_FACTORY_ID, PW_KEY_LINK_INPUT_NODE, PW_KEY_LINK_INPUT_PORT, PW_KEY_LINK_OUTPUT_NODE, PW_KEY_LINK_OUTPUT_PORT, PW_KEY_MODULE_ID, PW_KEY_OBJECT_PATH, PW_TYPE_INTERFACE_Link, and PW_VERSION_LINK.