Loading...
Searching...
No Matches
profiler.h
Go to the documentation of this file.
/* PipeWire */
/* SPDX-FileCopyrightText: Copyright © 2020 Wim Taymans */
/* SPDX-License-Identifier: MIT */
#ifndef PIPEWIRE_EXT_PROFILER_H
#define PIPEWIRE_EXT_PROFILER_H
#include <spa/utils/defs.h>
#ifdef __cplusplus
extern "C" {
#endif
#define PW_TYPE_INTERFACE_Profiler PW_TYPE_INFO_INTERFACE_BASE "Profiler"
#define PW_VERSION_PROFILER 3
struct pw_profiler;
#ifndef PW_API_PROFILER
#define PW_API_PROFILER static inline
#endif
#define PW_EXTENSION_MODULE_PROFILER PIPEWIRE_MODULE_PREFIX "module-profiler"
#define PW_PROFILER_PERM_MASK PW_PERM_R
#define PW_PROFILER_EVENT_PROFILE 0
#define PW_PROFILER_EVENT_NUM 1
struct pw_profiler_events {
#define PW_VERSION_PROFILER_EVENTS 0
uint32_t version;
void (*profile) (void *data, const struct spa_pod *pod);
};
#define PW_PROFILER_METHOD_ADD_LISTENER 0
#define PW_PROFILER_METHOD_NUM 1
struct pw_profiler_methods {
#define PW_VERSION_PROFILER_METHODS 0
uint32_t version;
int (*add_listener) (void *object,
struct spa_hook *listener,
const struct pw_profiler_events *events,
void *data);
};
PW_API_PROFILER int pw_profiler_add_listener(struct pw_profiler *object,
struct spa_hook *listener,
const struct pw_profiler_events *events,
void *data)
{
return spa_api_method_r(int, -ENOTSUP,
pw_profiler, (struct spa_interface*)object, add_listener, 0,
listener, events, data);
}
#define PW_KEY_PROFILER_NAME "profiler.name"
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* PIPEWIRE_EXT_PROFILER_H */
defs.h
spa/utils/defs.h
PW_API_PROFILER
#define PW_API_PROFILER
Definition profiler.h:36
pw_profiler_add_listener
PW_API_PROFILER int pw_profiler_add_listener(struct pw_profiler *object, struct spa_hook *listener, const struct pw_profiler_events *events, void *data)
Definition profiler.h:78
spa_api_method_r
#define spa_api_method_r(rtype, def, type, o, method, version,...)
Definition hook.h:291
pw_profiler_events
Profiler events
Definition profiler.h:51
pw_profiler_events::version
uint32_t version
Definition profiler.h:54
pw_profiler_events::profile
void(* profile)(void *data, const struct spa_pod *pod)
Definition profiler.h:56
pw_profiler_methods
Profiler methods
Definition profiler.h:65
pw_profiler_methods::add_listener
int(* add_listener)(void *object, struct spa_hook *listener, const struct pw_profiler_events *events, void *data)
Definition profiler.h:70
pw_profiler
spa_hook
A hook, contains the structure with functions and the data passed to the functions.
Definition hook.h:427
spa_interface
Definition hook.h:148
spa_pod
Definition pod.h:57