-
Notifications
You must be signed in to change notification settings - Fork 0
/
voip.h
48 lines (35 loc) · 797 Bytes
/
voip.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#ifndef VOIP_H
#define VOIP_H
#include <QObject>
#include <QIODevice>
#include <QUdpSocket>
#include <QHostAddress>
#include <QAudioInput>
#include <QAudioOutput>
class voip: public QObject
{
Q_OBJECT
public:
explicit voip( quint16 localPort);
//~voip();
bool start();
bool stop();
void call();
QAudioFormat GetStreamAudioFormat(void);
signals:
void clientAddr(QString name,QHostAddress addr,quint16 port);
private:
QUdpSocket *socket;
QAudioOutput * audio_output;
QAudioInput * audio_input;
QIODevice * audio_device;
QIODevice * audio_device_input;
quint16 localPORT;
QHostAddress remoteHOST;
quint16 remotePORT;
const qint64 maxsize;
public slots:
void readData();
void sendDatagrams();
};
#endif // VOIP_H