Commit Graph

256 Commits

Author SHA1 Message Date
WarmUpTill
adb266927f Move getSourceSettings() to utility 2021-05-29 06:48:18 -07:00
WarmUpTill
703f24b8fc Remove unused include 2021-05-29 06:48:18 -07:00
WarmUpTill
546a83ee07 Add macro action "plugin-state" 2021-05-28 10:23:35 -07:00
WarmUpTill
86d4e59dc2 Adjust to section widget rework 2021-05-28 10:23:24 -07:00
WarmUpTill
aa7714210a Rework section widget to support dynamically sized content 2021-05-28 10:23:24 -07:00
WarmUpTill
2454ea8fa5 Add macro condition "source" 2021-05-28 10:23:24 -07:00
WarmUpTill
ec6cffcd6a Rename MacroActionPause and add action to reset macro counter 2021-05-27 12:05:44 -07:00
WarmUpTill
89849a0792 Rename files 2021-05-27 12:05:44 -07:00
WarmUpTill
48e6bcbb7a Fix conditions and actions referencing macros not loading correctly
The reason is that while loading the required macro might not have been
loaded resulting in the pointer to the macro never being set correctly
in the loading phase.
2021-05-27 12:05:44 -07:00
WarmUpTill
6893d9539e Add MacroSelection widget 2021-05-27 12:05:44 -07:00
WarmUpTill
4a84bede37 Add macro condition "count" 2021-05-27 12:05:44 -07:00
WarmUpTill
77642c54d8 Add macro count member
Used to indicate the number of times the actions were executed.
2021-05-27 12:05:44 -07:00
WarmUpTill
9301713c49 Add option to not scene change msg via network tab 2021-05-25 10:18:36 -07:00
WarmUpTill
66285a0d3d Add option to synchronize preview scene via network tab 2021-05-25 10:18:36 -07:00
WarmUpTill
e7f031641f Add warning for macro action source 2021-05-24 07:29:56 -07:00
WarmUpTill
198a5dc1ec Move AskBackup() 2021-05-24 07:29:56 -07:00
WarmUpTill
5496c256c0 Move functions not required in advanced-scene-switcher.hpp
Create header for platform specific functions.
Move some UI helper functions to utility.hpp.
2021-05-24 07:29:56 -07:00
WarmUpTill
c2d2a27d44 Use more const refs where applicable 2021-05-23 17:52:15 -07:00
WarmUpTill
961ea655fd
Macro pause (#201)
* Add option to pause individual macros
* Add macro action to pause and unpause macros
2021-05-23 08:54:59 +02:00
WarmUpTill
c1704f2164 Fix rapid scene switches by random tab
Wait scene was not set while waiting for scene changes on the random
tab.
If wait scene was ever set by other means (sequence) the scene switcher
would immediately wake up as the wait scene is not the expected value.
2021-05-22 10:49:31 -07:00
WarmUpTill
e4b060976b Add macro action "media" 2021-05-22 10:48:52 -07:00
WarmUpTill
283025f1a8 Add helper function to convert to new id format 2021-05-22 03:07:09 -07:00
WarmUpTill
572b974b82 Switch to using string as ids for actions and conditions
Using int is an id was getting messy with more and more conditions and
actions beeing added.
It also made the order of conditions and actions in the respective
comboboxes unchangable as there was a 1 to 1 relation of index and id.
2021-05-22 03:07:09 -07:00
WarmUpTill
72bd905e7c Improve logging for macros 2021-05-20 11:36:08 -07:00
WarmUpTill
51680adc20 Add macro condition "interval" 2021-05-19 11:47:32 -07:00
WarmUpTill
6a998934d0 Add macro action "source" 2021-05-18 11:12:22 -07:00
WarmUpTill
b80c16a446 Add macro action filter 2021-05-17 13:16:13 -07:00
WarmUpTill
f4d11dd6e6 Add filter helper functions 2021-05-17 13:16:13 -07:00
WarmUpTill
4248b86705 Add macro action to control scene item visibility 2021-05-17 12:20:54 -07:00
WarmUpTill
74dfd9af30 Rename 2021-05-17 12:20:54 -07:00
WarmUpTill
8f16d05a28 Fix potential crash in audio macro action
UpdateEntryData() could be called from ActionChanged() leading to a
potential double lock of switcher->m when triggerin other slots of this
widget
2021-05-16 13:00:06 -07:00
WarmUpTill
2ce0b35921 Add volume to control to audio action 2021-05-15 09:51:20 -07:00
WarmUpTill
3abeb936b3 Fix random order of various macro entries 2021-05-15 01:03:07 -07:00
WarmUpTill
a66961eac1 Add macro condition "idle" 2021-05-14 14:03:04 -07:00
WarmUpTill
5b12468a46 Add macro condition process 2021-05-14 09:44:49 -07:00
WarmUpTill
675021c284
Add Macro tab (#170)
* add action switch scene

* add window condition

* Add macro action wait

* Add macro condition region

* Add audio macro condition

* Add file based macro condition

* Add macro condition media

* Add video macro condition

* Add macro action audio

* Add macro action streaming

* Add macro action recording

* Add replay buffer macro action

* Add stream macro condition

* Add macro condition recording

* Add macro condition plugin state

* Add macro action to run an arbitrary command
2021-05-14 16:37:01 +02:00
WarmUpTill
6bf122d0e8
Add support for transition duration in switchScene() (#178) 2021-05-12 19:50:50 +02:00
WarmUpTill
717d41a527 Adjust default setting values of transition tab 2021-05-04 11:32:45 -07:00
WarmUpTill
f37f384b5a Move DisplayMessage() to utility.hpp 2021-05-04 11:32:45 -07:00
WarmUpTill
dad36689c4 Move AdvSSScreenshotObj to separate files 2021-05-04 11:32:45 -07:00
WarmUpTill
e714df7ad0 Use Duration class and DurationSelection widget 2021-05-04 11:32:45 -07:00
WarmUpTill
6277da1bbd Add Duration class and DurationSelection widget 2021-05-04 11:32:45 -07:00
WarmUpTill
3f492f468a Move compareIgnoringLineEnding() to utility.hpp 2021-05-04 11:32:45 -07:00
WarmUpTill
c86bba84b3 Add scene-group.hpp include to switch-generic
This is to allow easier use of generic scene switch structs and widgets
in other areas. (Macro tab)
2021-05-04 11:32:45 -07:00
WarmUpTill
c468b0698b Move definition of SwitchTargetType 2021-05-04 11:32:45 -07:00
WarmUpTill
5d720219bf Clean up transition tab save and load 2021-05-04 11:32:45 -07:00
WarmUpTill
484e1aa191 Remove unnused function 2021-05-04 11:32:45 -07:00
WarmUpTill
0fdfe757b4 Reset tab order if config is invalid 2021-05-04 11:32:45 -07:00
WarmUpTill
d9dfc1913d Fix previous scene not working for some sequences
If a duration for a transition is used that is longer than the scene
switcher check interval it could happen that the "incorrect" previous
scene could be chosen for uninterruptible scene sequences, as at the
time the sequence check was preformed the "previous scene" variable
was not yet updated as the transition was still ongoing.
2021-05-04 11:32:45 -07:00
WarmUpTill
139df8a641 Adjust function signature
Don't pass bool by reference if not necessary.
2021-05-04 11:32:45 -07:00
WarmUpTill
041a9e7f19
Add option to set transition duration (#171) 2021-05-01 00:20:25 +02:00
WarmUpTill
45fa4dac8f
Add option "has changed" to video tab (#168) 2021-04-22 20:51:35 +02:00
WarmUpTill
e4bf5fa749
Add option to use transition overrides for transition changes (#164)
* Adjust switchScene() signature to support adjustActiveTransitionType and verbose parameters and only change the transition type if adjustActiveTransitionType, otherwise rely on transition overrides

* Add new adjustActiveTransitionType checkbox

* save and load adjustActiveTransitionType

* Add check to either enable transition type change or use of transition
overrides

* Add locale

* Adjust layout and locale
2021-04-10 19:58:17 +02:00
WarmUpTill
10e1c7b3a3
Resolve asio network crashes on macOS (#157)
* Reenable network tab functionality for macOS

* Set asio to b73dc1d and  websocketpp to c6d7e29
2021-04-03 22:02:42 +02:00
WarmUpTill
beb482bd5a
Disable Network tab functionality on macOS (#155)
The asio library ran into issues when the obs-websocket plugin was also running leading to a crash in the obs-websocket's listen() calls.

As the use obs-websocket plugin is more widespread than the use of the advanced scene switcher the network tab functionality will be disabled for macOS for the time being.
2021-04-03 18:52:16 +02:00
WarmUpTill
73ce88e2f0
Add option to save window size and position (#154) 2021-04-03 11:55:42 +02:00
WarmUpTill
dfccc4b16d
Add network tab (#149)
The network tab allows you to open a web-socket or connect to web-socket to synchronize the active scene between two or more instances of OBS.
The functionality is mostly based on https://github.com/Palakis/obs-websocket.

An OBS instance running a server will send its currently active scene to all connected clients on scene change.
By default all scene switches will trigger a message to be sent to all clients, but you also have the option to limit sending these messages only when an automated scene change is triggered by the advanced scene switcher.
2021-03-24 20:51:22 +01:00
WarmUpTill
1ef8ce4b4a
Resolve Qt runtime warning by renaming function. (#151) 2021-03-22 22:31:29 +01:00
WarmUpTill
2a87334d38
Init noMatchDelay to zero. (#148)
A non-zero value might be confusing for users which set up the plugin
for the first time.
2021-03-21 14:44:42 +01:00
WarmUpTill
1a4724ff21
Fix audio tab not supporting mono audio output. (#145) 2021-03-19 20:01:15 +01:00
WarmUpTill
8823c05aeb
Fix scene groups not being selected when using more than one entry on the Random tab. (#143) 2021-03-18 21:22:33 +01:00
WarmUpTill
1273446ce5
Add option to configure default transition delay. (#140) 2021-03-17 18:21:42 +01:00
WarmUpTill
7526cbe1a3
Add option to check volume of 'inactive' audio sources. (#137) 2021-03-12 18:48:06 +01:00
WarmUpTill
e4bb034303
Add video tab (#131)
This tab will allow switching scenes based on the video output of sources.
2021-03-05 14:08:17 +01:00
WarmUpTill
34f07bfb07
Clean up extended sequence (#134)
* Update original switch widget status if changed in extend edit

* Clean up

* Add more comments

* Clean up unecessary code.

Sleep no longer happens inside the sequence switch check so we don't
need to stop / start the switcher after importing new entries or deleting
existing entries.
2021-02-28 15:38:33 +01:00
WarmUpTill
7947ad2608
Add option to extend scene sequences (#121)
Extending a scene sequence allows for more complex switching setups, but should also simplify some setups.
Sequences like "A -> B -> A -> C", which previously were only possible by creating a copy of A, can now be specified in a single entry.
To extend a sequence either select the sequence you want to modify and click the extend sequence button or simply double click the entry.
2021-02-24 18:19:23 +01:00
WarmUpTill
920c188213
Add scene trigger for starting and stopping the scene switcher (#129) 2021-02-23 21:00:25 +01:00
WarmUpTill
499ba7dd21
Update the UI's status element if the status changed externally (#126) 2021-02-20 18:58:07 +01:00
WarmUpTill
f4902933ab
Fix getCurrentScene() returning garbage if scene group has type random (#125) 2021-02-20 18:08:47 +01:00
WarmUpTill
9aa0b31bff
Add scene trigger to unmute source (#124) 2021-02-20 18:08:35 +01:00
WarmUpTill
6d5086b971
Add option to select 'current transition' (#123)
* move addSelectionEntry to AdvSceneSwitcher class and allow select entry to be 'selectable'

Can be useful for implementing 'current transition' as an option or just allowing to select 'None' for screen region ignore

* Add option to select 'current transition'
2021-02-19 19:03:38 +01:00
WarmUpTill
a74a952b1d
Fix log messages containing two '[adv-ss]' tags (#118) 2021-02-07 18:41:47 +01:00
WarmUpTill
5bbfef81e0
Improve scene trigger handling (#117) 2021-02-06 18:23:57 +01:00
WarmUpTill
c31d1cd975
Delay setting of default scene transitions (#116) 2021-02-06 18:23:41 +01:00
WarmUpTill
a84a205608
Minor style changes (#114)
* use GetWeakSourceName() where possible

* add getCurrentScene() to scene group

* silence OBS warning log and fix typo in audio switch

* extract showing initial status of widgets to function in generic switch
2021-02-03 20:27:25 +01:00
WarmUpTill
a5f0eb8da8
Add option to automatically start scene switcher on recording / streaming start (#112) 2021-02-03 20:02:07 +01:00
WarmUpTill
35151ea134
Add scene trigger tab (#110) 2021-02-03 19:50:37 +01:00
Kevin Nash
1510a2c2fa
Specify scenes to exclude from Region triggers (#111)
Adds an option to exclude a region triggered scene switch if you're
currently in the specified Scene.
2021-02-03 19:49:18 +01:00
WarmUpTill
69d452f978
allow selection of previous scene for exe,file,region,window and scene group for idle switches (#106) 2021-01-23 23:21:59 +01:00
WarmUpTill
fe9457427f
add linger variable instead of sleeping inside sequence match (#105)
This solves issues with the busy loop detection and adds the possibility of other switching methods to delay the scene switch
2021-01-23 20:32:32 +01:00
WarmUpTill
d989c2b570
Add scene groups and rework save and load (#103) 2021-01-23 17:39:35 +01:00
WarmUpTill
1f4679433e
ask for backup of settings if a new version detected (#104) 2021-01-23 17:08:17 +01:00
WarmUpTill
0950d93828
allow selection of target for auto stop of recoding or streaming 2021-01-18 01:20:56 +01:00
WarmUpTill
5156c66b26
add warning if translation cannot be found (#99)
* add warning if translation cannot be found

* extract displaying message boxes to separate function
2021-01-09 14:27:51 +01:00
WarmUpTill
17c4fefb37
add fallback option if multiple audio matches are active (#95) 2021-01-07 18:59:06 +01:00
WarmUpTill
2b90493ae9
add switch cooldown option (#97)
* add switch cooldown functionality

* slightly adjust sequence check for cooldown

* add UI implementation for cooldown feature
2021-01-07 18:58:35 +01:00
WarmUpTill
4e971f59a9
add option to allow scene sequence to be interrupted (#93) 2021-01-02 14:32:18 +01:00
WarmUpTill
e78383d3ed
clean up build and build instructions (#92)
* fix build issue with atomic bool initialization

* clean up cmake

* fix warning

* add missing '\' to linux instructions
2020-12-31 15:45:08 +01:00
WarmUpTill
caa2833272
allow pause individual switching methods (#90)
* allow pausing individual switching methods

* clean up pause tab

* allow import of old pauseScenes and pauseWindows
2020-12-31 14:24:09 +01:00
WarmUpTill
fae50024ea rename mediaSources 2020-12-28 17:38:34 +01:00
WarmUpTill
d20cdac5e4
add duration and 'below' condition type options to audio tab (#85) 2020-12-28 17:06:30 +01:00
WarmUpTill
e377be3999
Minor UI changes (#89)
* automatically scroll to new entry

* fix remote file check always matching

* sort combobox entries alphabetically (meida / processes / audio)

* fix some visual issues on non-default OBS themes
2020-12-28 17:03:55 +01:00
WarmUpTill
80e2b3dd14 fix new time matching if QTime is not initialized 2020-12-28 17:02:32 +01:00
shugen002
8ba78b12c1
I18n Support (#72)
* adapt UI for i18n

* add placeWidgets() helper function to ease translation

* add hint about Transition Matrix plugin on Transition tab

* translate

* rework UI of file tab

* write status of plugin to scene info file
2020-12-21 11:24:04 +01:00
WarmUpTill
faca5f8863
add option to only match if file content changed (#80) 2020-12-12 16:31:07 +01:00
WarmUpTill
a1c592f1ec format 2020-12-10 20:14:07 +01:00
WarmUpTill
9711390aac
add no match delay option (#78) 2020-12-06 14:10:17 +01:00
WarmUpTill
25f28b9796
Add media state played to end (#58) 2020-12-06 14:09:21 +01:00
WarmUpTill
4af7540497
hide guide frames when switching to a different tab (#75) 2020-11-28 12:36:58 +01:00
WarmUpTill
f6c3c65e26
resolve potential deadlocks (#66)
A deadlock could occur if the save callback is called just before the frontend set functions are used.
Thus unlock() is necessary before setting current scene or transition.
(e.g. if start recording is activated just before using the above functions, as this apparently triggers a save() call)
2020-11-21 01:40:24 +01:00
WarmUpTill
45a880d8f8
Add version info log (#61)
add generated version info log on startup of the plugin using the "GetGitRevisionDescription" cmake module from https://github.com/rpavlik/cmake-modules
2020-11-15 20:34:11 +01:00
WarmUpTill
e5c1e81d81 clean up and silence warnings 2020-11-14 18:45:25 +01:00
WarmUpTill
cdd1259f12 style changes 2020-11-09 22:20:58 +01:00
WarmUpTill
0c6a7b140e add comment about use of 'matched' 2020-11-02 19:00:50 +01:00
WarmUpTill
8e26148255
fix media states being retriggered multiple times (#54) 2020-11-01 18:53:48 +01:00
WarmUpTill
214821b69f
UI rework (#44)
* rework general tab UI

* rework audio tab UI

* rework media tab UI

* rework time tab UI

* rework random tab UI

* rework window tab UI

* rework sreen region tab UI

* rework sequence tab UI

* rework transition tab UI

* adjust log messages to new format

* fix include path and warning

* highlight widgets to guide users (can be disabled)

* add helper frame for screen region tab

* rename main SceneSwitcher widget to AdvSceneSwitcher to resolve naming conflicts with the frontend tools on certain platforms (e.g. Debian 10)

* add media state 'any'

* adjust media switch handling to support vlc source
2020-10-31 16:25:44 +01:00
WarmUpTill
1e6a022787
improve hotkey handling (#49) 2020-10-12 20:55:51 +02:00
WarmUpTill
dd63ff846c
Refactor, fixes and maximized option for title tab (#40)
* move definitions of switcher structs to separate files

* remove useless comment

* cleanup and silence warnings

* add generic switch

* removed delay on main thread startup as it served no purpose

* clean up ultility.hpp

* do not save switchStr to file as it could cause issues when scenes are renamed

* rename sceneRoundTrip to sceneSequence

* add option to switch if window is maximized to title tab
2020-09-25 21:42:58 +02:00
WarmUpTill
8d023ee385
Add audio tab (#36)
* add volumemeter widget

* add audio tab UI

* add checkAudioSwitch functionality

* use constexpr instead of preprocessing
2020-09-21 00:52:42 +02:00
WarmUpTill
3fd3801e56
load libcurl at runtime (#33)
* load libcurl at runtime

* add warning to file tab if curl cant be loaded
2020-09-13 09:13:09 +02:00
WarmUpTill
21a788b48b
Improve time tab (#34)
* add support for weekdays and allow reordering on time tab

* add option to use time relative to streaming/recording start on time tab
2020-09-13 00:03:38 +02:00
WarmUpTill
a5c8d776f3 only try auto start streaming/recording once on scene chagne 2020-08-24 20:55:54 +02:00
WarmUpTill
95261ce9bb add first draft of auto start of recording / streaming 2020-08-16 19:48:54 +02:00
WarmUpTill
2f33b6bdc3 fix data loss for sequence delay 2020-08-02 19:37:37 +02:00
WarmUpTill
3c1e240722 add option to set startup behavior 2020-08-02 18:45:44 +02:00
WarmUpTill
0cdd8bf1d0 move UI init of tabs to respective source files 2020-08-01 11:14:54 +02:00
WarmUpTill
f8ad8c31be scene sequence adjustments
use double internally instead of two ints
rework save / load to file to reuse existing functionality
add option to select between seconds / minutes / hours
2020-08-01 10:12:32 +02:00
WarmUpTill
f8b505fa4e silence warnings 2020-07-31 22:05:55 +02:00
WarmUpTill
1516263d2a save and load tab order 2020-07-31 21:58:17 +02:00
WarmUpTill
a4418996f4 disable mediaTime selection if restriction is set to none 2020-06-19 19:52:43 +02:00
WarmUpTill
340cb559ee add option to override transitionOverrides 2020-06-17 22:16:47 +02:00
WarmUpTill
eeefd8279f allow reordering of file/media/sequence/region 2020-06-16 20:25:25 +02:00
WarmUpTill
d3ab9e01c5 add support for remote file using libcurl 2020-06-15 21:19:34 +02:00
WarmUpTill
2a92df4f3c add draft of remote file support 2020-06-14 20:35:02 +02:00
WarmUpTill
560044bbbf implement export/import of settings 2020-06-14 15:22:34 +02:00
WarmUpTill
c17cbb66d9 write to OBS log if verbose logging is enabled 2020-06-14 14:14:00 +02:00
WarmUpTill
bf70bd7c60 move saving and loading to separate files 2020-06-13 21:56:26 +02:00
WarmUpTill
6810ba71e8 remove using namespace std 2020-06-12 21:40:06 +02:00
Myned
7a924438bc
Add .clang-format and apply to src/ files 2020-06-08 14:58:44 -04:00
Myned
9f7ca3e4c7
Merge remote-tracking branch 'WarmUpTill/master' 2020-06-07 14:15:08 -04:00
WarmUpTill
2f77d99161
Undo "Revert "do not use QThread::create""
This reverts commit 4b86849356.
2020-06-07 14:15:01 -04:00
WarmUpTill
513fe0728c initialize SwitcherThread to nullptr 2020-06-07 10:43:52 +02:00
Myned
cba39633aa
Add ability to reorder Window and Executable switches with arrows 2020-06-06 23:23:02 -04:00
WarmUpTill
4b86849356
Revert "do not use QThread::create"
This reverts commit 98c3131017.
2020-06-06 22:38:22 -04:00
Myned
8fd263f44a
Merge remote-tracking branch 'WarmUpTill/master' 2020-06-06 18:40:17 -04:00
WarmUpTill
98c3131017 do not use QThread::create
there might still be versions of QT in use which do not yet have this functionality (see Linux build fail of f03fca8)
2020-06-06 18:51:26 +02:00
WarmUpTill
f03fca85aa add thread priority option (using QThread) 2020-06-06 17:05:49 +02:00
WarmUpTill
5082f5944e prune media switches if invalid 2020-06-03 19:56:18 +02:00
WarmUpTill
b981a446b6 fix for times switch not saving when using previous scene 2020-06-03 19:55:06 +02:00
WarmUpTill
5e60cefd1c update current selection on media tab when selecting a different row 2020-06-02 19:34:15 +02:00
Myned
fabb7406bd
Merge remote-tracking branch 'WarmUpTill/master' 2020-06-02 00:48:01 -04:00
WarmUpTill
2e475b8059 add first draft of thread priority 2020-06-01 14:54:08 +02:00
WarmUpTill
99b5c16406 add Time scene switching 2020-05-31 12:43:34 +02:00
Myned
a7a8adb91b
Remove whitespace 2020-05-21 00:54:49 -04:00
Myned
f00c244bfa
Change wording slightly 2020-05-21 00:52:41 -04:00
Myned
de5b6f8eb4
Fix fullscreen check only returning true if window is focused on Linux 2020-05-21 00:40:37 -04:00
Myned
e4b640903d
Add ability to choose focus state to window title switcher 2020-05-21 00:34:22 -04:00
Myned
451bb6518c
Revert "Move forms/advanced-scene-switcher.ui to src/headers/"
This reverts commit 318502d8d0.
2020-05-16 23:42:26 -04:00
Myned
318502d8d0
Move forms/advanced-scene-switcher.ui to src/headers/
Out-of-tree building (at least) fails without this file in this location, and builds successfully without it under forms
2020-05-14 19:11:04 -04:00
WarmUpTill
4ed12db12b add support for previous scene on media tab 2020-04-27 20:20:50 +02:00