mirror of
https://git.sr.ht/~thestr4ng3r/chiaki
synced 2025-07-15 01:23:37 -07:00
Add stub MainWindow
This commit is contained in:
parent
0124fc1ab6
commit
498e48e4f6
4 changed files with 67 additions and 2 deletions
|
@ -2,6 +2,7 @@
|
|||
#include <streamwindow.h>
|
||||
#include <videodecoder.h>
|
||||
#include <discoverycmd.h>
|
||||
#include <mainwindow.h>
|
||||
|
||||
#include <chiaki/session.h>
|
||||
#include <chiaki/base64.h>
|
||||
|
@ -16,6 +17,7 @@
|
|||
|
||||
|
||||
int RunStream(QApplication &app, const QString &host, const QString ®istkey, const QString &ostype, const QString &auth, const QString &morning, const QString &did);
|
||||
int RunMain(QApplication &app);
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
|
@ -47,6 +49,9 @@ int main(int argc, char *argv[])
|
|||
parser.process(app);
|
||||
QStringList args = parser.positionalArguments();
|
||||
|
||||
if(args.length() == 0)
|
||||
return RunMain(app);
|
||||
|
||||
if(args.length() < 2)
|
||||
parser.showHelp(1);
|
||||
|
||||
|
@ -73,6 +78,12 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
}
|
||||
|
||||
int RunMain(QApplication &app)
|
||||
{
|
||||
MainWindow main_window;
|
||||
main_window.show();
|
||||
return app.exec();
|
||||
}
|
||||
|
||||
QAudioOutput *audio_out;
|
||||
QIODevice *audio_io;
|
||||
|
@ -98,7 +109,6 @@ void video_sample_cb(uint8_t *buf, size_t buf_size, void *user)
|
|||
//io_device->PushSample(buf, buf_size);
|
||||
}
|
||||
|
||||
|
||||
int RunStream(QApplication &app, const QString &host, const QString ®istkey, const QString &ostype, const QString &auth, const QString &morning, const QString &did)
|
||||
{
|
||||
QByteArray host_str = host.toUtf8();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue