PipeWire: pipewire/extensions/session-manager/introspect.h Source File

PipeWire 1.0.3

Loading...
Searching...
No Matches
introspect.h
Go to the documentation of this file.
1/* PipeWire */
2/* SPDX-FileCopyrightText: Copyright © 2019 Collabora Ltd. */
3/* @author George Kiagiadakis <george.kiagiadakis@collabora.com> */
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 <spa/utils/defs.h>
10#include <spa/utils/dict.h>
11#include <spa/param/param.h>
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
22enum 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;
32 uint32_t id;
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;
37 struct spa_dict *props;
38 struct spa_param_info *params;
39 uint32_t n_params;
40};
41
42struct pw_endpoint_info {
43#define PW_VERSION_ENDPOINT_INFO 0
44 uint32_t version;
45 uint32_t id;
46 char *name;
47 char *media_class;
48 enum pw_direction direction;
49#define PW_ENDPOINT_FLAG_PROVIDES_SESSION (1 << 0)
50 uint32_t 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;
57 uint32_t n_streams;
58 uint32_t session_id;
59 struct spa_dict *props;
60 struct spa_param_info *params;
61 uint32_t n_params;
62};
63
64 struct pw_endpoint_stream_info {
65#define PW_VERSION_ENDPOINT_STREAM_INFO 0
66 uint32_t version;
67 uint32_t id;
68 uint32_t endpoint_id;
69 char *name;
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;
75 struct spa_pod *link_params;
76 struct spa_dict *props;
77 struct spa_param_info *params;
78 uint32_t n_params;
79};
80
81 struct pw_endpoint_link_info {
82#define PW_VERSION_ENDPOINT_LINK_INFO 0
83 uint32_t version;
84 uint32_t id;
85 uint32_t session_id;
86 uint32_t output_endpoint_id;
87 uint32_t output_stream_id;
88 uint32_t input_endpoint_id;
89 uint32_t input_stream_id;
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;
95 enum pw_endpoint_link_state state;
96 char *error;
97 struct spa_dict *props;
98 struct spa_param_info *params;
99 uint32_t n_params;
100};
101
106#ifdef __cplusplus
107} /* extern "C" */
108#endif
109
110#endif /* PIPEWIRE_EXT_SESSION_MANAGER_INTROSPECT_H */
defs.h
spa/utils/defs.h
pw_direction
#define pw_direction
The direction of a port.
Definition port.h:46
pw_endpoint_link_state
pw_endpoint_link_state
Definition introspect.h:26
PW_ENDPOINT_LINK_STATE_PREPARING
@ PW_ENDPOINT_LINK_STATE_PREPARING
Definition introspect.h:28
PW_ENDPOINT_LINK_STATE_ACTIVE
@ PW_ENDPOINT_LINK_STATE_ACTIVE
Definition introspect.h:30
PW_ENDPOINT_LINK_STATE_INACTIVE
@ PW_ENDPOINT_LINK_STATE_INACTIVE
Definition introspect.h:29
PW_ENDPOINT_LINK_STATE_ERROR
@ PW_ENDPOINT_LINK_STATE_ERROR
Definition introspect.h:27
param.h
spa/param/param.h
pw_endpoint_info
Definition introspect.h:50
pw_endpoint_info::params
struct spa_param_info * params
parameters
Definition introspect.h:75
pw_endpoint_info::id
uint32_t id
the endpoint id (global)
Definition introspect.h:54
pw_endpoint_info::change_mask
uint64_t change_mask
bitfield of changed fields since last call
Definition introspect.h:71
pw_endpoint_info::direction
enum pw_direction direction
direction of the endpoint
Definition introspect.h:57
pw_endpoint_info::n_params
uint32_t n_params
number of items in params
Definition introspect.h:76
pw_endpoint_info::flags
uint32_t flags
additional flags
Definition introspect.h:60
pw_endpoint_info::version
uint32_t version
version of this structure
Definition introspect.h:53
pw_endpoint_info::media_class
char * media_class
media class of the endpoint
Definition introspect.h:56
pw_endpoint_info::session_id
uint32_t session_id
the id of the controlling session
Definition introspect.h:73
pw_endpoint_info::n_streams
uint32_t n_streams
number of streams available
Definition introspect.h:72
pw_endpoint_link_info
Definition introspect.h:101
pw_endpoint_link_info::id
uint32_t id
the link id (global)
Definition introspect.h:105
pw_endpoint_link_info::output_endpoint_id
uint32_t output_endpoint_id
the output endpoint id (global)
Definition introspect.h:107
pw_endpoint_link_info::input_endpoint_id
uint32_t input_endpoint_id
the input endpoint id (global)
Definition introspect.h:109
pw_endpoint_link_info::error
char * error
error string if state == ERROR
Definition introspect.h:121
pw_endpoint_link_info::version
uint32_t version
version of this structure
Definition introspect.h:104
pw_endpoint_link_info::params
struct spa_param_info * params
parameters
Definition introspect.h:123
pw_endpoint_link_info::state
enum pw_endpoint_link_state state
the state of the link
Definition introspect.h:120
pw_endpoint_link_info::n_params
uint32_t n_params
number of items in params
Definition introspect.h:124
pw_endpoint_link_info::output_stream_id
uint32_t output_stream_id
the output stream id (local or global)
Definition introspect.h:108
pw_endpoint_link_info::input_stream_id
uint32_t input_stream_id
the input stream id (local or global)
Definition introspect.h:110
pw_endpoint_link_info::session_id
uint32_t session_id
the session id (global)
Definition introspect.h:106
pw_endpoint_stream_info
Definition introspect.h:79
pw_endpoint_stream_info::n_params
uint32_t n_params
number of items in params
Definition introspect.h:98
pw_endpoint_stream_info::params
struct spa_param_info * params
parameters
Definition introspect.h:97
pw_endpoint_stream_info::endpoint_id
uint32_t endpoint_id
the endpoint id (global)
Definition introspect.h:84
pw_endpoint_stream_info::link_params
struct spa_pod * link_params
information for linking this stream
Definition introspect.h:95
pw_endpoint_stream_info::id
uint32_t id
the stream id (local or global)
Definition introspect.h:83
pw_endpoint_stream_info::version
uint32_t version
version of this structure
Definition introspect.h:82
pw_endpoint_stream_info::change_mask
uint64_t change_mask
bitfield of changed fields since last call
Definition introspect.h:94
pw_session_info
Definition introspect.h:33
pw_session_info::params
struct spa_param_info * params
parameters
Definition introspect.h:46
pw_session_info::change_mask
uint64_t change_mask
bitfield of changed fields since last call
Definition introspect.h:44
pw_session_info::id
uint32_t id
the session id (global)
Definition introspect.h:37
pw_session_info::version
uint32_t version
version of this structure
Definition introspect.h:36
pw_session_info::n_params
uint32_t n_params
number of items in params
Definition introspect.h:47
spa_dict
Definition dict.h:39
spa_param_info
information about a parameter
Definition param.h:51
spa_pod
Definition pod.h:43
dict.h
spa/utils/dict.h