QXmpp  Version: 1.10.4
QXmppCallStream_p.h
1 // SPDX-FileCopyrightText: 2019 Niels Ole Salscheider <niels_ole@salscheider-online.de>
2 //
3 // SPDX-License-Identifier: LGPL-2.1-or-later
4 
5 #ifndef QXMPPCALLSTREAM_P_H
6 #define QXMPPCALLSTREAM_P_H
7 
8 #include "QXmppCall_p.h"
9 #include "QXmppJingleIq.h"
10 
11 #include <gst/gst.h>
12 
13 #include <QList>
14 #include <QObject>
15 #include <QString>
16 
17 class QXmppIceConnection;
18 
19 // W A R N I N G
20 // -------------
21 //
22 // This file is not part of the QXmpp API.
23 // This header file may change from version to version without notice,
24 // or even be removed.
25 //
26 // We mean it.
27 //
28 
29 static const int RTP_COMPONENT = 1;
30 static const int RTCP_COMPONENT = 2;
31 
32 static const QLatin1String AUDIO_MEDIA("audio");
33 static const QLatin1String VIDEO_MEDIA("video");
34 
35 class QXmppCallStreamPrivate : public QObject
36 {
37  Q_OBJECT
38 
39 public:
40  QXmppCallStreamPrivate(QXmppCallStream *parent, GstElement *pipeline_, GstElement *rtpbin_,
41  QString media_, QString creator_, QString name_, int id_);
42  ~QXmppCallStreamPrivate();
43 
44  GstFlowReturn sendDatagram(GstElement *appsink, int component);
45  void datagramReceived(const QByteArray &datagram, GstElement *appsrc);
46 
47  void addEncoder(QXmppCallPrivate::GstCodec &codec);
48  void addDecoder(GstPad *pad, QXmppCallPrivate::GstCodec &codec);
49  void addRtpSender(GstPad *pad);
50  void addRtcpSender(GstPad *pad);
51 
52  QXmppCallStream *q;
53 
54  quint32 localSsrc;
55 
56  GstElement *pipeline;
57  GstElement *rtpbin;
58  GstPad *sendPad;
59  GstPad *receivePad;
60  GstPad *internalReceivePad;
61  GstPad *internalRtpPad;
62  GstPad *internalRtcpPad;
63  GstElement *encoderBin;
64  GstElement *decoderBin;
65  GstElement *iceReceiveBin;
66  GstElement *iceSendBin;
67  GstElement *apprtpsrc;
68  GstElement *apprtcpsrc;
69  GstElement *apprtpsink;
70  GstElement *apprtcpsink;
71 
72  std::function<void(GstPad *)> sendPadCB;
73  std::function<void(GstPad *)> receivePadCB;
74 
75  QXmppIceConnection *connection;
76  QString media;
77  QString creator;
78  QString name;
79  int id;
80 
81  QList<QXmppJinglePayloadType> payloadTypes;
82 };
83 
84 #endif
The QXmppIceConnection class represents a set of UDP sockets capable of performing Interactive Connec...
Definition: QXmppStun.h:224
Definition: QXmppCallStream.h:22