Commit Graph

72 Commits

Author SHA1 Message Date
Michael Rochelle acdf733936
Audio Grabber Feature (#1570)
* Creating Audio Grabber

Creating Audio Grabber

Creating Audio Grabber.

Successfully began capturing audio in windows. Starting to implement a hard-coded UV Visualizer.

Got Windows DirectSound Implementation working.
Hardcoded basic VU Meter.

Begin working on linux audio grabber implementation.

Finished Linux Draft Implementation.
Minor Mods to windows implementation.

Windows:
 - Free memory used by device id.
 - Prevent starting audio if the grabber is disabled
 - More debug logging

Linux:
 - Prevent starting audio if the grabber is disabled

Added strings to english
Removed "custom" from device selection
Made hard-coded visualizer values configurable.
wrote values to imageData with BGR priority to enable configurable values to be set in RGB format.
created logic to support "Automatic" to enable the API to select the default device.

Add language key for audio in "Remote Control" section.
Removed audio configuration for number of channels. This was causing an error with some devices.

Fixed logic to update capture while its active.
Optimizing code .

UI Tweaks
Destructuring.

Fixed build error on linux.

Custom Effects - Clean-ups and Enhancements (#1163)

* Cleanup EffectFileHandler

* Support Custom Effect Schemas and align EffectFileHandler

* Change back to colon prefix for system effects

* WebSockets - Fix error in handling fragmented frames

* Correct missing colon updates

* Update json with image file location for custom gif effects

* Image effect deletion - considere full filename is stored in JSON

* Correct selection lists indentions

Creating Audio Grabber

Creating Audio Grabber

Creating Audio Grabber.

Successfully began capturing audio in windows. Starting to implement a hard-coded UV Visualizer.

Got Windows DirectSound Implementation working.
Hardcoded basic VU Meter.

Begin working on linux audio grabber implementation.

Finished Linux Draft Implementation.
Minor Mods to windows implementation.

Windows:
 - Free memory used by device id.
 - Prevent starting audio if the grabber is disabled
 - More debug logging

Linux:
 - Prevent starting audio if the grabber is disabled

Added strings to english
Removed "custom" from device selection
Made hard-coded visualizer values configurable.
wrote values to imageData with BGR priority to enable configurable values to be set in RGB format.
created logic to support "Automatic" to enable the API to select the default device.

Add language key for audio in "Remote Control" section.
Removed audio configuration for number of channels. This was causing an error with some devices.

Fixed logic to update capture while its active.
Optimizing code .

UI Tweaks
Destructuring.

Fixed build error on linux.

Commented setVideoMode from AudioGrabber.

Linux Threading changes.

Implementing new API

Continuing to implement audio into new APIs

Fixed Audio Grabber for DirectSound on Windows
Fixed UI for Audio Grabber Configuration
Default AUDIO to off unless specified.

fixed missing #ifdef for audio grabber.

Added logic to calculate a dynamic multiplier from the signal input.

Updating linux api for discovering devices.

Fixed HTML/JS issues with view.
Fixed NPE in Windows.
Disabled setting thread priority in linux.

updated the schema options check to pass through hidden states and commented the change.

Updated grabber start conditions
Updated Audio grabber to instantiate similar to video grabber

Updated windows grabber to set "started" flag to false when shutting down.
Removed "tryStart" to prevent enabling audio capture unnecessarily.

Fixing instance audio grabber device configuration

Added configurable resolution
Reduced tolerance to 5%
Fixed issue where grabber failed for additional instances when "start" was called multiple times.

Fixed resolution calculation

Change averaging algorithm to prevent overflowing the sum.

Updated logic to stop audio grabber when disabled.

Fix integer casting and rounding.

Restart grabber on configuration change.
Fix missing include/grabber/AudioGrabber.
Disable tolerance.

Added configurable tolerance.
Fixed tolerance algorithm.
reset multiplier on configuration change.

Line Endings

Proposed change and questions/request to fix

implementing more of LordGrey's suggestions.

Fix mode for snd_pcm_open. Latest ALSA uses SND_PCM_NONBLOCK instead of SND_PCM_OPEN_NONBLOCK
defaulted multiplier to 0 "auto"
defaulted tolerance to 20%

changed 100 to 100.0 for pixel value percentage calculation to fix value from being 0.

missed a 100 as a double so precision isn't lost during math operation.

Fix Windows grabber and further cleanups

Enable Audio grabbing in standard build

Remove empty methods

Fix audio capture priority setting

Remove unused code

Clean-up default config

Allow additional json-editor attributes

Allow multiple effects and resetting to defaults

Correct default values

Allow to build for Qt < 5.14

Update CodeQL build dependency

Update build dependencies

Remove effect1 placeholder

* Renamed uvMeter to VU Meter (Volume Unit)
- Fixed issues flagged by code scanning bot.

* Moved stop call into destructor of implementing class.

* Removed commented linux audio channel configuration logic.

---------

Co-authored-by: Michael Rochelle <michael@j2inn.com>
2023-02-19 09:36:39 +01:00
Paulchen-Panther a4811b7e3c
UDP listener removed because this class is not multi-instance capable. For a new implementation, image data is needed instead of led colors.
Signed-off-by: Paulchen-Panther <Paulchen-Panter@protonmail.com>
2019-08-03 19:14:52 +02:00
Paulchen-Panther ea796160af
- The first part
- Added CodeDocs config file for customization
- Fixing LGTM alerts
- LGTM bug fixed again
- added token option to hyperion-remote
- fix DBManager::getDB()
- next bugfix
- correct broken signal from SettingManager to Hyperion
- Token list is created after the schema is fetched

Signed-off-by: Paulchen-Panther <Paulchen-Panter@protonmail.com>
2019-08-03 19:14:52 +02:00
Paulchen-Panther 7ff9d7037b
ProtoBuffer, UDPListener ...
Protocol Buffer reimplemented to receive image data from third-party apps
The status of the component "UDPListener" is now displayed correctly in WebUI
Global signal names for WebUI added
2019-02-17 15:26:11 +01:00
Paulchen-Panther 38950edf35 remove protobuf (part 2) 2018-12-30 22:07:53 +01:00
Paulchen-Panther 2a77f6f012
even more changes
Signed-off-by: Paulchen-Panther <Paulchen--Panter@gmx.net>
2018-12-28 18:28:49 +01:00
Paulchen-Panther d762aa2f3e Details coming soon. 2018-12-27 23:11:32 +01:00
brindosch fa75143dbf
remove kodiVideoChecker (#475) 2017-11-22 00:52:55 +01:00
Paulchen Panther 5bd020a570 JSON Auto correction + hyperion schema split for better readability (#452)
* revoke schema split

* add "getAutoCorrectedConfig" function

* revoke schema split

* revoke schema split

* revoke schema split

* Prevent compiler error if none grabber is available

* revoke schema split

* add "getAutoCorrectedConfig" function

* revoke schema split

* remove "configMigrator"

* remove "configMigrator"

* Change TestConfigFile to show how the autocorrection works

* revoke schema split

* revoke schema split

* remove "ConfigMigrator"

* remove "ConfigMigrator"

* remove "ConfigMigratorBase"

* remove "ConfigMigratorBase"

* Add QJsonUtils.h

* added ability "ignore-required"

It has been added the ability to correct the configuration without having to pay attention to the keyword "required" in the hyperion schema

* Allow Comments in Hyperion Schema

* add ability to ignore the "required" keyword in hyperion schema

* add ability to ignore the "required" keyword in hyperion schema

* add ability to ignore the "required" keyword in hyperion schema

* //Allow Comments in Hyperion Schema

* Update jsonschema.py to version 0.8.0 to support ...

references in json schema

* add RefResolver from jsonschema.py to resolve

references in hyperion schema

* remove dupe code

* split the hyperion schema in separatly files

For better readability

* add function "resolveReferences" to resolve

references in hyperion schema.

* remove CURRENT_CONFIG_VERSION

* remove CURRENT_CONFIG_VERSION

* split the hyperion schema in separatly files

For better readability

* Create schema-backgroundEffect.json

* Add the rest of the Hyperion schema via upload

* Remove Comments in config file

* Add return variable to function writeJson().

fix function resolveReferences().
edit function load() to handle QPair result from schemaChecker.

* edit function validate() to return QPair variable

* fit function loadEffectDefinition()

* fit function checkJson()

*  Expand error check by dividing

"_error" variable in "_error" and "_schemaError".
Replace variable "bool" in validate() in QPair

* Extend function "cmd_cfg_set" to handle auto correction

* Extend function "loadConfig" to handle auto correction

* fix function loadConfig()
2017-07-30 13:32:10 +02:00
brindosch db5ce43202 Update hyperion.schema.json 2016-12-26 00:22:26 +01:00
redPanther 0825937a3e move 'name' to new config section general. (#345)
* move name to general
add a version for config file

* start impl. config migrator

* fix typo amd set access level

* fix schemaa name

* fix schema

* add structure for config migrator
2016-12-23 19:37:35 +01:00
brindosch 88bed79c07 impl options explanation, uiLock (#343)
* update schemas

* update

* killed upstream change

* min prio is now 100

* reset watchdog regularly

* update

* fix

* update
2016-12-21 18:24:03 +01:00
redPanther c5e0299c55 adjustable image2led mode for grabbers (#341)
* implement most points for a adjustable image2leds mapping

* implement new adjustable led mapping type
2016-12-19 23:59:50 +01:00
penfold42 cb7e2ff1c0 Re-introduce hsv transform into config schema. (#336)
iOS app needs this (at the moment) and i needs to be able to set the inital config from the config file.
2016-12-17 09:23:22 +01:00
redPanther d59c94421d Kill "Rainbow lights" when v4l grabber has no signal (#334)
* on v4l screenshot, print out nosignal threshold values

* separate fractional parameters for no signal detection

* fully implement handling for "rainbow grabber"
2016-12-16 19:48:43 +01:00
redPanther a724fd1535 detect config is readonly, adalight and other stuff (#333)
* update lightberry sketches
update compilehowwto (windows disclaimer)
some refactoring in main cmakelists + preparation for windows compile
tune ada driver, set delayAfterConnect default to 1.5s because some arduino (e.g. mega r3) needs this
set priority min/max for grabber/network services - prevent colliding prios between webui/background stuff and grabbers/net services

* add check if config is writable. TODO do something usefull in webui

* fix indention error

* fix typo

* fix webui can't write led config

* typo

* fix cmakelists

* change methode of detecting linux
2016-12-14 22:45:00 +01:00
brindosch 0d114ca728 localStorage for i18n/access (#318)
* upd

* upd

* .

* enumtr

* cleanup

* upd

* update js

* update html

* hide buttons, if browser not comp, fix typo

[skip ci]

* fix empty effect name
2016-12-08 23:39:41 +01:00
brindosch 8d55154164 Transit translation system (#309)
* update schemas

* update schemas

* update schemas

* schema update

* update translation

* upd
2016-12-04 19:32:23 +01:00
redPanther 96e8c29582 refresh time for all devices + schema fixes (#305)
* refresh for all :-)
remove dups

* - integrate refresh leds for all devices
- fix schemas for led devices

* add minimum for rewrite time

* rewriteTime: add missing info in config examples
2016-12-02 12:07:24 +01:00
brindosch 3e5ca4601d Update webui (#301)
* update

* update

* fix

* implement opt groups

* spaces

[skip ci]

* page wrapper adjust

[skip ci]

* implement optgroups for remote, adjust effect schemas

* lost id

[skip ci]
2016-11-30 17:32:12 +01:00
redPanther e889996ae7 implement optional color correction for V4L only (#267)
* remove color temperatire, its the same as color adjustment

* remove temperature from schema

* implement most part of v4l only colro settings,
now hyperion update knows from which component the colors come

* update configs

* fix webui config write

* reomve correction and temperature from hyperion-remote
2016-10-10 18:29:54 +02:00
redPanther 0a142b0e7d implement a function for easy json editor creation (#264)
* implement a function for easy json editor creation

* grabber and kodi moved to new editor func

* webui: implement conf editors

* add missing files and remove debug code
2016-10-09 10:23:04 +02:00
redPanther f88cd3a230 extend effect engine with qt image effects (#249)
* - effects now can use qt image effects
- rainbow swirtl is now suitable for any led layout - including matrix

* fix rainbow effect

* effect: add radialGradient

* fix some js errors

* optimize code

* try fix travis test not working as expected

* fix default config files

* fix config
2016-09-21 22:01:50 +02:00
brindosch f349f4b0ee forms: horizontal layout and unit support (#245)
* update

* sync

[skip ci]

* always required

[skip ci]

* append support

* update schemas

[skip ci]

* typo

[skip ci]

* adjustment

* update

[skip ci]

* sync

[skip ci]

* slightly smaller logo

[skip ci]

* also for checkboxes

[skip ci]

* new connection lost page

[skip ci]

* update con_lost page

[skip ci]

* lost change

[skip ci]

* fix center position

[skip ci]
2016-09-17 23:37:44 +02:00
redPanther eeb9b0f7da implement hyperion restart via webui (#242)
* first try

* implement hyperion restart. core function is good, but needs a beeter structuring- something for next refactoring session ;-)

* several fixes (including osx)
merge with upstream
some refactoring

* add some eye candy to webui
2016-09-15 20:42:58 +02:00
brindosch a04f34eab7 update schemas | mod jsoneditor (#243)
* update

* sync

[skip ci]

* always required

[skip ci]
2016-09-15 19:06:21 +02:00
redPanther 1cc2f72fa2 embedded webui + config modification detection (#240)
* implement embedded webui

* add detection for changed config, later on used for restart hyperion
2016-09-14 13:51:28 +02:00
redPanther adfe2a4b23 effects included in hyperiond binary as qtResource (#237)
* implement effects included in hyperiond  binary

* cleanup

* remove install of effects dir. People who wants to develop effects has to copy them from github
effect params for initial effects can be changed in config permanently and other effect params can be changed
via json (currently only temporarily)

* fix schema of fadecandy
webui fix display of specific led options

* add leddevice write support

* cleanup

* webui: tune hue code

* when use json effect definition from putsiede hyperiond but want to use py script from inside hyperiond use ad a :
e.g. fade.py needs a fade.py near the json file, but :fade.py is taken from resource inside hyperiond

* add ability to di

* add abiloty to diable effcts via hyperion config

* use effect name instead of script in active effects and prio register

* finally solve open file handle during effect is playing. Now script is read before, then file closed and then t is run by python

* fix some webui things
- led config tabs
- inital loading screen

optimize qrc file generation
fix compile warning in hyperion.cpp

* cleanup

* more cleanup
2016-09-13 11:51:16 +02:00
redPanther 2d88cdc2d3 webui: initial support for leddevice options (#232)
* initial support for leddevice options

* fix schema and editor init

* fix led editor labels and schema

* add some led schemas

* led config: insert current values. not yet perfect, but it works
2016-09-10 19:08:08 +02:00
redPanther 2beccb0912 Webui: extend led hardware config + connection lost page (#226)
* split content and js
tune leds config

* implement connection lost page

* split js/html in huebridge

* add js action for connection lost

* extend led config
make connection loss nicer

* tune led code
add menu entry for grabber

* more tuning of webui

* switch back to botstrap textarea
add v4l to components

* add icon

* extend schema for jsoneditor

* implement ledcolors streaming with 4fps

* implement component state
2016-09-07 20:10:37 +02:00
redPanther 4a27f3d43e refactoring of webui and event based websocket layer (#219)
* make hyperion websocket api event based

* implement new websocket handling for generalconf

* migrate all webui stuff to new event based websocket api
some cleanup ... now all html templates are in content
refactoring of web stuff

* add hyperionport to global
start impl. removing advanced key

* separate dashboard
serverinfo is updated every 3 seconds automatily
add input selection
cleanup and remove not needed stuff

* prepare infrastructure for server sided file execution

* webui minor fixes

* fix compile
2016-09-03 15:54:33 +02:00
brindosch c17c3bd273 Add more schemas + webui integration (#218)
* update schema
... need some fixing regarding schema, will come in next commit
2016-09-02 19:29:04 +02:00
redPanther ee26abc6c4 Merge pull request #212 from b1rdhous3/editor
New Json Editor
2016-08-31 18:03:53 +02:00
b1rdhous3 b6cec24596 Update 2016-08-31 00:46:39 +02:00
b1rdhous3 019e3f5d0c New JSON Editor 2016-08-31 00:22:17 +02:00
b1rdhous3 7009aa50ed New JSON Editor 2016-08-30 23:49:21 +02:00
redpanther a85a5c0f2c implement use of multiple v4l devices.
Not all v4l devices are compat with that or must be attaches to different usb controllers
2016-08-30 22:28:13 +02:00
b1rdhous3 d8f6f86948 Example JSON Form Example with General setting (#185)
I have created a new Category "General" with several Settings for
Hyperion.
For now the Submit Button only console.log's the values.

Known Bug: For some reason it seems to do not load the bootstrap
correctly or maybe the Lib isn't compatible with the newest version of
bootstrap.
2016-08-18 21:14:50 +02:00
redPanther e46d392ed1 - in json reply the command is written again, to better identify it. (#182)
- also added a transaction number (tan). This is a user defined number to track exactly every reply
2016-08-17 11:46:36 +02:00
Paulchen-Panther 68fd395670 JSON RPC Writer (configSet) (#175)
* Remove "endOfJson" Value

Deprecated value from Hypercon

* Remove "endOfJson" Value

Deprecated value from Hypercon

* Add writeJson function to JsonFactory

* ability to ignore required value in schema file

* Remove "endOfJson" Value

* Add handleConfigSetCommand function

* Add handleConfigSetCommand function

* Update JsonSchemas.qrc

* Update schema.json

* Update JsonSchemaChecker.cpp

* Add configSet command to Hyperion-remote

* Add setConfigFile function

* Add setConfigFile function

* Add schema-configset.json
2016-08-14 20:17:12 +02:00
redPanther 7ee2e7cf8d rework kodi grabbing mode for all grabbers (#169)
* pull out setgrabbing mode from every grabber into parent class

* implement optional kodi check for v4l

* fix typo

* fix dispmanx build
2016-08-12 23:07:32 +02:00
redPanther 197af35de0 Clone single led color from other led (#157)
* start ledclone

* led cloning: clone scan areas from original led
main: show exceptions, better exit

* tune json schema for new option. somwe cleanup

* fix warnings and bug for framebuffer selection. thx to clang brought by new osx buikld on travis

* make ledclone feature work flawlessly for effects too. Effect sees the ledstring without cloned leds.
cloned leds will be inserted just before sending to leddevice

additional: remove warnings and fix code style

* fix warning
2016-08-08 00:17:00 +02:00
redPanther 817dabae8c sourceOff feature + small json refactoring (#151)
* add --sourceOff to hyperion-remote - this will select "off" source and set all leds to black
refactor new json stuff
make schema checker not so strict, do not require values that have defaults (not finished yet)
initialEffect config: effect is always an array, regardless if it is a color or an effect name

* make off source visible in active priority list

* transform initialeffect to qjson (except part of effect-args, this needs effectengine transformed to qjson)

* remove unneeded comment

* add web ui for source selection.
call http://hyperion_host:8099/select/index.html
current example needed json server on port 19444
2016-08-06 08:28:42 +02:00
redPanther 722d4eb357 Manual input source select via json (#143)
* implement manual source select via json interface
fix schema error

* refactoring

* add visible value to all listed prios
2016-07-31 22:21:35 +02:00
redPanther 04ab2f05f7 color filter config additions (#142)
* add ability to disably specific color corrections
update protobuf external
move smoothing out of color section

* update config

* update schema

* update schema
2016-07-30 13:07:53 +02:00
redPanther 30b9c20611 new frame grabber handling (#137)
* - implement framegrabber type option
- framegrabber autoselect
- integrate x11 grabber in hyperiond

* add doxy

* v4l: select device by name
hyperiond: fix x11 grabber connection to kodichecker
config: tune default prios of boblight and v4l

* make v4l name finding case insensitive
2016-07-24 15:18:34 +02:00
redPanther fff42f370c fix serial port device crash (#134)
* fix resourceerror in serialport implemention and  extend error output

* cleanup

* fix json schema

* remove some nerd setting
2016-07-20 23:26:47 +02:00
Paulchen-Panther c677a42a74 Update hyperion.schema.json 2016-07-16 20:33:09 +02:00
redPanther 3ac0781c1f Kodi checker rework (+enable option) (#96)
* big kodichecker rework

- use new logger
- 'enable' flag in config
- startable on runtime (atm not stoppable and no reconfigure)
- rename xbmc to kodi

* remove unnecceasry checks for kodi

* make kodichecker stoppable and add reconfigure

* tune config
2016-07-10 22:04:31 +02:00
brindosch 9578a3e386 Kodicheck: Add option for pause modus (#681)
* introduce pause mode

* fix it fe...

* fix

* fix compile warning

* change solution

* fix order

* fix

* last update

* -


Former-commit-id: b35c4d672aed5be7a6a694b3c861c6cf287d89df
2016-06-07 12:34:50 +02:00