Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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:

Expand Down Expand Up @@ -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).
11 changes: 9 additions & 2 deletions apps/DesktopStreamer/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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());
Expand Down Expand Up @@ -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()
Expand Down
9 changes: 8 additions & 1 deletion apps/DesktopStreamer/MainWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 15 additions & 1 deletion apps/DesktopStreamer/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion doc/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down