mirror of
https://git.sr.ht/~thestr4ng3r/chiaki
synced 2025-08-14 10:46:51 -07:00
Make StreamWindow create the Session
This commit is contained in:
parent
c34ce875ba
commit
8e15f498c2
6 changed files with 71 additions and 42 deletions
|
@ -43,6 +43,16 @@ class ChiakiException : public std::exception
|
|||
const char *what() const noexcept override { return msg.toLocal8Bit().constData(); }
|
||||
};
|
||||
|
||||
struct StreamSessionConnectInfo
|
||||
{
|
||||
QString host;
|
||||
QString registkey;
|
||||
QString ostype;
|
||||
QString auth;
|
||||
QString morning;
|
||||
QString did;
|
||||
};
|
||||
|
||||
class StreamSession : public QObject
|
||||
{
|
||||
friend class StreamSessionPrivate;
|
||||
|
@ -67,7 +77,7 @@ class StreamSession : public QObject
|
|||
void PushVideoSample(uint8_t *buf, size_t buf_size);
|
||||
|
||||
public:
|
||||
explicit StreamSession(const QString &host, const QString ®istkey, const QString &ostype, const QString &auth, const QString &morning, const QString &did, QObject *parent = nullptr);
|
||||
explicit StreamSession(const StreamSessionConnectInfo &connect_info, QObject *parent = nullptr);
|
||||
~StreamSession();
|
||||
|
||||
void Stop();
|
||||
|
|
|
@ -20,15 +20,16 @@
|
|||
|
||||
#include <QMainWindow>
|
||||
|
||||
#include "streamsession.h"
|
||||
|
||||
class QLabel;
|
||||
class StreamSession;
|
||||
|
||||
class StreamWindow: public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit StreamWindow(StreamSession *session, QWidget *parent = nullptr);
|
||||
explicit StreamWindow(const StreamSessionConnectInfo &connect_info, QWidget *parent = nullptr);
|
||||
~StreamWindow();
|
||||
|
||||
private:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue