Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/xcb grabber #912

Merged

Conversation

m-seker
Copy link
Contributor

@m-seker m-seker commented Jul 27, 2020

Summary

Add XCB grabber. An alternative for X11 grabber.

libx11 has some inherent problems that can't be fixed (#892)

This PR introduces an alternative. Grabbing via XCB should also be a bit faster. Maybe we can make this default instead of X11 in the future.

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Docs
  • Build-related changes
  • Other, please describe:

If changing the UI of web configuration, please provide the before/after screenshot:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and migration path for existing setups:

The PR fulfills these requirements:

  • When resolving a specific issue, it's referenced in the PR's body (e.g. Fixes: #xxx[,#xxx], where "xxx" is the issue number)

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature
  • Related documents have been updated (docs/docs/en)
  • Related tests have been updated

PLEASE DON'T FORGET TO ADD YOUR CHANGES TO CHANGELOG.MD

  • Yes, CHANGELOG.md is also updated

To avoid wasting your time, it's best to open a feature request issue first and wait for approval before working on it.

Other information:

@m-seker m-seker requested review from brindosch, Paulchen-Panther, Lord-Grey and tpmodding and removed request for brindosch July 27, 2020 01:51
@hyperion-project
Copy link

Hello @m-seker 👋

I'm your friendly neighborhood bot and would like to say thank you for
submitting a pull request to Hyperion!

So that you and other users can test your changes more quickly,
you can find your workflow artifacts here.

If you make changes to your PR, i create a new link to your workflow artifacts.

Best regards,
Hyperion-Project

@hyperion-project
Copy link

Here is your new link to your workflow artifacts.

@hyperion-project
Copy link

Here is your new link to your workflow artifacts.

@hyperion-project
Copy link

Here is your new link to your workflow artifacts.

@hyperion-project
Copy link

Here is your new link to your workflow artifacts.

@hyperion-project
Copy link

Here is your new link to your workflow artifacts.

@@ -0,0 +1,278 @@
#.rst:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got this file from another project

@@ -0,0 +1,180 @@
#.rst:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got this file from another project

@@ -72,8 +72,13 @@ void X11Grabber::setupResources()
_shminfo.readOnly = False;
XShmAttach(_x11Display, &_shminfo);
}

Copy link
Contributor Author

@m-seker m-seker Jul 27, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes a bug in X11 grabber. Image resampler needs to be reinitialized during resource setup (Pixel decimation can't be set on the fly without this fix)

}

