6#ifndef QXMPPCALLSTREAM_P_H
7#define QXMPPCALLSTREAM_P_H
9#include "QXmppCall_p.h"
10#include "QXmppJingleIq.h"
31static const int RTP_COMPONENT = 1;
32static const int RTCP_COMPONENT = 2;
34constexpr QStringView AUDIO_MEDIA = u
"audio";
35constexpr QStringView VIDEO_MEDIA = u
"video";
37namespace QXmpp::Private {
46class QXmppCallStreamPrivate :
public QObject
51 QXmppCallStreamPrivate(
QXmppCallStream *parent, GstElement *pipeline_, GstElement *rtpBin_,
52 QString media_, QString creator_, QString name_,
int id_,
bool useDtls_);
53 ~QXmppCallStreamPrivate();
55 GstFlowReturn sendDatagram(GstElement *appsink,
int component);
56 void datagramReceived(
const QByteArray &datagram, GstElement *appsrc);
58 void addEncoder(QXmppCallPrivate::GstCodec &codec);
59 void addDecoder(GstPad *pad, QXmppCallPrivate::GstCodec &codec);
60 bool isDtlsClient()
const;
61 void enableDtlsClientMode();
62 void onDtlsConnectionStateChanged(QXmpp::Private::GstDtlsConnectionState);
63 void onPeerCertificateReceived(QXmpp::Private::GCharPtr pem);
65 Q_SIGNAL
void peerCertificateReceived(
bool fingerprintMatches);
67 bool sendPadCbReady()
const {
return sendPadCB && sendPad && (dtlsHandshakeComplete || !useDtls); }
68 bool receivePadCbReady()
const {
return receivePadCB && receivePad && (dtlsHandshakeComplete || !useDtls); }
74 GstElement *pipeline =
nullptr;
75 GstElement *rtpBin =
nullptr;
76 GstPad *sendPad =
nullptr;
77 GstPad *receivePad =
nullptr;
78 GstElement *encoderBin =
nullptr;
79 GstElement *decoderBin =
nullptr;
80 GstElement *iceReceiveBin =
nullptr;
81 GstElement *iceSendBin =
nullptr;
82 GstElement *appRtpSrc =
nullptr;
83 GstElement *appRtcpSrc =
nullptr;
84 GstElement *appRtpSink =
nullptr;
85 GstElement *appRtcpSink =
nullptr;
87 GstElement *dtlsSrtpEncoder =
nullptr;
88 GstElement *dtlsSrtcpEncoder =
nullptr;
89 GstElement *dtlsSrtpDecoder =
nullptr;
90 GstElement *dtlsSrtcpDecoder =
nullptr;
92 std::function<void(GstPad *)> sendPadCB;
93 std::function<void(GstPad *)> receivePadCB;
103 std::optional<QXmpp::Private::DtlsClientSetup> dtlsPeerSetup;
104 QByteArray ownCertificateDigest;
105 QByteArray peerCertificateDigest;
106 QByteArray expectedPeerCertificateDigest;
107 bool dtlsHandshakeComplete =
false;
109 QList<QXmppJinglePayloadType> payloadTypes;
Definition QXmppCallStream.h:22
The QXmppIceConnection class represents a set of UDP sockets capable of performing Interactive Connec...
Definition QXmppStun.h:225