4#ifndef QPIPEWIRE_INSTANCE_P_H
5#define QPIPEWIRE_INSTANCE_P_H
18#include <QtCore/qglobal.h>
19#include <QtCore/qloggingcategory.h>
21#include <pipewire/pipewire.h>
static bool minimumRequirementMet()
PwNodeHandle bindNode(ObjectId)
static QAudioDeviceMonitor & deviceMonitor()
static QAudioContextManager * instance()
void registerStreamReference(std::shared_ptr< QPipewireAudioStream >)
void unregisterStreamReference(const std::shared_ptr< QPipewireAudioStream > &)
PwMetadataHandle bindMetadata(ObjectId)
static bool isInPwThreadLoop()
static pw_loop * getEventLoop()
const PwCoreConnectionHandle & coreConnection() const
static std::shared_ptr< QPipeWireInstance > instance()
Q_STATIC_LOGGING_CATEGORY(lcPipewireRegistry, "qt.multimedia.pipewire.registry")
Q_GLOBAL_STATIC(QAudioContextManager, s_audioContextInstance)
std::unique_ptr< pw_core, PwCoreConnectionDeleter > PwCoreConnectionHandle
StrongIdType< uint32_t, ObjectIdTag > ObjectId
StrongIdType< uint64_t, ObjectSerialTag > ObjectSerial
std::shared_ptr< ObjectRemoveObserver > SharedObjectRemoveObserver
std::error_code make_error_code(int errnoValue=errno)
Q_DECLARE_LOGGING_CATEGORY(lcPipewire)
bool pw_check_library_version(int major, int minor, int micro)
uint64_t m_totalNumberOfFrames
std::atomic_bool m_skipNextTickDiscontinuity
void performXRunDetection(uint64_t framesPerBuffer) noexcept QT_MM_NONBLOCKING
void createStream(QSpan< spa_dict_item > extraProperties, std::optional< int32_t > hardwareBufferFrames, const char *streamName, StreamType=StreamType::Ringbuffer)
pw_stream_events stream_events
void unregisterDeviceObserver()
SharedObjectRemoveObserver m_deviceRemovalObserver
bool registerDeviceObserver(ObjectSerial)
virtual void processCallback()=0
QPipewireAudioStream(const QAudioFormat &)
std::atomic_int m_xrunCount
virtual void stateChanged(pw_stream_state oldState, pw_stream_state state, const char *error)=0
virtual void processRingbuffer()=0
std::shared_ptr< QPipewireAudioStream > m_self
virtual void xrunOccurred(int xrunCount)=0
void addFramesHandled(uint64_t)
bool connectStream(ObjectSerial target, spa_direction)
uint64_t m_expectedNextTick
virtual void handleDeviceRemoved()=0