if (isActive())
{
if (_grabber.updateScreenDimensions() >= 0 )
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason for calling updateScreenDimensions every time we want to grab a frame ?

@@ -0,0 +1,436 @@
#include <utils/Logger.h>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to make this file as similar as possible to X11 grabber

@@ -0,0 +1,38 @@
cmake_minimum_required(VERSION 3.0.0)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

copied from hyperion-x11

@@ -0,0 +1,47 @@

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

copied from hyperion-x11

@@ -0,0 +1,115 @@

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

copied from hyperion-x11

@@ -0,0 +1,57 @@
#pragma once
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

copied from hyperion-x11

@@ -117,8 +118,6 @@ HyperionDaemon::HyperionDaemon(const QString rootPath, QObject *parent, const bo
// spawn all Hyperion instances (non blocking)
_instanceManager->startAll();

//connect(_hyperion,SIGNAL(closing()),this,SLOT(freeObjects())); // TODO for app restart, refactor required
Copy link
Contributor Author

@m-seker m-seker Jul 27, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already done #894

@hyperion-project
Copy link

Here is your new link to your workflow artifacts.

@hyperion-project
Copy link

Here is your new link to your workflow artifacts.

@m-seker
Copy link
Contributor Author

m-seker commented Aug 1, 2020

If I build with Platform "x11-dev" (using create_all_releases.sh)
only the XCB Grabber is enabled. I would have expected x11 and xcb are enabled.

i.e. make_release x86x64 x11-dev

same for building with platform = x11

-- PLATFORM: x11
-- ENABLE_AMLOGIC = OFF
-- ENABLE_DISPMANX = OFF
-- ENABLE_FB = ON
-- ENABLE_OSX = OFF
-- ENABLE_SPIDEV   = ON
-- ENABLE_TINKERFORGE = ON
-- ENABLE_V4L2 = ON
-- ENABLE_WS281XPWM = OFF
-- ENABLE_AVAHI = ON
-- ENABLE_USB_HID = ON
-- ENABLE_CEC = ON
-- ENABLE_X11 = OFF
-- ENABLE_XCB = ON
-- ENABLE_QT = ON
-- ENABLE_TESTS = OFF
-- ENABLE_PROFILER = OFF

That's interesting. They are set to true next to each other :
https://github.com/hyperion-project/hyperion.ng/pull/912/files#diff-af3b638bc2a3e6c650974192a53c7291R125

@Paulchen-Panther do you have any idea why this might happen ?

EDIT : I can't reprodice btw.

@m-seker
Copy link
Contributor Author

m-seker commented Aug 1, 2020

Now selecting Xcb as Grabber and saving:

2020-08-01T20:40:25.790 hyperiond WEBSOCKET    : <DEBUG> WebSocketClient.cpp:204:sendClose() | send close: 1000 
2020-08-01T20:40:25.996 hyperiond WEBSOCKET    : <DEBUG> WebSocketClient.cpp:30:WebSocketClient() | New connection from ::1
2020-08-01T20:40:25.996 hyperiond WEBSOCKET    : <DEBUG> JsonAPI.cpp:107:handleInstanceSwitch() | Client '::1' switch to Hyperion instance 0
2020-08-01T20:44:52.473 hyperiond DAEMON       : <INFO> set screen capture device to 'xcb'
2020-08-01T20:44:52.473 hyperiond XCBGRABBER   : <DEBUG> Grabber.cpp:31:setVideoMode() | Set videomode to 0
2020-08-01T20:44:52.474 hyperiond DAEMON       : <INFO> XCB grabber created
2020-08-01T20:45:07.387 hyperiond WEBSOCKET    : <DEBUG> WebSocketClient.cpp:204:sendClose() | send close: 1000 
2020-08-01T20:45:07.709 hyperiond WEBSOCKET    : <DEBUG> WebSocketClient.cpp:30:WebSocketClient() | New connection from ::1
2020-08-01T20:45:07.709 hyperiond WEBSOCKET    : <DEBUG> JsonAPI.cpp:107:handleInstanceSwitch() | Client '::1' switch to Hyperion instance 0

Xcb still does not show up as a Grabber:

image

Disable + Enable Platform capture
-> Now Xcb shows up and is grabbing

image

2020-08-01T20:45:07.709 hyperiond WEBSOCKET    : <DEBUG> JsonAPI.cpp:107:handleInstanceSwitch() | Client '::1' switch to Hyperion instance 0
2020-08-01T20:47:05.519 hyperiond HYPERION     : <DEBUG> PriorityMuxer.cpp:255:clearInput() | Removed source priority 250
2020-08-01T20:47:05.519 hyperiond COMPONENTREG : <DEBUG> ComponentRegister.cpp:36:setNewComponentState() | Framegrabber: disabled
2020-08-01T20:47:07.692 hyperiond HYPERION     : <DEBUG> PriorityMuxer.cpp:158:registerInput() | Register new input 'System/GRABBER' with priority 250 as inactive
2020-08-01T20:47:07.692 hyperiond COMPONENTREG : <DEBUG> ComponentRegister.cpp:36:setNewComponentState() | Framegrabber: enabled
2020-08-01T20:47:07.692 hyperiond Xcb          : <DEBUG> GrabberWrapper.cpp:49:start() | Grabber start()
2020-08-01T20:47:07.790 hyperiond XCBGRABBER   : <INFO> Update of screen resolution: [0x0]  to [3280x1200]
2020-08-01T20:47:07.790 hyperiond XCBGRABBER   : <INFO> Using XcbRender for grabbing
2020-08-01T20:47:07.791 hyperiond XCBGRABBER   : <INFO> Capture interface is now enabled
2020-08-01T20:47:07.804 hyperiond HYPERION     : <DEBUG> PriorityMuxer.cpp:238:setInputImage() | Priority 250 is now active
2020-08-01T20:47:07.804 hyperiond HYPERION     : <DEBUG> PriorityMuxer.cpp:333:setCurrentTime() | Set visible priority to 250

I actually didn't think a case where X11 is disabled but XCB is enabed. See my previous post.

But I didn't think about a custom compile case. Someone may want to just disable X11 in compile time and leave XCB eanbled. So yes, that's an issue, I'll check.

@Lord-Grey
Copy link
Collaborator

„ I actually didn't think a case where X11 is disabled but XCB is enabed. See my previous post.“

As you added Xcb as THE alternative to x11, because x11 has limitations, I would have expected that Xcb is the default going forward and has higher priority during configuration.
This would be just in line why you brought Xcb forward, if I got it right...
After this PR x11 should only be the fall-back, or?

@Paulchen-Panther
Copy link
Member

Maybe we can make this default instead of X11 in the future.

@Lord-Grey
Copy link
Collaborator

Lord-Grey commented Aug 1, 2020

„ That's interesting. They are set to true next to each other :“
Let me rerun the build tomorrow again.
I may have not removed the previous build directory, as I am doing incremental compiles.

Looks like the x11 value was used from the CMake Cache

@m-seker
Copy link
Contributor Author

m-seker commented Aug 1, 2020

„ I actually didn't think a case where X11 is disabled but XCB is enabed. See my previous post.“

As you added Xcb as THE alternative to x11, because x11 has limitations, I would have expected that Xcb is the default going forward and has higher priority during configuration.
This would be just in line why you brought Xcb forward, if I got it right...
After this PR x11 should only be the fall-back, or?

I would say let's test XCB first in production before reducing priority of X11.

@Paulchen-Panther
Copy link
Member

I do not understand the parameters. Param 1 (RELEASE) is 'x86x64 ' and Param 2 (PLATFORM) is 'x86'?
https://github.com/hyperion-project/hyperion.ng/blob/master/bin/create_all_releases.sh#L31

@Paulchen-Panther
Copy link
Member

PLATFORM is definitely wrong

@Lord-Grey
Copy link
Collaborator

Lord-Grey commented Aug 1, 2020

Yes, 2nd Parameter is wrong in the repo.

Edit: I just fixed it.

This is why I am running with an updated version.
See above.

I run with x11 or x11-dev as platform

Nevertheless, let me rebuild the CMake Cache tomorrow. Seems the behavior is my fault.

@Paulchen-Panther
Copy link
Member

Paulchen-Panther commented Aug 1, 2020

@Lord-Grey Warum testest du nicht einfach das Artefakt? Es wurde dafür eingeführt.
Why don't you just test the artifact? It was introduced for that.

@Lord-Grey
Copy link
Collaborator

Lord-Grey commented Aug 1, 2020

@paulchenpanther Ich habe vom Start her getestet. Wenn Scripts angepasst wurden, dann gehören die natürlich zum Testumfang dazu.
Wir brauchen uns aber hier nicht daran aufhalten, sondern können zu den anderen Punkten gehen.
Wenn ich teste, dann gehe ich davon aus, das die Hauptfunktionalität geht. Ich teste dann darum herum. Darum geht es beim Testen.

@Paulchen-Panther
Copy link
Member

Paulchen-Panther commented Aug 1, 2020

Du solltest aber erst die Artefakte testen. Danach kannst du gerne selber kompilieren und testen. Das ist der Sinn der Artefakte.
edit: Das Script create_all_releases.sh wurde nicht verändert.

@Paulchen-Panther
Copy link
Member

Trotzdem danke für das testen für das Script. 👍

@Lord-Grey
Copy link
Collaborator

If I build with Platform "x11-dev" (using create_all_releases.sh)
only the XCB Grabber is enabled. I would have expected x11 and xcb are enabled.

i.e. make_release x86x64 x11-dev

same for building with platform = x11

-- PLATFORM: x11
-- ENABLE_AMLOGIC = OFF
-- ENABLE_DISPMANX = OFF
-- ENABLE_FB = ON
-- ENABLE_OSX = OFF
-- ENABLE_SPIDEV   = ON
-- ENABLE_TINKERFORGE = ON
-- ENABLE_V4L2 = ON
-- ENABLE_WS281XPWM = OFF
-- ENABLE_AVAHI = ON
-- ENABLE_USB_HID = ON
-- ENABLE_CEC = ON
-- ENABLE_X11 = OFF
-- ENABLE_XCB = ON
-- ENABLE_QT = ON
-- ENABLE_TESTS = OFF
-- ENABLE_PROFILER = OFF

Edit: If X11 and Xcb are enabled during build, this issues does not occur.
The standard CMake script works ok. Was my fault not deleting the CMake Cache before.
In case a developer put the values manually, we have to bear in mind that this might happen.

@Lord-Grey
Copy link
Collaborator

Additional Finding:

A High Picture decimation is not considered correctly.

Set Picture decimation = 30

X11 Output

image

Xcb Output

image

@Lord-Grey
Copy link
Collaborator

Test Summary:

Xcb grabber's main functionality works!

Open topics (as X11 supports this correctly):

  • Auto detection of resolution change
  • High Picture decimation

@m-seker
Copy link
Contributor Author

m-seker commented Aug 2, 2020

Test Summary:

Xcb grabber's main functionality works!

Open topics (as X11 supports this correctly):

  • Auto detection of resolution change
  • High Picture decimation

Can you share your logs ? Pixel decimation works OK on me. This must be happening because of an extension that happens to be in my system but not yours, so grabber chooses an alternate path to apply decimation which I don't see

EDIT : Resolution detection and selecting XCB as default in case X11 is not available is fixed, see my last commit :88aa4d0
Thanks for testing.

@hyperion-project
Copy link

Here is your new link to your workflow artifacts.

@Lord-Grey
Copy link
Collaborator

@m-seker
Re-tested the executable linked with the PR

a) Auto detection of resolution change - Works
b) High Picture decimation - Still not working

