PipeWire 1.0.5
Loading...
Searching...
No Matches
profiler.h
Go to the documentation of this file.
1/* PipeWire */
2/* SPDX-FileCopyrightText: Copyright © 2020 Wim Taymans */
3/* SPDX-License-Identifier: MIT */
4
5#ifndef PIPEWIRE_EXT_PROFILER_H
6#define PIPEWIRE_EXT_PROFILER_H
7
8#ifdef __cplusplus
9extern "C" {
10#endif
11
12#include <spa/utils/defs.h>
13
22#define PW_TYPE_INTERFACE_Profiler PW_TYPE_INFO_INTERFACE_BASE "Profiler"
23
24#define PW_VERSION_PROFILER 3
25struct pw_profiler;
26
27#define PW_EXTENSION_MODULE_PROFILER PIPEWIRE_MODULE_PREFIX "module-profiler"
28
29#define PW_PROFILER_PERM_MASK PW_PERM_R
31#define PW_PROFILER_EVENT_PROFILE 0
32#define PW_PROFILER_EVENT_NUM 1
33
36#define PW_VERSION_PROFILER_EVENTS 0
37 uint32_t version;
39 void (*profile) (void *data, const struct spa_pod *pod);
40};
42#define PW_PROFILER_METHOD_ADD_LISTENER 0
43#define PW_PROFILER_METHOD_NUM 1
44
47#define PW_VERSION_PROFILER_METHODS 0
48 uint32_t version;
50 int (*add_listener) (void *object,
51 struct spa_hook *listener,
52 const struct pw_profiler_events *events,
53 void *data);
54};
56#define pw_profiler_method(o,method,version,...) \
57({ \
58 int _res = -ENOTSUP; \
59 spa_interface_call_res((struct spa_interface*)o, \
60 struct pw_profiler_methods, _res, \
61 method, version, ##__VA_ARGS__); \
62 _res; \
63})
64
65#define pw_profiler_add_listener(c,...) pw_profiler_method(c,add_listener,0,__VA_ARGS__)
66
67#define PW_KEY_PROFILER_NAME "profiler.name"
68
73#ifdef __cplusplus
74} /* extern "C" */
75#endif
76
77#endif /* PIPEWIRE_EXT_PROFILER_H */
spa/utils/defs.h
Profiler events
Definition profiler.h:46
uint32_t version
Definition profiler.h:49
void(* profile)(void *data, const struct spa_pod *pod)
Definition profiler.h:51
Profiler methods
Definition profiler.h:60
int(* add_listener)(void *object, struct spa_hook *listener, const struct pw_profiler_events *events, void *data)
Definition profiler.h:65
uint32_t version
Definition profiler.h:63
A hook, contains the structure with functions and the data passed to the functions.
Definition hook.h:350
Definition pod.h:43