24 #ifndef QXMPPRTPCHANNEL_H 25 #define QXMPPRTPCHANNEL_H 30 #include "QXmppJingleIq.h" 31 #include "QXmppLogger.h" 35 class QXmppRtpAudioChannelPrivate;
36 class QXmppRtpVideoChannelPrivate;
38 class QXMPP_EXPORT QXmppRtpChannel
44 virtual void close() = 0;
47 virtual QIODevice::OpenMode openMode()
const = 0;
49 QList<QXmppJinglePayloadType> localPayloadTypes();
50 void setRemotePayloadTypes(
const QList<QXmppJinglePayloadType> &remotePayloadTypes);
52 quint32 localSsrc()
const;
53 void setLocalSsrc(quint32 ssrc);
57 virtual void payloadTypesChanged() = 0;
59 QList<QXmppJinglePayloadType> m_incomingPayloadTypes;
60 QList<QXmppJinglePayloadType> m_outgoingPayloadTypes;
61 bool m_outgoingPayloadNumbered;
65 quint32 m_outgoingSsrc;
104 qint64 bytesAvailable()
const override;
105 void close()
override;
106 bool isSequential()
const override;
107 QIODevice::OpenMode openMode()
const override;
109 qint64 pos()
const override;
110 bool seek(qint64 pos)
override;
114 void sendDatagram(
const QByteArray &ba);
120 void datagramReceived(
const QByteArray &ba);
126 void debug(
const QString &message)
131 void warning(
const QString &message)
136 void logReceived(
const QString &message)
141 void logSent(
const QString &message)
146 void payloadTypesChanged()
override;
147 qint64 readData(
char * data, qint64 maxSize)
override;
148 qint64 writeData(
const char * data, qint64 maxSize)
override;
153 void writeDatagram();
156 friend class QXmppRtpAudioChannelPrivate;
157 QXmppRtpAudioChannelPrivate * d;
189 QXmppVideoFrame(
int bytes,
const QSize &size,
int bytesPerLine, PixelFormat format);
191 const uchar *bits()
const;
192 int bytesPerLine()
const;
194 bool isValid()
const;
195 int mappedBytes()
const;
196 PixelFormat pixelFormat()
const;
205 PixelFormat m_pixelFormat;
209 class QXMPP_EXPORT QXmppVideoFormat
214 , m_frameSize(QSize(320, 240))
218 int frameHeight()
const {
219 return m_frameSize.height();
222 int frameWidth()
const {
223 return m_frameSize.width();
226 qreal frameRate()
const {
230 void setFrameRate(qreal frameRate) {
231 m_frameRate = frameRate;
234 QSize frameSize()
const {
238 void setFrameSize(
const QSize &frameSize) {
239 m_frameSize = frameSize;
243 return m_pixelFormat;
247 m_pixelFormat = pixelFormat;
269 void close()
override;
270 QIODevice::OpenMode openMode()
const override;
273 QXmppVideoFormat decoderFormat()
const;
274 QList<QXmppVideoFrame> readFrames();
277 QXmppVideoFormat encoderFormat()
const;
278 void setEncoderFormat(
const QXmppVideoFormat &format);
283 void sendDatagram(
const QByteArray &ba);
286 void datagramReceived(
const QByteArray &ba);
290 void payloadTypesChanged()
override;
294 friend class QXmppRtpVideoChannelPrivate;
295 QXmppRtpVideoChannelPrivate * d;
Tone for the 7 key.
Definition: QXmppRtpChannel.h:90
Tone for the 6 key.
Definition: QXmppRtpChannel.h:89
Warning message.
Definition: QXmppLogger.h:70
Tone for the B key.
Definition: QXmppRtpChannel.h:96
Tone for the A key.
Definition: QXmppRtpChannel.h:95
Tone
This enum is used to describe a DTMF tone.
Definition: QXmppRtpChannel.h:82
Tone for the 8 key.
Definition: QXmppRtpChannel.h:91
MessageType
This enum describes a type of log message.
Definition: QXmppLogger.h:65
The QXmppJinglePayloadType class represents a payload type as specified by XEP-0167: Jingle RTP Sessi...
Definition: QXmppJingleIq.h:40
Tone for the 1 key.
Definition: QXmppRtpChannel.h:84
The QXmppLoggable class represents a source of logging messages.
Definition: QXmppLogger.h:111
Tone for the 3 key.
Definition: QXmppRtpChannel.h:86
Tone for the 4 key.
Definition: QXmppRtpChannel.h:87
Tone for the 5 key.
Definition: QXmppRtpChannel.h:88
Tone for the # key.
Definition: QXmppRtpChannel.h:94
Tone for the 9 key.
Definition: QXmppRtpChannel.h:92
The QXmppRtpAudioChannel class represents an RTP audio channel to a remote party. ...
Definition: QXmppRtpChannel.h:75
Tone for the 2 key.
Definition: QXmppRtpChannel.h:85
Debugging message.
Definition: QXmppLogger.h:68
Tone for the * key.
Definition: QXmppRtpChannel.h:93
PixelFormat
This enum describes a pixel format.
Definition: QXmppRtpChannel.h:168
Message received from server.
Definition: QXmppLogger.h:71
The QXmppRtpVideoChannel class represents an RTP video channel to a remote party. ...
Definition: QXmppRtpChannel.h:261
Message sent to server.
Definition: QXmppLogger.h:72
The QXmppVideoFrame class provides a representation of a frame of video data.
Definition: QXmppRtpChannel.h:164
Tone for the C key.
Definition: QXmppRtpChannel.h:97