I did a full screenshot:
With decimation = 30 , a lot s of black space rather then screen content
Log file is with a restart of hyperion with Xcb and decimation=30.

image

./bin/hyperiond -d -u help
Qt: Session management error: None of the authentication protocols specified are supported
2020-08-02T18:05:35.065 hyperiond MAIN         : <INFO> Set user data path to '/home/thomas/Downloads/amd64(1)/Hyperion-2.0.0-alpha.7-PR#912-Linux-x86_64/share/hyperion/help'
2020-08-02T18:05:35.077 hyperiond DAEMON       : <DEBUG> PythonInit.cpp:45:PythonInit() | Initializing Python interpreter
2020-08-02T18:05:35.090 hyperiond SETTINGSMGR  : <DEBUG> SettingsManager.cpp:108:SettingsManager() | Settings database initialized
2020-08-02T18:05:35.091 hyperiond DAEMON       : <INFO> CEC handler created
2020-08-02T18:05:35.092 hyperiond EFFECTFILES  : <INFO> 39 effects loaded from directory :/effects/
2020-08-02T18:05:35.093 hyperiond EFFECTFILES  : <INFO> 22 effect schemas loaded from directory :/effects/schema/
2020-08-02T18:05:35.093 hyperiond EFFECTFILES  : <INFO> 0 effects loaded from directory help/custom-effects
2020-08-02T18:05:35.098 hyperiond SETTINGSMGR  : <DEBUG> SettingsManager.cpp:108:SettingsManager() | Settings database initialized
2020-08-02T18:05:35.098 hyperiond BLACKBORDER  : <DEBUG> BlackBorderProcessor.cpp:65:handleSettingsUpdate() | Set mode to: default
2020-08-02T18:05:35.098 hyperiond COMPONENTREG : <DEBUG> ComponentRegister.cpp:36:setNewComponentState() | Blackborder detector: enabled
2020-08-02T18:05:35.101 hyperiond DAEMON       : <INFO> set screen capture device to 'xcb'
2020-08-02T18:05:35.101 hyperiond XCBGRABBER   : <DEBUG> Grabber.cpp:31:setVideoMode() | Set videomode to 0
2020-08-02T18:05:35.101 hyperiond DAEMON       : <INFO> XCB grabber created
2020-08-02T18:05:35.102 hyperiond V4L2:AUTO    : <DEBUG> Grabber.cpp:31:setVideoMode() | Set videomode to 0
2020-08-02T18:05:35.102 hyperiond V4L2:AUTO    : <INFO> Signal threshold set to: {12, 12, 12}
2020-08-02T18:05:35.102 hyperiond V4L2:AUTO    : <INFO> CEC detection is now disabled
2020-08-02T18:05:35.102 hyperiond V4L2:AUTO    : <INFO> Signal detection is now disabled
2020-08-02T18:05:35.102 hyperiond V4L2:AUTO    : <INFO> Signal detection area set to: 0.250000,0.250000 x 0.750000,0.750000
2020-08-02T18:05:35.102 hyperiond DAEMON       : <DEBUG> hyperiond.cpp:548:handleSettingsUpdate() | V4L2 grabber created
2020-08-02T18:05:35.102 hyperiond JSONSERVER   : <DEBUG> JsonServer.cpp:27:JsonServer() | Created instance
2020-08-02T18:05:35.102 hyperiond JSONSERVER   : <INFO> Started on port 19444
2020-08-02T18:05:35.103 hyperiond PROTOSERVER  : <INFO> Started on port 19445
2020-08-02T18:05:35.103 hyperiond WEBSERVER    : <DEBUG> WebServer.cpp:32:initServer() | Initialize Webserver
2020-08-02T18:05:35.104 hyperiond WEBSERVER    : <DEBUG> WebServer.cpp:32:initServer() | Initialize Webserver
2020-08-02T18:05:35.104 hyperiond MAIN         : <INFO> start systray
2020-08-02T18:05:35.107 hyperiond FLATBUFSERVE : <INFO> Started on port 19400
2020-08-02T18:05:35.108 hyperiond LEDDEVICE    : <INFO> Start LedDevice 'file'.
2020-08-02T18:05:35.108 hyperiond COMPONENTREG : <DEBUG> ComponentRegister.cpp:36:setNewComponentState() | Smoothing: enabled
2020-08-02T18:05:35.108 hyperiond LEDDEVICE    : <DEBUG> LedDevice.cpp:133:init() | deviceConfig: [{"colorOrder":"rgb","currentLedCount":26,"hardwareLedCount":1,"latchTime":0,"output":"/dev/null","rewriteTime":0,"type":"file"}]
2020-08-02T18:05:35.108 hyperiond LEDDEVICE    : <DEBUG> LedDeviceFile.cpp:55:open() | QIODevice::WriteOnly, /dev/null
2020-08-02T18:05:35.108 hyperiond FLATBUFCONN  : <INFO> Connecting to Hyperion: 127.0.0.1:19401
2020-08-02T18:05:35.109 hyperiond EFFECTENGINE : <INFO> Run effect "Rainbow swirl fast" on channel 0
2020-08-02T18:05:35.109 hyperiond EFFECTENGINE : <DEBUG> EffectEngine.cpp:187:runEffectScript() | Start the effect: name [Rainbow swirl fast], smoothCfg [2]
2020-08-02T18:05:35.109 hyperiond HYPERION     : <DEBUG> PriorityMuxer.cpp:158:registerInput() | Register new input 'System/EFFECT' with priority 0 as inactive
2020-08-02T18:05:35.109 hyperiond HYPERION     : <INFO> Initial foreground effect 'Rainbow swirl fast' started
2020-08-02T18:05:35.109 hyperiond EFFECTENGINE : <INFO> Run effect "Warm mood blobs" on channel 254
2020-08-02T18:05:35.109 hyperiond EFFECTENGINE : <DEBUG> EffectEngine.cpp:187:runEffectScript() | Start the effect: name [Warm mood blobs], smoothCfg [2]
2020-08-02T18:05:35.109 hyperiond HYPERION     : <DEBUG> PriorityMuxer.cpp:158:registerInput() | Register new input 'System/EFFECT' with priority 254 as inactive
2020-08-02T18:05:35.110 hyperiond HYPERION     : <INFO> Inital background effect 'Warm mood blobs' started
2020-08-02T18:05:35.110 hyperiond HYPERION     : <DEBUG> PriorityMuxer.cpp:158:registerInput() | Register new input 'System/GRABBER' with priority 250 as inactive
2020-08-02T18:05:35.110 hyperiond COMPONENTREG : <DEBUG> ComponentRegister.cpp:36:setNewComponentState() | Framegrabber: enabled
2020-08-02T18:05:35.110 hyperiond BOBLIGHT     : <DEBUG> BoblightServer.cpp:28:BoblightServer() | Instance created
2020-08-02T18:05:35.110 hyperiond COMPONENTREG : <DEBUG> ComponentRegister.cpp:36:setNewComponentState() | LED device: enabled
2020-08-02T18:05:35.113 hyperiond WEBSERVER    : <DEBUG> WebServer.cpp:90:handleSettingsUpdate() | Apply Webserver settings
2020-08-02T18:05:35.113 hyperiond WEBSERVER    : <DEBUG> WebServer.cpp:108:handleSettingsUpdate() | Set document root to: :/webconfig
2020-08-02T18:05:35.113 hyperiond WEBSERVER    : <INFO> Started on port 8090 name 'Hyperion Webserver'
2020-08-02T18:05:35.113 hyperiond WEBSERVER    : <DEBUG> WebServer.cpp:90:handleSettingsUpdate() | Apply Webserver settings
2020-08-02T18:05:35.113 hyperiond WEBSERVER    : <DEBUG> WebServer.cpp:108:handleSettingsUpdate() | Set document root to: :/webconfig
2020-08-02T18:05:35.114 hyperiond WEBSERVER    : <DEBUG> WebServer.cpp:174:handleSettingsUpdate() | Setup SSL certificate
2020-08-02T18:05:35.114 hyperiond WEBSERVER    : <DEBUG> WebServer.cpp:190:handleSettingsUpdate() | Setup private SSL key
2020-08-02T18:05:35.114 hyperiond WEBSERVER    : <INFO> Started on port 8092 name 'Hyperion Webserver'
2020-08-02T18:05:35.133 hyperiond Xcb          : <DEBUG> GrabberWrapper.cpp:49:start() | Grabber start()
2020-08-02T18:05:35.133 hyperiond HYPERION     : <INFO> Hyperion instance 'First LED Hardware instance' has been started
2020-08-02T18:05:35.154 hyperiond HYPERION     : <DEBUG> PriorityMuxer.cpp:238:setInputImage() | Priority 0 is now active
2020-08-02T18:05:35.154 hyperiond HYPERION     : <DEBUG> PriorityMuxer.cpp:333:setCurrentTime() | Set visible priority to 0
2020-08-02T18:05:35.174 hyperiond HYPERION     : <DEBUG> PriorityMuxer.cpp:198:setInput() | Priority 254 is now active
2020-08-02T18:05:35.240 hyperiond XCBGRABBER   : <INFO> XcbRandR : available
2020-08-02T18:05:35.240 hyperiond XCBGRABBER   : <INFO> XcbRender : available
2020-08-02T18:05:35.240 hyperiond XCBGRABBER   : <INFO> XcbShm : available
2020-08-02T18:05:35.240 hyperiond XCBGRABBER   : <INFO> XcbPixmap : available
2020-08-02T18:05:35.240 hyperiond XCBGRABBER   : <INFO> Update of screen resolution: [0x0]  to [1680x1050]
2020-08-02T18:05:35.240 hyperiond XCBGRABBER   : <INFO> Using XcbRender for grabbing
2020-08-02T18:05:35.240 hyperiond XCBGRABBER   : <INFO> Capture interface is now enabled
2020-08-02T18:05:35.245 hyperiond HYPERION     : <DEBUG> PriorityMuxer.cpp:238:setInputImage() | Priority 250 is now active
2020-08-02T18:05:35.426 hyperiond WEBSOCKET    : <DEBUG> WebSocketClient.cpp:30:WebSocketClient() | New connection from ::1
2020-08-02T18:05:35.426 hyperiond WEBSOCKET    : <DEBUG> JsonAPI.cpp:107:handleInstanceSwitch() | Client '::1' switch to Hyperion instance 0
2020-08-02T18:05:38.282 hyperiond HYPERION     : <DEBUG> PriorityMuxer.cpp:298:setCurrentTime() | Timeout clear for priority 0
2020-08-02T18:05:38.532 hyperiond HYPERION     : <DEBUG> PriorityMuxer.cpp:333:setCurrentTime() | Set visible priority to 250

