Skip to content

Commit

Permalink
feat: improve screen rendering framework
Browse files Browse the repository at this point in the history
  • Loading branch information
acolombier committed Oct 16, 2024
1 parent 6efbf8c commit 4576315
Show file tree
Hide file tree
Showing 10 changed files with 167 additions and 206 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2789,6 +2789,7 @@ if(QML)
src/qml/qmlvisibleeffectsmodel.cpp
src/qml/qmlchainpresetmodel.cpp
src/qml/qmlwaveformoverview.cpp
src/qml/qmlmixxxcontroller.cpp
# The following sources need to be in this target to get QML_ELEMENT properly interpreted
src/control/controlmodel.cpp
src/control/controlsortfiltermodel.cpp
Expand Down
8 changes: 4 additions & 4 deletions res/controllers/DummyDeviceDefaultScreen.qml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import Mixxx.Controls 1.0 as MixxxControls

import "." as Skin

Item {
Mixxx.Controller {
id: root

required property string screenId
Expand All @@ -23,7 +23,7 @@ Item {
property string group: "[Channel1]"
property var deckPlayer: Mixxx.PlayerManager.getPlayer(root.group)

function init(controlerName, isDebug) {
init: function(controlerName, isDebug) {
console.log(`Screen ${root.screenId} has started`)
switch (root.screenId) {
case "jog":
Expand All @@ -34,13 +34,13 @@ Item {
}
}

function shutdown() {
shutdown: function() {
console.log(`Screen ${root.screenId} is stopping`)
loader.sourceComponent = splash
}

// function transformFrame(input: ArrayBuffer, timestamp: date) {
function transformFrame(input, timestamp) {
transformFrame: function(input, timestamp) {
return new ArrayBuffer(0);
}

Expand Down
1 change: 1 addition & 0 deletions src/controllers/controllerscreenpreview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ ControllerScreenPreview::ControllerScreenPreview(
setMaximumWidth(screen.size.width());
m_pStat->setAlignment(Qt::AlignRight);
auto pLayout = make_parented<QVBoxLayout>(this);
pLayout->setContentsMargins(0, 0, 0, 0);
auto* pBottomLayout = new QHBoxLayout();
pLayout->addWidget(m_pFrame);
pBottomLayout->addWidget(make_parented<QLabel>(
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/rendering/controllerrenderingengine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ void ControllerRenderingEngine::send(Controller* controller, const QByteArray& f
DEBUG_ASSERT_THIS_QOBJECT_THREAD_AFFINITY();
ScopedTimer t(QStringLiteral("ControllerRenderingEngine::send"));
if (!frame.isEmpty()) {
controller->sendBytes(frame);
VERIFY_OR_TERMINATE(controller->sendBytes(frame), "Unable to send frame to device");
}

if (CmdlineArgs::Instance()
Expand Down
Loading

0 comments on commit 4576315

Please sign in to comment.