Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qpipewire_instance_p.h
Go to the documentation of this file.
1// Copyright (C) 2025 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QPIPEWIRE_INSTANCE_P_H
5#define QPIPEWIRE_INSTANCE_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtCore/qglobal.h>
19#include <QtCore/qloggingcategory.h>
20
21#include <pipewire/pipewire.h>
22
24
25namespace QtPipeWire {
26
27Q_DECLARE_LOGGING_CATEGORY(lcPipewire); // "qt.multimedia.pipewire"
28
30{
31public:
32 [[nodiscard]] static std::shared_ptr<QPipeWireInstance> instance();
33 static bool isLoaded();
34
37};
38
39} // namespace QtPipeWire
40
41QT_END_NAMESPACE
42
43#endif // QPIPEWIRE_INSTANCE_P_H
void registerStreamReference(std::shared_ptr< QPipewireAudioStream >)
void unregisterStreamReference(const std::shared_ptr< QPipewireAudioStream > &)
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)
#define __has_include(x)
bool pw_check_library_version(int major, int minor, int micro)
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)
SharedObjectRemoveObserver m_deviceRemovalObserver
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
bool connectStream(ObjectSerial target, spa_direction)
virtual void handleDeviceRemoved()=0