@Paulchen-Panther
Copy link
Member

Paulchen-Panther commented Aug 2, 2020

Tested amd64 Artifakt under Mint 20.
Mint_XCB

paulchen@paulchen-VirtualBox:~/Schreibtisch/hyperion/bin$ ./hyperiond -d
Qt: Session management error: Authentication Rejected, reason : None of the authentication protocols specified are supported and host-based authentication failed
2020-08-02T19:03:34.273 hyperiond MAIN         : <INFO> Set user data path to '/home/paulchen/.hyperion'
2020-08-02T19:03:34.440 hyperiond DAEMON       : <DEBUG> PythonInit.cpp:45:PythonInit() | Initializing Python interpreter
2020-08-02T19:03:34.669 hyperiond SETTINGSMGR  : <DEBUG> SettingsManager.cpp:108:SettingsManager() | Settings database initialized
2020-08-02T19:03:34.669 hyperiond DAEMON       : <INFO> CEC handler created
2020-08-02T19:03:34.680 hyperiond EFFECTFILES  : <INFO> 39 effects loaded from directory :/effects/
2020-08-02T19:03:34.684 hyperiond EFFECTFILES  : <INFO> 22 effect schemas loaded from directory :/effects/schema/
2020-08-02T19:03:34.685 hyperiond EFFECTFILES  : <INFO> New Effect path "/home/paulchen/.hyperion/custom-effects" created successfull
2020-08-02T19:03:34.708 hyperiond SETTINGSMGR  : <DEBUG> SettingsManager.cpp:108:SettingsManager() | Settings database initialized
2020-08-02T19:03:34.710 hyperiond BLACKBORDER  : <DEBUG> BlackBorderProcessor.cpp:65:handleSettingsUpdate() | Set mode to: default
2020-08-02T19:03:34.711 hyperiond COMPONENTREG : <DEBUG> ComponentRegister.cpp:36:setNewComponentState() | Blackborder detector: enabled
2020-08-02T19:03:34.728 hyperiond DAEMON       : <INFO> set screen capture device to 'x11'
2020-08-02T19:03:34.729 hyperiond X11GRABBER   : <DEBUG> Grabber.cpp:31:setVideoMode() | Set videomode to 0
2020-08-02T19:03:34.729 hyperiond DAEMON       : <INFO> X11 grabber created
2020-08-02T19:03:34.730 hyperiond V4L2:AUTO    : <DEBUG> Grabber.cpp:31:setVideoMode() | Set videomode to 0
2020-08-02T19:03:34.730 hyperiond V4L2:AUTO    : <INFO> Signal threshold set to: {12, 12, 12}
2020-08-02T19:03:34.730 hyperiond V4L2:AUTO    : <INFO> CEC detection is now disabled
2020-08-02T19:03:34.730 hyperiond V4L2:AUTO    : <INFO> Signal detection is now disabled
2020-08-02T19:03:34.730 hyperiond V4L2:AUTO    : <INFO> Signal detection area set to: 0.250000,0.250000 x 0.750000,0.750000
2020-08-02T19:03:34.730 hyperiond DAEMON       : <DEBUG> hyperiond.cpp:548:handleSettingsUpdate() | V4L2 grabber created
2020-08-02T19:03:34.731 hyperiond JSONSERVER   : <DEBUG> JsonServer.cpp:27:JsonServer() | Created instance
2020-08-02T19:03:34.731 hyperiond JSONSERVER   : <INFO> Started on port 19444
2020-08-02T19:03:34.733 hyperiond FLATBUFSERVE : <INFO> Started on port 19400
2020-08-02T19:03:34.733 hyperiond PROTOSERVER  : <INFO> Started on port 19445
2020-08-02T19:03:34.733 hyperiond WEBSERVER    : <DEBUG> WebServer.cpp:32:initServer() | Initialize Webserver
2020-08-02T19:03:34.734 hyperiond WEBSERVER    : <DEBUG> WebServer.cpp:32:initServer() | Initialize Webserver
2020-08-02T19:03:34.735 hyperiond MAIN         : <INFO> start systray
2020-08-02T19:03:34.741 hyperiond COMPONENTREG : <DEBUG> ComponentRegister.cpp:36:setNewComponentState() | Smoothing: enabled
2020-08-02T19:03:34.745 hyperiond FLATBUFCONN  : <INFO> Connecting to Hyperion: 127.0.0.1:19401
2020-08-02T19:03:34.750 hyperiond LEDDEVICE    : <INFO> Start LedDevice 'file'.
2020-08-02T19:03:34.750 hyperiond LEDDEVICE    : <DEBUG> LedDevice.cpp:133:init() | deviceConfig: [{"colorOrder":"rgb","currentLedCount":26,"hardwareLedCount":1,"latchTime":0,"output":"/dev/null","rewriteTime":0,"type":"file"}]
2020-08-02T19:03:34.751 hyperiond LEDDEVICE    : <DEBUG> LedDeviceFile.cpp:55:open() | QIODevice::WriteOnly, /dev/null
2020-08-02T19:03:34.761 hyperiond WEBSERVER    : <DEBUG> WebServer.cpp:90:handleSettingsUpdate() | Apply Webserver settings
2020-08-02T19:03:34.760 hyperiond WEBSERVER    : <DEBUG> WebServer.cpp:90:handleSettingsUpdate() | Apply Webserver settings
2020-08-02T19:03:34.761 hyperiond WEBSERVER    : <DEBUG> WebServer.cpp:108:handleSettingsUpdate() | Set document root to: :/webconfig
2020-08-02T19:03:34.761 hyperiond WEBSERVER    : <DEBUG> WebServer.cpp:108:handleSettingsUpdate() | Set document root to: :/webconfig
2020-08-02T19:03:34.762 hyperiond WEBSERVER    : <INFO> Started on port 8090 name 'Hyperion Webserver'
2020-08-02T19:03:34.764 hyperiond EFFECTENGINE : <INFO> Run effect "Rainbow swirl fast" on channel 0
2020-08-02T19:03:34.764 hyperiond EFFECTENGINE : <DEBUG> EffectEngine.cpp:187:runEffectScript() | Start the effect: name [Rainbow swirl fast], smoothCfg [2]
2020-08-02T19:03:34.765 hyperiond HYPERION     : <DEBUG> PriorityMuxer.cpp:158:registerInput() | Register new input 'System/EFFECT' with priority 0 as inactive
2020-08-02T19:03:34.767 hyperiond HYPERION     : <INFO> Initial foreground effect 'Rainbow swirl fast' started
2020-08-02T19:03:34.768 hyperiond EFFECTENGINE : <INFO> Run effect "Warm mood blobs" on channel 254
2020-08-02T19:03:34.768 hyperiond EFFECTENGINE : <DEBUG> EffectEngine.cpp:187:runEffectScript() | Start the effect: name [Warm mood blobs], smoothCfg [2]
2020-08-02T19:03:34.768 hyperiond HYPERION     : <DEBUG> PriorityMuxer.cpp:158:registerInput() | Register new input 'System/EFFECT' with priority 254 as inactive
2020-08-02T19:03:34.769 hyperiond HYPERION     : <INFO> Inital background effect 'Warm mood blobs' started
2020-08-02T19:03:34.770 hyperiond HYPERION     : <DEBUG> PriorityMuxer.cpp:158:registerInput() | Register new input 'System/GRABBER' with priority 250 as inactive
2020-08-02T19:03:34.770 hyperiond COMPONENTREG : <DEBUG> ComponentRegister.cpp:36:setNewComponentState() | Framegrabber: enabled
2020-08-02T19:03:34.779 hyperiond WEBSERVER    : <DEBUG> WebServer.cpp:174:handleSettingsUpdate() | Setup SSL certificate
2020-08-02T19:03:34.782 hyperiond WEBSERVER    : <DEBUG> WebServer.cpp:190:handleSettingsUpdate() | Setup private SSL key
2020-08-02T19:03:34.782 hyperiond WEBSERVER    : <INFO> Started on port 8092 name 'Hyperion Webserver'
2020-08-02T19:03:34.771 hyperiond BOBLIGHT     : <DEBUG> BoblightServer.cpp:28:BoblightServer() | Instance created
2020-08-02T19:03:34.786 hyperiond COMPONENTREG : <DEBUG> ComponentRegister.cpp:36:setNewComponentState() | LED device: enabled
2020-08-02T19:03:34.898 hyperiond X11          : <DEBUG> GrabberWrapper.cpp:49:start() | Grabber start()
2020-08-02T19:03:34.900 hyperiond HYPERION     : <INFO> Hyperion instance 'First LED Hardware instance' has been started
2020-08-02T19:03:35.013 hyperiond X11GRABBER   : <INFO> Update of screen resolution: [0x0]  to [1280x768]
2020-08-02T19:03:35.014 hyperiond X11GRABBER   : <INFO> Using XRender for grabbing
2020-08-02T19:03:35.014 hyperiond X11GRABBER   : <INFO> Update output image resolution: [0x0]  to [160x96]
2020-08-02T19:03:35.014 hyperiond X11GRABBER   : <INFO> Capture interface is now enabled
2020-08-02T19:03:35.020 hyperiond HYPERION     : <DEBUG> PriorityMuxer.cpp:238:setInputImage() | Priority 250 is now active
2020-08-02T19:03:35.020 hyperiond HYPERION     : <DEBUG> PriorityMuxer.cpp:333:setCurrentTime() | Set visible priority to 0
2020-08-02T19:03:35.021 hyperiond HYPERION     : <DEBUG> PriorityMuxer.cpp:198:setInput() | Priority 254 is now active
2020-08-02T19:03:35.045 hyperiond HYPERION     : <DEBUG> PriorityMuxer.cpp:238:setInputImage() | Priority 0 is now active
2020-08-02T19:03:38.061 hyperiond HYPERION     : <DEBUG> PriorityMuxer.cpp:298:setCurrentTime() | Timeout clear for priority 0
2020-08-02T19:03:38.303 hyperiond HYPERION     : <DEBUG> PriorityMuxer.cpp:333:setCurrentTime() | Set visible priority to 250
2020-08-02T19:03:54.689 hyperiond X11GRABBER   : <INFO> Update of screen resolution: [1280x768]  to [1280x768]
2020-08-02T19:03:54.690 hyperiond X11GRABBER   : <INFO> Using XRender for grabbing
2020-08-02T19:03:54.690 hyperiond X11GRABBER   : <INFO> Update output image resolution: [160x96]  to [160x96]
2020-08-02T19:03:54.804 hyperiond X11GRABBER   : <INFO> Update of screen resolution: [1280x768]  to [1280x768]
2020-08-02T19:03:54.805 hyperiond X11GRABBER   : <INFO> Using XRender for grabbing
2020-08-02T19:03:54.805 hyperiond X11GRABBER   : <INFO> Update output image resolution: [160x96]  to [160x96]
2020-08-02T19:03:54.887 hyperiond X11GRABBER   : <INFO> Update of screen resolution: [1280x768]  to [1280x768]
2020-08-02T19:03:54.887 hyperiond X11GRABBER   : <INFO> Using XRender for grabbing
2020-08-02T19:03:54.888 hyperiond X11GRABBER   : <INFO> Update output image resolution: [160x96]  to [160x96]
2020-08-02T19:03:54.939 hyperiond X11GRABBER   : <INFO> Update of screen resolution: [1280x768]  to [1280x768]
2020-08-02T19:03:54.939 hyperiond X11GRABBER   : <INFO> Using XRender for grabbing
2020-08-02T19:03:54.939 hyperiond X11GRABBER   : <INFO> Update output image resolution: [160x96]  to [160x96]
2020-08-02T19:03:55.022 hyperiond X11GRABBER   : <INFO> Update of screen resolution: [1280x768]  to [1280x768]
2020-08-02T19:03:55.022 hyperiond X11GRABBER   : <INFO> Using XRender for grabbing
2020-08-02T19:03:55.023 hyperiond X11GRABBER   : <INFO> Update output image resolution: [160x96]  to [160x96]
2020-08-02T19:03:55.090 hyperiond X11GRABBER   : <INFO> Update of screen resolution: [1280x768]  to [1280x768]
2020-08-02T19:03:55.090 hyperiond X11GRABBER   : <INFO> Using XRender for grabbing
2020-08-02T19:03:55.090 hyperiond X11GRABBER   : <INFO> Update output image resolution: [160x96]  to [160x96]
2020-08-02T19:03:55.148 hyperiond X11GRABBER   : <INFO> Update of screen resolution: [1280x768]  to [1280x768]
2020-08-02T19:03:55.148 hyperiond X11GRABBER   : <INFO> Using XRender for grabbing
2020-08-02T19:03:55.148 hyperiond X11GRABBER   : <INFO> Update output image resolution: [160x96]  to [160x96]
2020-08-02T19:03:55.185 hyperiond X11GRABBER   : <INFO> Update of screen resolution: [1280x768]  to [1280x768]
2020-08-02T19:03:55.185 hyperiond X11GRABBER   : <INFO> Using XRender for grabbing
2020-08-02T19:03:55.185 hyperiond X11GRABBER   : <INFO> Update output image resolution: [160x96]  to [160x96]
2020-08-02T19:03:55.318 hyperiond X11GRABBER   : <INFO> Update of screen resolution: [1280x768]  to [960x966]
2020-08-02T19:03:55.319 hyperiond X11GRABBER   : <INFO> Using XRender for grabbing
2020-08-02T19:03:55.319 hyperiond X11GRABBER   : <INFO> Update output image resolution: [160x96]  to [120x120]
2020-08-02T19:03:55.366 hyperiond X11GRABBER   : <INFO> Update of screen resolution: [960x966]  to [960x966]
2020-08-02T19:03:55.367 hyperiond X11GRABBER   : <INFO> Using XRender for grabbing
2020-08-02T19:03:55.368 hyperiond X11GRABBER   : <INFO> Update output image resolution: [120x120]  to [120x120]
2020-08-02T19:03:55.374 hyperiond X11GRABBER   : <INFO> Update of screen resolution: [960x966]  to [960x966]
2020-08-02T19:03:55.374 hyperiond X11GRABBER   : <INFO> Using XRender for grabbing
2020-08-02T19:03:55.374 hyperiond X11GRABBER   : <INFO> Update output image resolution: [120x120]  to [120x120]
2020-08-02T19:04:34.079 hyperiond WEBSOCKET    : <DEBUG> WebSocketClient.cpp:30:WebSocketClient() | New connection from ::ffff:192.168.0.90
2020-08-02T19:04:34.080 hyperiond WEBSOCKET    : <DEBUG> JsonAPI.cpp:107:handleInstanceSwitch() | Client '::ffff:192.168.0.90' switch to Hyperion instance 0
2020-08-02T19:05:00.956 hyperiond DAEMON       : <INFO> set screen capture device to 'xcb'
2020-08-02T19:05:00.956 hyperiond X11          : <DEBUG> GrabberWrapper.cpp:59:stop() | Grabber stop()
2020-08-02T19:05:00.957 hyperiond X11          : <DEBUG> GrabberWrapper.cpp:43:~GrabberWrapper() | Close grabber: X11
2020-08-02T19:05:00.958 hyperiond XCBGRABBER   : <DEBUG> Grabber.cpp:31:setVideoMode() | Set videomode to 0
2020-08-02T19:05:00.958 hyperiond DAEMON       : <INFO> XCB grabber created
2020-08-02T19:05:00.958 hyperiond Xcb          : <DEBUG> GrabberWrapper.cpp:49:start() | Grabber start()
2020-08-02T19:05:01.070 hyperiond XCBGRABBER   : <INFO> XcbRandR : available
2020-08-02T19:05:01.070 hyperiond XCBGRABBER   : <INFO> XcbRender : available
2020-08-02T19:05:01.070 hyperiond XCBGRABBER   : <INFO> XcbShm : available
2020-08-02T19:05:01.070 hyperiond XCBGRABBER   : <INFO> XcbPixmap : available
2020-08-02T19:05:01.071 hyperiond XCBGRABBER   : <INFO> Update of screen resolution: [0x0]  to [960x966]
2020-08-02T19:05:01.071 hyperiond XCBGRABBER   : <INFO> Using XcbRender for grabbing
2020-08-02T19:05:01.072 hyperiond XCBGRABBER   : <INFO> Capture interface is now enabled
2020-08-02T19:05:09.082 hyperiond WEBSOCKET    : <DEBUG> WebSocketClient.cpp:204:sendClose() | send close: 1000 
2020-08-02T19:05:10.570 hyperiond WEBSOCKET    : <DEBUG> WebSocketClient.cpp:30:WebSocketClient() | New connection from ::ffff:192.168.0.90
2020-08-02T19:05:10.570 hyperiond WEBSOCKET    : <DEBUG> JsonAPI.cpp:107:handleInstanceSwitch() | Client '::ffff:192.168.0.90' switch to Hyperion instance 0
2020-08-02T19:05:22.386 hyperiond XCBGRABBER   : <INFO> Update of screen resolution: [960x966]  to [960x966]
2020-08-02T19:05:22.386 hyperiond XCBGRABBER   : <INFO> Using XcbRender for grabbing
2020-08-02T19:05:22.388 hyperiond XCBGRABBER   : <INFO> Update of screen resolution: [960x966]  to [960x966]
2020-08-02T19:05:22.388 hyperiond XCBGRABBER   : <INFO> Using XcbRender for grabbing

@hyperion-project
Copy link

Here is your new link to your workflow artifacts.

@m-seker
Copy link
Contributor Author

m-seker commented Aug 2, 2020

@Lord-Grey Should be fixed with this : e2fb4d0

@hyperion-project
Copy link

Here is your new link to your workflow artifacts.

Copy link
Collaborator

@Lord-Grey Lord-Grey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-tested. All previous issues were addressed. Good to be merged.

@Paulchen-Panther Paulchen-Panther merged commit 13205a9 into hyperion-project:master Aug 3, 2020
Lord-Grey pushed a commit to Lord-Grey/hyperion.ng that referenced this pull request Aug 4, 2020
* Add Xcb grabber

* update compile instruction

Signed-off-by: Paulchen Panther <Paulchen-Panter@protonmail.com>

* Fix problem on resolution change + Make XCB default if X11 is not avaialable

* Fix decimation problem

Co-authored-by: Paulchen Panther <16664240+Paulchen-Panther@users.noreply.github.com>
Co-authored-by: Paulchen Panther <Paulchen-Panter@protonmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants