| 1 |
/* WirePlumber |
| 2 |
* |
| 3 |
* Copyright © 2019 Collabora Ltd. |
| 4 |
* @author Julian Bouzas <[email protected]> |
| 5 |
* |
| 6 |
* SPDX-License-Identifier: MIT |
| 7 |
*/ |
| 8 |
|
| 9 |
#ifndef __WIREPLUMBER_LINK_H__ |
| 10 |
#define __WIREPLUMBER_LINK_H__ |
| 11 |
|
| 12 |
#include "global-proxy.h" |
| 13 |
|
| 14 |
G_BEGIN_DECLS |
| 15 |
|
| 16 |
/*! |
| 17 |
* \brief The state of the link |
| 18 |
* \ingroup wplink |
| 19 |
* |
| 20 |
* \since 0.4.11 |
| 21 |
*/ |
| 22 |
typedef enum { |
| 23 |
WP_LINK_STATE_ERROR = -2, /*!< the link is in error */ |
| 24 |
WP_LINK_STATE_UNLINKED = -1, /*!< the link is unlinked */ |
| 25 |
WP_LINK_STATE_INIT = 0, /*!< the link is initialized */ |
| 26 |
WP_LINK_STATE_NEGOTIATING = 1, /*!< the link is negotiating formats */ |
| 27 |
WP_LINK_STATE_ALLOCATING = 2, /*!< the link is allocating buffers */ |
| 28 |
WP_LINK_STATE_PAUSED = 3, /*!< the link is paused */ |
| 29 |
WP_LINK_STATE_ACTIVE = 4, /*!< the link is active */ |
| 30 |
} WpLinkState; |
| 31 |
|
| 32 |
/*! |
| 33 |
* \brief The WpLink GType |
| 34 |
* \ingroup wplink |
| 35 |
*/ |
| 36 |
#define WP_TYPE_LINK (wp_link_get_type ()) |
| 37 |
WP_API |
| 38 |
G_DECLARE_FINAL_TYPE (WpLink, wp_link, WP, LINK, WpGlobalProxy) |
| 39 |
|
| 40 |
WP_API |
| 41 |
WpLink * wp_link_new_from_factory (WpCore * core, |
| 42 |
const gchar * factory_name, WpProperties * properties); |
| 43 |
|
| 44 |
WP_API |
| 45 |
void wp_link_get_linked_object_ids (WpLink * self, |
| 46 |
guint32 * output_node, guint32 * output_port, |
| 47 |
guint32 * input_node, guint32 * input_port); |
| 48 |
|
| 49 |
WP_API |
| 50 |
WpLinkState wp_link_get_state (WpLink * self, const gchar ** error); |
| 51 |
|
| 52 |
G_END_DECLS |
| 53 |
|
| 54 |
#endif |