Last change
on this file since 403 was 324, checked in by Sanahuja Guillaume, 5 years ago |
removing opencv dependency
|
File size:
1.1 KB
|
Rev | Line | |
---|
[324] | 1 | // %flair:license{
|
---|
| 2 | // This file is part of the Flair framework distributed under the
|
---|
| 3 | // CECILL-C License, Version 1.0.
|
---|
| 4 | // %flair:license}
|
---|
| 5 | #ifndef UDTSOCKET_H
|
---|
| 6 | #define UDTSOCKET_H
|
---|
| 7 |
|
---|
| 8 | #include <udt.h>
|
---|
| 9 | #include <QObject>
|
---|
| 10 | #include <QTimer>
|
---|
| 11 |
|
---|
| 12 | class file_ui;
|
---|
| 13 |
|
---|
| 14 | class UdtSocket : public QObject {
|
---|
| 15 | Q_OBJECT
|
---|
| 16 |
|
---|
| 17 | public:
|
---|
| 18 | UdtSocket(UDTSOCKET socket,QString name);
|
---|
| 19 | ~UdtSocket();
|
---|
| 20 | void setName(QString name);
|
---|
| 21 | QString getUDTStats();
|
---|
| 22 |
|
---|
| 23 | private:
|
---|
| 24 | UDTSOCKET socket;
|
---|
| 25 | bool stop,destroySocket;
|
---|
| 26 | QTimer *heartbeat_timer,*udtstats_timer;
|
---|
| 27 | QString name;
|
---|
| 28 | static int uncompressBuffer(char *in, ssize_t in_size, char *out,ssize_t *out_size);
|
---|
| 29 | enum SocketType { unknown, gui, log };
|
---|
| 30 | SocketType socketType;
|
---|
| 31 | unsigned int total_received;
|
---|
| 32 | QString stats;
|
---|
| 33 | int pktSndLossTotal;
|
---|
| 34 |
|
---|
| 35 | signals:
|
---|
| 36 | void dataReady(char *, int size);
|
---|
| 37 | void newFileUI(UDTSOCKET socket);
|
---|
| 38 | void newConnectionLayout(QString name);
|
---|
| 39 | void UDTStats(QString stats,bool loosingPackets);
|
---|
| 40 |
|
---|
| 41 | public slots:
|
---|
| 42 | void receiveData(void);
|
---|
| 43 | void kill(void);
|
---|
| 44 | qint64 write(const char *buf, qint64 size,int ttl=-1,bool inOrder=true);
|
---|
| 45 |
|
---|
| 46 | private slots:
|
---|
| 47 | void heartbeat(void);
|
---|
| 48 | void getUTDStats(void);
|
---|
| 49 | };
|
---|
| 50 |
|
---|
| 51 | #endif // UDTSOCKET_H
|
---|
Note:
See
TracBrowser
for help on using the repository browser.