| 1 |
/* PipeWire */ |
| 2 |
/* SPDX-FileCopyrightText: Copyright © 2019 Collabora Ltd. */ |
| 3 |
/* @author George Kiagiadakis <[email protected]> */ |
| 4 |
/* SPDX-License-Identifier: MIT */ |
| 5 |
|
| 6 |
#ifndef PIPEWIRE_EXT_SESSION_MANAGER_INTROSPECT_H |
| 7 |
#define PIPEWIRE_EXT_SESSION_MANAGER_INTROSPECT_H |
| 8 |
|
| 9 |
#include <pw-headers/spa/utils/defs.h> |
| 10 |
#include <pw-headers/spa/utils/dict.h> |
| 11 |
#include <pw-headers/spa/param/param.h> |
| 12 |
|
| 13 |
#ifdef __cplusplus |
| 14 |
extern "C" { |
| 15 |
#endif |
| 16 |
|
| 17 |
/** |
| 18 |
* \addtogroup pw_session_manager |
| 19 |
* \{ |
| 20 |
*/ |
| 21 |
|
| 22 |
enum pw_endpoint_link_state { |
| 23 |
PW_ENDPOINT_LINK_STATE_ERROR = -1, |
| 24 |
PW_ENDPOINT_LINK_STATE_PREPARING, |
| 25 |
PW_ENDPOINT_LINK_STATE_INACTIVE, |
| 26 |
PW_ENDPOINT_LINK_STATE_ACTIVE, |
| 27 |
}; |
| 28 |
|
| 29 |
struct pw_session_info { |
| 30 |
#define PW_VERSION_SESSION_INFO 0 |
| 31 |
uint32_t version; /**< version of this structure */ |
| 32 |
uint32_t id; /**< the session id (global) */ |
| 33 |
#define PW_SESSION_CHANGE_MASK_PROPS (1 << 0) |
| 34 |
#define PW_SESSION_CHANGE_MASK_PARAMS (1 << 1) |
| 35 |
#define PW_SESSION_CHANGE_MASK_ALL ((1 << 2)-1) |
| 36 |
uint64_t change_mask; /**< bitfield of changed fields since last call */ |
| 37 |
struct spa_dict *props; /**< extra properties */ |
| 38 |
struct spa_param_info *params; /**< parameters */ |
| 39 |
uint32_t n_params; /**< number of items in \a params */ |
| 40 |
}; |
| 41 |
|
| 42 |
struct pw_endpoint_info { |
| 43 |
#define PW_VERSION_ENDPOINT_INFO 0 |
| 44 |
uint32_t version; /**< version of this structure */ |
| 45 |
uint32_t id; /**< the endpoint id (global) */ |
| 46 |
char *name; /**< name of the endpoint */ |
| 47 |
char *media_class; /**< media class of the endpoint */ |
| 48 |
enum pw_direction direction; /**< direction of the endpoint */ |
| 49 |
#define PW_ENDPOINT_FLAG_PROVIDES_SESSION (1 << 0) |
| 50 |
uint32_t flags; /**< additional flags */ |
| 51 |
#define PW_ENDPOINT_CHANGE_MASK_STREAMS (1 << 0) |
| 52 |
#define PW_ENDPOINT_CHANGE_MASK_SESSION (1 << 1) |
| 53 |
#define PW_ENDPOINT_CHANGE_MASK_PROPS (1 << 2) |
| 54 |
#define PW_ENDPOINT_CHANGE_MASK_PARAMS (1 << 3) |
| 55 |
#define PW_ENDPOINT_CHANGE_MASK_ALL ((1 << 4)-1) |
| 56 |
uint64_t change_mask; /**< bitfield of changed fields since last call */ |
| 57 |
uint32_t n_streams; /**< number of streams available */ |
| 58 |
uint32_t session_id; /**< the id of the controlling session */ |
| 59 |
struct spa_dict *props; /**< extra properties */ |
| 60 |
struct spa_param_info *params; /**< parameters */ |
| 61 |
uint32_t n_params; /**< number of items in \a params */ |
| 62 |
}; |
| 63 |
|
| 64 |
struct pw_endpoint_stream_info { |
| 65 |
#define PW_VERSION_ENDPOINT_STREAM_INFO 0 |
| 66 |
uint32_t version; /**< version of this structure */ |
| 67 |
uint32_t id; /**< the stream id (local or global) */ |
| 68 |
uint32_t endpoint_id; /**< the endpoint id (global) */ |
| 69 |
char *name; /**< name of the stream */ |
| 70 |
#define PW_ENDPOINT_STREAM_CHANGE_MASK_LINK_PARAMS (1 << 0) |
| 71 |
#define PW_ENDPOINT_STREAM_CHANGE_MASK_PROPS (1 << 1) |
| 72 |
#define PW_ENDPOINT_STREAM_CHANGE_MASK_PARAMS (1 << 2) |
| 73 |
#define PW_ENDPOINT_STREAM_CHANGE_MASK_ALL ((1 << 3)-1) |
| 74 |
uint64_t change_mask; /**< bitfield of changed fields since last call */ |
| 75 |
struct spa_pod *link_params; /**< information for linking this stream */ |
| 76 |
struct spa_dict *props; /**< extra properties */ |
| 77 |
struct spa_param_info *params; /**< parameters */ |
| 78 |
uint32_t n_params; /**< number of items in \a params */ |
| 79 |
}; |
| 80 |
|
| 81 |
struct pw_endpoint_link_info { |
| 82 |
#define PW_VERSION_ENDPOINT_LINK_INFO 0 |
| 83 |
uint32_t version; /**< version of this structure */ |
| 84 |
uint32_t id; /**< the link id (global) */ |
| 85 |
uint32_t session_id; /**< the session id (global) */ |
| 86 |
uint32_t output_endpoint_id; /**< the output endpoint id (global) */ |
| 87 |
uint32_t output_stream_id; /**< the output stream id (local or global) */ |
| 88 |
uint32_t input_endpoint_id; /**< the input endpoint id (global) */ |
| 89 |
uint32_t input_stream_id; /**< the input stream id (local or global) */ |
| 90 |
#define PW_ENDPOINT_LINK_CHANGE_MASK_STATE (1 << 0) |
| 91 |
#define PW_ENDPOINT_LINK_CHANGE_MASK_PROPS (1 << 1) |
| 92 |
#define PW_ENDPOINT_LINK_CHANGE_MASK_PARAMS (1 << 2) |
| 93 |
#define PW_ENDPOINT_LINK_CHANGE_MASK_ALL ((1 << 3)-1) |
| 94 |
uint64_t change_mask; /**< bitfield of changed fields since last call */ |
| 95 |
enum pw_endpoint_link_state state; /**< the state of the link */ |
| 96 |
char *error; /**< error string if state == ERROR */ |
| 97 |
struct spa_dict *props; /**< extra properties */ |
| 98 |
struct spa_param_info *params; /**< parameters */ |
| 99 |
uint32_t n_params; /**< number of items in \a params */ |
| 100 |
}; |
| 101 |
|
| 102 |
/** |
| 103 |
* \} |
| 104 |
*/ |
| 105 |
|
| 106 |
#ifdef __cplusplus |
| 107 |
} /* extern "C" */ |
| 108 |
#endif |
| 109 |
|
| 110 |
#endif /* PIPEWIRE_EXT_SESSION_MANAGER_INTROSPECT_H */ |