4#ifndef QPIPEWIRE_SUPPORT_P_H
5#define QPIPEWIRE_SUPPORT_P_H
18#include <QtCore/qglobal.h>
19#include <QtCore/qdebug.h>
22#include <pipewire/extensions/metadata.h>
23#include <system_error>
25#include <pipewire/pipewire.h>
27#if !PW_CHECK_VERSION
(0
, 3
, 75
)
40 return std::error_code(errnoValue,
std::generic_category());
44template <
typename BaseType,
void(Deleter)(BaseType *),
typename Type = BaseType>
49 BaseType *base =
reinterpret_cast<BaseType *>(handle);
54template <
typename BaseType,
void(Deleter)(BaseType *),
typename Type = BaseType>
75 int status = pw_core_disconnect(handle);
77 qWarning() <<
"Failed to disconnect pw_core:" <<
make_error_code(status
).message();
85template <
typename T,
typename Tag>
93#ifdef __cpp_impl_three_way_comparison
137#define QT_MM_GUARDED_BY(Mutex)
static bool isInPwThreadLoop()
static std::atomic_int s_sequenceNumberAllocator
std::unique_ptr< pw_core, PwCoreConnectionDeleter > PwCoreConnectionHandle
StrongIdType< uint32_t, ObjectIdTag > ObjectId
StrongIdType< uint64_t, ObjectSerialTag > ObjectSerial
std::error_code make_error_code(int errnoValue=errno)
bool pw_check_library_version(int major, int minor, int micro)
QDebug operator<<(QDebug dbg, const pw_time &state)
QDebug operator<<(QDebug dbg, const spa_dict &dict)
QDebug operator<<(QDebug dbg, enum pw_stream_state)
QDebug operator<<(QDebug dbg, const spa_pod &pod)
q23::expected< void, int > asyncWait(pw_core *coreConnection, std::function< void()> handler)
pw_core_events coreEvents
q23::expected< bool, int > sync(pw_core *coreConnection, std::optional< std::chrono::nanoseconds > timeout={})
void operator()(Type *handle) const
ParamHandler paramHandler
NodeEventListener(PwNodeHandle, NodeHandler)
std::function< void(const struct pw_node_info *)> InfoHandler
void enumParams(spa_param_type)
std::function< void(int, uint32_t, uint32_t, uint32_t, const struct spa_pod *)> ParamHandler
void operator()(pw_core *handle) const
friend QDebug operator<<(QDebug dbg, const StrongIdType &self)
friend bool comparesEqual(const StrongIdType &lhs, const StrongIdType &rhs) noexcept
friend Qt::strong_ordering compareThreeWay(const StrongIdType &lhs, const StrongIdType &rhs) noexcept