diff --git a/README.md b/README.md index e9f0571..fe73288 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Welcome to Deflect, a C++ library for streaming pixels to other Deflect-based applications, for example [Tide](https://github.com/BlueBrain/Tide). -Deflect offers a stable API marked with version 1.6 (for the client part). +Deflect offers a stable API marked with version 1.7 (for the client part). ## Overview @@ -17,7 +17,7 @@ Deflect provides the following functionality: * Receive input events from the Server and send data to it * Transmitted events include keyboard, mouse and multi-point touch gestures * Compressed or uncompressed streaming -* Fast multi-threaded JPEG compression (using libjpeg-turbo) +* Fast multi-threaded JPEG (de)compression using libjpeg-turbo DeflectQt (optional) provides the following additional functionality: @@ -55,5 +55,5 @@ environments are tested: * Linux: Ubuntu 16.04 and RHEL 6 (Makefile, Ninja; x64) * Mac OS X: 10.7 - 10.10 (Makefile, Ninja; x86_64) -The [latest API documentation](http://bluebrain.github.io/Deflect-0.13/index.html) +The [latest API documentation](http://bluebrain.github.io/Deflect-0.14/index.html) can be found on [bluebrain.github.io](http://bluebrain.github.io). diff --git a/apps/DesktopStreamer/MainWindow.cpp b/apps/DesktopStreamer/MainWindow.cpp index 43500a5..523a106 100644 --- a/apps/DesktopStreamer/MainWindow.cpp +++ b/apps/DesktopStreamer/MainWindow.cpp @@ -78,7 +78,7 @@ const int FAILURE_UPDATE_DELAY = 100; const float FRAME_RATE_DAMPING = 0.1f; // influence of new value between 0-1 } -MainWindow::MainWindow() +MainWindow::MainWindow(Options options) : _streamID(0) , _averageUpdate(0) { @@ -95,6 +95,9 @@ MainWindow::MainWindow() _listView->setEnabled(!text.isEmpty()); }); + if (!options.initialHost.isEmpty()) + _hostComboBox->setCurrentText(options.initialHost); + const auto username = nameutils::getFullUsername(); if (username.isEmpty()) _streamIdLineEdit->setText(QHostInfo::localHostName()); @@ -141,8 +144,12 @@ MainWindow::MainWindow() #ifndef DEFLECT_USE_QT5MACEXTRAS _actionMultiWindowMode->setVisible(false); #endif - _showAdvancedSettings(false); + _actionAdvancedSettings->setChecked(options.showAdvancedSettings); + _showAdvancedSettings(options.showAdvancedSettings); _showSingleWindowMode(); + + if (options.enableStream) + _streamButton->click(); } MainWindow::~MainWindow() diff --git a/apps/DesktopStreamer/MainWindow.h b/apps/DesktopStreamer/MainWindow.h index 18a9ada..a0cf65c 100644 --- a/apps/DesktopStreamer/MainWindow.h +++ b/apps/DesktopStreamer/MainWindow.h @@ -62,7 +62,14 @@ class MainWindow : public QMainWindow, public Ui::MainWindow Q_OBJECT public: - MainWindow(); + struct Options + { + QString initialHost; + bool enableStream; + bool showAdvancedSettings; + }; + + MainWindow(Options options); ~MainWindow(); const QAbstractItemModel* getItemModel() const diff --git a/apps/DesktopStreamer/main.cpp b/apps/DesktopStreamer/main.cpp index d6365a2..71e43b7 100644 --- a/apps/DesktopStreamer/main.cpp +++ b/apps/DesktopStreamer/main.cpp @@ -53,13 +53,27 @@ int main(int argc, char* argv[]) QCommandLineParser parser; parser.setApplicationDescription("Stream your desktop to a remote host"); + QCommandLineOption streamEnabledOption(QStringList() << "e" + << "enable", + "Enable streaming on startup."); + parser.addOption(streamEnabledOption); + QCommandLineOption advancedOption(QStringList() << "a" + << "advanced", + "Show advanced settings."); + parser.addOption(advancedOption); + parser.addPositionalArgument("host", "Default host to stream to."); parser.addHelpOption(); parser.addVersionOption(); parser.process(app); + const auto posArgs = parser.positionalArguments(); + const auto host = posArgs.isEmpty() ? QString() : posArgs.at(0); + const auto enable = parser.isSet(streamEnabledOption); + const auto advanced = parser.isSet(advancedOption); + Q_INIT_RESOURCE(resources); - MainWindow mainWindow; + MainWindow mainWindow{{host, enable, advanced}}; mainWindow.show(); // enter Qt event loop diff --git a/doc/Changelog.md b/doc/Changelog.md index 057a02a..7229552 100644 --- a/doc/Changelog.md +++ b/doc/Changelog.md @@ -3,8 +3,11 @@ Changelog {#Changelog} ## Deflect 0.14 -### 0.14.0 (git master) +### 0.14.0 (23-10-2017) +* [191](https://github.com/BlueBrain/Deflect/pull/191): + DesktopStreamer: default host and other options can be specified on the + command line. * [190](https://github.com/BlueBrain/Deflect/pull/190): DesktopStreamer: jpeg compression can be turned on or off. * [188](https://github.com/BlueBrain/Deflect/pull/188):