KPipewire

pipewireencodedstream.h
1/*
2 SPDX-FileCopyrightText: 2023 Aleix Pol Gonzalez <aleixpol@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5*/
6
7#pragma once
8
9#include <QObject>
10
11#include "pipewirebaseencodedstream.h"
12#include <kpipewire_export.h>
13
14struct PipeWireCursor;
15class PipeWirePacketPrivate;
16
17class KPIPEWIRE_EXPORT PipeWireEncodedStream : public PipeWireBaseEncodedStream
18{
19 Q_OBJECT
20public:
21 PipeWireEncodedStream(QObject *parent = nullptr);
22 ~PipeWireEncodedStream() override;
23
24 class Packet
25 {
26 public:
27 Packet(bool isKey, const QByteArray &data);
28
29 /// Whether the packet represents a key frame
30 bool isKeyFrame() const;
31 QByteArray data() const;
32
33 std::shared_ptr<PipeWirePacketPrivate> d;
34 };
35
37 /// will be emitted when the stream initializes as well as when the value changes
38 void sizeChanged(const QSize &size);
39 void cursorChanged(const PipeWireCursor &cursor);
40 void newPacket(const Packet &packet);
41
42protected:
43 std::unique_ptr<PipeWireProduce> makeProduce() override;
44};
Q_SIGNALSQ_SIGNALS
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:15:17 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.