Skip to content

Commit

Permalink
Fixes for v20beta1 (#705)
Browse files Browse the repository at this point in the history
* Custom platforms fix

* Fix BlackBorder status info

* Fix import v20 backup

* JS indexOf provides better compatibility
  • Loading branch information
awawa-dev authored Jan 6, 2024
1 parent 558c7e0 commit 1d2312c
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 17 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/push-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ jobs:
key: ${{ matrix.linuxVersion }}-${{ matrix.dockerImage }}-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
restore-keys: ${{ matrix.linuxVersion }}-${{ matrix.dockerImage }}-ccache-

- name: Check testing version
if: matrix.linuxVersion == 'bookworm'
- name: Check default version
if: matrix.linuxVersion != 'bullseye'
run: |
echo "USE_STANDARD_INSTALLER_NAME=ON" >> $GITHUB_ENV
Expand Down
2 changes: 1 addition & 1 deletion sources/api/JSONRPC_schema/schema-load-db.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"version": {
"type" : "string",
"required" : true,
"enum" : ["HyperHDR_export_format_v17"]
"enum" : ["HyperHDR_export_format_v17", "HyperHDR_export_format_v20"]
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions sources/base/HyperHdrInstance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ HyperHdrInstance::~HyperHdrInstance()
Info(_log, "[ 7/9] Releasing HyperHDR%i->LED driver wrapper...", _instIndex);
_ledDeviceWrapper = nullptr;
Info(_log, "[ 8/9] Releasing HyperHDR%i->ComponentController...", _instIndex);
_componentController = nullptr;
_componentController = nullptr;
Info(_log, "[ 9/9] Releasing HyperHDR%i->Muxer...", _instIndex);
_muxer = nullptr;

Expand All @@ -142,11 +142,11 @@ void HyperHdrInstance::start()
Info(_log, "Starting the instance");

_instanceConfig = std::unique_ptr<InstanceConfig>(new InstanceConfig(false, _instIndex, this, _readOnlyMode));
_componentController = std::unique_ptr<ComponentController>(new ComponentController(this));
_componentController = std::unique_ptr<ComponentController>(new ComponentController(this));
connect(_componentController.get(), &ComponentController::SignalComponentStateChanged, this, &HyperHdrInstance::SignalComponentStateChanged);
_ledString = LedString::createLedString(getSetting(settings::type::LEDS).array(), LedString::createColorOrder(getSetting(settings::type::DEVICE).object()));
_imageProcessor = std::unique_ptr<ImageToLedManager>(new ImageToLedManager(_ledString, this));
_muxer = std::unique_ptr<Muxer>(new Muxer(_instIndex, static_cast<int>(_ledString.leds().size()), this));
_imageProcessor = std::unique_ptr<ImageToLedManager>(new ImageToLedManager(_ledString, this));
connect(_muxer.get(), &Muxer::SignalPrioritiesChanged, this, &HyperHdrInstance::SignalPrioritiesChanged);
connect(_muxer.get(), &Muxer::SignalVisiblePriorityChanged, this, &HyperHdrInstance::SignalVisiblePriorityChanged);
connect(_muxer.get(), &Muxer::SignalVisibleComponentChanged, this, &HyperHdrInstance::SignalVisibleComponentChanged);
Expand Down Expand Up @@ -441,7 +441,7 @@ void HyperHdrInstance::setNewComponentState(hyperhdr::Components component, bool
if (_componentController == nullptr || _muxer == nullptr)
return;

_componentController->setNewComponentState(component, state);
_componentController->setNewComponentState(component, state);

if (hyperhdr::Components::COMP_LEDDEVICE == component && state)
{
Expand Down
4 changes: 2 additions & 2 deletions sources/hyperhdr/HyperHdrDaemon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -314,10 +314,10 @@ void HyperHdrDaemon::startNetworkServices()
flatProtoThreadClients.push_back(_flatBufferServer);
if (_videoGrabber == nullptr)
{
Warning(_log, "The USB grabber was disabled during build. FlatbufferServer now controlls the HDR state.");
connect(GlobalSignals::getInstance(), &GlobalSignals::SignalRequestComponent, _flatBufferServer, &FlatBufferServer::signalRequestSourceHandler);
Warning(_log, "The USB grabber was disabled during build. FlatbufferServer now controlls the HDR state.");
connect(_flatBufferServer, &FlatBufferServer::SignalSetNewComponentStateToAllInstances, _instanceManager.get(), &HyperHdrManager::SignalSetNewComponentStateToAllInstances);
}
connect(GlobalSignals::getInstance(), &GlobalSignals::SignalRequestComponent, _flatBufferServer, &FlatBufferServer::signalRequestSourceHandler);
connect(_flatProtoThread, &QThread::started, _flatBufferServer, &FlatBufferServer::initServer);
connect(_flatProtoThread, &QThread::finished, _flatBufferServer, &FlatBufferServer::deleteLater);
connect(_instanceManager.get(), &HyperHdrManager::SignalSettingsChanged, _flatBufferServer, &FlatBufferServer::handleSettingsUpdate);
Expand Down
2 changes: 1 addition & 1 deletion sources/hyperhdr/HyperHdrDaemon.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
#elif defined(ENABLE_SOUNDCAPMACOS)
#include <sound-capture/macos/SoundCaptureMacOS.h>
#else
class SoundGrabber : public QObject { public: void ForcedClose() {} };
class SoundCapture : public QObject {};
#endif

#include <utils/Logger.h>
Expand Down
7 changes: 2 additions & 5 deletions sources/utils/LutCalibrator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,8 @@ void LutCalibrator::incomingCommand(QString rootpath, GrabberWrapper* grabberWra
BLOCK_CALL_0(grabberWrapper, stop);
BLOCK_CALL_0(grabberWrapper, start);

for (int i = 0; i < 8; i++)
{
QThread::msleep(200);
QCoreApplication::processEvents(QEventLoop::AllEvents, 100);
}
QThread::msleep(2000);

_log->enable();
}

Expand Down
2 changes: 1 addition & 1 deletion www/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1147,7 +1147,7 @@
"edt_conf_fbs_hdrToneMappingMode_title": "Area for LUT mode effect",
"edt_conf_fbs_hdrToneMappingMode_expl": "Fullscreen or faster Border Mode.",
"general_comp_RAWUDPSERVER" : "UDP raw receiver",
"edt_udp_raw_server" : "A lightweight server for remote synchronization of HyperHDR instances using UDP and raw RGB LED colors. Can also be controlled from another applications (similar to Boblight server) in a very simple way. For HyperHDR synchronization use the 'udpraw' light source in the sender. Important: both instances should have the same number of LEDs and same geometry for this to work.",
"edt_udp_raw_server" : "A lightweight server for remote synchronization of HyperHDR instances using UDP and raw RGB LED colors. Can also be controlled from another applications (similar to Boblight server) in a very simple way. For HyperHDR synchronization use the 'udpraw' light source in the sender.<br/>Important: both instances should have the same number of LEDs (max 490) and same geometry for this to work. <b>Smoothing should only be enabled on one instance, not both!</b>",
"main_menu_grabber_calibration_token" : "LUT calibration",
"grabber_calibration_expl": "This tool allows you to create a new calibrated HDR LUT for your grabber (or external flatbuffers source) as close to the actual input colors as possible.<br/>You need an HDR10 video source that can display this web page, for example: Windows 10 with HDR enabled in the properties of the graphics driver.<br/>The screen may flicker during calibration. The process typically takes about few minutes on a Intel 7 Windows PC (depending on the host CPU resources and the video capturing framerate).<br/><b>The calculations are intensive and put a strain on your equipment.</b><br/>You can monitor the progress in HyperHDR logs using the browser from other device.<br/><br/><br/><b>1</b> If everything is properly connected, this page should be displayed on the TV screen (as HDR content) and live preview in HyperHDR (captured by the grabber).</br><b>2</b> You need to disable HDR tone mapping in the grabber configuration (we will verify this).<br/><b>3</b> Absolute minimum capturing resolution is 384x216 (we will verify this). Recommended are: 1920x1080 at least 1280x720. Aspect 1920/1080 must be preserved.<br/><b>4</b> It's preffered to disable 'Quarter of frame mode' in your grabber properties.<br/><b>5</b> You should set the video format you usually use. This is extremely important especially for the NV12/YUV as we need to check if the color gamut is full or limited.<br/><b>6</b> Before you run the process please put your WWW browser in the full-screen mode (F11 key, we will verify this).<br/><br/>After completing the calibration, your new LUT table file (lut_lin_tables.3d) will be created in the user's HyperHDR home directory and is immediately ready to use when you just enable HDR tone mapping. Please verify HyperHDR logs for details.",
"grabber_calibration_force": "Force auto-detection:",
Expand Down
3 changes: 2 additions & 1 deletion www/js/general.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,8 @@ $(document).ready(function()
else
{
content = JSON.parse(content);
if (typeof content.instances === 'undefined' || typeof content.settings === 'undefined' || content.version !== "HyperHDR_export_format_v17")
if (typeof content.instances === 'undefined' || typeof content.settings === 'undefined' ||
content.version == null || content.version.indexOf("HyperHDR_export_format_v") != 0)
{
showInfoDialog('error', "", $.i18n('infoDialog_import_hyperror_text', f.name));
dis_imp_btn(true);
Expand Down

0 comments on commit 1d2312c

Please sign in to comment.