introspect.h
Go to the documentation of this file.
/* PipeWire
*
* Copyright © 2019 Collabora Ltd.
* @author George Kiagiadakis <george.kiagiadakis@collabora.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
#ifndef PIPEWIRE_EXT_SESSION_MANAGER_INTROSPECT_H
#define PIPEWIRE_EXT_SESSION_MANAGER_INTROSPECT_H
#include <spa/utils/defs.h>
#include <spa/utils/dict.h>
#include <spa/param/param.h>
#ifdef __cplusplus
extern "C" {
#endif
enum pw_endpoint_link_state {
PW_ENDPOINT_LINK_STATE_ERROR = -1,
PW_ENDPOINT_LINK_STATE_PREPARING,
PW_ENDPOINT_LINK_STATE_INACTIVE,
PW_ENDPOINT_LINK_STATE_ACTIVE,
};
struct pw_session_info {
#define PW_VERSION_SESSION_INFO 0
uint32_t version;
uint32_t id;
#define PW_SESSION_CHANGE_MASK_PROPS (1 << 0)
#define PW_SESSION_CHANGE_MASK_PARAMS (1 << 1)
#define PW_SESSION_CHANGE_MASK_ALL ((1 << 2)-1)
uint64_t change_mask;
struct spa_dict *props;
struct spa_param_info *params;
uint32_t n_params;
};
struct pw_endpoint_info {
#define PW_VERSION_ENDPOINT_INFO 0
uint32_t version;
uint32_t id;
char *name;
char *media_class;
enum pw_direction direction;
#define PW_ENDPOINT_FLAG_PROVIDES_SESSION (1 << 0)
uint32_t flags;
#define PW_ENDPOINT_CHANGE_MASK_STREAMS (1 << 0)
#define PW_ENDPOINT_CHANGE_MASK_SESSION (1 << 1)
#define PW_ENDPOINT_CHANGE_MASK_PROPS (1 << 2)
#define PW_ENDPOINT_CHANGE_MASK_PARAMS (1 << 3)
#define PW_ENDPOINT_CHANGE_MASK_ALL ((1 << 4)-1)
uint64_t change_mask;
uint32_t n_streams;
uint32_t session_id;
struct spa_dict *props;
struct spa_param_info *params;
uint32_t n_params;
};
struct pw_endpoint_stream_info {
#define PW_VERSION_ENDPOINT_STREAM_INFO 0
uint32_t version;
uint32_t id;
uint32_t endpoint_id;
char *name;
#define PW_ENDPOINT_STREAM_CHANGE_MASK_LINK_PARAMS (1 << 0)
#define PW_ENDPOINT_STREAM_CHANGE_MASK_PROPS (1 << 1)
#define PW_ENDPOINT_STREAM_CHANGE_MASK_PARAMS (1 << 2)
#define PW_ENDPOINT_STREAM_CHANGE_MASK_ALL ((1 << 3)-1)
uint64_t change_mask;
struct spa_pod *link_params;
struct spa_dict *props;
struct spa_param_info *params;
uint32_t n_params;
};
struct pw_endpoint_link_info {
#define PW_VERSION_ENDPOINT_LINK_INFO 0
uint32_t version;
uint32_t id;
uint32_t session_id;
uint32_t output_endpoint_id;
uint32_t output_stream_id;
uint32_t input_endpoint_id;
uint32_t input_stream_id;
#define PW_ENDPOINT_LINK_CHANGE_MASK_STATE (1 << 0)
#define PW_ENDPOINT_LINK_CHANGE_MASK_PROPS (1 << 1)
#define PW_ENDPOINT_LINK_CHANGE_MASK_PARAMS (1 << 2)
#define PW_ENDPOINT_LINK_CHANGE_MASK_ALL ((1 << 3)-1)
uint64_t change_mask;
enum pw_endpoint_link_state state;
char *error;
struct spa_dict *props;
struct spa_param_info *params;
uint32_t n_params;
};
#ifdef __cplusplus
} /* extern "C" */
#endif
#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:63
pw_endpoint_link_state
pw_endpoint_link_state
Definition: introspect.h:46
PW_ENDPOINT_LINK_STATE_PREPARING
@ PW_ENDPOINT_LINK_STATE_PREPARING
Definition: introspect.h:48
PW_ENDPOINT_LINK_STATE_ACTIVE
@ PW_ENDPOINT_LINK_STATE_ACTIVE
Definition: introspect.h:50
PW_ENDPOINT_LINK_STATE_INACTIVE
@ PW_ENDPOINT_LINK_STATE_INACTIVE
Definition: introspect.h:49
PW_ENDPOINT_LINK_STATE_ERROR
@ PW_ENDPOINT_LINK_STATE_ERROR
Definition: introspect.h:47
param.h
spa/param/param.h
pw_endpoint_info
Definition: introspect.h:70
pw_endpoint_info::params
struct spa_param_info * params
parameters
Definition: introspect.h:95
pw_endpoint_info::id
uint32_t id
the endpoint id (global)
Definition: introspect.h:74
pw_endpoint_info::change_mask
uint64_t change_mask
bitfield of changed fields since last call
Definition: introspect.h:91
pw_endpoint_info::direction
enum pw_direction direction
direction of the endpoint
Definition: introspect.h:77
pw_endpoint_info::n_params
uint32_t n_params
number of items in params
Definition: introspect.h:96
pw_endpoint_info::flags
uint32_t flags
additional flags
Definition: introspect.h:80
pw_endpoint_info::version
uint32_t version
version of this structure
Definition: introspect.h:73
pw_endpoint_info::media_class
char * media_class
media class of the endpoint
Definition: introspect.h:76
pw_endpoint_info::session_id
uint32_t session_id
the id of the controlling session
Definition: introspect.h:93
pw_endpoint_info::n_streams
uint32_t n_streams
number of streams available
Definition: introspect.h:92
pw_endpoint_link_info
Definition: introspect.h:121
pw_endpoint_link_info::id
uint32_t id
the link id (global)
Definition: introspect.h:125
pw_endpoint_link_info::output_endpoint_id
uint32_t output_endpoint_id
the output endpoint id (global)
Definition: introspect.h:127
pw_endpoint_link_info::input_endpoint_id
uint32_t input_endpoint_id
the input endpoint id (global)
Definition: introspect.h:129
pw_endpoint_link_info::error
char * error
error string if state == ERROR
Definition: introspect.h:141
pw_endpoint_link_info::version
uint32_t version
version of this structure
Definition: introspect.h:124
pw_endpoint_link_info::params
struct spa_param_info * params
parameters
Definition: introspect.h:143
pw_endpoint_link_info::state
enum pw_endpoint_link_state state
the state of the link
Definition: introspect.h:140
pw_endpoint_link_info::n_params
uint32_t n_params
number of items in params
Definition: introspect.h:144
pw_endpoint_link_info::output_stream_id
uint32_t output_stream_id
the output stream id (local or global)
Definition: introspect.h:128
pw_endpoint_link_info::input_stream_id
uint32_t input_stream_id
the input stream id (local or global)
Definition: introspect.h:130
pw_endpoint_link_info::session_id
uint32_t session_id
the session id (global)
Definition: introspect.h:126
pw_endpoint_stream_info
Definition: introspect.h:99
pw_endpoint_stream_info::n_params
uint32_t n_params
number of items in params
Definition: introspect.h:118
pw_endpoint_stream_info::params
struct spa_param_info * params
parameters
Definition: introspect.h:117
pw_endpoint_stream_info::endpoint_id
uint32_t endpoint_id
the endpoint id (global)
Definition: introspect.h:104
pw_endpoint_stream_info::link_params
struct spa_pod * link_params
information for linking this stream
Definition: introspect.h:115
pw_endpoint_stream_info::id
uint32_t id
the stream id (local or global)
Definition: introspect.h:103
pw_endpoint_stream_info::version
uint32_t version
version of this structure
Definition: introspect.h:102
pw_endpoint_stream_info::change_mask
uint64_t change_mask
bitfield of changed fields since last call
Definition: introspect.h:114
pw_session_info
Definition: introspect.h:53
pw_session_info::params
struct spa_param_info * params
parameters
Definition: introspect.h:66
pw_session_info::change_mask
uint64_t change_mask
bitfield of changed fields since last call
Definition: introspect.h:64
pw_session_info::id
uint32_t id
the session id (global)
Definition: introspect.h:57
pw_session_info::version
uint32_t version
version of this structure
Definition: introspect.h:56
pw_session_info::n_params
uint32_t n_params
number of items in params
Definition: introspect.h:67
spa_dict
Definition: dict.h:59
spa_param_info
information about a parameter
Definition: param.h:70
spa_pod
Definition: pod.h:63
dict.h
spa/utils/dict.h