Compare commits

..

82 Commits
1.17 ... 1.17.3

Author SHA1 Message Date
WarmUpTill
04825e4b88 Fix warning 2022-02-26 08:23:10 -08:00
WarmUpTill
1cfd981245 Reduce text edit areas size of file, filter, source, transform segments 2022-02-26 08:23:10 -08:00
WarmUpTill
6fb8297275 Use QPropertyAnimation::DeleteWhenStopped PulseWidget() when once is set
Also fixes potential crash when waiting for single shot timer when
looping and widget and animations are deleted in the meantime
2022-02-26 08:23:10 -08:00
WarmUpTill
4253c99cf2 Fade out segment controls which will likely not be needed
This was done to give some hints which controls will likely need to be
used to avoid mistakenly clicking on the action controls when editing
conditions.
2022-02-26 08:23:10 -08:00
WarmUpTill
ae13a68cae Double click on list item in run and sequence action to edit 2022-02-26 08:23:10 -08:00
WarmUpTill
4e5aae7e5f Add 'OBS stats' condition type (#414)
It supports various different types of stats:
* fps
* cpu
* ram
* frame time
* skipped frames
* missed frames
* dropped frames
* data size sent
* bitrate
2022-02-26 11:37:54 +01:00
WarmUpTill
88dff37776 Allow drag and drop reordering of macros 2022-02-24 14:15:23 -08:00
WarmUpTill
83df1ab658 Skip collapse animation if section is already in the desired state 2022-02-24 14:15:23 -08:00
WarmUpTill
5298b14803 Use name of macro to be copied in addNewMacro() dialog 2022-02-24 14:15:23 -08:00
WarmUpTill
eeedf11c6a Add hotkey to delete macro segments 2022-02-24 14:15:23 -08:00
WarmUpTill
89efb6d1c8 Allow selecting either an action or condition but not both 2022-02-24 14:15:23 -08:00
WarmUpTill
1054bce4a7 Remove slight movement of macro segment when (de-)selecting them 2022-02-24 14:15:23 -08:00
WarmUpTill
d3cbddf0a4 Allow selecting scene groups in preview scene change action 2022-02-24 14:15:05 -08:00
WarmUpTill
a91fed1583 Simplify waitForTransitionChange()
Will now also work if the target scene is the already currently active
scene.
2022-02-24 14:15:05 -08:00
WarmUpTill
c94a791d19 Allow switching to already active scene if in studio mode
Preview and program scene can differ in regards to the active scene
items.
Thus it can make sense to switch to the already active scene.
2022-02-24 14:15:05 -08:00
WarmUpTill
02e380a9f2 Allow selecting current and previous scene in preview scene action 2022-02-24 14:15:05 -08:00
WarmUpTill
4349a98614 CI: Switch to Visual Studio 17 2022 2022-02-22 11:40:33 -08:00
WarmUpTill
f294283306 CI: Bump OBS version 2022-02-21 12:09:23 -08:00
WarmUpTill
cc9d5897da Add deprecation warning for legacy tabs 2022-02-20 04:50:12 -08:00
WarmUpTill
8e3eb8519b Fix potential crashes when adding or removing macro segments
I wrongly assumed that std::deque would guarantee that pointers to
elements in deque would not be invalidated by insert() or erase() but
this is not the case it seems.

""
An erase in the middle of the deque invalidates all the iterators and
references to elements of the deque. An erase at either end of the deque
invalidates only the iterators and the references to the erased
elements.
""

I guess I got lucky noone ran into these sorts of crashes for now?
2022-02-20 04:50:12 -08:00
WarmUpTill
354ef56070 Do not select any item if pressing add without any active selection 2022-02-20 04:50:12 -08:00
WarmUpTill
352dac5e32 Add MacroSegmentList to allow deselecting items
Previously once a macro segement was selected you could only deselect it
by clicking on different macro segment, thus never allowing the user to
deselect all macro segments
2022-02-20 04:50:12 -08:00
WarmUpTill
584fe4b3b6 Copy logic type when adding conditions 2022-02-20 04:50:12 -08:00
WarmUpTill
bdd489aea5 Fix crashes related to PulseWidget()
* Fix crash if widget was deleted during animation
* Fix crash if multiple animations were started at the same time
2022-02-20 04:50:12 -08:00
WarmUpTill
0b2e725471 Do not run collapse animation when calling SetContent() 2022-02-20 04:50:12 -08:00
WarmUpTill
45e8378021 Remove old macro segment controls 2022-02-20 04:50:12 -08:00
WarmUpTill
955f308c59 Add list-like controls to macro actions and conditions 2022-02-20 04:50:12 -08:00
WarmUpTill
2c25bb4dd4 Make slider background transparent
Sliders, e.g. in the video condition, would otherwise block parts of the
highlight frame around macro segments.
2022-02-18 13:40:33 -08:00
WarmUpTill
d8dcd91ed9 Split video condition into multiple files 2022-02-18 13:40:33 -08:00
WarmUpTill
03900e936b Rename class AdvSSScreenshotObj to ScreenshotHelper 2022-02-18 13:40:33 -08:00
WarmUpTill
6d2360eb87 Clean up AdvSSScreenshotObj usage in video condition 2022-02-18 13:40:33 -08:00
WarmUpTill
ab4a70a758 Refresh contents of "Show match" dialog every second 2022-02-18 13:40:33 -08:00
WarmUpTill
b48276bd5c Add option to check for OBS shutdown to MacroConditionPluginState 2022-02-18 13:35:15 -08:00
WarmUpTill
34167366db Add day of week based check to date condition 2022-02-12 17:57:35 -08:00
WarmUpTill
bfa8f4d9d5 Visually clean up date condition
- add "and" separator if "between" check is chosen
- split dateTimeEdit into a dateEdit and a timeEdit to make editing
  easier
- move ignore* checkboxes in front of respective edit widgets to make
  their intention more clear and add tooltips to further clarify their
  use
2022-02-12 17:57:35 -08:00
WarmUpTill
f8e3a3e275 CI: Fix MacOS build
Packages version bump
2022-02-10 12:19:56 -08:00
WarmUpTill
1328896801 Reopen last opened tab in current session
Will reset to General tab on startup / scene collection change
2022-02-10 11:29:44 -08:00
WarmUpTill
0effbd8ace Add context menu entry for expanding and collapsing edit areas 2022-02-04 11:38:42 -08:00
WarmUpTill
08a8157f3a Reduce spacing between macro segments 2022-02-04 11:38:42 -08:00
WarmUpTill
262bb3f1ee Keep size of individual macro sgements consistent
Previously the segments would expand if there was still room in the
condition and action area.
2022-02-04 11:38:42 -08:00
WarmUpTill
415f63c46c Fix warnings generated about missing icons 2022-02-04 11:38:42 -08:00
WarmUpTill
0771f939a6 Restore original color after PulseWidget() completes 2022-02-04 11:38:42 -08:00
WarmUpTill
a81ee605d6 Rename function 2022-02-04 11:38:42 -08:00
WarmUpTill
1e7726bcfc Add option to highlight recently executed macros on the Macro tab 2022-02-04 11:38:42 -08:00
WarmUpTill
dc698e426d Add MacroListEntryWidget
To be used for macro tab's macro list as regular QListWidgetItem are too
limited
2022-02-04 11:38:42 -08:00
WarmUpTill
a4f66dbbcd Fix warnings 2022-02-04 11:38:42 -08:00
WarmUpTill
1516b9a939 Add option to hide legacy tabs 2022-02-04 11:38:42 -08:00
WarmUpTill
e13f20c860 Adding frame highlighting individual macro segments 2022-02-04 11:38:42 -08:00
WarmUpTill
727992f1d0 Clean up stylesheet usage 2022-02-04 11:38:42 -08:00
WarmUpTill
4e75a15118 Clean up unnecessary variable 2022-02-04 11:38:42 -08:00
WarmUpTill
48368f4bd6 Move vertical / horizontal control handling to macro segment 2022-02-04 11:38:42 -08:00
WarmUpTill
61d9031933 Add option to toggle between vertical and horizontal macro controls 2022-02-04 11:38:42 -08:00
WarmUpTill
487c735e13 Delay show and hide of macro controls 2022-02-04 11:38:42 -08:00
WarmUpTill
7a34c334bd Highlight macro segments new position when moving it up or down 2022-02-04 11:38:42 -08:00
WarmUpTill
4988683e22 Resize conditions and actions areas on expand / collapse all 2022-02-04 11:38:42 -08:00
WarmUpTill
cb681643c8 Fix scene switch action blocking unexpectedly
If "wait for transition" was checked and no valid scene was selected the
waitForTransitionChange() function will wait for its maximum allowed
duration as switcher->currentScene will never be null.
2022-02-02 09:55:35 -08:00
WarmUpTill
d79e10ec97 Add tr-TR.ini locale (Provided by dargat) 2022-01-30 19:15:49 +01:00
WarmUpTill
af188b55df Move plugins to separate folder (#400) 2022-01-29 15:47:16 +01:00
WarmUpTill
f287a1041d Add option to also check for configured volume level 2022-01-25 12:46:16 -08:00
WarmUpTill
fda9b1c3ea Fix dock location and size not saving correctly
OBS will handle the docking position / window size and position as long
as an object name is set
2022-01-25 10:33:41 -08:00
WarmUpTill
9eb7f58525 CI: Save debian build result 2022-01-25 10:33:02 -08:00
WarmUpTill
abd6fd6b7e Add sequence action (#395) 2022-01-22 18:07:26 +01:00
WarmUpTill
2909b1300e Fix empty statusControl of general tab blocking mouse input 2022-01-22 06:14:03 -08:00
WarmUpTill
d1331a60b9 Fix crash on exit caused by status dock 2022-01-22 06:14:03 -08:00
WarmUpTill
d5fc3befb8 Remove QtConcurrent dependency 2022-01-22 06:14:03 -08:00
WarmUpTill
80f9c79907 CI: Bump windows QT version to 5.15.2 2022-01-22 06:14:03 -08:00
WarmUpTill
e4bd1fc180 Reduce amount of signals emitted on repopulate 2022-01-22 06:14:03 -08:00
WarmUpTill
59c87ca027 Emphasize that a duration of 0s means using default duration 2022-01-21 09:51:00 -08:00
WarmUpTill
eda161de39 Sort condition and action selection alphabetically 2022-01-21 09:51:00 -08:00
WarmUpTill
6033426a6e Enable word wrap for macro priority warning 2022-01-21 09:51:00 -08:00
WarmUpTill
caea16c6ad Hide selected macro for run or stop action
Running a macro from within itself is not supported and stopping it from
withint itself does not seem useful either.
2022-01-21 09:51:00 -08:00
WarmUpTill
e3a39a5df7 Add label clarifying the condition's intent 2022-01-21 09:51:00 -08:00
WarmUpTill
38b7e08711 Add macro action to stop other macros 2022-01-21 09:51:00 -08:00
WarmUpTill
7349841758 Fix unexpectedly returning true for hotkey condition
The condition would return true after unpause, if a configured hotkey was pressed
during the time the macro was paused.
2022-01-21 09:50:19 -08:00
WarmUpTill
5d58269b02 Add function to access parent macro from condition or action 2022-01-21 09:50:19 -08:00
WarmUpTill
8a4aef0f50 Update bug_report.md 2022-01-19 20:22:26 +01:00
WarmUpTill
4b877d865c Add issue templates 2022-01-16 19:43:51 +01:00
WarmUpTill
82503286ea Use the same widget for main settings window and status dock 2022-01-14 09:11:36 -08:00
WarmUpTill
16ee789c82 Add option to perform macro actions only on condition change 2022-01-06 08:41:18 -08:00
WarmUpTill
d040a01016 Reintroduce checkbox to change current scene check transition behaviour 2022-01-06 08:41:18 -08:00
WarmUpTill
eb952afe58 Enable time constraints for transition condition 2022-01-06 08:41:18 -08:00
WarmUpTill
34cff925fc CI: No longer query for 32 bit OBS install path 2022-01-05 20:21:03 +01:00
138 changed files with 5833 additions and 1934 deletions

35
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@@ -0,0 +1,35 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Logs**
Please provide a log of your issue with verbose logging enabled (See General tab of the plugin).
See [here](https://obsproject.com/forum/threads/please-post-a-log-with-your-issue-heres-how.23074/) for a description where to find the log files and how to share them.
Please share the currently used plugin settings by exporting them them to a file (See General tab of the plugin).
If applicable, add screenshots to help explain your problem.
**Version information**
- OS: [e.g. Windows 10]
- OBS Version [e.g. 27.1.3]
- Plugin Version [e.g. 1.17.1]
**Additional context**
Add any other context about the problem here.

View File

@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

View File

@@ -46,3 +46,10 @@ jobs:
- name: build
run: |
debuild --no-lintian --no-sign
mv ../*.deb .
- name: Publish
if: success()
uses: actions/upload-artifact@v2.2.1
with:
name: "obs-scene-switcher.deb"
path: ${{ github.workspace }}/*.deb

View File

@@ -5,7 +5,7 @@ on: [push, pull_request, workflow_dispatch]
env:
PLUGIN_NAME: SceneSwitcher
LIB_NAME: advanced-scene-switcher
OBS_TAG: 27.1.3
OBS_TAG: 27.2.0
jobs:
macos64:
@@ -85,7 +85,7 @@ jobs:
run: |
curl -L -O http://s.sudre.free.fr/Software/files/Packages.dmg
sudo hdiutil attach ./Packages.dmg
sudo installer -pkg /Volumes/Packages\ 1.2.9/Install\ Packages.pkg -target /
sudo installer -pkg /Volumes/Packages\ 1.2.10/Install\ Packages.pkg -target /
- name: Package
if: success()
shell: bash
@@ -184,7 +184,8 @@ jobs:
libx11-xcb-dev \
libxcb-xfixes0-dev \
libopencv-dev \
libprocps-dev
libprocps-dev \
libpci-dev
- name: "Configure"
shell: bash
run: |
@@ -206,8 +207,9 @@ jobs:
mv ./build/UI/frontend-plugins/${{ env.PLUGIN_NAME }}/${{ env.LIB_NAME }}.so ./${{ env.LIB_NAME }}/bin/64bit/${{ env.LIB_NAME }}.so
mv ./UI/frontend-plugins/${{ env.PLUGIN_NAME }}/data ./${{ env.LIB_NAME }}/data
# Macro modules
mkdir -p ./${{ env.LIB_NAME }}/bin/64bit/adv-ss-plugins
strip -d ./build/UI/frontend-plugins/${{ env.PLUGIN_NAME }}/src/external-macro-modules/opencv/advanced-scene-switcher-opencv.so
mv ./build/UI/frontend-plugins/${{ env.PLUGIN_NAME }}/src/external-macro-modules/opencv/advanced-scene-switcher-opencv.so ./${{ env.LIB_NAME }}/bin/64bit/
mv ./build/UI/frontend-plugins/${{ env.PLUGIN_NAME }}/src/external-macro-modules/opencv/advanced-scene-switcher-opencv.so ./${{ env.LIB_NAME }}/bin/64bit/adv-ss-plugins
tar -cvzf "${FILE_NAME}" ${{ env.LIB_NAME }}
- name: "Publish"
uses: actions/upload-artifact@v2.2.1
@@ -221,8 +223,8 @@ jobs:
matrix:
arch: [32, 64]
env:
QT_VERSION: 5.10.1
CMAKE_GENERATOR: "Visual Studio 16 2019"
QT_VERSION: 5.15.2
CMAKE_GENERATOR: "Visual Studio 17 2022"
CMAKE_SYSTEM_VERSION: "10.0.18363.657"
WINDOWS_DEPS_VERSION: "2019"
steps:
@@ -275,11 +277,11 @@ jobs:
Get-Location
if ( ${{ matrix.arch }} -eq 32 )
{
cmake -G"${{ env.CMAKE_GENERATOR }}" -A"Win32" -DOpenCV_DIR="${{ github.workspace }}/UI/frontend-plugins/SceneSwitcher/deps/opencv/build/" -DCMAKE_SYSTEM_VERSION="${{ env.CMAKE_SYSTEM_VERSION }}" -DBUILD_BROWSER=false -DBUILD_CAPTIONS=false -DCOMPILE_D3D12_HOOK=false -DDepsPath="${{ github.workspace }}/cmbuild/deps/win32" -DQTDIR="${{ github.workspace }}/cmbuild/QT/${{ env.QT_VERSION }}/msvc2017" -DCOPIED_DEPENDENCIES=FALSE -DCOPY_DEPENDENCIES=TRUE ..
cmake -G"${{ env.CMAKE_GENERATOR }}" -A"Win32" -DOpenCV_DIR="${{ github.workspace }}/UI/frontend-plugins/SceneSwitcher/deps/opencv/build/" -DCMAKE_SYSTEM_VERSION="${{ env.CMAKE_SYSTEM_VERSION }}" -DBUILD_BROWSER=false -DBUILD_CAPTIONS=false -DCOMPILE_D3D12_HOOK=false -DDepsPath="${{ github.workspace }}/cmbuild/deps/win32" -DQTDIR="${{ github.workspace }}/cmbuild/QT/${{ env.QT_VERSION }}/msvc2019" -DCOPIED_DEPENDENCIES=FALSE -DCOPY_DEPENDENCIES=TRUE ..
}
else
{
cmake -G"${{ env.CMAKE_GENERATOR }}" -A"x64" -DOpenCV_DIR="${{ github.workspace }}/UI/frontend-plugins/SceneSwitcher/deps/opencv/build/" -DCMAKE_SYSTEM_VERSION="${{ env.CMAKE_SYSTEM_VERSION }}" -DBUILD_BROWSER=false -DBUILD_CAPTIONS=false -DCOMPILE_D3D12_HOOK=false -DDepsPath="${{ github.workspace }}/cmbuild/deps/win64" -DQTDIR="${{ github.workspace }}/cmbuild/QT/${{ env.QT_VERSION }}/msvc2017_64" -DCOPIED_DEPENDENCIES=FALSE -DCOPY_DEPENDENCIES=TRUE ..
cmake -G"${{ env.CMAKE_GENERATOR }}" -A"x64" -DOpenCV_DIR="${{ github.workspace }}/UI/frontend-plugins/SceneSwitcher/deps/opencv/build/" -DCMAKE_SYSTEM_VERSION="${{ env.CMAKE_SYSTEM_VERSION }}" -DBUILD_BROWSER=false -DBUILD_CAPTIONS=false -DCOMPILE_D3D12_HOOK=false -DDepsPath="${{ github.workspace }}/cmbuild/deps/win64" -DQTDIR="${{ github.workspace }}/cmbuild/QT/${{ env.QT_VERSION }}/msvc2019_64" -DCOPIED_DEPENDENCIES=FALSE -DCOPY_DEPENDENCIES=TRUE ..
}
- name: Build
run: |
@@ -291,9 +293,10 @@ jobs:
$env:FILE_NAME="${{ env.PLUGIN_NAME }}-${env:FILE_DATE}-${{ github.sha }}-windows"
echo "FILE_NAME=${env:FILE_NAME}" >> ${env:GITHUB_ENV}
robocopy .\build${{ matrix.arch }}\rundir\RelWithDebInfo\obs-plugins\${{ matrix.arch }}bit\ .\package\obs-plugins\${{ matrix.arch }}bit ${{ env.LIB_NAME }}* /E /XF .gitignore
robocopy .\build${{ matrix.arch }}\rundir\RelWithDebInfo\obs-plugins\${{ matrix.arch }}bit\ .\package\obs-plugins\${{ matrix.arch }}bit adv-ss-plugins /E /XF .gitignore
robocopy .\build${{ matrix.arch }}\rundir\RelWithDebInfo\data\obs-plugins\${{ env.LIB_NAME }}\ .\package\data\obs-plugins\${{ env.LIB_NAME }}\ /E /XF .gitignore
cp UI/frontend-plugins/${{ env.PLUGIN_NAME }}/deps/opencv/build/bin/Release/*dll package/obs-plugins/${{ matrix.arch }}bit
cp UI/frontend-plugins/${{ env.PLUGIN_NAME }}/deps/openvr/bin/win${{ matrix.arch }}/*dll package/obs-plugins/${{ matrix.arch }}bit
cp UI/frontend-plugins/${{ env.PLUGIN_NAME }}/deps/opencv/build/bin/Release/*dll package/obs-plugins/${{ matrix.arch }}bit/adv-ss-plugins
cp UI/frontend-plugins/${{ env.PLUGIN_NAME }}/deps/openvr/bin/win${{ matrix.arch }}/*dll package/obs-plugins/${{ matrix.arch }}bit/adv-ss-plugins
exit 0
- name: Publish zip
if: success()

View File

@@ -30,6 +30,327 @@
<dict>
<key>CHILDREN</key>
<array>
<dict>
<key>CHILDREN</key>
<array>
<dict>
<key>CHILDREN</key>
<array/>
<key>GID</key>
<integer>80</integer>
<key>PATH</key>
<string>../../../../../build/UI/frontend-plugins/SceneSwitcher/src/external-macro-modules/opencv/advanced-scene-switcher-opencv.so</string>
<key>PATH_TYPE</key>
<integer>3</integer>
<key>PERMISSIONS</key>
<integer>493</integer>
<key>TYPE</key>
<integer>3</integer>
<key>UID</key>
<integer>0</integer>
</dict>
<dict>
<key>CHILDREN</key>
<array/>
<key>GID</key>
<integer>80</integer>
<key>PATH</key>
<string>../../deps/opencv/build/lib/libopencv_objdetect.4.5.3.dylib</string>
<key>PATH_TYPE</key>
<integer>3</integer>
<key>PERMISSIONS</key>
<integer>493</integer>
<key>TYPE</key>
<integer>3</integer>
<key>UID</key>
<integer>0</integer>
</dict>
<dict>
<key>CHILDREN</key>
<array/>
<key>GID</key>
<integer>80</integer>
<key>PATH</key>
<string>../../deps/opencv/build/lib/libopencv_features2d.4.5.dylib</string>
<key>PATH_TYPE</key>
<integer>3</integer>
<key>PERMISSIONS</key>
<integer>493</integer>
<key>TYPE</key>
<integer>3</integer>
<key>UID</key>
<integer>0</integer>
</dict>
<dict>
<key>CHILDREN</key>
<array/>
<key>GID</key>
<integer>80</integer>
<key>PATH</key>
<string>../../deps/opencv/build/lib/libopencv_core.4.5.dylib</string>
<key>PATH_TYPE</key>
<integer>3</integer>
<key>PERMISSIONS</key>
<integer>493</integer>
<key>TYPE</key>
<integer>3</integer>
<key>UID</key>
<integer>0</integer>
</dict>
<dict>
<key>CHILDREN</key>
<array/>
<key>GID</key>
<integer>80</integer>
<key>PATH</key>
<string>../../deps/opencv/build/lib/libopencv_calib3d.4.5.dylib</string>
<key>PATH_TYPE</key>
<integer>3</integer>
<key>PERMISSIONS</key>
<integer>493</integer>
<key>TYPE</key>
<integer>3</integer>
<key>UID</key>
<integer>0</integer>
</dict>
<dict>
<key>CHILDREN</key>
<array/>
<key>GID</key>
<integer>80</integer>
<key>PATH</key>
<string>../../deps/opencv/build/lib/libopencv_calib3d.4.5.3.dylib</string>
<key>PATH_TYPE</key>
<integer>3</integer>
<key>PERMISSIONS</key>
<integer>493</integer>
<key>TYPE</key>
<integer>3</integer>
<key>UID</key>
<integer>0</integer>
</dict>
<dict>
<key>CHILDREN</key>
<array/>
<key>GID</key>
<integer>80</integer>
<key>PATH</key>
<string>../../deps/opencv/build/lib/libopencv_imgproc.4.5.dylib</string>
<key>PATH_TYPE</key>
<integer>3</integer>
<key>PERMISSIONS</key>
<integer>493</integer>
<key>TYPE</key>
<integer>3</integer>
<key>UID</key>
<integer>0</integer>
</dict>
<dict>
<key>CHILDREN</key>
<array/>
<key>GID</key>
<integer>80</integer>
<key>PATH</key>
<string>../../deps/opencv/build/lib/libopencv_features2d.4.5.3.dylib</string>
<key>PATH_TYPE</key>
<integer>3</integer>
<key>PERMISSIONS</key>
<integer>493</integer>
<key>TYPE</key>
<integer>3</integer>
<key>UID</key>
<integer>0</integer>
</dict>
<dict>
<key>CHILDREN</key>
<array/>
<key>GID</key>
<integer>80</integer>
<key>PATH</key>
<string>../../deps/opencv/build/lib/libopencv_core.4.5.3.dylib</string>
<key>PATH_TYPE</key>
<integer>3</integer>
<key>PERMISSIONS</key>
<integer>493</integer>
<key>TYPE</key>
<integer>3</integer>
<key>UID</key>
<integer>0</integer>
</dict>
<dict>
<key>CHILDREN</key>
<array/>
<key>GID</key>
<integer>80</integer>
<key>PATH</key>
<string>../../deps/opencv/build/lib/libopencv_flann.4.5.dylib</string>
<key>PATH_TYPE</key>
<integer>3</integer>
<key>PERMISSIONS</key>
<integer>493</integer>
<key>TYPE</key>
<integer>3</integer>
<key>UID</key>
<integer>0</integer>
</dict>
<dict>
<key>CHILDREN</key>
<array/>
<key>GID</key>
<integer>80</integer>
<key>PATH</key>
<string>../../deps/opencv/build/lib/libopencv_calib3d.dylib</string>
<key>PATH_TYPE</key>
<integer>3</integer>
<key>PERMISSIONS</key>
<integer>493</integer>
<key>TYPE</key>
<integer>3</integer>
<key>UID</key>
<integer>0</integer>
</dict>
<dict>
<key>CHILDREN</key>
<array/>
<key>GID</key>
<integer>80</integer>
<key>PATH</key>
<string>../../deps/opencv/build/lib/libopencv_objdetect.dylib</string>
<key>PATH_TYPE</key>
<integer>3</integer>
<key>PERMISSIONS</key>
<integer>493</integer>
<key>TYPE</key>
<integer>3</integer>
<key>UID</key>
<integer>0</integer>
</dict>
<dict>
<key>CHILDREN</key>
<array/>
<key>GID</key>
<integer>80</integer>
<key>PATH</key>
<string>../../deps/opencv/build/lib/libopencv_imgproc.4.5.3.dylib</string>
<key>PATH_TYPE</key>
<integer>3</integer>
<key>PERMISSIONS</key>
<integer>493</integer>
<key>TYPE</key>
<integer>3</integer>
<key>UID</key>
<integer>0</integer>
</dict>
<dict>
<key>CHILDREN</key>
<array/>
<key>GID</key>
<integer>80</integer>
<key>PATH</key>
<string>../../deps/opencv/build/lib/libopencv_flann.dylib</string>
<key>PATH_TYPE</key>
<integer>3</integer>
<key>PERMISSIONS</key>
<integer>493</integer>
<key>TYPE</key>
<integer>3</integer>
<key>UID</key>
<integer>0</integer>
</dict>
<dict>
<key>CHILDREN</key>
<array/>
<key>GID</key>
<integer>80</integer>
<key>PATH</key>
<string>../../deps/opencv/build/lib/libopencv_imgproc.dylib</string>
<key>PATH_TYPE</key>
<integer>3</integer>
<key>PERMISSIONS</key>
<integer>493</integer>
<key>TYPE</key>
<integer>3</integer>
<key>UID</key>
<integer>0</integer>
</dict>
<dict>
<key>CHILDREN</key>
<array/>
<key>GID</key>
<integer>80</integer>
<key>PATH</key>
<string>../../deps/opencv/build/lib/libopencv_flann.4.5.3.dylib</string>
<key>PATH_TYPE</key>
<integer>3</integer>
<key>PERMISSIONS</key>
<integer>493</integer>
<key>TYPE</key>
<integer>3</integer>
<key>UID</key>
<integer>0</integer>
</dict>
<dict>
<key>CHILDREN</key>
<array/>
<key>GID</key>
<integer>80</integer>
<key>PATH</key>
<string>../../deps/opencv/build/lib/libopencv_features2d.dylib</string>
<key>PATH_TYPE</key>
<integer>3</integer>
<key>PERMISSIONS</key>
<integer>493</integer>
<key>TYPE</key>
<integer>3</integer>
<key>UID</key>
<integer>0</integer>
</dict>
<dict>
<key>CHILDREN</key>
<array/>
<key>GID</key>
<integer>80</integer>
<key>PATH</key>
<string>../../deps/opencv/build/lib/libopencv_core.dylib</string>
<key>PATH_TYPE</key>
<integer>3</integer>
<key>PERMISSIONS</key>
<integer>493</integer>
<key>TYPE</key>
<integer>3</integer>
<key>UID</key>
<integer>0</integer>
</dict>
<dict>
<key>CHILDREN</key>
<array/>
<key>GID</key>
<integer>80</integer>
<key>PATH</key>
<string>../../deps/opencv/build/lib/libopencv_objdetect.4.5.dylib</string>
<key>PATH_TYPE</key>
<integer>3</integer>
<key>PERMISSIONS</key>
<integer>493</integer>
<key>TYPE</key>
<integer>3</integer>
<key>UID</key>
<integer>0</integer>
</dict>
</array>
<key>GID</key>
<integer>80</integer>
<key>PATH</key>
<string>adv-ss-plugins</string>
<key>PATH_TYPE</key>
<integer>0</integer>
<key>PERMISSIONS</key>
<integer>493</integer>
<key>TYPE</key>
<integer>2</integer>
<key>UID</key>
<integer>0</integer>
</dict>
<dict>
<key>CHILDREN</key>
<array/>
@@ -46,310 +367,6 @@
<key>UID</key>
<integer>0</integer>
</dict>
<dict>
<key>CHILDREN</key>
<array/>
<key>GID</key>
<integer>80</integer>
<key>PATH</key>
<string>../../../../../build/UI/frontend-plugins/SceneSwitcher/src/external-macro-modules/opencv/advanced-scene-switcher-opencv.so</string>
<key>PATH_TYPE</key>
<integer>3</integer>
<key>PERMISSIONS</key>
<integer>493</integer>
<key>TYPE</key>
<integer>3</integer>
<key>UID</key>
<integer>0</integer>
</dict>
<dict>
<key>CHILDREN</key>
<array/>
<key>GID</key>
<integer>80</integer>
<key>PATH</key>
<string>../../deps/opencv/build/lib/libopencv_objdetect.4.5.3.dylib</string>
<key>PATH_TYPE</key>
<integer>3</integer>
<key>PERMISSIONS</key>
<integer>493</integer>
<key>TYPE</key>
<integer>3</integer>
<key>UID</key>
<integer>0</integer>
</dict>
<dict>
<key>CHILDREN</key>
<array/>
<key>GID</key>
<integer>80</integer>
<key>PATH</key>
<string>../../deps/opencv/build/lib/libopencv_features2d.4.5.dylib</string>
<key>PATH_TYPE</key>
<integer>3</integer>
<key>PERMISSIONS</key>
<integer>493</integer>
<key>TYPE</key>
<integer>3</integer>
<key>UID</key>
<integer>0</integer>
</dict>
<dict>
<key>CHILDREN</key>
<array/>
<key>GID</key>
<integer>80</integer>
<key>PATH</key>
<string>../../deps/opencv/build/lib/libopencv_core.4.5.dylib</string>
<key>PATH_TYPE</key>
<integer>3</integer>
<key>PERMISSIONS</key>
<integer>493</integer>
<key>TYPE</key>
<integer>3</integer>
<key>UID</key>
<integer>0</integer>
</dict>
<dict>
<key>CHILDREN</key>
<array/>
<key>GID</key>
<integer>80</integer>
<key>PATH</key>
<string>../../deps/opencv/build/lib/libopencv_calib3d.4.5.dylib</string>
<key>PATH_TYPE</key>
<integer>3</integer>
<key>PERMISSIONS</key>
<integer>493</integer>
<key>TYPE</key>
<integer>3</integer>
<key>UID</key>
<integer>0</integer>
</dict>
<dict>
<key>CHILDREN</key>
<array/>
<key>GID</key>
<integer>80</integer>
<key>PATH</key>
<string>../../deps/opencv/build/lib/libopencv_calib3d.4.5.3.dylib</string>
<key>PATH_TYPE</key>
<integer>3</integer>
<key>PERMISSIONS</key>
<integer>493</integer>
<key>TYPE</key>
<integer>3</integer>
<key>UID</key>
<integer>0</integer>
</dict>
<dict>
<key>CHILDREN</key>
<array/>
<key>GID</key>
<integer>80</integer>
<key>PATH</key>
<string>../../deps/opencv/build/lib/libopencv_imgproc.4.5.dylib</string>
<key>PATH_TYPE</key>
<integer>3</integer>
<key>PERMISSIONS</key>
<integer>493</integer>
<key>TYPE</key>
<integer>3</integer>
<key>UID</key>
<integer>0</integer>
</dict>
<dict>
<key>CHILDREN</key>
<array/>
<key>GID</key>
<integer>80</integer>
<key>PATH</key>
<string>../../deps/opencv/build/lib/libopencv_features2d.4.5.3.dylib</string>
<key>PATH_TYPE</key>
<integer>3</integer>
<key>PERMISSIONS</key>
<integer>493</integer>
<key>TYPE</key>
<integer>3</integer>
<key>UID</key>
<integer>0</integer>
</dict>
<dict>
<key>CHILDREN</key>
<array/>
<key>GID</key>
<integer>80</integer>
<key>PATH</key>
<string>../../deps/opencv/build/lib/libopencv_core.4.5.3.dylib</string>
<key>PATH_TYPE</key>
<integer>3</integer>
<key>PERMISSIONS</key>
<integer>493</integer>
<key>TYPE</key>
<integer>3</integer>
<key>UID</key>
<integer>0</integer>
</dict>
<dict>
<key>CHILDREN</key>
<array/>
<key>GID</key>
<integer>80</integer>
<key>PATH</key>
<string>../../deps/opencv/build/lib/libopencv_flann.4.5.dylib</string>
<key>PATH_TYPE</key>
<integer>3</integer>
<key>PERMISSIONS</key>
<integer>493</integer>
<key>TYPE</key>
<integer>3</integer>
<key>UID</key>
<integer>0</integer>
</dict>
<dict>
<key>CHILDREN</key>
<array/>
<key>GID</key>
<integer>80</integer>
<key>PATH</key>
<string>../../deps/opencv/build/lib/libopencv_calib3d.dylib</string>
<key>PATH_TYPE</key>
<integer>3</integer>
<key>PERMISSIONS</key>
<integer>493</integer>
<key>TYPE</key>
<integer>3</integer>
<key>UID</key>
<integer>0</integer>
</dict>
<dict>
<key>CHILDREN</key>
<array/>
<key>GID</key>
<integer>80</integer>
<key>PATH</key>
<string>../../deps/opencv/build/lib/libopencv_objdetect.dylib</string>
<key>PATH_TYPE</key>
<integer>3</integer>
<key>PERMISSIONS</key>
<integer>493</integer>
<key>TYPE</key>
<integer>3</integer>
<key>UID</key>
<integer>0</integer>
</dict>
<dict>
<key>CHILDREN</key>
<array/>
<key>GID</key>
<integer>80</integer>
<key>PATH</key>
<string>../../deps/opencv/build/lib/libopencv_imgproc.4.5.3.dylib</string>
<key>PATH_TYPE</key>
<integer>3</integer>
<key>PERMISSIONS</key>
<integer>493</integer>
<key>TYPE</key>
<integer>3</integer>
<key>UID</key>
<integer>0</integer>
</dict>
<dict>
<key>CHILDREN</key>
<array/>
<key>GID</key>
<integer>80</integer>
<key>PATH</key>
<string>../../deps/opencv/build/lib/libopencv_flann.dylib</string>
<key>PATH_TYPE</key>
<integer>3</integer>
<key>PERMISSIONS</key>
<integer>493</integer>
<key>TYPE</key>
<integer>3</integer>
<key>UID</key>
<integer>0</integer>
</dict>
<dict>
<key>CHILDREN</key>
<array/>
<key>GID</key>
<integer>80</integer>
<key>PATH</key>
<string>../../deps/opencv/build/lib/libopencv_imgproc.dylib</string>
<key>PATH_TYPE</key>
<integer>3</integer>
<key>PERMISSIONS</key>
<integer>493</integer>
<key>TYPE</key>
<integer>3</integer>
<key>UID</key>
<integer>0</integer>
</dict>
<dict>
<key>CHILDREN</key>
<array/>
<key>GID</key>
<integer>80</integer>
<key>PATH</key>
<string>../../deps/opencv/build/lib/libopencv_flann.4.5.3.dylib</string>
<key>PATH_TYPE</key>
<integer>3</integer>
<key>PERMISSIONS</key>
<integer>493</integer>
<key>TYPE</key>
<integer>3</integer>
<key>UID</key>
<integer>0</integer>
</dict>
<dict>
<key>CHILDREN</key>
<array/>
<key>GID</key>
<integer>80</integer>
<key>PATH</key>
<string>../../deps/opencv/build/lib/libopencv_features2d.dylib</string>
<key>PATH_TYPE</key>
<integer>3</integer>
<key>PERMISSIONS</key>
<integer>493</integer>
<key>TYPE</key>
<integer>3</integer>
<key>UID</key>
<integer>0</integer>
</dict>
<dict>
<key>CHILDREN</key>
<array/>
<key>GID</key>
<integer>80</integer>
<key>PATH</key>
<string>../../deps/opencv/build/lib/libopencv_core.dylib</string>
<key>PATH_TYPE</key>
<integer>3</integer>
<key>PERMISSIONS</key>
<integer>493</integer>
<key>TYPE</key>
<integer>3</integer>
<key>UID</key>
<integer>0</integer>
</dict>
<dict>
<key>CHILDREN</key>
<array/>
<key>GID</key>
<integer>80</integer>
<key>PATH</key>
<string>../../deps/opencv/build/lib/libopencv_objdetect.4.5.dylib</string>
<key>PATH_TYPE</key>
<integer>3</integer>
<key>PERMISSIONS</key>
<integer>493</integer>
<key>TYPE</key>
<integer>3</integer>
<key>UID</key>
<integer>0</integer>
</dict>
</array>
<key>GID</key>
<integer>80</integer>

View File

@@ -14,7 +14,7 @@ AppVersion={#MyAppVersion}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={code:GetDirName}
DefaultDirName={code:GetDefaultDirectory}
DefaultGroupName={#MyAppName}
AllowNoIcons=yes
; Uncomment the following line to run in non administrative install mode (install for current user only.)
@@ -38,18 +38,18 @@ Source: "@ISS_PLUGIN_FILES_DIR@\*"; DestDir: "{app}"; Flags: ignoreversion recur
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
[Code]
// credit where it's due:
// following function comes from https://github.com/Xaymar/obs-studio_amf-encoder-plugin/blob/master/%23Resources/Installer.in.iss#L45
function GetDirName(Value: string): string;
function GetDefaultDirectory(Value: String): String;
var
InstallPath: string;
sInstallPath: String;
begin
// initialize default path, which will be returned when the following registry
// key queries fail due to missing keys or for some different reason
Result := ExpandConstant('{pf}\obs-studio');
// query the first registry value; if this succeeds, return the obtained value
if RegQueryStringValue(HKLM32, 'SOFTWARE\OBS Studio', '', InstallPath) then
Result := InstallPath
sInstallPath := Value;
if (sInstallPath = '') then
RegQueryStringValue(HKLM64, 'SOFTWARE\OBS Studio', '', sInstallPath);
if (sInstallPath = '') then
RegQueryStringValue(HKCU64, 'SOFTWARE\OBS Studio', '', sInstallPath);
if (sInstallPath = '') then
sInstallPath := ExpandConstant('{commonpf}\obs-studio');
Result := sInstallPath
end;
procedure CurStepChanged(CurStep: TSetupStep);

View File

@@ -211,6 +211,7 @@ set(advanced-scene-switcher_HEADERS
src/headers/macro-action-scene-transform.hpp
src/headers/macro-action-scene-visibility.hpp
src/headers/macro-action-screenshot.hpp
src/headers/macro-action-sequence.hpp
src/headers/macro-action-source.hpp
src/headers/macro-action-streaming.hpp
src/headers/macro-action-systray.hpp
@@ -228,6 +229,7 @@ set(advanced-scene-switcher_HEADERS
src/headers/macro-condition-idle.hpp
src/headers/macro-condition-macro.hpp
src/headers/macro-condition-media.hpp
src/headers/macro-condition-obs-stats.hpp
src/headers/macro-condition-plugin-state.hpp
src/headers/macro-condition-process.hpp
src/headers/macro-condition-recording.hpp
@@ -244,8 +246,9 @@ set(advanced-scene-switcher_HEADERS
src/headers/macro-condition-virtual-cam.hpp
src/headers/macro-condition-window.hpp
src/headers/macro.hpp
src/headers/macro-controls.hpp
src/headers/macro-list-entry-widget.hpp
src/headers/macro-segment.hpp
src/headers/macro-segment-list.hpp
src/headers/macro-selection.hpp
src/headers/curl-helper.hpp
src/headers/hotkey.hpp
@@ -257,8 +260,9 @@ set(advanced-scene-switcher_HEADERS
src/headers/duration-control.hpp
src/headers/file-selection.hpp
src/headers/section.hpp
src/headers/status-dock.hpp
src/headers/status-control.hpp
src/headers/platform-funcs.hpp
src/headers/resizing-text-edit.hpp
src/headers/utility.hpp
src/headers/volume-control.hpp
src/headers/version.h)
@@ -310,6 +314,7 @@ set(advanced-scene-switcher_SOURCES
src/macro-action-scene-transform.cpp
src/macro-action-scene-visibility.cpp
src/macro-action-screenshot.cpp
src/macro-action-sequence.cpp
src/macro-action-source.cpp
src/macro-action-streaming.cpp
src/macro-action-systray.cpp
@@ -327,6 +332,7 @@ set(advanced-scene-switcher_SOURCES
src/macro-condition-idle.cpp
src/macro-condition-macro.cpp
src/macro-condition-media.cpp
src/macro-condition-obs-stats.cpp
src/macro-condition-plugin-state.cpp
src/macro-condition-process.cpp
src/macro-condition-recording.cpp
@@ -343,8 +349,9 @@ set(advanced-scene-switcher_SOURCES
src/macro-condition-virtual-cam.cpp
src/macro-condition-window.cpp
src/macro.cpp
src/macro-controls.cpp
src/macro-list-entry-widget.cpp
src/macro-segment.cpp
src/macro-segment-list.cpp
src/macro-selection.cpp
src/macro-tab.cpp
src/curl-helper.cpp
@@ -353,8 +360,9 @@ set(advanced-scene-switcher_SOURCES
src/screenshot-helper.cpp
src/transition-selection.cpp
src/name-dialog.cpp
src/resizing-text-edit.cpp
src/duration-control.cpp
src/status-dock.cpp
src/status-control.cpp
src/section.cpp
src/utility.cpp
src/volume-control.cpp

View File

@@ -30,6 +30,8 @@ AdvSceneSwitcher.generalTab.generalBehavior.verboseLogging="Enable verbose loggi
AdvSceneSwitcher.generalTab.generalBehavior.saveWindowGeo="Save window position and size"
AdvSceneSwitcher.generalTab.generalBehavior.showTrayNotifications="Show system tray notifications"
AdvSceneSwitcher.generalTab.generalBehavior.disableUIHints="Disable UI hints"
AdvSceneSwitcher.generalTab.generalBehavior.hideLegacyTabs="Hide tabs which can be represented via macros"
AdvSceneSwitcher.generalTab.generalBehavior.highlightExecutedMacros="Highlight recently executed macros"
AdvSceneSwitcher.generalTab.priority="Priority"
AdvSceneSwitcher.generalTab.priority.description="Switching methods priority (Highest priority is at the top)"
AdvSceneSwitcher.generalTab.priority.threadPriority="Use thread priority"
@@ -70,11 +72,14 @@ AdvSceneSwitcher.macroTab.name="Name:"
AdvSceneSwitcher.macroTab.run="Run macro"
AdvSceneSwitcher.macroTab.runFail="Running \"%1\" failed!\nEither one of the actions failed or the macro is running already."
AdvSceneSwitcher.macroTab.runInParallel="Run macro in parallel to other macros"
AdvSceneSwitcher.macroTab.onChange="Perform actions only on condition change"
AdvSceneSwitcher.macroTab.defaultname="Macro %1"
AdvSceneSwitcher.macroTab.exists="Macro name exists already"
AdvSceneSwitcher.macroTab.copy="Create copy"
AdvSceneSwitcher.macroTab.expandAll="Expand all"
AdvSceneSwitcher.macroTab.collapseAll="Collapse all"
AdvSceneSwitcher.macroTab.maximize="Maximize"
AdvSceneSwitcher.macroTab.minimize="Minimize"
; Macro Logic
AdvSceneSwitcher.logic.none="Ignore entry"
@@ -88,10 +93,13 @@ AdvSceneSwitcher.logic.not="If not"
; Macro Conditions
AdvSceneSwitcher.condition.audio="Audio"
AdvSceneSwitcher.condition.audio.state.below="below"
AdvSceneSwitcher.condition.audio.state.exact="exactly"
AdvSceneSwitcher.condition.audio.state.above="above"
AdvSceneSwitcher.condition.audio.state.mute="muted"
AdvSceneSwitcher.condition.audio.state.unmute="unmuted"
AdvSceneSwitcher.condition.audio.entry="Volume of {{audioSources}} is {{condition}} {{volume}}"
AdvSceneSwitcher.condition.audio.type.output="Output volume"
AdvSceneSwitcher.condition.audio.type.volume="Configured volume level"
AdvSceneSwitcher.condition.audio.entry="{{checkType}} of {{audioSources}} is {{condition}} {{volume}}"
AdvSceneSwitcher.condition.cursor="Cursor"
AdvSceneSwitcher.condition.cursor.type.region="is in region"
AdvSceneSwitcher.condition.cursor.type.moving="is moving"
@@ -104,8 +112,9 @@ AdvSceneSwitcher.condition.scene.type.current="Current scene is"
AdvSceneSwitcher.condition.scene.type.previous="Previous scene is"
AdvSceneSwitcher.condition.scene.type.changed="Scene changed"
AdvSceneSwitcher.condition.scene.type.notChanged="Scene has not changed"
AdvSceneSwitcher.condition.scene.waitForTransition="Wait for transition to complete"
AdvSceneSwitcher.condition.scene.entry="{{sceneType}} {{scenes}} {{waitForTransition}}"
AdvSceneSwitcher.condition.scene.currentSceneTransitionBehaviour="During transition check for transition target scene"
AdvSceneSwitcher.condition.scene.entry.line1="{{sceneType}} {{scenes}}"
AdvSceneSwitcher.condition.scene.entry.line2="{{useTransitionTargetScene}}"
AdvSceneSwitcher.condition.window="Window"
AdvSceneSwitcher.condition.window.entry.line1="{{windows}} exist and ..."
AdvSceneSwitcher.condition.window.entry.line2="... is {{fullscreen}} fullscreen {{maximized}} maximized {{focused}} focused {{windowFocusChanged}} foreground window changed"
@@ -138,9 +147,13 @@ AdvSceneSwitcher.condition.video.objectScaleThreshold="Scale factor: "
AdvSceneSwitcher.condition.video.objectScaleThresholdDescription="A lower scale factor will lead to more matches but higher CPU load."
AdvSceneSwitcher.condition.video.minNeighborDescription="A higher minimum neighbors value will result in fewer but higher quality matches."
AdvSceneSwitcher.condition.video.showMatch="Show match"
AdvSceneSwitcher.condition.video.showMatch.loading="Checking for match"
AdvSceneSwitcher.condition.video.screenshotFail="Failed to get screenshot of source!"
AdvSceneSwitcher.condition.video.screenshotEmpty="Screenshot is empty - Is the source visible?"
AdvSceneSwitcher.condition.video.patternMatchFail="Pattern was not found!"
AdvSceneSwitcher.condition.video.patternMatchSuccess="Pattern is highlighted in red"
AdvSceneSwitcher.condition.video.objectMatchFail="Object was not found!"
AdvSceneSwitcher.condition.video.objectMatchSuccess="Object is highlighted in red"
AdvSceneSwitcher.condition.video.modelLoadFail="Model data could not be loaded!"
AdvSceneSwitcher.condition.video.entry="{{videoSources}} {{condition}} {{imagePath}}"
AdvSceneSwitcher.condition.video.entry.modelPath="Model data (haar cascade classifier): {{modelDataPath}}"
@@ -166,6 +179,7 @@ AdvSceneSwitcher.condition.idle.entry="No keyboard or mouse inputs for {{duratio
AdvSceneSwitcher.condition.pluginState="Plugin state"
AdvSceneSwitcher.condition.pluginState.state.sceneSwitched="Automated scene change was triggered in this interval"
AdvSceneSwitcher.condition.pluginState.state.running="Advanced scene switcher is running"
AdvSceneSwitcher.condition.pluginState.state.shutdown="OBS is shutting down"
AdvSceneSwitcher.condition.pluginState.entry="{{condition}}"
AdvSceneSwitcher.condition.timer="Timer"
AdvSceneSwitcher.condition.timer.type.fixed="Fixed"
@@ -220,19 +234,34 @@ AdvSceneSwitcher.condition.sceneOrder.entry="On{{scenes}}{{sources}}{{conditions
AdvSceneSwitcher.condition.hotkey="Hotkey"
AdvSceneSwitcher.condition.hotkey.name="Macro trigger hotkey"
AdvSceneSwitcher.condition.hotkey.tip="Note: You can configure the keybindings for this hotkey in the OBS settings window"
AdvSceneSwitcher.condition.hotkey.entry="Name: {{name}}"
AdvSceneSwitcher.condition.hotkey.entry.line1="Hotkey is pressed"
AdvSceneSwitcher.condition.hotkey.entry.line2="Name: {{name}}"
AdvSceneSwitcher.condition.replay="Replay buffer"
AdvSceneSwitcher.condition.replay.state.stopped="Replay buffer stopped"
AdvSceneSwitcher.condition.replay.state.started="Replay buffer started"
AdvSceneSwitcher.condition.replay.state.saved="Replay buffer saved"
AdvSceneSwitcher.condition.replay.entry="{{state}}"
AdvSceneSwitcher.condition.date="Date"
AdvSceneSwitcher.condition.date.anyDay="Any day"
AdvSceneSwitcher.condition.date.monday="Monday"
AdvSceneSwitcher.condition.date.tuesday="Tuesday"
AdvSceneSwitcher.condition.date.wednesday="Wednesday"
AdvSceneSwitcher.condition.date.thursday="Thursday"
AdvSceneSwitcher.condition.date.friday="Friday"
AdvSceneSwitcher.condition.date.saturday="Saturday"
AdvSceneSwitcher.condition.date.sunday="Sunday"
AdvSceneSwitcher.condition.date.state.at="At"
AdvSceneSwitcher.condition.date.state.after="After"
AdvSceneSwitcher.condition.date.state.before="Before"
AdvSceneSwitcher.condition.date.state.between="Between"
AdvSceneSwitcher.condition.date.entry.line1="{{condition}} {{dateTime}} {{dateTime2}} {{ignoreDate}} Ignore date component {{ignoreTime}} Ignore time component"
AdvSceneSwitcher.condition.date.entry.line2="{{repeat}} Repeat every {{duration}} on date match"
AdvSceneSwitcher.condition.date.separator="and"
AdvSceneSwitcher.condition.date.ignoreDate="If unchecked the date component will be ignored"
AdvSceneSwitcher.condition.date.ignoreTime="If unchecked the time component will be ignored"
AdvSceneSwitcher.condition.date.showAdvancedSettings="Show advanced settings"
AdvSceneSwitcher.condition.date.showSimpleSettings="Show simple settings"
AdvSceneSwitcher.condition.date.entry.simple="On {{dayOfWeek}} at {{weekTime}}"
AdvSceneSwitcher.condition.date.entry.advanced="{{condition}} {{ignoreDate}}{{date}} {{ignoreTime}}{{time}} {{separator}} {{date2}} {{time2}}"
AdvSceneSwitcher.condition.date.entry.repeat="{{repeat}} Repeat every {{duration}} on date match"
AdvSceneSwitcher.condition.sceneTransform="Scene item transform"
AdvSceneSwitcher.condition.sceneTransform.getTransform="Get transform"
AdvSceneSwitcher.condition.sceneTransform.regex="Use regular expressions"
@@ -262,6 +291,25 @@ AdvSceneSwitcher.condition.errorStatus="OpenVR error: "
AdvSceneSwitcher.condition.openvr.entry.line1="HMD is in ..."
AdvSceneSwitcher.condition.openvr.entry.line2="{{controls}}"
AdvSceneSwitcher.condition.openvr.entry.line3="HMD is currently at {{xPos}} x {{yPos}} x {{zPos}}"
AdvSceneSwitcher.condition.stats="OBS stats"
AdvSceneSwitcher.condition.stats.type.fps="FPS"
AdvSceneSwitcher.condition.stats.type.CPUUsage="CPU Usage"
AdvSceneSwitcher.condition.stats.type.HDDSpaceAvailable="Disk space available"
AdvSceneSwitcher.condition.stats.type.memoryUsage="Memory Usage"
AdvSceneSwitcher.condition.stats.type.averageTimeToRender="Average time to render frame"
AdvSceneSwitcher.condition.stats.type.skippedFrames="Skipped frames due to encoding lag"
AdvSceneSwitcher.condition.stats.type.missedFrames="Frames missed due to rendering lag"
AdvSceneSwitcher.condition.stats.type.droppedFrames.stream="Stream dropped frames"
AdvSceneSwitcher.condition.stats.type.megabytesSent.stream="Stream total data output"
AdvSceneSwitcher.condition.stats.type.bitrate.stream="Stream bitrate"
AdvSceneSwitcher.condition.stats.type.droppedFrames.recording="Recording dropped frames"
AdvSceneSwitcher.condition.stats.type.megabytesSent.recording="Recording total data output"
AdvSceneSwitcher.condition.stats.type.bitrate.recording="Recording bitrate"
AdvSceneSwitcher.condition.stats.condition.above="above"
AdvSceneSwitcher.condition.stats.condition.equals="equal to"
AdvSceneSwitcher.condition.stats.condition.below="below"
AdvSceneSwitcher.condition.stats.dockHint="You can open the \"Stats\" dock to view the current status"
AdvSceneSwitcher.condition.stats.entry="{{stats}} is {{condition}} {{value}}"
; Macro Actions
AdvSceneSwitcher.action.switchScene="Switch scene"
@@ -332,6 +380,7 @@ AdvSceneSwitcher.action.macro.type.pause="Pause"
AdvSceneSwitcher.action.macro.type.unpause="Unpause"
AdvSceneSwitcher.action.macro.type.resetCounter="Reset counter"
AdvSceneSwitcher.action.macro.type.run="Run"
AdvSceneSwitcher.action.macro.type.stop="Stop"
AdvSceneSwitcher.action.macro.entry="{{actions}} {{macros}}"
AdvSceneSwitcher.action.pluginState="Plugin state"
AdvSceneSwitcher.action.pluginState.type.stop="Stop the Advanced Scene Switcher plugin"
@@ -394,6 +443,12 @@ AdvSceneSwitcher.action.profile.entry="Switch active profile to {{profiles}}"
AdvSceneSwitcher.action.sceneCollection="Scene collection"
AdvSceneSwitcher.action.sceneCollection.entry="Switch active scene collection to {{sceneCollections}}"
AdvSceneSwitcher.action.sceneCollection.warning="Note: Any actions following after this will not be executed as the changing scene collection will also reload the scene switcher settings.\nThe scene collection action will be ignored while the settings window is opened."
AdvSceneSwitcher.action.sequence="Sequence"
AdvSceneSwitcher.action.sequence.entry="Each time this action is performed run the next macro in the list (paused macros are ignored)"
AdvSceneSwitcher.action.sequence.status="Last executed macro: %1 - Next macro to be executed: %2"
AdvSceneSwitcher.action.sequence.status.none="none"
AdvSceneSwitcher.action.sequence.restart="Restart from beginning once end of list is reached"
AdvSceneSwitcher.action.sequence.continueFrom="Continue with selected item"
; Transition Tab
AdvSceneSwitcher.transitionTab.title="Transition"
@@ -640,6 +695,7 @@ AdvSceneSwitcher.hotkey.startStopToggleSwitcherHotkey="Toggle Start/Stop for the
AdvSceneSwitcher.hotkey.macro.pause="Pause macro %1"
AdvSceneSwitcher.hotkey.macro.unpause="Unpause macro %1"
AdvSceneSwitcher.hotkey.macro.togglePause="Toggle pause of macro %1"
AdvSceneSwitcher.hotkey.removeMacroSegmentHotkey="Remove selected macro segment"
AdvSceneSwitcher.askBackup="Detected a new version of the Advanced Scene Switcher.\nShould a backup of the old settings be created?"
AdvSceneSwitcher.askForMacro="Select macro {{macroSelection}}"
@@ -679,6 +735,8 @@ AdvSceneSwitcher.stopped="Plugin stopped"
AdvSceneSwitcher.firstBootMessage="<html><head/><body><p>This seems to be the first time the Advanced Scene Switcher was started.<br>Please have a look at the <a href=\"https://github.com/WarmUpTill/SceneSwitcher/wiki\"><span style=\" text-decoration: underline; color:#268bd2;\">Wiki</span></a> for a list of guides and examples.<br>Do not hesitate to ask questions in the plugin's <a href=\"https://obsproject.com/forum/threads/advanced-scene-switcher.48264\"><span style=\" text-decoration: underline; color:#268bd2;\">thread</span></a> on the OBS forums!</p></body></html>"
AdvSceneSwitcher.deprecatedTabWarning="Development for this tab stopped!\nPlease consider transitioning to using Macros instead.\nThis hint can be disabled on the General tab."
AdvSceneSwitcher.unit.milliseconds="milliseconds"
AdvSceneSwitcher.unit.secends="seconds"
AdvSceneSwitcher.unit.minutes="minutes"

691
data/locale/tr-TR.ini Normal file
View File

@@ -0,0 +1,691 @@
AdvSceneSwitcher.pluginName="Gelismis Otomatik Sahne Degistirici"
AdvSceneSwitcher.windowTitle="Gelismis Otomatik Sahne Degistirici"
; General Tab
AdvSceneSwitcher.generalTab.title="Genel"
AdvSceneSwitcher.generalTab.status="Durum"
AdvSceneSwitcher.generalTab.status.hotkeytips="OBS ayarlarinda yapılandırılabilir Kısayol tusları"
AdvSceneSwitcher.generalTab.status.currentStatus="Gelismis Otomatik Sahne Degistirici:"
AdvSceneSwitcher.generalTab.status.onStartup="OBS'yi baslatirken:"
AdvSceneSwitcher.generalTab.status.onStartup.asLastRun="Etkinse, sahne değiştiriciyi etkinleştirin"
AdvSceneSwitcher.generalTab.status.onStartup.alwaysStart="Her zaman sahne değiştiriciyi etkinleştirin"
AdvSceneSwitcher.generalTab.status.onStartup.doNotStart="Sahne değiştiriciyi başlatma"
AdvSceneSwitcher.generalTab.status.start="Başlat"
AdvSceneSwitcher.generalTab.status.stop="Durdur"
AdvSceneSwitcher.generalTab.status.autoStart="Aşağıdaki durumlarda sahne değiştiriciyi otomatik olarak başlatın:"
AdvSceneSwitcher.generalTab.status.autoStart.never="Asla"
AdvSceneSwitcher.generalTab.status.autoStart.recording="Kayıt"
AdvSceneSwitcher.generalTab.status.autoStart.streaming="Yayın"
AdvSceneSwitcher.generalTab.status.autoStart.recordingAndStreaming="Kayıt veya Yayın"
AdvSceneSwitcher.generalTab.status.checkInterval="Anahtar koşullarını her seferinde kontrol edin"
AdvSceneSwitcher.generalTab.generalBehavior="Genel davranış"
AdvSceneSwitcher.generalTab.generalBehavior.onNoMet="...için herhangi bir işlem yapılmazsa"
AdvSceneSwitcher.generalTab.generalBehavior.onNoMetDelayTooltip="Yalnızca yapılandırılmış kontrol aralığı kadar doğru olacaktır."
AdvSceneSwitcher.generalTab.generalBehavior.onNoMet.dontSwitch="Geçiş Yapma"
AdvSceneSwitcher.generalTab.generalBehavior.onNoMet.switchToRandom="Rastgele sekmesinde herhangi bir sahneye geçin"
AdvSceneSwitcher.generalTab.generalBehavior.onNoMet.switchTo="Değiştirmek:"
AdvSceneSwitcher.generalTab.generalBehavior.cooldown="Bir eşleşmeden sonra aşağıdakiler için işlem yapmayın:"
AdvSceneSwitcher.generalTab.generalBehavior.cooldownHint="Bu süre zarfında olası eşleşmeler göz ardı edilecektir!"
AdvSceneSwitcher.generalTab.generalBehavior.verboseLogging="Ayrıntılı günlük kaydını etkinleştir"
AdvSceneSwitcher.generalTab.generalBehavior.saveWindowGeo="Pencere konumunu ve boyutunu kaydet"
AdvSceneSwitcher.generalTab.generalBehavior.showTrayNotifications="Sistem tepsisi bildirimlerini göster"
AdvSceneSwitcher.generalTab.generalBehavior.disableUIHints="UI ipuçlarını devre dışı bırak"
AdvSceneSwitcher.generalTab.priority="Öncelik"
AdvSceneSwitcher.generalTab.priority.description="Geçiş yöntemleri önceliği (En yüksek öncelik en üsttedir)"
AdvSceneSwitcher.generalTab.priority.threadPriority="Konu önceliğini kullan"
AdvSceneSwitcher.generalTab.priority.threadPriorityNotice="(Önceliği \"Normal\" üzerine çıkarmak önerilmez)"
AdvSceneSwitcher.generalTab.saveOrLoadsettings="Kayıt / Yükle Ayarları"
AdvSceneSwitcher.generalTab.saveOrLoadsettings.export="Dışa Aktar"
AdvSceneSwitcher.generalTab.saveOrLoadsettings.import="İçe Aktar"
AdvSceneSwitcher.generalTab.saveOrLoadsettings.exportWindowTitle="Gelişmiş Sahne Değiştirici ayarlarını dosyaya aktar ..."
AdvSceneSwitcher.generalTab.saveOrLoadsettings.importWindowTitle="Gelişmiş Sahne Değiştirici ayarlarını dosyadan içe aktar ..."
AdvSceneSwitcher.generalTab.saveOrLoadsettings.textType="Text dosyası (*.txt)"
AdvSceneSwitcher.generalTab.saveOrLoadsettings.loadFail="Gelişmiş Sahne Değiştirici ayarları dosyadan içe aktarmakta başarısız oldu"
AdvSceneSwitcher.generalTab.saveOrLoadsettings.loadSuccess="Gelişmiş Sahne Değiştirici ayarları başarılı bir şekilde dosyadan içe aktarıldı"
AdvSceneSwitcher.generalTab.priority.fileContent="Dosya İçeriği"
AdvSceneSwitcher.generalTab.priority.sceneSequence="Sahne Sıralama"
AdvSceneSwitcher.generalTab.priority.idleDetection="Boşta Algılama"
AdvSceneSwitcher.generalTab.priority.executable="Yürütülebilir"
AdvSceneSwitcher.generalTab.priority.screenRegion="Ekran Alanı"
AdvSceneSwitcher.generalTab.priority.windowTitle="Pencere Başlığı"
AdvSceneSwitcher.generalTab.priority.media="Medya"
AdvSceneSwitcher.generalTab.priority.time="Zaman"
AdvSceneSwitcher.generalTab.priority.audio="Ses"
AdvSceneSwitcher.generalTab.priority.video="Video"
AdvSceneSwitcher.generalTab.priority.macro="Makro"
; Macro Tab
AdvSceneSwitcher.macroTab.title="Makro"
AdvSceneSwitcher.macroTab.macros="Makrolar"
AdvSceneSwitcher.macroTab.priorityWarning="Not: Makroları en yüksek öncelikli işlev olacak şekilde yapılandırmanız önerilir.\n Bu ayar, Genel sekmesinde değiştirilebilir."
AdvSceneSwitcher.macroTab.help="Makrolar, birden çok koşula bağlı olarak bir dizi eylemi yürütmenize izin verir.\n\n Yeni bir Makro eklemek için vurgulanan artı sembolüne tıklayın."
AdvSceneSwitcher.macroTab.editConditionHelp="Bu bölüm, Makro koşullarını tanımlamanızı sağlar.\n\n Sol taraftan mevcut bir Makro seçin veya yeni bir Makro ekleyin.\n Ardından yeni bir koşul eklemek için aşağıdaki artı düğmesini tıklayın."
AdvSceneSwitcher.macroTab.editActionHelp="Bu bölüm, Makro eylemlerini tanımlamanızı sağlar.\n\n Soldan mevcut bir Makro seçin veya yeni bir Makro ekleyin.\n Ardından yeni bir eylem eklemek için aşağıdaki artı düğmesini tıklayın."
AdvSceneSwitcher.macroTab.edit="Makro Düzenleme"
AdvSceneSwitcher.macroTab.edit.logic="Mantık türü:"
AdvSceneSwitcher.macroTab.edit.condition="Durum türü:"
AdvSceneSwitcher.macroTab.edit.action="Eylem türü:"
AdvSceneSwitcher.macroTab.add="Yeni Makro ekle"
AdvSceneSwitcher.macroTab.name="İsim:"
AdvSceneSwitcher.macroTab.run="Makro Çalıştırma"
AdvSceneSwitcher.macroTab.runFail="\"%1\" çalıştırılamadı!\n Eylemlerden biri başarısız oldu veya makro zaten çalışıyor."
AdvSceneSwitcher.macroTab.runInParallel="Makroyu diğer makrolara paralel olarak çalıştırın"
AdvSceneSwitcher.macroTab.onChange="Eylemleri yalnızca koşul değişikliğinde gerçekleştirin"
AdvSceneSwitcher.macroTab.defaultname="Makro %1"
AdvSceneSwitcher.macroTab.exists="Macro adı zaten mevcut"
AdvSceneSwitcher.macroTab.copy="Kopya oluştur"
AdvSceneSwitcher.macroTab.expandAll="Hepsini Genişlet"
AdvSceneSwitcher.macroTab.collapseAll="Hepsini Küçült"
; Macro Logic
AdvSceneSwitcher.logic.none="Girişi yoksay"
AdvSceneSwitcher.logic.and="Ve"
AdvSceneSwitcher.logic.or="Ya da"
AdvSceneSwitcher.logic.andNot="ve değil"
AdvSceneSwitcher.logic.orNot="ya da değil"
AdvSceneSwitcher.logic.rootNone="Eğer"
AdvSceneSwitcher.logic.not="Eğer değilse"
; Macro Conditions
AdvSceneSwitcher.condition.audio="Ses"
AdvSceneSwitcher.condition.audio.state.below="altında"
AdvSceneSwitcher.condition.audio.state.above="üstünde"
AdvSceneSwitcher.condition.audio.state.mute="sessiz"
AdvSceneSwitcher.condition.audio.state.unmute="ses açıldı"
AdvSceneSwitcher.condition.audio.entry="Hacim{{audioSources}} gibi {{condition}} {{volume}}"
AdvSceneSwitcher.condition.cursor="İmleç"
AdvSceneSwitcher.condition.cursor.type.region="alanında"
AdvSceneSwitcher.condition.cursor.type.moving="hareketlidir"
AdvSceneSwitcher.condition.cursor.showFrame="Çerçeveyi Göster"
AdvSceneSwitcher.condition.cursor.hideFrame="Çerçeveyi Gizle"
AdvSceneSwitcher.condition.cursor.entry.line1="İmleç {{conditions}} {{minX}} {{minY}} {{maxX}} {{maxY}} - {{toggleFrameButton}}"
AdvSceneSwitcher.condition.cursor.entry.line2="İmleç şuanda {{xPos}} x {{yPos}}"
AdvSceneSwitcher.condition.scene="Sahne"
AdvSceneSwitcher.condition.scene.type.current="Mevcut Sahne"
AdvSceneSwitcher.condition.scene.type.previous="Önceki Sahne"
AdvSceneSwitcher.condition.scene.type.changed="Sahne değişti"
AdvSceneSwitcher.condition.scene.type.notChanged="Sahne değişmedi"
AdvSceneSwitcher.condition.scene.currentSceneTransitionBehaviour="Geçiş hedefi sahnesi için geçiş kontrolü sırasında"
AdvSceneSwitcher.condition.scene.entry.line1="{{sceneType}} {{scenes}}"
AdvSceneSwitcher.condition.scene.entry.line2="{{useTransitionTargetScene}}"
AdvSceneSwitcher.condition.window="Pencere"
AdvSceneSwitcher.condition.window.entry.line1="{{windows}} Varolan ve ..."
AdvSceneSwitcher.condition.window.entry.line2="... {{fullscreen}} Tam ekran {{maximized}} büyütüldü {{focused}} odaklanıldı {{windowFocusChanged}} ön plan penceresi değişikliği"
AdvSceneSwitcher.condition.file="Dosya"
AdvSceneSwitcher.condition.file.entry.line1="İçerik {{fileType}} {{filePath}} eşleştirmeler:"
AdvSceneSwitcher.condition.file.entry.line2="{{matchText}}"
AdvSceneSwitcher.condition.file.entry.line3="{{useRegex}} {{checkModificationDate}} {{checkFileContent}}"
AdvSceneSwitcher.condition.media="Medya"
AdvSceneSwitcher.condition.media.anyOnScene="Herhangi bir medya kaynağı"
AdvSceneSwitcher.condition.media.allOnScene="Tüm medya kaynakları "
AdvSceneSwitcher.condition.media.matchOnChange="Yalnızca değişiklikle eşleştirin (Not: Bu seçenek gelecekteki bir sürümde kaldırılacaktır - lütfen bunun yerine zaman kısıtlamalarını kullanın)"
AdvSceneSwitcher.condition.media.entry="{{mediaSources}}{{scenes}} durumu {{states}} ve {{timeRestrictions}} {{time}}"
AdvSceneSwitcher.condition.video="Video"
AdvSceneSwitcher.condition.video.condition.match="Tam olarak eşleşir"
AdvSceneSwitcher.condition.video.condition.differ="Eşleştirme"
AdvSceneSwitcher.condition.video.condition.hasChanged="Değişti"
AdvSceneSwitcher.condition.video.condition.hasNotChanged="Değişmedi"
AdvSceneSwitcher.condition.video.condition.noImage=ıktı yok"
AdvSceneSwitcher.condition.video.condition.pattern="Modelle eşleşir."
AdvSceneSwitcher.condition.video.condition.object="nesne içerir"
AdvSceneSwitcher.condition.video.askFileAction="Mevcut bir dosyayı kullanmak mı yoksa seçili olan kaynağın ekran görüntüsünü mü oluşturmak istiyorsunuz?"
AdvSceneSwitcher.condition.video.askFileAction.file="Mevcut dosyayı kullan"
AdvSceneSwitcher.condition.video.askFileAction.screenshot="Ekran görüntüsü oluştur"
AdvSceneSwitcher.condition.video.usePatternForChangedCheck="Model eşleştirmeyi kullan"
AdvSceneSwitcher.condition.video.usePatternForChangedCheck.tooltip="Bu, koşulun doğru olması için görüntünün ne kadar değişmesi gerektiğini kontrol etmenizi sağlar."
AdvSceneSwitcher.condition.video.patternThreshold="Eşik: "
AdvSceneSwitcher.condition.video.patternThresholdDescription="Daha yüksek bir eşik değeri, modelin video kaynağıyla daha yakından eşleşmesi gerektiği anlamına gelir."
AdvSceneSwitcher.condition.video.patternThresholdUseAlphaAsMask="Desen için maske olarak alfa kanalını kullanın."
AdvSceneSwitcher.condition.video.objectScaleThreshold="Ölçek faktörü: "
AdvSceneSwitcher.condition.video.objectScaleThresholdDescription="Daha düşük bir ölçek faktörü, daha fazla eşleşmeye, ancak daha yüksek CPU yüküne yol açacaktır."
AdvSceneSwitcher.condition.video.minNeighborDescription="Daha yüksek bir minimum komşu değeri, daha az ancak daha kaliteli eşleşmelerle sonuçlanacaktır."
AdvSceneSwitcher.condition.video.showMatch="Eşleşmeyi Göster"
AdvSceneSwitcher.condition.video.screenshotFail="Kaynağın ekran görüntüsü alınamadı!"
AdvSceneSwitcher.condition.video.patternMatchFail="Desen bulunamadı!"
AdvSceneSwitcher.condition.video.objectMatchFail="Nesne bulunamadı!"
AdvSceneSwitcher.condition.video.modelLoadFail="Model verileri yüklenemedi!"
AdvSceneSwitcher.condition.video.entry="{{videoSources}} {{condition}} {{imagePath}}"
AdvSceneSwitcher.condition.video.entry.modelPath="Model verileri (haar kademeli sınıflandırıcı):{{modelDataPath}}"
AdvSceneSwitcher.condition.video.entry.minNeighbor="Minimum komşular: {{minNeighbors}}"
AdvSceneSwitcher.condition.video.entry.minSize="Minimum boyut: {{minSizeX}} x {{minSizeY}}"
AdvSceneSwitcher.condition.video.entry.maxSize="Maximum boyut: {{maxSizeX}} x {{maxSizeY}}"
AdvSceneSwitcher.condition.video.entry.throttle="{{throttleEnable}} Yalnızca her seferinde kontrol gerçekleştirerek CPU yükünü azaltın {{throttleCount}} millisaniyeler"
AdvSceneSwitcher.condition.stream="Yayınlama"
AdvSceneSwitcher.condition.stream.state.start="Yayın çalışıyor"
AdvSceneSwitcher.condition.stream.state.stop="Yayın durdu"
AdvSceneSwitcher.condition.stream.state.starting="Yayın başlıyor"
AdvSceneSwitcher.condition.stream.state.stopping="Yayın duruyor"
AdvSceneSwitcher.condition.stream.entry="{{streamState}}"
AdvSceneSwitcher.condition.record="Kayıt"
AdvSceneSwitcher.condition.record.state.start="Kayıt Çalışıyor"
AdvSceneSwitcher.condition.record.state.pause="Kayıt durakladı"
AdvSceneSwitcher.condition.record.state.stop="Kayıt durdu"
AdvSceneSwitcher.condition.record.entry="{{recordState}}"
AdvSceneSwitcher.condition.process="İşlem"
AdvSceneSwitcher.condition.process.entry="{{processes}} çalışıyor {{focused}} ve odaklandı"
AdvSceneSwitcher.condition.idle="Boşta"
AdvSceneSwitcher.condition.idle.entry="...için klavye veya fare girişi yok {{duration}}"
AdvSceneSwitcher.condition.pluginState="Eklenti durumu"
AdvSceneSwitcher.condition.pluginState.state.sceneSwitched="Bu aralıkta otomatik sahne değişikliği tetiklendi"
AdvSceneSwitcher.condition.pluginState.state.running="Gelişmiş sahne değiştirici çalışıyor"
AdvSceneSwitcher.condition.pluginState.entry="{{condition}}"
AdvSceneSwitcher.condition.timer="Zamanlayıcı"
AdvSceneSwitcher.condition.timer.type.fixed="Sabit"
AdvSceneSwitcher.condition.timer.type.random="Rastgele"
AdvSceneSwitcher.condition.timer.pause="Duraklat"
AdvSceneSwitcher.condition.timer.continue="Devam etmek"
AdvSceneSwitcher.condition.timer.entry.line1.fixed="{{type}} süresi {{duration}} geçti"
AdvSceneSwitcher.condition.timer.entry.line1.random="{{type}} itibaren süre {{duration}} to {{duration2}} geçti"
AdvSceneSwitcher.condition.timer.entry.line2="Kalan Süre: {{remaining}} saniye"
AdvSceneSwitcher.condition.timer.entry.line3="{{pauseContinue}} {{reset}} {{saveRemaining}} Kalan zamanı kayıt {{autoReset}} Süreye ulaşıldıktan sonra zamanlayıcıyı otomatik olarak sıfırla"
AdvSceneSwitcher.condition.timer.reset="Sıfırlama"
AdvSceneSwitcher.condition.macro="Makro"
AdvSceneSwitcher.condition.macro.type.count="Saymak"
AdvSceneSwitcher.condition.macro.type.state="Belirtmek"
AdvSceneSwitcher.condition.macro.type.selection="Koşul türü: {{types}}"
AdvSceneSwitcher.condition.macro.count.type.below="Daha az"
AdvSceneSwitcher.condition.macro.count.type.above="Daha fazla"
AdvSceneSwitcher.condition.macro.count.type.equal="Aynen"
AdvSceneSwitcher.condition.macro.count.reset="Sıfırlama"
AdvSceneSwitcher.condition.macro.pausedWarning="Seçili makro şu anda duraklatıldı!"
AdvSceneSwitcher.condition.macro.state.entry="Koşulları {{macros}} doğru"
AdvSceneSwitcher.condition.macro.count.entry.line1="{{macros}} yürütüldü {{conditions}} {{count}} zaman"
AdvSceneSwitcher.condition.macro.count.entry.line2="Mevcut sayı: {{currentCount}} {{resetCount}}"
AdvSceneSwitcher.condition.source="Kaynak"
AdvSceneSwitcher.condition.source.type.active="Aktiftir"
AdvSceneSwitcher.condition.source.type.showing="gösteriyor"
AdvSceneSwitcher.condition.source.type.settings="Ayarlar eşleştirildi"
AdvSceneSwitcher.condition.source.regex="Normal ifadeler kullanın"
AdvSceneSwitcher.condition.source.getSettings="Mevcut ayarları al"
AdvSceneSwitcher.condition.source.entry.line1="{{sources}} {{conditions}}"
AdvSceneSwitcher.condition.source.entry.line2="{{settings}}"
AdvSceneSwitcher.condition.source.entry.line3="{{regex}} {{getSettings}}"
AdvSceneSwitcher.condition.virtualCamera="Sanal kamera"
AdvSceneSwitcher.condition.virtualCamera.state.start="Sanal kamera başladı"
AdvSceneSwitcher.condition.virtualCamera.state.stop="Sanal kamera durdu"
AdvSceneSwitcher.condition.virtualCamera.entry="{{states}}"
AdvSceneSwitcher.condition.filter="Filtrele"
AdvSceneSwitcher.condition.filter.type.active="Etkinleştirildi"
AdvSceneSwitcher.condition.filter.type.showing="Etkisizleştirildi"
AdvSceneSwitcher.condition.filter.type.settings="Ayarlar eşleşti"
AdvSceneSwitcher.condition.filter.regex="Normal ifadeler kullanın"
AdvSceneSwitcher.condition.filter.getSettings="Mevcut ayarları al"
AdvSceneSwitcher.condition.filter.entry.line1="Açık {{sources}} {{filters}} {{conditions}}"
AdvSceneSwitcher.condition.filter.entry.line2="{{settings}}"
AdvSceneSwitcher.condition.filter.entry.line3="{{regex}} {{getSettings}}"
AdvSceneSwitcher.condition.sceneOrder="Sahne öğesi sırası"
AdvSceneSwitcher.condition.sceneOrder.type.above="Üstünde"
AdvSceneSwitcher.condition.sceneOrder.type.below="Altında"
AdvSceneSwitcher.condition.sceneOrder.type.position="konumunda"
AdvSceneSwitcher.condition.sceneOrder.positionInfo="Konum değeri en altta 0 ile başlar ve sahne gruplarındakiler dahil her sahne öğesi için bir artar."
AdvSceneSwitcher.condition.sceneOrder.entry="Açık{{scenes}}{{sources}}{{conditions}}{{sources2}}{{position}}"
AdvSceneSwitcher.condition.hotkey="Kısayol tuşu"
AdvSceneSwitcher.condition.hotkey.name="Makro tetik kısayol tuşu"
AdvSceneSwitcher.condition.hotkey.tip="Not: Bu kısayol tuşu için tuş atamalarını OBS ayarları penceresinde yapılandırabilirsiniz."
AdvSceneSwitcher.condition.hotkey.entry="İsim: {{name}}"
AdvSceneSwitcher.condition.replay="Tekrar oynatma arabelleği"
AdvSceneSwitcher.condition.replay.state.stopped="Tekrar oynatma arabelleği durdu"
AdvSceneSwitcher.condition.replay.state.started="Tekrar oynatma arabelleği başladı"
AdvSceneSwitcher.condition.replay.state.saved="Tekrar oynatma arabelleği kaydedildi"
AdvSceneSwitcher.condition.replay.entry="{{state}}"
AdvSceneSwitcher.condition.date="Tarih"
AdvSceneSwitcher.condition.date.state.at="de"
AdvSceneSwitcher.condition.date.state.after="Sonra"
AdvSceneSwitcher.condition.date.state.before="Önce"
AdvSceneSwitcher.condition.date.state.between="Arasında"
AdvSceneSwitcher.condition.date.entry.line1="{{condition}} {{dateTime}} {{dateTime2}} {{ignoreDate}} Tarih bileşenini yoksay {{ignoreTime}} Zaman bileşenini yoksay"
AdvSceneSwitcher.condition.date.entry.line2="{{repeat}} Tekrar her {{duration}} tarih eşleşmesinde"
AdvSceneSwitcher.condition.sceneTransform="Sahne öğesi dönüşümü"
AdvSceneSwitcher.condition.sceneTransform.getTransform="Dönüşümü al"
AdvSceneSwitcher.condition.sceneTransform.regex="Normal ifadeler kullanın"
AdvSceneSwitcher.condition.sceneTransform.entry.line1="Açık{{scenes}}{{sources}} dönüşümle eşleşir"
AdvSceneSwitcher.condition.sceneTransform.entry.line2="{{settings}}"
AdvSceneSwitcher.condition.sceneTransform.entry.line3="{{regex}} {{getSettings}}"
AdvSceneSwitcher.condition.transition="Geçiş"
AdvSceneSwitcher.condition.transition.type.current="Geçerli geçiş türü"
AdvSceneSwitcher.condition.transition.type.duration="Mevcut geçiş süresi"
AdvSceneSwitcher.condition.transition.type.started="Geçiş başladı"
AdvSceneSwitcher.condition.transition.type.ended="Geçiş sona erdi"
AdvSceneSwitcher.condition.transition.type.transitionSource="İtibaren geçiş"
AdvSceneSwitcher.condition.transition.type.transitionTarget="Geçiş "
AdvSceneSwitcher.condition.transition.durationSuffix="saniyesi"
AdvSceneSwitcher.condition.transition.entry="{{conditions}}{{transitions}}{{scenes}}{{duration}}{{durationSuffix}}"
AdvSceneSwitcher.condition.sceneVisibility="Sahne öğesi görünürlüğü"
AdvSceneSwitcher.condition.sceneVisibility.type.shown="Gösterilen"
AdvSceneSwitcher.condition.sceneVisibility.type.hidden="Gizli"
AdvSceneSwitcher.condition.sceneVisibility.entry="Açık {{scenes}}{{sources}}is{{conditions}}"
AdvSceneSwitcher.condition.studioMode="Stüdyo ingilizce"
AdvSceneSwitcher.condition.studioMode.state.active="Studyo modu Etkinleştirildi"
AdvSceneSwitcher.condition.studioMode.state.notActive="Studyo modu aktif değil"
AdvSceneSwitcher.condition.studioMode.state.previewScene="Önizleme sahnesi"
AdvSceneSwitcher.condition.studioMode.entry="{{conditions}}{{scenes}}"
AdvSceneSwitcher.condition.openvr="Aç VR"
AdvSceneSwitcher.condition.errorStatus="Aç VR hatası: "
AdvSceneSwitcher.condition.openvr.entry.line1="HMD içinde ..."
AdvSceneSwitcher.condition.openvr.entry.line2="{{controls}}"
AdvSceneSwitcher.condition.openvr.entry.line3="HMD mevcut {{xPos}} x {{yPos}} x {{zPos}}"
; Macro Actions
AdvSceneSwitcher.action.switchScene="Sahne Degistirici"
AdvSceneSwitcher.action.scene.entry="Sahneyi {{scenes}} kullanarak {{transitions}} süresi olan {{duration}} saniye"
AdvSceneSwitcher.action.scene.blockUntilTransitionDone="Hedef sahneye geçiş tamamlanana kadar bekleyin"
AdvSceneSwitcher.action.wait="Bekle"
AdvSceneSwitcher.action.wait.type.fixed="sabit"
AdvSceneSwitcher.action.wait.type.random="rastgele"
AdvSceneSwitcher.action.wait.entry.fixed="Şunu bekle {{waitType}} süre {{duration}}"
AdvSceneSwitcher.action.wait.entry.random="Şunu bekle {{waitType}} bu aralıktan {{duration}} buna {{duration2}}"
AdvSceneSwitcher.action.audio="Ses"
AdvSceneSwitcher.action.audio.type.mute="Sessiz"
AdvSceneSwitcher.action.audio.type.unmute="Ses açmak"
AdvSceneSwitcher.action.audio.type.sourceVolume="Kaynak ses seviyesini ayarla"
AdvSceneSwitcher.action.audio.type.masterVolume="Ana ses seviyesini ayarla"
AdvSceneSwitcher.action.audio.fade="{{fade}}karartmak {{duration}} saniye"
AdvSceneSwitcher.action.audio.entry="{{actions}} {{audioSources}} {{volume}}"
AdvSceneSwitcher.action.recording="Kayıt"
AdvSceneSwitcher.action.recording.type.stop="Kayıt Durdur"
AdvSceneSwitcher.action.recording.type.start="Kayıt Başlat"
AdvSceneSwitcher.action.recording.type.pause="Kayıt Duraklat"
AdvSceneSwitcher.action.recording.type.unpause="Kayıt Duraklatma"
AdvSceneSwitcher.action.recording.pause.hint="Kayıt ayarlarınıza bağlı olarak kaydı duraklatamayabileceğinizi unutmayın."
AdvSceneSwitcher.action.recording.entry="{{actions}}{{pauseHint}}"
AdvSceneSwitcher.action.replay="Tekrar arabelleği"
AdvSceneSwitcher.action.replay.type.stop="Tekrar arabelleğini durdur"
AdvSceneSwitcher.action.replay.type.start="Tekrar arabelleğini başlat"
AdvSceneSwitcher.action.replay.type.save="Tekrar arabelleğini kaydet"
AdvSceneSwitcher.action.replay.entry="{{actions}}"
AdvSceneSwitcher.action.streaming="Yayın"
AdvSceneSwitcher.action.streaming.type.stop="Yayın durdur"
AdvSceneSwitcher.action.streaming.type.start="Yayın başlat"
AdvSceneSwitcher.action.streaming.entry="{{actions}}"
AdvSceneSwitcher.action.run="Çalıştır"
AdvSceneSwitcher.action.run.arguments="Argümanlar:"
AdvSceneSwitcher.action.run.addArgument="Argüman ekle"
AdvSceneSwitcher.action.run.addArgumentDescription="Yeni Argüman ekle:"
AdvSceneSwitcher.action.run.entry="Çalıştır {{filePath}}"
AdvSceneSwitcher.action.sceneVisibility="Sahne öğesi görünürlüğü"
AdvSceneSwitcher.action.sceneVisibility.type.show="Göster"
AdvSceneSwitcher.action.sceneVisibility.type.hide="Gizle"
AdvSceneSwitcher.action.sceneVisibility.type.source="Kayıt"
AdvSceneSwitcher.action.sceneVisibility.type.sourceGroup="Herhangi"
AdvSceneSwitcher.action.sceneVisibility.entry="Açık{{scenes}}{{actions}}{{sourceTypes}}{{sources}}{{sourceGroups}}"
AdvSceneSwitcher.action.filter="Filtrele"
AdvSceneSwitcher.action.filter.type.enable="Etkin"
AdvSceneSwitcher.action.filter.type.disable="Etkisiz"
AdvSceneSwitcher.action.filter.type.settings="Ayarları yap"
AdvSceneSwitcher.action.filter.entry="Açık {{sources}} {{actions}} {{filters}}"
AdvSceneSwitcher.action.filter.getSettings="Mevcut ayarları al"
AdvSceneSwitcher.action.source="Kaynak"
AdvSceneSwitcher.action.source.type.enable="Etkin"
AdvSceneSwitcher.action.source.type.disable="Etkisiz"
AdvSceneSwitcher.action.source.type.settings="Ayarları yap"
AdvSceneSwitcher.action.source.entry="{{actions}} {{sources}}"
AdvSceneSwitcher.action.source.warning="Uyarı: Kaynakların global olarak etkinleştirilmesi ve devre dışı bırakılması, OBS UI tarafından kontrol edilemez"
AdvSceneSwitcher.action.source.getSettings="Mevcut Ayarları yap"
AdvSceneSwitcher.action.media="Medya"
AdvSceneSwitcher.action.media.type.play="Oynat"
AdvSceneSwitcher.action.media.type.pause="Duraklat"
AdvSceneSwitcher.action.media.type.stop="Dur"
AdvSceneSwitcher.action.media.type.restart="Yeniden Başlat"
AdvSceneSwitcher.action.media.type.next="Sonraki"
AdvSceneSwitcher.action.media.type.previous="Önceki"
AdvSceneSwitcher.action.media.entry="{{actions}} {{mediaSources}}"
AdvSceneSwitcher.action.macro="Makro"
AdvSceneSwitcher.action.macro.type.pause="Duraklat"
AdvSceneSwitcher.action.macro.type.unpause="Duraklatma"
AdvSceneSwitcher.action.macro.type.resetCounter="Sayacı sıfırla"
AdvSceneSwitcher.action.macro.type.run="Çalıştır"
AdvSceneSwitcher.action.macro.entry="{{actions}} {{macros}}"
AdvSceneSwitcher.action.pluginState="Eklenti durumu"
AdvSceneSwitcher.action.pluginState.type.stop="Advanced Scene Switcher eklentisini durdurun"
AdvSceneSwitcher.action.pluginState.type.noMatch="Eşleşmeme davranışını değiştirin:"
AdvSceneSwitcher.action.pluginState.type.import="Ayarları şuradan içe aktar:"
AdvSceneSwitcher.action.pluginState.importWarning="Not: Ayarlar penceresi açılırken eylem göz ardı edilecektir."
AdvSceneSwitcher.action.pluginState.entry="{{actions}}{{values}}{{scenes}}{{settings}}{{settingsWarning}}"
AdvSceneSwitcher.action.virtualCamera="Sanal Kamera"
AdvSceneSwitcher.action.virtualCamera.type.stop="Sanal Kamerayı Durdur"
AdvSceneSwitcher.action.virtualCamera.type.start="Sanal Kamerayı Başlat"
AdvSceneSwitcher.action.virtualCamera.entry="{{actions}}"
AdvSceneSwitcher.action.hotkey="Kısayol tuşu"
AdvSceneSwitcher.action.hotkey.leftShift="Sol shift"
AdvSceneSwitcher.action.hotkey.rightShift="Sağ Shift"
AdvSceneSwitcher.action.hotkey.leftCtrl="Sol Ctrl"
AdvSceneSwitcher.action.hotkey.rightCtrl="Sağ Ctrl"
AdvSceneSwitcher.action.hotkey.leftAlt="Sol Alt"
AdvSceneSwitcher.action.hotkey.rightAlt="Sağ Alt"
AdvSceneSwitcher.action.hotkey.leftMeta="Sol Meta"
AdvSceneSwitcher.action.hotkey.rightMeta="Sağ Meta"
AdvSceneSwitcher.action.hotkey.onlyOBS="Tuşa basımı yalnızca OBS'ye gönder"
AdvSceneSwitcher.action.hotkey.disabled="Tuşa basma simülasyonu yapılamıyor - işlevsellik devre dışı!"
AdvSceneSwitcher.action.hotkey.entry="Bas {{keys}} uygun {{duration}} millisaniye"
AdvSceneSwitcher.action.sceneOrder="Sahne öğesi sırası"
AdvSceneSwitcher.action.sceneOrder.type.moveUp="Yukarı taşı"
AdvSceneSwitcher.action.sceneOrder.type.moveDown="Aşağı indir"
AdvSceneSwitcher.action.sceneOrder.type.moveTop="En üste taşı"
AdvSceneSwitcher.action.sceneOrder.type.moveBottom="Aşağıya taşı"
AdvSceneSwitcher.action.sceneOrder.type.movePosition="Konuma taşı"
AdvSceneSwitcher.action.sceneOrder.entry="Açık{{scenes}}{{actions}}{{sources}}{{position}}"
AdvSceneSwitcher.action.sceneTransform="Sahne öğesi dönüşümü"
AdvSceneSwitcher.action.sceneTransform.getTransform="Dönüşümü al"
AdvSceneSwitcher.action.sceneTransform.entry="Açık{{scenes}}transform{{sources}}"
AdvSceneSwitcher.action.file="Dosya"
AdvSceneSwitcher.action.file.type.write="Yaz"
AdvSceneSwitcher.action.file.type.append="Ekle"
AdvSceneSwitcher.action.file.entry="{{actions}} {{filePath}}:"
AdvSceneSwitcher.action.previewScene="Önizleme sahnesini değiştir"
AdvSceneSwitcher.action.previewScene.entry="Önizleme sahnesini şu şekilde değiştir: {{scenes}}"
AdvSceneSwitcher.action.SceneSwap="Sahneyi değiştir (Studyo modu)"
AdvSceneSwitcher.action.SceneSwap.entry="Stüdyo modunda önizleme ve program sahnesini değiştir"
AdvSceneSwitcher.action.transition="Geçiş"
AdvSceneSwitcher.action.transition.entry.line1="{{setType}}Geçiş türünü ayarla {{transitions}}"
AdvSceneSwitcher.action.transition.entry.line2="{{setDuration}}Geçiş süresini şuna ayarla: {{duration}}saniyeler"
AdvSceneSwitcher.action.timer="Zamanlayıcı"
AdvSceneSwitcher.action.timer.type.pause="Duraklat"
AdvSceneSwitcher.action.timer.type.continue="Devam et"
AdvSceneSwitcher.action.timer.type.reset="Sıfırla"
AdvSceneSwitcher.action.timer.type.setTimeRemaining="Kalan süreyi ayarla"
AdvSceneSwitcher.action.timer.entry="{{timerAction}} zamanlayıcılar açık {{macros}} {{duration}}"
AdvSceneSwitcher.action.random="Rastgele"
AdvSceneSwitcher.action.random.entry="Aşağıdaki makrolardan herhangi birini rastgele çalıştırın (duraklatılmış makrolar yoksayılır)"
AdvSceneSwitcher.action.systray="Sistem tepsisi bildirimi"
AdvSceneSwitcher.action.systray.entry="Bildirimleri göster: {{message}}"
AdvSceneSwitcher.action.screenshot="Ekran görüntüsü"
AdvSceneSwitcher.action.screenshot.mainOutput="OBS'nin ana çıkışı"
AdvSceneSwitcher.action.screenshot.entry="Ekran görüntüsü {{sources}}"
AdvSceneSwitcher.action.profile="Profil"
AdvSceneSwitcher.action.profile.entry="Aktif profili şununla değiştir: {{profiles}}"
AdvSceneSwitcher.action.sceneCollection="Sahne koleksiyonu"
AdvSceneSwitcher.action.sceneCollection.entry="Aktif sahne koleksiyonunu şu şekilde değiştir: {{sceneCollections}}"
AdvSceneSwitcher.action.sceneCollection.warning="Not: Değişen sahne koleksiyonu sahne değiştirici ayarlarını da yeniden yükleyeceğinden, bundan sonraki eylemler yürütülmeyecektir.\n Ayarlar penceresi açılırken sahne toplama eylemi yok sayılacaktır."
; Transition Tab
AdvSceneSwitcher.transitionTab.title="Geçiş"
AdvSceneSwitcher.transitionTab.setTransitionBy="Geçişleri değiştirirken:"
AdvSceneSwitcher.transitionTab.transitionOverride="Geçiş geçersiz kılmaları ayarla"
AdvSceneSwitcher.transitionTab.adjustActiveTransitionType="Etkin geçiş türünü değiştir"
AdvSceneSwitcher.transitionTab.transitionBehaviorSelectionError="En az bir seçenek etkinleştirilmelidir: \n\n - Geçiş geçersiz kılmalarını kullan \n\n - Etkin geçiş türünü değiştir"
AdvSceneSwitcher.transitionTab.transitionForAToB="Sahne A'dan sahne B'ye otomatik sahne geçişi için geçişi kullanın"
AdvSceneSwitcher.transitionTab.transitionsHelp="<html><head/><body><p>Bu ayarlar <span style=\"font-style:italic;\">yalnızca</span>, sahne değiştiricinin neden olduğu geçişleri etkiler - <a href=\ Göz atın "https://obsproject.com/forum/resources/transition-table.1174/\"><span style=\" text-decoration: underline; color:#268bd2;\">Geçiş Tablosu</span></ a> bunu manuel sahne değişiklikleri için yapılandırmak istiyorsanız.<br/>Burada tanımlanan ayarlar, sahne değiştiricide başka bir yerde yapılandırılmış geçiş ayarlarına göre önceliklidir.<br/><br/>Yeni bir giriş eklemek için aşağıdaki artı simgesini tıklayın. .</p></body></html>"
AdvSceneSwitcher.transitionTab.defaultTransition="Sahne aktifse geçişi değiştir"
AdvSceneSwitcher.transitionTab.entry="Şuradan geçiş yap {{scenes}} buna {{scenes2}} kullanarak {{transitions}} süresinde {{duration}}"
AdvSceneSwitcher.transitionTab.defaultTransitionEntry="Ne zaman sahne {{scenes}} aktifse, varsayılan sahne geçişini değiştir{{transitions}}"
AdvSceneSwitcher.transitionTab.defaultTransitionsHelp="Bir giriş eklemek için artı sembolüne tıklayın."
AdvSceneSwitcher.transitionTab.defaultTransition.delay="Geçişi değiştirmek {{defTransitionDelay}} sahne değişikliğinden sonra."
AdvSceneSwitcher.transitionTab.defaultTransition.delay.help="Gecikme, bir geçiş devam ederken geçiş türü değiştirilirse meydana gelebilecek iptal edilen sahne geçişlerini önlemek için kullanılır."
; Pause Scenes Tab
AdvSceneSwitcher.pauseTab.title="Duraklat"
AdvSceneSwitcher.pauseTab.pauseOnScene="Sahne Değiştiriciyi sahnede duraklatın"
AdvSceneSwitcher.pauseTab.pauseInFocus1="Sahne Değiştiriciyi duraklat şu durumda: "
AdvSceneSwitcher.pauseTab.pauseInFocus2="odakta"
AdvSceneSwitcher.pauseTab.pauseTypeScene="sahne aktif"
AdvSceneSwitcher.pauseTab.pauseTypeWindow="pencere odakta"
AdvSceneSwitcher.pauseTab.pauseTargetAll="tümü"
AdvSceneSwitcher.pauseTab.pauseEntry="Duraklat {{pauseTargets}} kontrol edildiğinde {{pauseTypes}} {{scenes}} {{windows}}"
AdvSceneSwitcher.pauseTab.help="Bu sekmede, bir sahne etkinse veya pencere odaktaysa bireysel geçiş yöntemlerini duraklatmak için yapılandırabilirsiniz.\ve Devam etmek için vurgulanan artı sembolüne tıklayın."
; Window Title Tab
AdvSceneSwitcher.windowTitleTab.title="Başlık"
AdvSceneSwitcher.windowTitleTab.regexrDescription="<html><head/><body><p>Doğrudan pencere başlıklarını veya geçerli normal ifadeyi girin. <a href=\"https://regexr.com\"><span style=\" text-decoration: underline; color:#268bd2;\">RegExr</span'i kullanarak normal ifadeler için söz dizimini ve eşleşmeleri kontrol edebilirsiniz. ></a></p></body></html>"
AdvSceneSwitcher.windowTitleTab.stayInFocus1="Bu pencere adını yoksay"
AdvSceneSwitcher.windowTitleTab.stayInFocus2=" "
AdvSceneSwitcher.windowTitleTab.fullscreen="tam ekran ise"
AdvSceneSwitcher.windowTitleTab.maximized="maksimize edilirse"
AdvSceneSwitcher.windowTitleTab.focused="eğer odaklanmışsa"
AdvSceneSwitcher.windowTitleTab.entry="{{windows}} {{scenes}} {{transitions}} {{fullscreen}} {{maximized}} {{focused}}"
AdvSceneSwitcher.windowTitleTab.windowsHelp="Çalışan uygulamaların pencere başlığına göre sahneler arasında geçiş yapın.\nAşağıdaki ek koşullar seçilebilir:\nPencere Tam Ekrandır\nPencere büyütülür\nPencere odaklanılır\n\nDevam etmek için vurgulanan artı sembolüne tıklayın."
AdvSceneSwitcher.windowTitleTab.ignoreWindowsHelp="Bir pencere başlığı yoksayılırsa, sahne değiştirici, önceden seçilen pencere hala odaktaymış gibi davranacaktır.\nBu, sık sık farklı bir pencereye geçerseniz, sahne değişikliğini tetiklemeyecek olan sahne geçişlerinden kaçınmanıza olanak tanır.\ n\nBir pencere seçin veya yukarıya bir pencere başlığı girin ve listeye eklemek için aşağıdaki artı sembolüne tıklayın."
; Executable Tab
AdvSceneSwitcher.executableTab.title="yürütülebilir"
AdvSceneSwitcher.executableTab.implemented="dasOven tarafından uygulandı"
AdvSceneSwitcher.executableTab.requiresFocus="sadece odaklanmışsa"
AdvSceneSwitcher.executableTab.entry="Bu {{processes}} çalışıyorsa değiştir {{scenes}} kullanılır {{transitions}} {{requiresFocus}}"
AdvSceneSwitcher.executableTab.help="Bu sekme, bir işlem çalışıyorsa sahneleri otomatik olarak değiştirmenize olanak tanır.\nBu, pencere adının değişebileceği veya bilinmediği durumlarda faydalı olabilir.\n\nDevam etmek için vurgulanan artı sembolüne tıklayın."
; Screen Region Tab
AdvSceneSwitcher.screenRegionTab.title="Bölge"
AdvSceneSwitcher.screenRegionTab.currentPosition="İmleç şu anda şu konumda:"
AdvSceneSwitcher.screenRegionTab.showGuideFrames="Kılavuz çerçeveleri göster"
AdvSceneSwitcher.screenRegionTab.hideGuideFrames="Kılavuz çerçeveleri gizle"
AdvSceneSwitcher.screenRegionTab.excludeScenes.None="Seçim yok"
AdvSceneSwitcher.screenRegionTab.entry="Eğer imleç şuanda böyleyse {{minX}} {{minY}} x {{maxX}} {{maxY}} şuna çevir {{scenes}} kullanarak {{transitions}} sürece {{excludeScenes}}"
AdvSceneSwitcher.screenRegionTab.help="Bu sekme, fare imlecinizin geçerli konumuna göre sahneleri otomatik olarak değiştirmenize olanak tanır.\n\nDevam etmek için vurgulanan artı sembolüne tıklayın."
; Media Tab
AdvSceneSwitcher.mediaTab.title="Medya"
AdvSceneSwitcher.mediaTab.implemented="Exelero tarafından uygulandı"
AdvSceneSwitcher.mediaTab.states.none="Yok"
AdvSceneSwitcher.mediaTab.states.playing="Oynamak"
AdvSceneSwitcher.mediaTab.states.opening="Açmak"
AdvSceneSwitcher.mediaTab.states.buffering="Arabelleğe alma"
AdvSceneSwitcher.mediaTab.states.Paused="Duraklatıldı"
AdvSceneSwitcher.mediaTab.states.stopped="Durduruldu"
AdvSceneSwitcher.mediaTab.states.ended="Bitti"
AdvSceneSwitcher.mediaTab.states.error="Hata"
AdvSceneSwitcher.mediaTab.states.playedToEnd="Sonuna kadar oynandı"
AdvSceneSwitcher.mediaTab.states.any="Herhangi"
AdvSceneSwitcher.mediaTab.timeRestriction.none="Yok"
AdvSceneSwitcher.mediaTab.timeRestriction.shorter="Zaman daha kısa"
AdvSceneSwitcher.mediaTab.timeRestriction.longer="Zaman daha uzun"
AdvSceneSwitcher.mediaTab.timeRestriction.remainShorter="Kalan süre daha kısa"
AdvSceneSwitcher.mediaTab.timeRestriction.remainLonger="Kalan süre daha uzun"
AdvSceneSwitcher.mediaTab.entry="Kaynak {{mediaSources}} durumu {{states}} ve {{timeRestrictions}} {{time}} şuna çevir {{scenes}} kullanarak {{transitions}}"
AdvSceneSwitcher.mediaTab.help="Bu sekme, medya kaynaklarının durumuna göre sahneler arasında geçiş yapmanızı sağlar.\nÖrneğin, seçilen medya kaynaklı oynatmayı bitirdiğinde otomatik olarak önceki sahneye dönebilirsiniz.\n\nDevam etmek için vurgulanan artı sembolüne tıklayın."
; File Tab
AdvSceneSwitcher.fileTab.title="Dosya"
AdvSceneSwitcher.fileTab.readWriteSceneFile="Oku / Sahneden yazdır / Dosyaya"
AdvSceneSwitcher.fileTab.currentSceneOutputFile="Mevcut sahnenin adını bu dosyaya yazın:"
AdvSceneSwitcher.fileTab.switchSceneBaseOnFile="Dosya girişine göre sahnelerin değiştirilmesini etkinleştirin"
AdvSceneSwitcher.fileTab.switchSceneNameInputFile="Bu dosyadan geçiş yapılacak sahne adını okuyun:"
AdvSceneSwitcher.fileTab.switchSceneBaseOnFileContent="Dosya içeriğine göre sahneyi değiştir"
AdvSceneSwitcher.fileTab.remoteFileWarning="Uzak seçeneğini seçerseniz, sahne değiştiricinin Genel sekmesinde belirtildiği gibi her x ms'de bir uzak konuma erişmeye çalışacağını lütfen unutmayın!"
AdvSceneSwitcher.fileTab.remoteFileWarning1="Sahne değiştiricinin her seferinde uzak konuma erişmeye çalışacağını unutmayın."
AdvSceneSwitcher.fileTab.remoteFileWarning2="ms"
AdvSceneSwitcher.fileTab.libcurlWarning="libcurl yüklenemedi! Uzak dosyalara erişim mümkün olmayacak!"
AdvSceneSwitcher.fileTab.selectWrite="Yazmak için bir dosya seçin..."
AdvSceneSwitcher.fileTab.selectRead="Okumak için bir dosya seçin..."
AdvSceneSwitcher.fileTab.textFileType="Text dosyası (*.txt)"
AdvSceneSwitcher.fileTab.anyFileType="Herhangi bir dosya türü (*.*)"
AdvSceneSwitcher.fileTab.remote="uzak dosya"
AdvSceneSwitcher.fileTab.local="yerel dosya"
AdvSceneSwitcher.fileTab.useRegExp="normal ifadeler kullan (desen eşleştirme)"
AdvSceneSwitcher.fileTab.checkfileContentTime="değişiklik tarihi değiştiyse"
AdvSceneSwitcher.fileTab.checkfileContent="İçerik değiştiyse"
AdvSceneSwitcher.fileTab.entry="Suna dönüştür {{scenes}} kullanıp {{transitions}} içerik şunlarla {{fileType}} {{filePath}} {{browseButton}} eşleşirse:"
AdvSceneSwitcher.fileTab.entry2="{{matchText}}"
AdvSceneSwitcher.fileTab.entry3="{{useRegex}} {{checkModificationDate}} {{checkFileContent}}"
AdvSceneSwitcher.fileTab.help="Bu sekme, uzak veya yerel dosyaların içeriğine göre sahneleri otomatik olarak değiştirmenize olanak tanır.\n\nDevam etmek için vurgulanan artı sembolüne tıklayın."
; Random Tab
AdvSceneSwitcher.randomTab.title="Rastgele"
AdvSceneSwitcher.randomTab.randomDisabledWarning="İşlevsellik devre dışı - Etkinleştirmek için Genel sekmesinde \"Herhangi bir geçiş koşulu karşılanmazsa Rastgele sekmesinde herhangi bir sahneye geç\"i seçin"
AdvSceneSwitcher.randomTab.entry="Herhangi bir geçiş koşulu karşılanmıyorsa, geçiş yapın {{scenes}} kullan {{transitions}} için {{delay}}"
AdvSceneSwitcher.randomTab.help="Sahne değiştirici, yapılandırılan süre için geçiş yapmak için bu sekmede rastgele bir giriş seçecektir.\nAynı girişin arka arkaya iki kez seçilmeyeceğini unutmayın.\n\nDevam etmek için vurgulanan artı sembolüne tıklayın."
; Time Tab
AdvSceneSwitcher.timeTab.title="Zaman"
AdvSceneSwitcher.timeTab.anyDay="Herhangi bir günde"
AdvSceneSwitcher.timeTab.mondays="Pazartesi günleri"
AdvSceneSwitcher.timeTab.tuesdays="Salı günleri"
AdvSceneSwitcher.timeTab.wednesdays="Çarşamba günleri"
AdvSceneSwitcher.timeTab.thursdays="Perşembe günleri"
AdvSceneSwitcher.timeTab.fridays="Cuma günleri"
AdvSceneSwitcher.timeTab.saturdays="Cumartesi günleri"
AdvSceneSwitcher.timeTab.sundays="Pazar günleri"
AdvSceneSwitcher.timeTab.afterstart="Akış/kayıt başladıktan sonra"
AdvSceneSwitcher.timeTab.afterstart.tip="Akışın / kaydın başlangıcına göre zaman kullanılacaktır"
AdvSceneSwitcher.timeTab.entry="{{triggers}} da/de {{time}} Değiştir {{scenes}} kullan {{transitions}}"
AdvSceneSwitcher.timeTab.help="Bu sekme, geçerli yerel saate göre otomatik olarak farklı bir sahneye geçmenizi sağlar.\n\nSahne değiştiricinin sahneleri yalnızca tam olarak belirttiğiniz saatte değiştireceğini unutmayın.\nGenel'de öncelik ayarlarını yapılandırdığınızdan emin olun. sekmesini beğeninize göre seçin, böylece daha yüksek önceliğe sahip diğer geçiş yöntemleri nedeniyle seçilen zaman noktası kaçırılmaz.\n\nDevam etmek için vurgulanan artı sembolüne tıklayın."
; Idle Tab
AdvSceneSwitcher.idleTab.title="Boşta"
AdvSceneSwitcher.idleTab.enable="Boşta Algılamayı Etkinleştir"
AdvSceneSwitcher.idleTab.idleswitch="Sonra {{duration}} klavye veya fare girişi olmadan sahneye geçiş {{scenes}} kullan {{transitions}}"
AdvSceneSwitcher.idleTab.dontSwitchIfFocus1="eğer geçiş yapmayın"
AdvSceneSwitcher.idleTab.dontSwitchIfFocus2="odakta"
; Scene Sequence Tab
AdvSceneSwitcher.sceneSequenceTab.title="Sıra"
AdvSceneSwitcher.sceneSequenceTab.description="Otomatik sahne geçişleri dizisi, sahne değiştiriciyi duraklatarak/durdurarak veya manuel olarak farklı bir sahneye geçerek iptal edilebilir."
AdvSceneSwitcher.sceneSequenceTab.save="Sahne dizilerini dosyaya kaydet"
AdvSceneSwitcher.sceneSequenceTab.load="Dosyadan sahne dizilerini yükle"
AdvSceneSwitcher.sceneSequenceTab.saveTitle="Sahne Sırasını dosyaya kaydet..."
AdvSceneSwitcher.sceneSequenceTab.loadTitle="Sahne Sırasını okumak için bir dosya seçin ..."
AdvSceneSwitcher.sceneSequenceTab.loadFail="Advanced Scene Switcher ayarları içe aktaramadı!"
AdvSceneSwitcher.sceneSequenceTab.loadSuccess="Gelişmiş Sahne Değiştirici ayarları başarıyla içe aktarıldı!"
AdvSceneSwitcher.sceneSequenceTab.fileType="Text dosyaları (*.txt)"
AdvSceneSwitcher.sceneSequenceTab.interruptible="Kesilebilir"
AdvSceneSwitcher.sceneSequenceTab.interruptibleHint="Diğer anahtarlama yöntemlerinin bu sahne dizisini kesmesine izin verilir"
AdvSceneSwitcher.sceneSequenceTab.entry=" {{startScenes}} aktif olduğunda değiştir {{scenes}} sonra {{delay}} kullan {{transitions}} {{interruptible}}"
AdvSceneSwitcher.sceneSequenceTab.extendEdit="Sırayı Uzat"
AdvSceneSwitcher.sceneSequenceTab.extendEntry="Sonra {{delay}} çevirmek {{scenes}} kullan {{transitions}}"
AdvSceneSwitcher.sceneSequenceTab.help="Bu sekme, bir sahne yapılandırılmış bir süre boyunca etkinse otomatik olarak farklı bir sahneye geçmenizi sağlar.\nÖrneğin, iki sahne arasında otomatik olarak ileri ve geri geçiş yapabilirsiniz.\n\nVurgulanan artı sembolüne tıklayarak devam et."
; Audio Tab
AdvSceneSwitcher.audioTab.title="Ses"
AdvSceneSwitcher.audioTab.condition.above="üstünde"
AdvSceneSwitcher.audioTab.condition.below="altında"
AdvSceneSwitcher.audioTab.ignoreInactiveSource="kaynak etkin olmadığı sürece"
AdvSceneSwitcher.audioTab.entry="Ses Hacmi{{audioSources}} durumu {{condition}} {{volumeWidget}} için {{duration}} saniye geçiş {{scenes}} kullanarak {{transitions}} {{ignoreInactiveSource}}"
AdvSceneSwitcher.audioTab.multiMatchfallbackCondition="Birden çok giriş eşleşirse..."
AdvSceneSwitcher.audioTab.multiMatchfallback="... için {{duration}} saniye geçiş {{scenes}} kullan {{transitions}}"
AdvSceneSwitcher.audioTab.help="Bu sekme, kaynakların ses düzeyine göre sahneler arasında geçiş yapmanızı sağlar.\nÖrneğin, mikrofonunuzun ses düzeyi belirli bir eşiğe ulaşırsa otomatik olarak farklı bir sahneye geçebilirsiniz.\n\nDevam etmek için vurgulanan artı simgesini tıklayın."
; Video Tab
AdvSceneSwitcher.videoTab.title="Video"
AdvSceneSwitcher.videoTab.getScreenshot="Seçilen giriş için ekran görüntüsü al"
AdvSceneSwitcher.videoTab.getScreenshotHelp="Seçili olan girişin video kaynağının Ekran Görüntüsünü alın ve otomatik olarak hedef görüntü olarak ayarlayın"
AdvSceneSwitcher.videoTab.condition.match="tam olarak eşleşir"
AdvSceneSwitcher.videoTab.condition.match.tooltip="Tam eşleşme, hedef ve kaynak görüntünün aynı çözünürlükte olmasını gerektirir.\nAyrıca her bir pikselin eşleşmesi gerekir, bu nedenle sıkıştırma kullanan görüntü biçimlerinin (ör. .JPG) kullanılması önerilmez!"
AdvSceneSwitcher.videoTab.condition.differ="eşleşmiyor"
AdvSceneSwitcher.videoTab.condition.hasNotChanged="değişmedi"
AdvSceneSwitcher.videoTab.condition.hasChanged="değişti"
AdvSceneSwitcher.videoTab.ignoreInactiveSource="Kaynak etkin olmadığı sürece"
AdvSceneSwitcher.videoTab.entry="Zaman {{videoSources}} {{condition}} {{filePath}} {{browseButton}} için {{duration}} şuna dönüştür {{scenes}} kullan {{transitions}} {{ignoreInactiveSource}}"
AdvSceneSwitcher.videoTab.help="<html><head/><body><p>Bu sekme, seçilen kaynakların mevcut video çıkışına göre sahneler arasında geçiş yapmanızı sağlar.<br/><a href=\"https:// adresini kontrol ettiğinizden emin olun. obsproject.com/forum/resources/pixel-match-switcher.1202/\"><span style=\" text-decoration: underline; color:#268bd2;\">Pixel Match Switcher</span></a> bu işlevin daha da iyi bir şekilde uygulanması için.<br/><br/> Devam etmek için vurgulanan artı simgesini tıklayın.</p></body></html>"
; Network Tab
AdvSceneSwitcher.networkTab.title="Ağ"
AdvSceneSwitcher.networkTab.description="Bu sekme, başka bir OBS örneğinin etkin sahnesini uzaktan kontrol etmenizi sağlar.\nSahne adlarının tüm OBS örneklerinde tam olarak eşleşmesi gerektiğini lütfen unutmayın."
AdvSceneSwitcher.networkTab.warning="Sunucuyu yerel bir ağın dışında çalıştırmak, üçüncü tarafların aktif sahneyi okumasına izin verecektir."
AdvSceneSwitcher.networkTab.DisabledWarning="Bu işlevsellik, obs-websocket eklentisini paralel olarak çalıştırırken kitaplık uyumsuzlukları nedeniyle ne yazık ki macOS'ta devre dışı bırakılmak zorunda kaldı."
AdvSceneSwitcher.networkTab.server="Sunucuyu başlat (Bağlı tüm istemcilere sahne değiştirme mesajları gönderir)"
AdvSceneSwitcher.networkTab.server.port="Port"
AdvSceneSwitcher.networkTab.server.lockToIPv4="Sunucuyu yalnızca IPv4 kullanacak şekilde kilitleyin"
AdvSceneSwitcher.networkTab.server.sendSceneChange="Sahne değişiklikleri için mesaj gönder"
AdvSceneSwitcher.networkTab.server.restrictSendToAutomatedSwitches="Yalnızca otomatik sahne anahtarları için mesaj gönder"
AdvSceneSwitcher.networkTab.server.sendPreview="Stüdyo modunda çalışırken önizleme sahnesi değişikliği için mesajlar gönderin"
AdvSceneSwitcher.networkTab.startFailed.message="WebSockets sunucusu başlatılamadı, bunun nedeni şunlar olabilir:\n - %1 TCP bağlantı noktası şu anda bu sistemde başka bir yerde, muhtemelen başka bir uygulama tarafından kullanılıyor olabilir. WebSocket sunucu ayarlarında farklı bir TCP bağlantı noktası ayarlamayı deneyin veya bu bağlantı noktasını kullanabilecek herhangi bir uygulamayı durdurun.\n - Hata mesajı: %2"
AdvSceneSwitcher.networkTab.server.status.currentStatus="Şu anki durum"
AdvSceneSwitcher.networkTab.server.status.notRunning="Çalışmıyor"
AdvSceneSwitcher.networkTab.server.status.starting="Başlangıç"
AdvSceneSwitcher.networkTab.server.status.running="Çalışıyor"
AdvSceneSwitcher.networkTab.server.restart="Sunucuyu yeniden başlat"
AdvSceneSwitcher.networkTab.client="İstemciyi başlat (Sahne değiştirme mesajlarını alır)"
AdvSceneSwitcher.networkTab.client.address="Ana makine adı veya IP adresi"
AdvSceneSwitcher.networkTab.client.port="Port"
AdvSceneSwitcher.networkTab.client.status.currentStatus="Şu anki durum"
AdvSceneSwitcher.networkTab.client.status.disconnected="Bağlantı kesildi"
AdvSceneSwitcher.networkTab.client.status.connecting="Bağlanıyor"
AdvSceneSwitcher.networkTab.client.status.connected="Bağlandı"
AdvSceneSwitcher.networkTab.client.reconnect="Yeniden bağlanmaya zorla"
; Scene Group Tab
AdvSceneSwitcher.sceneGroupTab.title="Sahne Grubu"
AdvSceneSwitcher.sceneGroupTab.list="Sahne Grupları"
AdvSceneSwitcher.sceneGroupTab.edit="Sahne Gruplarını Düzenle"
AdvSceneSwitcher.sceneGroupTab.edit.name="İsim:"
AdvSceneSwitcher.sceneGroupTab.edit.type="Tip: {{type}}"
AdvSceneSwitcher.sceneGroupTab.type.count="Saymak"
AdvSceneSwitcher.sceneGroupTab.type.time="Zaman"
AdvSceneSwitcher.sceneGroupTab.type.random="Rastgele"
AdvSceneSwitcher.sceneGroupTab.edit.count="Sonra listedeki bir sonraki sahneye ilerleyin {{count}} karşılama"
AdvSceneSwitcher.sceneGroupTab.edit.time="Sonra listedeki bir sonraki sahneye ilerleyin {{time}} geçtiyse"
AdvSceneSwitcher.sceneGroupTab.edit.random="Listeden rastgele bir sonraki sahneyi seçin"
AdvSceneSwitcher.sceneGroupTab.edit.repeat="Sahne listesinin sonuna ulaşılırsa baştan başlayın"
AdvSceneSwitcher.sceneGroupTab.edit.addScene="Sahne ekle"
AdvSceneSwitcher.sceneGroupTab.add="Sahne Grubu Ekle"
AdvSceneSwitcher.sceneGroupTab.defaultname="Sahne Grubu %1"
AdvSceneSwitcher.sceneGroupTab.exists="Sahne Grubu veya Sahne adı zaten var"
AdvSceneSwitcher.sceneGroupTab.help="Sahne Grupları, normal bir sahne gibi bir hedef olarak seçilebilir.\n\nAdından da anlaşılacağı gibi, bir sahne grubu birden fazla sahneden oluşan bir koleksiyondur.\nSahne grubu, yapılandırılmış ayarlara bağlı olarak kendisine atanan sahneler listesinde ilerleyecektir. sağ tarafta bulunabilir.\n\nSahne grubunu listedeki bir sonraki sahneye geçecek şekilde yapılandırabilirsiniz:\nSahne grubu birkaç kez hedef olarak seçildikten sonra.\nBelirli bir süre sonra geçti.\nVeya rastgele.\n\nÖrneğin, sahneleri içeren bir sahne grubu ...\nSahne 1\nSahne 2\nSahne 3 \n... ilk seçildiğinde \"Sahne 1\"i etkinleştirecek bir hedef olarak.\nİkinci kez \"Sahne 2\"yi etkinleştirecek.\nKalan zamanlar \"Scene 3\" etkinleştirilecek.\n\nYeni bir sahne grubu eklemek için aşağıdaki vurgulanan artı sembolüne tıklayın."
AdvSceneSwitcher.sceneGroupTab.scenes.help="Soldan değiştirmek istediğiniz sahne grubunu seçin.\n\nYukarıdaki sahneyi seçip aşağıdaki artı simgesini tıklayarak bu sahne grubuna eklemek için bir sahne seçin.\n\nAynı sahneye birden fazla sahne eklenebilir grup."
; Scene Trigger Tab
AdvSceneSwitcher.sceneTriggerTab.title="Sahne Tetikleyicileri"
AdvSceneSwitcher.sceneTriggerTab.sceneTriggerType.none="--tetikleyiciyi seçin--"
AdvSceneSwitcher.sceneTriggerTab.sceneTriggerType.sceneActive="aktif"
AdvSceneSwitcher.sceneTriggerTab.sceneTriggerType.sceneInactive="aktif değil"
AdvSceneSwitcher.sceneTriggerTab.sceneTriggerType.sceneLeave="uzaklaştı"
AdvSceneSwitcher.sceneTriggerTab.sceneTriggerAction.none="--eylemi seç--"
AdvSceneSwitcher.sceneTriggerTab.sceneTriggerAction.startRecording="Kayda başla"
AdvSceneSwitcher.sceneTriggerTab.sceneTriggerAction.pauseRecording="Kaydı duraklat"
AdvSceneSwitcher.sceneTriggerTab.sceneTriggerAction.unpauseRecording="kaydı duraklatma"
AdvSceneSwitcher.sceneTriggerTab.sceneTriggerAction.stopRecording="Kaydetmeyi bırak"
AdvSceneSwitcher.sceneTriggerTab.sceneTriggerAction.stopStreaming="Akışı durdur"
AdvSceneSwitcher.sceneTriggerTab.sceneTriggerAction.startStreaming="Akışı başlat"
AdvSceneSwitcher.sceneTriggerTab.sceneTriggerAction.startReplayBuffer="Yeniden oynatma arabelleğini başlat"
AdvSceneSwitcher.sceneTriggerTab.sceneTriggerAction.stopReplayBuffer="Tekrar arabelleğini durdur"
AdvSceneSwitcher.sceneTriggerTab.sceneTriggerAction.muteSource="Kaynağı sessize al"
AdvSceneSwitcher.sceneTriggerTab.sceneTriggerAction.unmuteSource="Kaynağı sesi aç"
AdvSceneSwitcher.sceneTriggerTab.sceneTriggerAction.startSwitcher="Sahne değiştiriciyi başlat"
AdvSceneSwitcher.sceneTriggerTab.sceneTriggerAction.stopSwitcher="Sahne değiştiriciyi durdur"
AdvSceneSwitcher.sceneTriggerTab.sceneTriggerAction.startVirtualCamera="Sanal kamerayı başlat"
AdvSceneSwitcher.sceneTriggerTab.sceneTriggerAction.stopVirtualCamera="Sanal kamerayı durdur"
AdvSceneSwitcher.sceneTriggerTab.entry="Şundan {{scenes}} {{triggers}} {{actions}} {{audioSources}} sonra {{duration}}"
AdvSceneSwitcher.sceneTriggerTab.help="Bu sekme, kaydı veya akışı durdurma gibi sahne değişikliklerinde eylemleri tetiklemenize olanak tanır."
; Hotkey
AdvSceneSwitcher.hotkey.startSwitcherHotkey="Advanced Scene Switcher'ı başlatın"
AdvSceneSwitcher.hotkey.stopSwitcherHotkey="Gelişmiş Sahne Değiştiriciyi Durdurun"
AdvSceneSwitcher.hotkey.startStopToggleSwitcherHotkey="Gelişmiş Sahne Değiştirici için Başlat/Durdur arasında geçiş yapın"
AdvSceneSwitcher.hotkey.macro.pause="%1 makrosunu duraklat"
AdvSceneSwitcher.hotkey.macro.unpause="%1 makrosunu duraklatma"
AdvSceneSwitcher.hotkey.macro.togglePause="%1 makrosunun duraklatmasını aç/kapat"
AdvSceneSwitcher.askBackup="Advanced Scene Switcher'ın yeni bir sürümü algılandı.\nEski ayarların bir yedeği oluşturulsun mu?"
AdvSceneSwitcher.askForMacro="Makro seç {{macroSelection}}"
AdvSceneSwitcher.close="Kapat"
AdvSceneSwitcher.browse="Araştır"
AdvSceneSwitcher.selectScene="--sahne seç--"
AdvSceneSwitcher.selectPreviousScene="Önceki Sahne"
AdvSceneSwitcher.selectCurrentScene="Mevcut Sahne"
AdvSceneSwitcher.selectAnyScene="Herhangi bir Sahne"
AdvSceneSwitcher.currentTransition="Mevcut Geçiş"
AdvSceneSwitcher.anyTransition="Herhangi Bir Geçiş"
AdvSceneSwitcher.selectTransition="--geçişi seç--"
AdvSceneSwitcher.selectWindow="--pencereyi seç--"
AdvSceneSwitcher.selectSource="--kaynak Seç--"
AdvSceneSwitcher.selectAudioSource="--ses kaynağını seçin--"
AdvSceneSwitcher.selectVideoSource="--video kaynağını seçin--"
AdvSceneSwitcher.selectMediaSource="--medya kaynağını seçin--"
AdvSceneSwitcher.selectProcess="--işlemi seç--"
AdvSceneSwitcher.selectFilter="--filtre seç--"
AdvSceneSwitcher.selectMacro="--makroyu seçin--"
AdvSceneSwitcher.selectItem="--Öğeyi seçin--"
AdvSceneSwitcher.selectProfile="--profil seç--"
AdvSceneSwitcher.selectSceneCollection="--sahne koleksiyonunu seç--"
AdvSceneSwitcher.enterPath="--yolu girin--"
AdvSceneSwitcher.enterText="--metni girin--"
AdvSceneSwitcher.invaildEntriesWillNotBeSaved="geçersiz girişler kaydedilmeyecek"
AdvSceneSwitcher.selectWindowTip="\"OBS\" OBS penceresini belirlemek için \nKullan \"Görev değiştirme\"için ALT + TAB"
AdvSceneSwitcher.sceneItemSelection.all="Hepsi"
AdvSceneSwitcher.sceneItemSelection.any="Herhangi"
AdvSceneSwitcher.status.active="Aktif"
AdvSceneSwitcher.status.inactive="İnaktif"
AdvSceneSwitcher.running="Eklenti çalışıyor"
AdvSceneSwitcher.stopped="Eklenti durdu"
AdvSceneSwitcher.firstBootMessage="<html><head/><body><p>Gelişmiş Sahne Değiştirici ilk kez başlatılıyor gibi görünüyor.<br>Lütfen <a href=\"https://github.com/ adresine bir göz atın. WarmUpTill/SceneSwitcher/wiki\"><span style=\" text-decoration: underline; color:#268bd2;\">Wiki</span></a> için kılavuzlar ve örnekler listesi.<br>Yapmayın. eklentinin <a href=\"https://obsproject.com/forum/threads/advanced-scene-switcher.48264\"><span style=\" text-decoration: underline; color:# sayfasında soru sormaktan çekinmeyin OBS forumlarında 268bd2;\">konu</span></a>!</p></body></html>"
AdvSceneSwitcher.unit.milliseconds="millisaniye"
AdvSceneSwitcher.unit.secends="saniye"
AdvSceneSwitcher.unit.minutes="dakika"
AdvSceneSwitcher.unit.hours="saat"
AdvSceneSwitcher.duration.condition.none="Zaman kısıtlaması yok"
AdvSceneSwitcher.duration.condition.more="En azından"
AdvSceneSwitcher.duration.condition.equal="Tam olarak"
AdvSceneSwitcher.duration.condition.less="En çoğu"

File diff suppressed because it is too large Load Diff

View File

@@ -9,7 +9,7 @@
#include <obs-frontend-api.h>
#include "headers/advanced-scene-switcher.hpp"
#include "headers/status-dock.hpp"
#include "headers/status-control.hpp"
#include "headers/curl-helper.hpp"
#include "headers/utility.hpp"
#include "headers/version.h"
@@ -20,6 +20,8 @@ SwitcherData *GetSwitcher()
return switcher;
}
AdvSceneSwitcher *AdvSceneSwitcher::window = nullptr;
/******************************************************************************
* Create the Advanced Scene Switcher settings window
******************************************************************************/
@@ -39,6 +41,7 @@ AdvSceneSwitcher::~AdvSceneSwitcher()
{
if (switcher) {
switcher->settingsWindowOpened = false;
switcher->lastOpenedTab = ui->tabWidget->currentIndex();
}
}
@@ -85,7 +88,9 @@ void AdvSceneSwitcher::loadUI()
setupTriggerTab();
setupMacroTab();
setDeprecationWarnings();
setTabOrder();
setCurrentTab();
restoreWindowGeo();
checkFirstTimeSetup();
@@ -340,7 +345,7 @@ bool SwitcherData::checkForMatch(OBSWeakSource &scene,
return match;
}
void switchScene(const sceneSwitchInfo &sceneSwitch)
void switchScene(const sceneSwitchInfo &sceneSwitch, bool force)
{
if (!sceneSwitch.scene && switcher->verbose) {
blog(LOG_INFO, "nothing to switch to");
@@ -350,7 +355,7 @@ void switchScene(const sceneSwitchInfo &sceneSwitch)
obs_source_t *source = obs_weak_source_get_source(sceneSwitch.scene);
obs_source_t *currentSource = obs_frontend_get_current_scene();
if (source && source != currentSource) {
if (source && (source != currentSource || force)) {
transitionData currentTransitionData;
setNextTransition(sceneSwitch, currentSource,
currentTransitionData);
@@ -574,6 +579,18 @@ void setStreamStopping()
std::chrono::high_resolution_clock::now();
}
void handleExit()
{
switcher->obsIsShuttingDown = true;
if (switcher && switcher->obsIsShuttingDown &&
switcher->shutdownConditionCount) {
switcher->Stop();
switcher->checkMacros();
switcher->runMacros();
}
FreeSceneSwitcher();
}
// Note to future self:
// be careful using switcher->m here as there is potential for deadlocks when using
// frontend functions such as obs_frontend_set_current_scene()
@@ -585,7 +602,7 @@ static void OBSEvent(enum obs_frontend_event event, void *switcher)
switch (event) {
case OBS_FRONTEND_EVENT_EXIT:
FreeSceneSwitcher();
handleExit();
break;
case OBS_FRONTEND_EVENT_SCENE_CHANGED:
handleSceneChange();
@@ -626,26 +643,32 @@ static void OBSEvent(enum obs_frontend_event event, void *switcher)
void LoadPlugins()
{
QFileInfo fi(obs_get_module_binary_path(obs_current_module()));
QDirIterator it(fi.absolutePath(), QStringList() << "*.so",
QDir::Files);
QFileInfo libPath(
QString(obs_get_module_binary_path(obs_current_module())));
QString pluginDir(libPath.absolutePath() + "/adv-ss-plugins");
#ifdef _WIN32
QString libPattern = "*.dll";
SetDllDirectory(pluginDir.toStdWString().c_str());
#else
QString libPattern = "*.so";
#endif
QDirIterator it(pluginDir, QStringList() << libPattern, QDir::Files);
while (it.hasNext()) {
auto file = it.next();
if (it.fileName() == "advanced-scene-switcher.so") {
continue;
}
blog(LOG_INFO, "attempting to load \"%s\"",
file.toStdString().c_str());
auto lib = new QLibrary(file, nullptr);
if (lib->load()) {
blog(LOG_INFO, "successfully loaded \"%s\"",
file.toStdString().c_str());
} else {
blog(LOG_WARNING, "failed to load \"%s\": %s",
file.toStdString().c_str(),
lib->errorString().toStdString().c_str());
}
}
}
AdvSceneSwitcher *ssWindow;
extern "C" void InitSceneSwitcher()
{
blog(LOG_INFO, "version: %s", g_GIT_TAG);
@@ -658,26 +681,21 @@ extern "C" void InitSceneSwitcher()
}
PlatformInit();
#if !defined(_WIN32)
// Windows does not require the plugins to be loaded manually
LoadPlugins();
#endif
dock = new StatusDock(
static_cast<QMainWindow *>(obs_frontend_get_main_window()));
obs_frontend_add_dock(dock);
SetupDock();
auto cb = []() {
if (switcher->settingsWindowOpened) {
ssWindow->show();
ssWindow->raise();
ssWindow->activateWindow();
AdvSceneSwitcher::window->show();
AdvSceneSwitcher::window->raise();
AdvSceneSwitcher::window->activateWindow();
} else {
ssWindow =
AdvSceneSwitcher::window =
new AdvSceneSwitcher(static_cast<QMainWindow *>(
obs_frontend_get_main_window()));
ssWindow->setAttribute(Qt::WA_DeleteOnClose);
ssWindow->show();
AdvSceneSwitcher::window->setAttribute(
Qt::WA_DeleteOnClose);
AdvSceneSwitcher::window->show();
}
};

View File

@@ -1,3 +1,57 @@
# Helper function to install plugins to correct location
function(install_advss_plugin target)
set(plugin_folder "adv-ss-plugins")
if(APPLE)
set(_bit_suffix "")
elseif(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(_bit_suffix "64bit/")
else()
set(_bit_suffix "32bit/")
endif()
set_target_properties(${target} PROPERTIES PREFIX "")
install(
TARGETS ${target}
LIBRARY DESTINATION "${OBS_PLUGIN_DESTINATION}/${plugin_folder}"
RUNTIME DESTINATION "${OBS_PLUGIN_DESTINATION}/${plugin_folder}")
add_custom_command(
TARGET ${target}
POST_BUILD
COMMAND
"${CMAKE_COMMAND}" -E copy "$<TARGET_FILE:${target}>"
"${OBS_OUTPUT_DIR}/$<CONFIGURATION>/obs-plugins/${_bit_suffix}/${plugin_folder}/$<TARGET_FILE_NAME:${target}>"
VERBATIM)
if(DEFINED ENV{obsInstallerTempDir})
add_custom_command(
TARGET ${target}
POST_BUILD
COMMAND
"${CMAKE_COMMAND}" -E copy "$<TARGET_FILE:${target}>"
"$ENV{obsInstallerTempDir}/${OBS_PLUGIN_DESTINATION}/${plugin_folder}/$<TARGET_FILE_NAME:${target}>"
VERBATIM)
endif()
if(MSVC)
obs_debug_copy_helper(
${target}
"${OBS_OUTPUT_DIR}/$<CONFIGURATION>/obs-plugins/${_bit_suffix}/${plugin_folder}"
)
if(DEFINED ENV{obsInstallerTempDir})
obs_debug_copy_helper(
${target}
"$ENV{obsInstallerTempDir}/${OBS_PLUGIN_DESTINATION}/${plugin_folder}")
endif()
install(
DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/pdbs/"
DESTINATION "${OBS_PLUGIN_DESTINATION}/${plugin_folder}"
CONFIGURATIONS Debug RelWithDebInfo)
endif()
endfunction()
# Add macro conditions or actions which have dependencies to external libraries
# or other components which might potentially not be fulfilled by the user and
# thus cause issues.

View File

@@ -16,7 +16,15 @@ else()
endif()
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../../headers")
set(module_SOURCES macro-condition-video.cpp macro-condition-video.hpp)
set(module_SOURCES
macro-condition-video.cpp
macro-condition-video.hpp
video-match-dialog.cpp
video-match-dialog.hpp
threshold-slider.cpp
threshold-slider.hpp
opencv-helpers.cpp
opencv-helpers.hpp)
add_library(advanced-scene-switcher-opencv MODULE ${module_SOURCES})
if(BUILD_OUT_OF_TREE)
@@ -34,8 +42,9 @@ if(BUILD_OUT_OF_TREE)
set(LIB_OUT_DIR "/lib/obs-plugins")
endif()
set_target_properties(advanced-scene-switcher-opencv PROPERTIES PREFIX "")
install(TARGETS advanced-scene-switcher-opencv
LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIB_OUT_DIR})
install(
TARGETS advanced-scene-switcher-opencv
LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIB_OUT_DIR}/adv-ss-plugins)
endif()
else()
target_link_libraries(
@@ -46,5 +55,5 @@ else()
Qt5::Core
Qt5::Widgets
libobs)
install_obs_plugin(advanced-scene-switcher-opencv)
install_advss_plugin(advanced-scene-switcher-opencv)
endif()

View File

@@ -78,19 +78,21 @@ bool MacroConditionVideo::CheckCondition()
return _lastMatchResult;
}
if (_screenshotData && _screenshotData->done) {
if (_screenshotData.done) {
match = Compare();
_lastMatchResult = match;
if (!requiresFileInput(_condition)) {
_matchImage = std::move(_screenshotData->image);
_matchImage = std::move(_screenshotData.image);
}
_screenshotData.reset(nullptr);
_getNextScreenshot = true;
} else {
match = _lastMatchResult;
}
GetScreenshot();
if (_getNextScreenshot) {
GetScreenshot();
}
return match;
}
@@ -178,46 +180,10 @@ std::string MacroConditionVideo::GetShortDesc()
void MacroConditionVideo::GetScreenshot()
{
auto source = obs_weak_source_get_source(_videoSource);
_screenshotData = std::make_unique<AdvSSScreenshotObj>(source);
_screenshotData.~ScreenshotHelper();
new (&_screenshotData) ScreenshotHelper(source);
obs_source_release(source);
}
// Assumption is that QImage uses Format_RGBA8888.
// Conversion from: https://github.com/dbzhang800/QtOpenCV
cv::Mat QImageToMat(const QImage &img)
{
if (img.isNull()) {
return cv::Mat();
}
return cv::Mat(img.height(), img.width(), CV_8UC(img.depth() / 8),
(uchar *)img.bits(), img.bytesPerLine());
}
QImage MatToQImage(const cv::Mat &mat)
{
if (mat.empty()) {
return QImage();
}
return QImage(mat.data, mat.cols, mat.rows, mat.step,
QImage::Format::Format_RGBA8888);
}
PatternMatchData createPatternData(QImage &pattern)
{
PatternMatchData data;
if (pattern.isNull()) {
return data;
}
data.rgbaPattern = QImageToMat(pattern);
std::vector<cv::Mat1b> rgbaChannelsPattern;
cv::split(data.rgbaPattern, rgbaChannelsPattern);
std::vector<cv::Mat1b> rgbChanlesPattern(
rgbaChannelsPattern.begin(), rgbaChannelsPattern.begin() + 3);
cv::merge(rgbChanlesPattern, data.rgbPattern);
cv::threshold(rgbaChannelsPattern[3], data.mask, 0, 255,
cv::THRESH_BINARY);
return data;
_getNextScreenshot = false;
}
bool MacroConditionVideo::LoadImageFromFile()
@@ -241,51 +207,10 @@ bool MacroConditionVideo::LoadModelData(std::string &path)
return !_objectCascade.empty();
}
void matchPattern(QImage &img, PatternMatchData &patternData, double threshold,
cv::Mat &result, bool useAlphaAsMask = true)
{
if (img.isNull() || patternData.rgbaPattern.empty()) {
return;
}
if (img.height() < patternData.rgbaPattern.rows ||
img.width() < patternData.rgbaPattern.cols) {
return;
}
auto i = QImageToMat(img);
if (useAlphaAsMask) {
std::vector<cv::Mat1b> rgbaChannelsImage;
cv::split(i, rgbaChannelsImage);
std::vector<cv::Mat1b> rgbChanlesImage(
rgbaChannelsImage.begin(),
rgbaChannelsImage.begin() + 3);
cv::Mat3b rgbImage;
cv::merge(rgbChanlesImage, rgbImage);
cv::matchTemplate(rgbImage, patternData.rgbPattern, result,
cv::TM_CCORR_NORMED, patternData.mask);
cv::threshold(result, result, threshold, 0, cv::THRESH_TOZERO);
} else {
cv::matchTemplate(i, patternData.rgbaPattern, result,
cv::TM_CCOEFF_NORMED);
cv::threshold(result, result, threshold, 0, cv::THRESH_TOZERO);
}
}
void matchPattern(QImage &img, QImage &pattern, double threshold,
cv::Mat &result, bool useAlphaAsMask)
{
auto data = createPatternData(pattern);
matchPattern(img, data, threshold, result, useAlphaAsMask);
}
bool MacroConditionVideo::ScreenshotContainsPattern()
{
cv::Mat result;
matchPattern(_screenshotData->image, _patternData, _patternThreshold,
matchPattern(_screenshotData.image, _patternData, _patternThreshold,
result, _useAlphaAsMask);
return countNonZero(result) > 0;
}
@@ -295,34 +220,16 @@ bool MacroConditionVideo::OutputChanged()
if (_usePatternForChangedCheck) {
cv::Mat result;
_patternData = createPatternData(_matchImage);
matchPattern(_screenshotData->image, _patternData,
matchPattern(_screenshotData.image, _patternData,
_patternThreshold, result, _useAlphaAsMask);
return countNonZero(result) == 0;
}
return _screenshotData->image != _matchImage;
}
std::vector<cv::Rect> matchObject(QImage &img, cv::CascadeClassifier &cascade,
double scaleFactor, int minNeighbors,
cv::Size minSize, cv::Size maxSize)
{
if (img.isNull() || cascade.empty()) {
return {};
}
auto i = QImageToMat(img);
cv::Mat frameGray;
cv::cvtColor(i, frameGray, cv::COLOR_BGR2GRAY);
equalizeHist(frameGray, frameGray);
std::vector<cv::Rect> objects;
cascade.detectMultiScale(frameGray, objects, scaleFactor, minNeighbors,
0, minSize, maxSize);
return objects;
return _screenshotData.image != _matchImage;
}
bool MacroConditionVideo::ScreenshotContainsObject()
{
auto objects = matchObject(_screenshotData->image, _objectCascade,
auto objects = matchObject(_screenshotData.image, _objectCascade,
_scaleFactor, _minNeighbors,
{_minSizeX, _minSizeY},
{_maxSizeX, _maxSizeY});
@@ -333,15 +240,15 @@ bool MacroConditionVideo::Compare()
{
switch (_condition) {
case VideoCondition::MATCH:
return _screenshotData->image == _matchImage;
return _screenshotData.image == _matchImage;
case VideoCondition::DIFFER:
return _screenshotData->image != _matchImage;
return _screenshotData.image != _matchImage;
case VideoCondition::HAS_CHANGED:
return OutputChanged();
case VideoCondition::HAS_NOT_CHANGED:
return !OutputChanged();
case VideoCondition::NO_IMAGE:
return _screenshotData->image.isNull();
return _screenshotData.image.isNull();
case VideoCondition::PATTERN:
return ScreenshotContainsPattern();
case VideoCondition::OBJECT:
@@ -359,57 +266,9 @@ static inline void populateConditionSelection(QComboBox *list)
}
}
ThresholdSlider::ThresholdSlider(double min, double max, const QString &label,
const QString &description, QWidget *parent)
: QWidget(parent)
{
_slider = new QSlider();
_slider->setOrientation(Qt::Horizontal);
_slider->setRange(min * _scale, max * _scale);
_value = new QLabel();
QString labelText = label + QString("0.");
for (int i = 0; i < _precision; i++) {
labelText.append(QString("0"));
}
_value->setText(labelText);
connect(_slider, SIGNAL(valueChanged(int)), this,
SLOT(NotifyValueChanged(int)));
QVBoxLayout *mainLayout = new QVBoxLayout();
QHBoxLayout *sliderLayout = new QHBoxLayout();
sliderLayout->addWidget(_value);
sliderLayout->addWidget(_slider);
mainLayout->addLayout(sliderLayout);
if (!description.isEmpty()) {
mainLayout->addWidget(new QLabel(description));
}
mainLayout->setContentsMargins(0, 0, 0, 0);
setLayout(mainLayout);
}
void ThresholdSlider::SetDoubleValue(double value)
{
_slider->setValue(value * _scale);
SetDoubleValueText(value);
}
void ThresholdSlider::NotifyValueChanged(int value)
{
double doubleValue = value / _scale;
SetDoubleValueText(doubleValue);
emit DoubleValueChanged(doubleValue);
}
void ThresholdSlider::SetDoubleValueText(double value)
{
QString labelText = _value->text();
labelText.chop(_precision + 2); // 2 for the part left of the "."
labelText.append(QString::number(value, 'f', _precision));
_value->setText(labelText);
}
MacroConditionVideoEdit::MacroConditionVideoEdit(
QWidget *parent, std::shared_ptr<MacroConditionVideo> entryData)
: QWidget(parent)
: QWidget(parent), _matchDialog(this, entryData.get())
{
_videoSelection = new QComboBox();
_condition = new QComboBox();
@@ -682,7 +541,7 @@ void MacroConditionVideoEdit::ImageBrowseButtonClicked()
} else {
auto source =
obs_weak_source_get_source(_entryData->_videoSource);
auto screenshot = std::make_unique<AdvSSScreenshotObj>(source);
ScreenshotHelper screenshot(source);
obs_source_release(source);
path = QFileDialog::getSaveFileName(this);
@@ -693,16 +552,15 @@ void MacroConditionVideoEdit::ImageBrowseButtonClicked()
if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) {
return;
}
if (!screenshot->done) { // Screenshot usually completed by now
if (!screenshot.done) { // Screenshot usually completed by now
std::this_thread::sleep_for(std::chrono::seconds(1));
}
if (!screenshot->done) {
if (!screenshot.done) {
DisplayMessage(obs_module_text(
"AdvSceneSwitcher.condition.video.screenshotFail"));
return;
}
screenshot->image.save(path);
screenshot.image.save(path);
}
_imagePath->SetPath(path);
ImagePathChanged(path);
@@ -822,83 +680,12 @@ void MacroConditionVideoEdit::ThrottleCountChanged(int value)
_entryData->_throttleCount = value / GetSwitcher()->interval;
}
QImage markPatterns(cv::Mat &matchResult, QImage &image, QImage &pattern)
{
auto matchImg = QImageToMat(image);
for (int row = 0; row < matchResult.rows - 1; row++) {
for (int col = 0; col < matchResult.cols - 1; col++) {
if (matchResult.at<float>(row, col) != 0.0) {
rectangle(matchImg, {col, row},
cv::Point(col + pattern.width(),
row + pattern.height()),
cv::Scalar(255, 0, 0, 255), 2, 8, 0);
}
}
}
return MatToQImage(matchImg);
}
QImage markObjects(QImage &image, std::vector<cv::Rect> &objects)
{
auto frame = QImageToMat(image);
for (size_t i = 0; i < objects.size(); i++) {
rectangle(frame, cv::Point(objects[i].x, objects[i].y),
cv::Point(objects[i].x + objects[i].width,
objects[i].y + objects[i].height),
cv::Scalar(255, 0, 0, 255), 2, 8, 0);
}
return MatToQImage(frame);
}
void MacroConditionVideoEdit::ShowMatchClicked()
{
auto source = obs_weak_source_get_source(_entryData->_videoSource);
auto screenshot = std::make_unique<AdvSSScreenshotObj>(source);
obs_source_release(source);
if (!screenshot->done) {
std::this_thread::sleep_for(std::chrono::seconds(1));
}
if (!screenshot->done) {
DisplayMessage(obs_module_text(
"AdvSceneSwitcher.condition.video.screenshotFail"));
return;
}
QImage markedIamge;
if (_entryData->_condition == VideoCondition::PATTERN) {
cv::Mat result;
QImage pattern = _entryData->GetMatchImage();
matchPattern(screenshot->image, pattern,
_entryData->_patternThreshold, result,
_entryData->_useAlphaAsMask);
if (countNonZero(result) == 0) {
DisplayMessage(obs_module_text(
"AdvSceneSwitcher.condition.video.patternMatchFail"));
return;
}
markedIamge = markPatterns(result, screenshot->image, pattern);
} else if (_entryData->_condition == VideoCondition::OBJECT) {
auto objects = matchObject(
screenshot->image, _entryData->_objectCascade,
_entryData->_scaleFactor, _entryData->_minNeighbors,
{_entryData->_minSizeX, _entryData->_minSizeY},
{_entryData->_maxSizeX, _entryData->_maxSizeY});
if (objects.empty()) {
DisplayMessage(obs_module_text(
"AdvSceneSwitcher.condition.video.objectMatchFail"));
return;
}
markedIamge = markObjects(screenshot->image, objects);
}
QLabel *label = new QLabel;
label->setPixmap(QPixmap::fromImage(markedIamge));
QVBoxLayout *layout = new QVBoxLayout;
layout->addWidget(label);
QDialog dialog;
dialog.setLayout(layout);
dialog.setWindowTitle("Advanced Scene Switcher");
dialog.exec();
_matchDialog.show();
_matchDialog.raise();
_matchDialog.activateWindow();
_matchDialog.ShowMatch();
}
void MacroConditionVideoEdit::ModelPathChanged(const QString &text)

View File

@@ -1,15 +1,16 @@
#pragma once
#include <macro.hpp>
#include <screenshot-helper.hpp>
#include <opencv-helpers.hpp>
#include <file-selection.hpp>
#include <threshold-slider.hpp>
#include <video-match-dialog.hpp>
#include <QWidget>
#include <QComboBox>
#include <QCheckBox>
#include <QHBoxLayout>
#include <chrono>
#undef NO // MacOS macro that can conflict with OpenCV
#include <opencv2/opencv.hpp>
#include <QLabel>
enum class VideoCondition {
MATCH,
@@ -21,26 +22,18 @@ enum class VideoCondition {
OBJECT,
};
struct PatternMatchData {
cv::Mat4b rgbaPattern;
cv::Mat3b rgbPattern;
cv::Mat1b mask;
};
constexpr int minMinNeighbors = 3;
constexpr int maxMinNeighbors = 6;
class MacroConditionVideo : public MacroCondition {
public:
MacroConditionVideo(Macro *m) : MacroCondition(m) {}
bool CheckCondition();
bool Save(obs_data_t *obj);
bool Load(obs_data_t *obj);
std::string GetShortDesc();
std::string GetId() { return id; };
QImage GetMatchImage() { return _matchImage; };
static std::shared_ptr<MacroCondition> Create()
static std::shared_ptr<MacroCondition> Create(Macro *m)
{
return std::make_shared<MacroConditionVideo>();
return std::make_shared<MacroConditionVideo>(m);
}
void GetScreenshot();
bool LoadImageFromFile();
@@ -73,7 +66,8 @@ private:
bool Compare();
bool CheckShouldBeSkipped();
std::unique_ptr<AdvSSScreenshotObj> _screenshotData = nullptr;
bool _getNextScreenshot = true;
ScreenshotHelper _screenshotData;
QImage _matchImage;
std::string _modelDataPath =
obs_get_module_data_path(obs_current_module()) +
@@ -86,27 +80,6 @@ private:
static const std::string id;
};
class ThresholdSlider : public QWidget {
Q_OBJECT
public:
ThresholdSlider(double min = 0., double max = 1.,
const QString &label = "threshold",
const QString &description = "", QWidget *parent = 0);
void SetDoubleValue(double);
public slots:
void NotifyValueChanged(int value);
signals:
void DoubleValueChanged(double value);
private:
void SetDoubleValueText(double);
QLabel *_value;
QSlider *_slider;
double _scale = 100.0;
int _precision = 2;
};
class MacroConditionVideoEdit : public QWidget {
Q_OBJECT
@@ -174,6 +147,7 @@ protected:
QCheckBox *_throttleEnable;
QSpinBox *_throttleCount;
QPushButton *_showMatch;
ShowMatchDialog _matchDialog;
std::shared_ptr<MacroConditionVideo> _entryData;

View File

@@ -0,0 +1,98 @@
#include "opencv-helpers.hpp"
PatternMatchData createPatternData(QImage &pattern)
{
PatternMatchData data;
if (pattern.isNull()) {
return data;
}
data.rgbaPattern = QImageToMat(pattern);
std::vector<cv::Mat1b> rgbaChannelsPattern;
cv::split(data.rgbaPattern, rgbaChannelsPattern);
std::vector<cv::Mat1b> rgbChanlesPattern(
rgbaChannelsPattern.begin(), rgbaChannelsPattern.begin() + 3);
cv::merge(rgbChanlesPattern, data.rgbPattern);
cv::threshold(rgbaChannelsPattern[3], data.mask, 0, 255,
cv::THRESH_BINARY);
return data;
}
void matchPattern(QImage &img, PatternMatchData &patternData, double threshold,
cv::Mat &result, bool useAlphaAsMask)
{
if (img.isNull() || patternData.rgbaPattern.empty()) {
return;
}
if (img.height() < patternData.rgbaPattern.rows ||
img.width() < patternData.rgbaPattern.cols) {
return;
}
auto i = QImageToMat(img);
if (useAlphaAsMask) {
std::vector<cv::Mat1b> rgbaChannelsImage;
cv::split(i, rgbaChannelsImage);
std::vector<cv::Mat1b> rgbChanlesImage(
rgbaChannelsImage.begin(),
rgbaChannelsImage.begin() + 3);
cv::Mat3b rgbImage;
cv::merge(rgbChanlesImage, rgbImage);
cv::matchTemplate(rgbImage, patternData.rgbPattern, result,
cv::TM_CCORR_NORMED, patternData.mask);
cv::threshold(result, result, threshold, 0, cv::THRESH_TOZERO);
} else {
cv::matchTemplate(i, patternData.rgbaPattern, result,
cv::TM_CCOEFF_NORMED);
cv::threshold(result, result, threshold, 0, cv::THRESH_TOZERO);
}
}
void matchPattern(QImage &img, QImage &pattern, double threshold,
cv::Mat &result, bool useAlphaAsMask)
{
auto data = createPatternData(pattern);
matchPattern(img, data, threshold, result, useAlphaAsMask);
}
std::vector<cv::Rect> matchObject(QImage &img, cv::CascadeClassifier &cascade,
double scaleFactor, int minNeighbors,
cv::Size minSize, cv::Size maxSize)
{
if (img.isNull() || cascade.empty()) {
return {};
}
auto i = QImageToMat(img);
cv::Mat frameGray;
cv::cvtColor(i, frameGray, cv::COLOR_BGR2GRAY);
equalizeHist(frameGray, frameGray);
std::vector<cv::Rect> objects;
cascade.detectMultiScale(frameGray, objects, scaleFactor, minNeighbors,
0, minSize, maxSize);
return objects;
}
// Assumption is that QImage uses Format_RGBA8888.
// Conversion from: https://github.com/dbzhang800/QtOpenCV
cv::Mat QImageToMat(const QImage &img)
{
if (img.isNull()) {
return cv::Mat();
}
return cv::Mat(img.height(), img.width(), CV_8UC(img.depth() / 8),
(uchar *)img.bits(), img.bytesPerLine());
}
QImage MatToQImage(const cv::Mat &mat)
{
if (mat.empty()) {
return QImage();
}
return QImage(mat.data, mat.cols, mat.rows,
QImage::Format::Format_RGBA8888);
}

View File

@@ -0,0 +1,24 @@
#pragma once
#include <QImage>
#undef NO // MacOS macro that can conflict with OpenCV
#include <opencv2/opencv.hpp>
constexpr int minMinNeighbors = 3;
constexpr int maxMinNeighbors = 6;
struct PatternMatchData {
cv::Mat4b rgbaPattern;
cv::Mat3b rgbPattern;
cv::Mat1b mask;
};
PatternMatchData createPatternData(QImage &pattern);
void matchPattern(QImage &img, PatternMatchData &patternData, double threshold,
cv::Mat &result, bool useAlphaAsMask = true);
void matchPattern(QImage &img, QImage &pattern, double threshold,
cv::Mat &result, bool useAlphaAsMask);
std::vector<cv::Rect> matchObject(QImage &img, cv::CascadeClassifier &cascade,
double scaleFactor, int minNeighbors,
cv::Size minSize, cv::Size maxSize);
cv::Mat QImageToMat(const QImage &img);
QImage MatToQImage(const cv::Mat &mat);

View File

@@ -0,0 +1,50 @@
#include "threshold-slider.hpp"
#include <QHBoxLayout>
ThresholdSlider::ThresholdSlider(double min, double max, const QString &label,
const QString &description, QWidget *parent)
: QWidget(parent)
{
_slider = new QSlider();
_slider->setOrientation(Qt::Horizontal);
_slider->setRange(min * _scale, max * _scale);
_value = new QLabel();
QString labelText = label + QString("0.");
for (int i = 0; i < _precision; i++) {
labelText.append(QString("0"));
}
_value->setText(labelText);
connect(_slider, SIGNAL(valueChanged(int)), this,
SLOT(NotifyValueChanged(int)));
QVBoxLayout *mainLayout = new QVBoxLayout();
QHBoxLayout *sliderLayout = new QHBoxLayout();
sliderLayout->addWidget(_value);
sliderLayout->addWidget(_slider);
mainLayout->addLayout(sliderLayout);
if (!description.isEmpty()) {
mainLayout->addWidget(new QLabel(description));
}
mainLayout->setContentsMargins(0, 0, 0, 0);
setLayout(mainLayout);
}
void ThresholdSlider::SetDoubleValue(double value)
{
_slider->setValue(value * _scale);
SetDoubleValueText(value);
}
void ThresholdSlider::NotifyValueChanged(int value)
{
double doubleValue = value / _scale;
SetDoubleValueText(doubleValue);
emit DoubleValueChanged(doubleValue);
}
void ThresholdSlider::SetDoubleValueText(double value)
{
QString labelText = _value->text();
labelText.chop(_precision + 2); // 2 for the part left of the "."
labelText.append(QString::number(value, 'f', _precision));
_value->setText(labelText);
}

View File

@@ -0,0 +1,25 @@
#pragma once
#include <QWidget>
#include <QSlider>
#include <QLabel>
class ThresholdSlider : public QWidget {
Q_OBJECT
public:
ThresholdSlider(double min = 0., double max = 1.,
const QString &label = "threshold",
const QString &description = "", QWidget *parent = 0);
void SetDoubleValue(double);
public slots:
void NotifyValueChanged(int value);
signals:
void DoubleValueChanged(double value);
private:
void SetDoubleValueText(double);
QLabel *_value;
QSlider *_slider;
double _scale = 100.0;
int _precision = 2;
};

View File

@@ -0,0 +1,145 @@
#include "video-match-dialog.hpp"
#include "macro-condition-video.hpp"
#include "opencv-helpers.hpp"
#include "utility.hpp"
ShowMatchDialog::ShowMatchDialog(QWidget *parent,
MacroConditionVideo *conditionData)
: QDialog(parent),
_conditionData(conditionData),
_imageLabel(new QLabel),
_scrollArea(new QScrollArea)
{
setWindowTitle("Advanced Scene Switcher");
_statusLabel = new QLabel(obs_module_text(
"AdvSceneSwitcher.condition.video.showMatch.loading"));
_scrollArea->setBackgroundRole(QPalette::Dark);
_scrollArea->setWidget(_imageLabel);
QVBoxLayout *layout = new QVBoxLayout;
layout->addWidget(_statusLabel);
layout->addWidget(_scrollArea);
setLayout(layout);
}
ShowMatchDialog::~ShowMatchDialog()
{
_stop = true;
if (_thread.joinable()) {
_thread.join();
}
}
void ShowMatchDialog::ShowMatch()
{
if (_thread.joinable()) {
return;
}
if (!_conditionData) {
DisplayMessage(obs_module_text(
"AdvSceneSwitcher.condition.video.screenshotFail"));
return;
}
_thread = std::thread(&ShowMatchDialog::CheckForMatchLoop, this);
}
void ShowMatchDialog::RedrawImage(QImage img)
{
_imageLabel->setPixmap(QPixmap::fromImage(img));
_imageLabel->adjustSize();
}
void ShowMatchDialog::CheckForMatchLoop()
{
while (!_stop) {
auto source = obs_weak_source_get_source(
_conditionData->_videoSource);
ScreenshotHelper screenshot(source);
obs_source_release(source);
std::this_thread::sleep_for(std::chrono::seconds(1));
if (!screenshot.done) {
_statusLabel->setText(obs_module_text(
"AdvSceneSwitcher.condition.video.screenshotFail"));
continue;
}
if (screenshot.image.width() == 0 ||
screenshot.image.height() == 0) {
_statusLabel->setText(obs_module_text(
"AdvSceneSwitcher.condition.video.screenshotEmpty"));
continue;
}
auto image = MarkMatch(screenshot.image);
if (_stop) {
return;
}
QMetaObject::invokeMethod(this, "RedrawImage",
Qt::BlockingQueuedConnection,
Q_ARG(QImage, image));
}
}
QImage markPatterns(cv::Mat &matchResult, QImage &image, QImage &pattern)
{
auto matchImg = QImageToMat(image);
for (int row = 0; row < matchResult.rows - 1; row++) {
for (int col = 0; col < matchResult.cols - 1; col++) {
if (matchResult.at<float>(row, col) != 0.0) {
rectangle(matchImg, {col, row},
cv::Point(col + pattern.width(),
row + pattern.height()),
cv::Scalar(255, 0, 0, 255), 2, 8, 0);
}
}
}
return MatToQImage(matchImg);
}
QImage markObjects(QImage &image, std::vector<cv::Rect> &objects)
{
auto frame = QImageToMat(image);
for (size_t i = 0; i < objects.size(); i++) {
rectangle(frame, cv::Point(objects[i].x, objects[i].y),
cv::Point(objects[i].x + objects[i].width,
objects[i].y + objects[i].height),
cv::Scalar(255, 0, 0, 255), 2, 8, 0);
}
return MatToQImage(frame);
}
QImage ShowMatchDialog::MarkMatch(QImage &screenshot)
{
QImage resultIamge;
if (_conditionData->_condition == VideoCondition::PATTERN) {
cv::Mat result;
QImage pattern = _conditionData->GetMatchImage();
matchPattern(screenshot, pattern,
_conditionData->_patternThreshold, result,
_conditionData->_useAlphaAsMask);
if (countNonZero(result) == 0) {
resultIamge = screenshot;
_statusLabel->setText(obs_module_text(
"AdvSceneSwitcher.condition.video.patternMatchFail"));
} else {
_statusLabel->setText(obs_module_text(
"AdvSceneSwitcher.condition.video.patternMatchSuccess"));
resultIamge = markPatterns(result, screenshot, pattern);
}
} else if (_conditionData->_condition == VideoCondition::OBJECT) {
auto objects = matchObject(
screenshot, _conditionData->_objectCascade,
_conditionData->_scaleFactor,
_conditionData->_minNeighbors,
{_conditionData->_minSizeX, _conditionData->_minSizeY},
{_conditionData->_maxSizeX, _conditionData->_maxSizeY});
if (objects.empty()) {
resultIamge = screenshot;
_statusLabel->setText(obs_module_text(
"AdvSceneSwitcher.condition.video.objectMatchFail"));
} else {
_statusLabel->setText(obs_module_text(
"AdvSceneSwitcher.condition.video.objectMatchSuccess"));
resultIamge = markObjects(screenshot, objects);
}
}
return resultIamge;
}

View File

@@ -0,0 +1,31 @@
#pragma once
#include <QDialog>
#include <QLabel>
#include <QScrollArea>
#include <thread>
class MacroConditionVideo;
class ShowMatchDialog : public QDialog {
Q_OBJECT
public:
ShowMatchDialog(QWidget *parent, MacroConditionVideo *_conditionData);
virtual ~ShowMatchDialog();
void ShowMatch();
private slots:
void RedrawImage(QImage img);
private:
void CheckForMatchLoop();
QImage MarkMatch(QImage &screenshot);
MacroConditionVideo *_conditionData;
QScrollArea *_scrollArea;
QLabel *_statusLabel;
QLabel *_imageLabel;
std::thread _thread;
std::atomic_bool _stop = {false};
};

View File

@@ -73,8 +73,9 @@ if(BUILD_OUT_OF_TREE)
set(LIB_OUT_DIR "/lib/obs-plugins")
endif()
set_target_properties(advanced-scene-switcher-openvr PROPERTIES PREFIX "")
install(TARGETS advanced-scene-switcher-openvr
LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIB_OUT_DIR})
install(
TARGETS advanced-scene-switcher-openvr
LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIB_OUT_DIR}/adv-ss-plugins)
endif()
else()
target_link_libraries(
@@ -85,5 +86,5 @@ else()
Qt5::Core
Qt5::Widgets
libobs)
install_obs_plugin(advanced-scene-switcher-openvr)
install_advss_plugin(advanced-scene-switcher-openvr)
endif()

View File

@@ -8,13 +8,14 @@
class MacroConditionOpenVR : public MacroCondition {
public:
MacroConditionOpenVR(Macro *m) : MacroCondition(m) {}
bool CheckCondition();
bool Save(obs_data_t *obj);
bool Load(obs_data_t *obj);
std::string GetId() { return id; };
static std::shared_ptr<MacroCondition> Create()
static std::shared_ptr<MacroCondition> Create(Macro *m)
{
return std::make_shared<MacroConditionOpenVR>();
return std::make_shared<MacroConditionOpenVR>(m);
}
double _minX = 0, _minY = 0, _minZ = 0, _maxX = 0, _maxY = 0, _maxZ = 0;

View File

@@ -1,13 +1,11 @@
#include "headers/advanced-scene-switcher.hpp"
#include "headers/status-dock.hpp"
#include "headers/status-control.hpp"
#include "headers/utility.hpp"
#include "headers/version.h"
#include <QFileDialog>
#include <QStandardPaths>
QMetaObject::Connection inactivePluse;
void AdvSceneSwitcher::on_close_clicked()
{
close();
@@ -147,41 +145,6 @@ void AdvSceneSwitcher::on_checkInterval_valueChanged(int value)
switcher->interval = value;
}
void AdvSceneSwitcher::SetStarted()
{
ui->toggleStartButton->setText(
obs_module_text("AdvSceneSwitcher.generalTab.status.stop"));
ui->pluginRunningText->setText(
obs_module_text("AdvSceneSwitcher.status.active"));
ui->pluginRunningText->disconnect(inactivePluse);
currentStatusActive = true;
}
void AdvSceneSwitcher::SetStopped()
{
ui->toggleStartButton->setText(
obs_module_text("AdvSceneSwitcher.generalTab.status.start"));
ui->pluginRunningText->setText(
obs_module_text("AdvSceneSwitcher.status.inactive"));
if (!switcher->disableHints) {
inactivePluse = PulseWidget(ui->pluginRunningText,
QColor(Qt::red), QColor(0, 0, 0, 0),
"QLabel ");
}
currentStatusActive = false;
}
void AdvSceneSwitcher::on_toggleStartButton_clicked()
{
if (switcher->th && switcher->th->isRunning()) {
switcher->Stop();
SetStopped();
} else {
switcher->Start();
SetStarted();
}
}
void AdvSceneSwitcher::closeEvent(QCloseEvent *)
{
if (!switcher) {
@@ -229,6 +192,71 @@ void AdvSceneSwitcher::on_uiHintsDisable_stateChanged(int state)
switcher->disableHints = state;
}
void AdvSceneSwitcher::on_highlightExecutedMacros_stateChanged(int state)
{
if (loading) {
return;
}
switcher->highlightExecutedMacros = state;
}
bool isLegacyTab(const QString &name)
{
return name == obs_module_text(
"AdvSceneSwitcher.transitionTab.title") ||
name == obs_module_text(
"AdvSceneSwitcher.windowTitleTab.title") ||
name == obs_module_text(
"AdvSceneSwitcher.executableTab.title") ||
name == obs_module_text(
"AdvSceneSwitcher.screenRegionTab.title") ||
name == obs_module_text("AdvSceneSwitcher.mediaTab.title") ||
name == obs_module_text("AdvSceneSwitcher.fileTab.title") ||
name == obs_module_text("AdvSceneSwitcher.randomTab.title") ||
name == obs_module_text("AdvSceneSwitcher.timeTab.title") ||
name == obs_module_text("AdvSceneSwitcher.idleTab.title") ||
name == obs_module_text(
"AdvSceneSwitcher.sceneSequenceTab.title") ||
name == obs_module_text("AdvSceneSwitcher.audioTab.title") ||
name == obs_module_text("AdvSceneSwitcher.videoTab.title") ||
name == obs_module_text("AdvSceneSwitcher.pauseTab.title") ||
name == obs_module_text(
"AdvSceneSwitcher.sceneTriggerTab.title");
}
void AdvSceneSwitcher::on_hideLegacyTabs_stateChanged(int state)
{
switcher->hideLegacyTabs = state;
for (int idx = 0; idx < ui->tabWidget->count(); idx++) {
if (isLegacyTab(ui->tabWidget->tabText(idx))) {
#if defined(_WIN32) || defined(__APPLE__)
ui->tabWidget->setTabVisible(idx, !state);
#else
// TODO: Switch to setTabVisible() once QT 5.15 is more wide spread
ui->tabWidget->setTabEnabled(idx, !state);
ui->tabWidget->setStyleSheet(
"QTabBar::tab::disabled {width: 0; height: 0; margin: 0; padding: 0; border: none;} ");
#endif
}
}
}
void AdvSceneSwitcher::setDeprecationWarnings()
{
QString toolTip =
switcher->disableHints
? ""
: obs_module_text(
"AdvSceneSwitcher.deprecatedTabWarning");
for (int idx = 0; idx < ui->tabWidget->count(); idx++) {
if (isLegacyTab(ui->tabWidget->tabText(idx))) {
ui->tabWidget->widget(idx)->setToolTip(toolTip);
}
}
}
QString getDefaultSaveLocation()
{
QString desktopPath = QStandardPaths::writableLocation(
@@ -436,6 +464,13 @@ void AdvSceneSwitcher::setTabOrder()
connect(bar, &QTabBar::tabMoved, this, &AdvSceneSwitcher::on_tabMoved);
}
void AdvSceneSwitcher::setCurrentTab()
{
if (switcher->lastOpenedTab >= 0) {
ui->tabWidget->setCurrentIndex(switcher->lastOpenedTab);
}
}
void AdvSceneSwitcher::restoreWindowGeo()
{
if (switcher->saveWindowGeo && windowPosValid(switcher->windowPos)) {
@@ -493,7 +528,9 @@ void SwitcherData::loadSettings(obs_data_t *obj)
loadSceneTriggers(obj);
loadGeneralSettings(obj);
loadHotkeys(obj);
loadDock(obj);
// Reset on startup and scene collection change
switcher->lastOpenedTab = -1;
}
void SwitcherData::saveSettings(obs_data_t *obj)
@@ -524,7 +561,6 @@ void SwitcherData::saveSettings(obs_data_t *obj)
saveSceneTriggers(obj);
saveGeneralSettings(obj);
saveHotkeys(obj);
saveDock(obj);
saveVersion(obj, g_GIT_SHA1);
}
@@ -550,6 +586,9 @@ void SwitcherData::saveGeneralSettings(obs_data_t *obj)
obs_data_set_bool(obj, "showSystemTrayNotifications",
showSystemTrayNotifications);
obs_data_set_bool(obj, "disableHints", disableHints);
obs_data_set_bool(obj, "highlightExecutedMacros",
highlightExecutedMacros);
obs_data_set_bool(obj, "hideLegacyTabs", hideLegacyTabs);
obs_data_set_int(obj, "priority0", functionNamesByPriority[0]);
obs_data_set_int(obj, "priority1", functionNamesByPriority[1]);
@@ -623,6 +662,9 @@ void SwitcherData::loadGeneralSettings(obs_data_t *obj)
showSystemTrayNotifications =
obs_data_get_bool(obj, "showSystemTrayNotifications");
disableHints = obs_data_get_bool(obj, "disableHints");
highlightExecutedMacros =
obs_data_get_bool(obj, "highlightExecutedMacros");
hideLegacyTabs = obs_data_get_bool(obj, "hideLegacyTabs");
obs_data_set_default_int(obj, "priority0", default_priority_0);
obs_data_set_default_int(obj, "priority1", default_priority_1);
@@ -791,21 +833,6 @@ void populateAutoStartEventSelection(QComboBox *cb)
"AdvSceneSwitcher.generalTab.status.autoStart.recordingAndStreaming"));
}
void AdvSceneSwitcher::updateStatus()
{
if (switcher->th && switcher->th->isRunning()) {
if (currentStatusActive) {
return;
}
SetStarted();
} else {
if (!currentStatusActive) {
return;
}
SetStopped();
}
}
void AdvSceneSwitcher::setupGeneralTab()
{
populateSceneSelection(ui->noMatchSwitchScene, false);
@@ -851,6 +878,9 @@ void AdvSceneSwitcher::setupGeneralTab()
ui->showTrayNotifications->setChecked(
switcher->showSystemTrayNotifications);
ui->uiHintsDisable->setChecked(switcher->disableHints);
ui->highlightExecutedMacros->setChecked(
switcher->highlightExecutedMacros);
ui->hideLegacyTabs->setChecked(switcher->hideLegacyTabs);
for (int p : switcher->functionNamesByPriority) {
std::string s = "";
@@ -926,17 +956,17 @@ void AdvSceneSwitcher::setupGeneralTab()
ui->autoStartEvent->setCurrentIndex(
static_cast<int>(switcher->autoStartEvent));
if (switcher->th && switcher->th->isRunning()) {
SetStarted();
} else {
SetStopped();
}
// Updates the UI status element if the status changed externally
// (e.g. via hotkeys)
QTimer *statusTimer = new QTimer(this);
connect(statusTimer, SIGNAL(timeout()), this, SLOT(updateStatus()));
statusTimer->start(1000);
// Set up status control
auto statusControl = new StatusControl(this, true);
ui->statusLayout->addWidget(statusControl->StatusPrefixLabel(), 1, 0);
auto tmp = new QHBoxLayout;
tmp->addWidget(statusControl->StatusLabel());
tmp->addStretch();
ui->statusLayout->addLayout(tmp, 1, 1);
ui->statusLayout->addWidget(statusControl->Button(), 2, 1);
// Hide the now empty invisible shell of the statusControl widget
// as otherwise it could block user input
statusControl->hide();
setWindowTitle(windowTitle() + " - " + g_GIT_TAG);
}

View File

@@ -6,6 +6,7 @@
#else
#include "ui_advanced-scene-switcher.h"
#endif
#include "macro-segment-list.hpp"
#include "switcher-data-structs.hpp"
#include "platform-funcs.hpp"
@@ -28,17 +29,15 @@ class AdvSceneSwitcher : public QDialog {
public:
std::unique_ptr<Ui_AdvSceneSwitcher> ui;
bool loading = true;
bool currentStatusActive = false;
AdvSceneSwitcher(QWidget *parent);
~AdvSceneSwitcher();
static AdvSceneSwitcher *window;
void reject() override;
void closeEvent(QCloseEvent *event) override;
void SetStarted();
void SetStopped();
void SetShowFrames();
void SetHideFrames();
void clearFrames(QListWidget *list);
@@ -50,13 +49,15 @@ public:
void OpenSequenceExtendEdit(SequenceWidget *sw);
void SetEditSceneGroup(SceneGroup &sg);
bool addNewMacro(std::string &name);
bool addNewMacro(std::string &name, std::string format = "");
Macro *getSelectedMacro();
void SetEditMacro(Macro &m);
void HighlightAction(int idx);
void HighlightCondition(int idx);
void PopulateMacroActions(Macro &m, uint32_t afterIdx = 0);
void PopulateMacroConditions(Macro &m, uint32_t afterIdx = 0);
void SetActionData(Macro &m);
void SetConditionData(Macro &m);
void ConnectControlSignals(MacroActionEdit *);
void ConnectControlSignals(MacroConditionEdit *);
void SwapActions(Macro *m, int pos1, int pos2);
@@ -81,7 +82,9 @@ public:
void setupVideoTab();
void setupNetworkTab();
void setupMacroTab();
void setDeprecationWarnings();
void setTabOrder();
void setCurrentTab();
void restoreWindowGeo();
void checkFirstTimeSetup();
@@ -109,7 +112,6 @@ public slots:
void on_autoStartEvent_currentIndexChanged(int index);
void on_noMatchSwitchScene_currentTextChanged(const QString &text);
void on_checkInterval_valueChanged(int value);
void on_toggleStartButton_clicked();
void on_tabMoved(int from, int to);
void on_tabWidget_currentChanged(int index);
@@ -120,12 +122,17 @@ public slots:
void on_macroName_editingFinished();
void on_runMacro_clicked();
void on_runMacroInParallel_stateChanged(int value);
void on_runMacroOnChange_stateChanged(int value);
void on_macros_currentRowChanged(int idx);
void on_macros_itemChanged(QListWidgetItem *);
void on_conditionAdd_clicked();
void on_conditionRemove_clicked();
void on_conditionUp_clicked();
void on_conditionDown_clicked();
void on_actionAdd_clicked();
void on_actionRemove_clicked();
void on_actionUp_clicked();
void on_actionDown_clicked();
void DeleteMacroSegementHotkey();
void ShowMacroContextMenu(const QPoint &);
void ShowMacroActionsContextMenu(const QPoint &);
void ShowMacroConditionsContextMenu(const QPoint &);
@@ -134,14 +141,25 @@ public slots:
void ExpandAllConditions();
void CollapseAllActions();
void CollapseAllConditions();
void MinimizeActions();
void MinimizeConditions();
void MacroActionSelectionChanged(int idx);
void AddMacroAction(int idx);
void RemoveMacroAction(int idx);
void MoveMacroActionUp(int idx);
void MoveMacroActionDown(int idx);
void MacroConditionSelectionChanged(int idx);
void AddMacroCondition(int idx);
void RemoveMacroCondition(int idx);
void MoveMacroConditionUp(int idx);
void MoveMacroConditionDown(int idx);
void FadeOutActionControls();
void FadeOutConditionControls();
void ResetOpacityActionControls();
void ResetOpacityConditionControls();
void HighlightControls();
void HighlightMatchedMacros();
void MacroDragDropReorder(QModelIndex, int, int, QModelIndex, int);
void on_screenRegionSwitches_currentRowChanged(int idx);
void on_showFrame_clicked();
@@ -172,6 +190,8 @@ public slots:
void on_saveWindowGeo_stateChanged(int state);
void on_showTrayNotifications_stateChanged(int state);
void on_uiHintsDisable_stateChanged(int state);
void on_highlightExecutedMacros_stateChanged(int state);
void on_hideLegacyTabs_stateChanged(int state);
void on_exportSettings_clicked();
void on_importSettings_clicked();
@@ -271,11 +291,17 @@ public slots:
void on_threadPriority_currentTextChanged(const QString &text);
void updateScreenRegionCursorPos();
void updateStatus();
void on_close_clicked();
private:
void SetSelection(MacroSegmentList *, int);
MacroSegmentList *conditionsList = nullptr;
MacroSegmentList *actionsList = nullptr;
int currentConditionIdx = -1;
int currentActionIdx = -1;
};
/******************************************************************************
@@ -287,7 +313,7 @@ void setNextTransition(const sceneSwitchInfo &ssi, obs_source_t *currentSource,
void overwriteTransitionOverride(const sceneSwitchInfo &ssi,
transitionData &td);
void restoreTransitionOverride(obs_source_t *scene, const transitionData &td);
void switchScene(const sceneSwitchInfo &ssi);
void switchScene(const sceneSwitchInfo &ssi, bool force = false);
void switchPreviewScene(const OBSWeakSource &ws);
/******************************************************************************

View File

@@ -42,6 +42,7 @@ public:
void SetValue(double value);
void SetUnit(DurationUnit u);
void SetDuration(Duration d);
QDoubleSpinBox *SpinBox() { return _duration; }
private slots:
void _DurationChanged(double value);

View File

@@ -15,15 +15,16 @@ enum class AudioAction {
class MacroActionAudio : public MacroAction {
public:
MacroActionAudio(Macro *m) : MacroAction(m) {}
bool PerformAction();
void LogAction();
bool Save(obs_data_t *obj);
bool Load(obs_data_t *obj);
std::string GetShortDesc();
std::string GetId() { return id; };
static std::shared_ptr<MacroAction> Create()
static std::shared_ptr<MacroAction> Create(Macro *m)
{
return std::make_shared<MacroActionAudio>();
return std::make_shared<MacroActionAudio>(m);
}
OBSWeakSource _audioSource;

View File

@@ -2,7 +2,7 @@
#include "macro.hpp"
struct MacroActionInfo {
using TCreateMethod = std::shared_ptr<MacroAction> (*)();
using TCreateMethod = std::shared_ptr<MacroAction> (*)(Macro *m);
using TCreateWidgetMethod = QWidget *(*)(QWidget *parent,
std::shared_ptr<MacroAction>);
TCreateMethod _createFunc = nullptr;
@@ -14,7 +14,8 @@ class MacroActionFactory {
public:
MacroActionFactory() = delete;
static bool Register(const std::string &id, MacroActionInfo);
static std::shared_ptr<MacroAction> Create(const std::string &id);
static std::shared_ptr<MacroAction> Create(const std::string &id,
Macro *m);
static QWidget *CreateWidget(const std::string &id, QWidget *parent,
std::shared_ptr<MacroAction> action);
static auto GetActionTypes() { return _methods; }
@@ -33,6 +34,7 @@ public:
std::shared_ptr<MacroAction> * = nullptr,
const std::string &id = "scene_switch");
void UpdateEntryData(const std::string &id);
void SetEntryData(std::shared_ptr<MacroAction> *);
private slots:
void ActionSelectionChanged(const QString &text);

View File

@@ -1,8 +1,9 @@
#pragma once
#include <QSpinBox>
#include <QPlainTextEdit>
#include "macro-action-edit.hpp"
#include "file-selection.hpp"
#include "resizing-text-edit.hpp"
#include <QSpinBox>
enum class FileAction {
WRITE,
@@ -11,15 +12,16 @@ enum class FileAction {
class MacroActionFile : public MacroAction {
public:
MacroActionFile(Macro *m) : MacroAction(m) {}
bool PerformAction();
void LogAction();
bool Save(obs_data_t *obj);
bool Load(obs_data_t *obj);
std::string GetShortDesc();
std::string GetId() { return id; };
static std::shared_ptr<MacroAction> Create()
static std::shared_ptr<MacroAction> Create(Macro *m)
{
return std::make_shared<MacroActionFile>();
return std::make_shared<MacroActionFile>(m);
}
std::string _file = obs_module_text("AdvSceneSwitcher.enterPath");
@@ -56,7 +58,7 @@ signals:
protected:
FileSelection *_filePath;
QPlainTextEdit *_text;
ResizingPlainTextEdit *_text;
QComboBox *_actions;
std::shared_ptr<MacroActionFile> _entryData;

View File

@@ -1,7 +1,8 @@
#pragma once
#include <QSpinBox>
#include <QPlainTextEdit>
#include "macro-action-edit.hpp"
#include "resizing-text-edit.hpp"
#include <QSpinBox>
enum class FilterAction {
ENABLE,
@@ -11,15 +12,16 @@ enum class FilterAction {
class MacroActionFilter : public MacroAction {
public:
MacroActionFilter(Macro *m) : MacroAction(m) {}
bool PerformAction();
void LogAction();
bool Save(obs_data_t *obj);
bool Load(obs_data_t *obj);
std::string GetShortDesc();
std::string GetId() { return id; };
static std::shared_ptr<MacroAction> Create()
static std::shared_ptr<MacroAction> Create(Macro *m)
{
return std::make_shared<MacroActionFilter>();
return std::make_shared<MacroActionFilter>(m);
}
OBSWeakSource _source;
@@ -62,7 +64,7 @@ protected:
QComboBox *_filters;
QComboBox *_actions;
QPushButton *_getSettings;
QPlainTextEdit *_settings;
ResizingPlainTextEdit *_settings;
std::shared_ptr<MacroActionFilter> _entryData;
private:

View File

@@ -8,14 +8,15 @@
class MacroActionHotkey : public MacroAction {
public:
MacroActionHotkey(Macro *m) : MacroAction(m) {}
bool PerformAction();
void LogAction();
bool Save(obs_data_t *obj);
bool Load(obs_data_t *obj);
std::string GetId() { return id; };
static std::shared_ptr<MacroAction> Create()
static std::shared_ptr<MacroAction> Create(Macro *m)
{
return std::make_shared<MacroActionHotkey>();
return std::make_shared<MacroActionHotkey>(m);
}
OBSWeakSource _HotkeySource;

View File

@@ -9,19 +9,21 @@ enum class PerformMacroAction {
UNPAUSE,
RESET_COUNTER,
RUN,
STOP,
};
class MacroActionMacro : public MacroRefAction {
public:
MacroActionMacro(Macro *m) : MacroRefAction(m) {}
bool PerformAction();
void LogAction();
bool Save(obs_data_t *obj);
bool Load(obs_data_t *obj);
std::string GetShortDesc();
std::string GetId() { return id; };
static std::shared_ptr<MacroAction> Create()
static std::shared_ptr<MacroAction> Create(Macro *m)
{
return std::make_shared<MacroActionMacro>();
return std::make_shared<MacroActionMacro>(m);
}
PerformMacroAction _action = PerformMacroAction::PAUSE;

View File

@@ -15,15 +15,16 @@ enum class MediaAction {
class MacroActionMedia : public MacroAction {
public:
MacroActionMedia(Macro *m) : MacroAction(m) {}
bool PerformAction();
void LogAction();
bool Save(obs_data_t *obj);
bool Load(obs_data_t *obj);
std::string GetShortDesc();
std::string GetId() { return id; };
static std::shared_ptr<MacroAction> Create()
static std::shared_ptr<MacroAction> Create(Macro *m)
{
return std::make_shared<MacroActionMedia>();
return std::make_shared<MacroActionMedia>(m);
}
OBSWeakSource _mediaSource;

View File

@@ -13,14 +13,15 @@ enum class PluginStateAction {
class MacroActionPluginState : public MacroAction {
public:
MacroActionPluginState(Macro *m) : MacroAction(m) {}
bool PerformAction();
void LogAction();
bool Save(obs_data_t *obj);
bool Load(obs_data_t *obj);
std::string GetId() { return id; };
static std::shared_ptr<MacroAction> Create()
static std::shared_ptr<MacroAction> Create(Macro *m)
{
return std::make_shared<MacroActionPluginState>();
return std::make_shared<MacroActionPluginState>(m);
}
PluginStateAction _action = PluginStateAction::STOP;

View File

@@ -4,15 +4,16 @@
class MacroActionPreviewScene : public MacroAction {
public:
MacroActionPreviewScene(Macro *m) : MacroAction(m) {}
bool PerformAction();
void LogAction();
bool Save(obs_data_t *obj);
bool Load(obs_data_t *obj);
std::string GetShortDesc();
std::string GetId() { return id; };
static std::shared_ptr<MacroAction> Create()
static std::shared_ptr<MacroAction> Create(Macro *m)
{
return std::make_shared<MacroActionPreviewScene>();
return std::make_shared<MacroActionPreviewScene>(m);
}
SceneSelection _scene;

View File

@@ -3,15 +3,16 @@
class MacroActionProfile : public MacroAction {
public:
MacroActionProfile(Macro *m) : MacroAction(m) {}
bool PerformAction();
void LogAction();
bool Save(obs_data_t *obj);
bool Load(obs_data_t *obj);
std::string GetShortDesc();
std::string GetId() { return id; };
static std::shared_ptr<MacroAction> Create()
static std::shared_ptr<MacroAction> Create(Macro *m)
{
return std::make_shared<MacroActionProfile>();
return std::make_shared<MacroActionProfile>(m);
}
std::string _profile;

View File

@@ -4,19 +4,19 @@
#include <QPushButton>
#include <QListWidget>
#include <QDialog>
#include <unordered_map>
class MacroActionRandom : public MultiMacroRefAction {
public:
MacroActionRandom(Macro *m) : MultiMacroRefAction(m) {}
bool PerformAction();
void LogAction();
bool Save(obs_data_t *obj);
bool Load(obs_data_t *obj);
std::string GetId() { return id; };
static std::shared_ptr<MacroAction> Create()
static std::shared_ptr<MacroAction> Create(Macro *m)
{
return std::make_shared<MacroActionRandom>();
return std::make_shared<MacroActionRandom>(m);
}
// TODO: add weights to each macro ...
@@ -28,17 +28,6 @@ private:
static const std::string id;
};
class MacroDialog : public QDialog {
Q_OBJECT
public:
MacroDialog(QWidget *parent);
static bool AskForMacro(QWidget *parent, std::string &macroName);
private:
MacroSelection *_macroSelection;
};
class MacroActionRandomEdit : public QWidget {
Q_OBJECT

View File

@@ -13,14 +13,15 @@ enum class RecordAction {
class MacroActionRecord : public MacroAction {
public:
MacroActionRecord(Macro *m) : MacroAction(m) {}
bool PerformAction();
void LogAction();
bool Save(obs_data_t *obj);
bool Load(obs_data_t *obj);
std::string GetId() { return id; };
static std::shared_ptr<MacroAction> Create()
static std::shared_ptr<MacroAction> Create(Macro *m)
{
return std::make_shared<MacroActionRecord>();
return std::make_shared<MacroActionRecord>(m);
}
RecordAction _action = RecordAction::STOP;

View File

@@ -14,14 +14,15 @@ enum class ReplayBufferAction {
class MacroActionReplayBuffer : public MacroAction {
public:
MacroActionReplayBuffer(Macro *m) : MacroAction(m) {}
bool PerformAction();
void LogAction();
bool Save(obs_data_t *obj);
bool Load(obs_data_t *obj);
std::string GetId() { return id; };
static std::shared_ptr<MacroAction> Create()
static std::shared_ptr<MacroAction> Create(Macro *m)
{
return std::make_shared<MacroActionReplayBuffer>();
return std::make_shared<MacroActionReplayBuffer>(m);
}
ReplayBufferAction _action = ReplayBufferAction::STOP;

View File

@@ -9,15 +9,16 @@
class MacroActionRun : public MacroAction {
public:
MacroActionRun(Macro *m) : MacroAction(m) {}
bool PerformAction();
void LogAction();
bool Save(obs_data_t *obj);
bool Load(obs_data_t *obj);
std::string GetShortDesc();
std::string GetId() { return id; };
static std::shared_ptr<MacroAction> Create()
static std::shared_ptr<MacroAction> Create(Macro *m)
{
return std::make_shared<MacroActionRun>();
return std::make_shared<MacroActionRun>(m);
}
std::string _path = obs_module_text("AdvSceneSwitcher.enterPath");
@@ -49,6 +50,7 @@ private slots:
void RemoveArg();
void ArgUp();
void ArgDown();
void ArgItemClicked(QListWidgetItem *);
signals:
void HeaderInfoChanged(const QString &);

View File

@@ -3,15 +3,16 @@
class MacroActionSceneCollection : public MacroAction {
public:
MacroActionSceneCollection(Macro *m) : MacroAction(m) {}
bool PerformAction();
void LogAction();
bool Save(obs_data_t *obj);
bool Load(obs_data_t *obj);
std::string GetShortDesc();
std::string GetId() { return id; };
static std::shared_ptr<MacroAction> Create()
static std::shared_ptr<MacroAction> Create(Macro *m)
{
return std::make_shared<MacroActionSceneCollection>();
return std::make_shared<MacroActionSceneCollection>(m);
}
std::string _sceneCollection;

View File

@@ -15,15 +15,16 @@ enum class SceneOrderAction {
class MacroActionSceneOrder : public MacroAction {
public:
MacroActionSceneOrder(Macro *m) : MacroAction(m) {}
bool PerformAction();
void LogAction();
bool Save(obs_data_t *obj);
bool Load(obs_data_t *obj);
std::string GetShortDesc();
std::string GetId() { return id; };
static std::shared_ptr<MacroAction> Create()
static std::shared_ptr<MacroAction> Create(Macro *m)
{
return std::make_shared<MacroActionSceneOrder>();
return std::make_shared<MacroActionSceneOrder>(m);
}
SceneSelection _scene;

View File

@@ -3,14 +3,15 @@
class MacroActionSceneSwap : public MacroAction {
public:
MacroActionSceneSwap(Macro *m) : MacroAction(m) {}
bool PerformAction();
void LogAction();
bool Save(obs_data_t *obj);
bool Load(obs_data_t *obj);
std::string GetId() { return id; };
static std::shared_ptr<MacroAction> Create()
static std::shared_ptr<MacroAction> Create(Macro *m)
{
return std::make_shared<MacroActionSceneSwap>();
return std::make_shared<MacroActionSceneSwap>(m);
}
private:

View File

@@ -8,6 +8,7 @@
class MacroActionSwitchScene : public MacroAction {
public:
MacroActionSwitchScene(Macro *m) : MacroAction(m) {}
bool PerformAction();
void LogAction();
bool Save(obs_data_t *obj);
@@ -15,9 +16,9 @@ public:
std::string GetShortDesc();
std::string GetId() { return id; };
static std::shared_ptr<MacroAction> Create()
static std::shared_ptr<MacroAction> Create(Macro *m)
{
return std::make_shared<MacroActionSwitchScene>();
return std::make_shared<MacroActionSwitchScene>(m);
}
SceneSelection _scene;
TransitionSelection _transition;

View File

@@ -2,21 +2,22 @@
#include "macro-action-edit.hpp"
#include "scene-selection.hpp"
#include "scene-item-selection.hpp"
#include "resizing-text-edit.hpp"
#include <QSpinBox>
#include <QPlainTextEdit>
class MacroActionSceneTransform : public MacroAction {
public:
MacroActionSceneTransform(Macro *m) : MacroAction(m) {}
bool PerformAction();
void LogAction();
bool Save(obs_data_t *obj);
bool Load(obs_data_t *obj);
std::string GetShortDesc();
std::string GetId() { return id; };
static std::shared_ptr<MacroAction> Create()
static std::shared_ptr<MacroAction> Create(Macro *m)
{
return std::make_shared<MacroActionSceneTransform>();
return std::make_shared<MacroActionSceneTransform>(m);
}
std::string GetSettings();
void SetSettings(std::string &);
@@ -60,7 +61,7 @@ protected:
SceneSelectionWidget *_scenes;
SceneItemSelectionWidget *_sources;
QPushButton *_getSettings;
QPlainTextEdit *_settings;
ResizingPlainTextEdit *_settings;
std::shared_ptr<MacroActionSceneTransform> _entryData;
private:

View File

@@ -17,15 +17,16 @@ enum class SceneItemSourceType {
class MacroActionSceneVisibility : public MacroAction {
public:
MacroActionSceneVisibility(Macro *m) : MacroAction(m) {}
bool PerformAction();
void LogAction();
bool Save(obs_data_t *obj);
bool Load(obs_data_t *obj);
std::string GetShortDesc();
std::string GetId() { return id; };
static std::shared_ptr<MacroAction> Create()
static std::shared_ptr<MacroAction> Create(Macro *m)
{
return std::make_shared<MacroActionSceneVisibility>();
return std::make_shared<MacroActionSceneVisibility>(m);
}
SceneSelection _scene;

View File

@@ -3,15 +3,16 @@
class MacroActionScreenshot : public MacroAction {
public:
MacroActionScreenshot(Macro *m) : MacroAction(m) {}
bool PerformAction();
void LogAction();
bool Save(obs_data_t *obj);
bool Load(obs_data_t *obj);
std::string GetShortDesc();
std::string GetId() { return id; };
static std::shared_ptr<MacroAction> Create()
static std::shared_ptr<MacroAction> Create(Macro *m)
{
return std::make_shared<MacroActionScreenshot>();
return std::make_shared<MacroActionScreenshot>(m);
}
OBSWeakSource _source;

View File

@@ -0,0 +1,78 @@
#pragma once
#include "macro-action-edit.hpp"
#include "macro-selection.hpp"
#include <QPushButton>
#include <QListWidget>
#include <QCheckBox>
#include <QTimer>
class MacroActionSequence : public MultiMacroRefAction {
public:
MacroActionSequence(Macro *m) : MultiMacroRefAction(m) {}
bool PerformAction();
void LogAction();
bool Save(obs_data_t *obj);
bool Load(obs_data_t *obj);
std::string GetId() { return id; };
MacroRef GetNextMacro(bool advance = true);
static std::shared_ptr<MacroAction> Create(Macro *m)
{
return std::make_shared<MacroActionSequence>(m);
}
bool _restart = true;
MacroRef _lastSequenceMacro;
int _lastIdx = -1;
private:
static bool _registered;
static const std::string id;
};
class MacroActionSequenceEdit : public QWidget {
Q_OBJECT
public:
MacroActionSequenceEdit(
QWidget *parent,
std::shared_ptr<MacroActionSequence> entryData = nullptr);
void UpdateEntryData();
static QWidget *Create(QWidget *parent,
std::shared_ptr<MacroAction> action)
{
return new MacroActionSequenceEdit(
parent,
std::dynamic_pointer_cast<MacroActionSequence>(action));
}
private slots:
void MacroRemove(const QString &name);
void MacroRename(const QString &oldName, const QString &newName);
void Add();
void Remove();
void Up();
void Down();
void MacroItemClicked(QListWidgetItem *);
void ContinueFromClicked();
void RestartChanged(int state);
void UpdateStatusLine();
protected:
std::shared_ptr<MacroActionSequence> _entryData;
private:
int FindEntry(const std::string &macro);
void SetMacroListSize();
QListWidget *_macroList;
QPushButton *_add;
QPushButton *_remove;
QPushButton *_up;
QPushButton *_down;
QPushButton *_continueFrom;
QCheckBox *_restart;
QLabel *_statusLine;
QTimer _statusTimer;
bool _loading = true;
};

View File

@@ -1,10 +1,10 @@
#pragma once
#include "macro-action-edit.hpp"
#include "resizing-text-edit.hpp"
#include <QSpinBox>
#include <QLabel>
#include <QPushButton>
#include <QPlainTextEdit>
enum class SourceAction {
ENABLE,
@@ -14,15 +14,16 @@ enum class SourceAction {
class MacroActionSource : public MacroAction {
public:
MacroActionSource(Macro *m) : MacroAction(m) {}
bool PerformAction();
void LogAction();
bool Save(obs_data_t *obj);
bool Load(obs_data_t *obj);
std::string GetShortDesc();
std::string GetId() { return id; };
static std::shared_ptr<MacroAction> Create()
static std::shared_ptr<MacroAction> Create(Macro *m)
{
return std::make_shared<MacroActionSource>();
return std::make_shared<MacroActionSource>(m);
}
OBSWeakSource _source;
@@ -62,7 +63,7 @@ protected:
QComboBox *_sources;
QComboBox *_actions;
QPushButton *_getSettings;
QPlainTextEdit *_settings;
ResizingPlainTextEdit *_settings;
QLabel *_warning;
std::shared_ptr<MacroActionSource> _entryData;

View File

@@ -13,14 +13,15 @@ enum class StreamAction {
class MacroActionStream : public MacroAction {
public:
MacroActionStream(Macro *m) : MacroAction(m) {}
bool PerformAction();
void LogAction();
bool Save(obs_data_t *obj);
bool Load(obs_data_t *obj);
std::string GetId() { return id; };
static std::shared_ptr<MacroAction> Create()
static std::shared_ptr<MacroAction> Create(Macro *m)
{
return std::make_shared<MacroActionStream>();
return std::make_shared<MacroActionStream>(m);
}
StreamAction _action = StreamAction::STOP;

View File

@@ -5,14 +5,15 @@
class MacroActionSystray : public MacroAction {
public:
MacroActionSystray(Macro *m) : MacroAction(m) {}
bool PerformAction();
void LogAction();
bool Save(obs_data_t *obj);
bool Load(obs_data_t *obj);
std::string GetId() { return id; };
static std::shared_ptr<MacroAction> Create()
static std::shared_ptr<MacroAction> Create(Macro *m)
{
return std::make_shared<MacroActionSystray>();
return std::make_shared<MacroActionSystray>(m);
}
std::string _msg = "";

View File

@@ -15,15 +15,16 @@ enum class TimerAction {
class MacroActionTimer : public MacroRefAction {
public:
MacroActionTimer(Macro *m) : MacroRefAction(m) {}
bool PerformAction();
void LogAction();
bool Save(obs_data_t *obj);
bool Load(obs_data_t *obj);
std::string GetShortDesc();
std::string GetId() { return id; };
static std::shared_ptr<MacroAction> Create()
static std::shared_ptr<MacroAction> Create(Macro *m)
{
return std::make_shared<MacroActionTimer>();
return std::make_shared<MacroActionTimer>(m);
}
Duration _duration;
TimerAction _actionType = TimerAction::PAUSE;

View File

@@ -8,15 +8,16 @@
class MacroActionTransition : public MacroAction {
public:
MacroActionTransition(Macro *m) : MacroAction(m) {}
bool PerformAction();
void LogAction();
bool Save(obs_data_t *obj);
bool Load(obs_data_t *obj);
std::string GetShortDesc();
std::string GetId() { return id; };
static std::shared_ptr<MacroAction> Create()
static std::shared_ptr<MacroAction> Create(Macro *m)
{
return std::make_shared<MacroActionTransition>();
return std::make_shared<MacroActionTransition>(m);
}
bool _setDuration = true;

View File

@@ -13,14 +13,15 @@ enum class VCamAction {
class MacroActionVCam : public MacroAction {
public:
MacroActionVCam(Macro *m) : MacroAction(m) {}
bool PerformAction();
void LogAction();
bool Save(obs_data_t *obj);
bool Load(obs_data_t *obj);
std::string GetId() { return id; };
static std::shared_ptr<MacroAction> Create()
static std::shared_ptr<MacroAction> Create(Macro *m)
{
return std::make_shared<MacroActionVCam>();
return std::make_shared<MacroActionVCam>(m);
}
VCamAction _action = VCamAction::STOP;

View File

@@ -12,13 +12,14 @@ enum class WaitType {
class MacroActionWait : public MacroAction {
public:
MacroActionWait(Macro *m) : MacroAction(m) {}
bool PerformAction();
bool Save(obs_data_t *obj);
bool Load(obs_data_t *obj);
std::string GetId() { return id; };
static std::shared_ptr<MacroAction> Create()
static std::shared_ptr<MacroAction> Create(Macro *m)
{
return std::make_shared<MacroActionWait>();
return std::make_shared<MacroActionWait>(m);
}
Duration _duration;
Duration _duration2;

View File

@@ -6,24 +6,39 @@
#include <QComboBox>
#include <chrono>
enum class AudioCondition {
enum class AudioConditionCheckType {
OUTPUT_VOLUME,
CONFIGURED_VOLUME,
};
enum class AudioOutputCondition {
ABOVE,
BELOW,
// TODO: To be removed
MUTE,
UNMUTE,
};
enum class AudioVolumeCondition {
ABOVE,
EXACT,
BELOW,
MUTE,
UNMUTE,
};
class MacroConditionAudio : public MacroCondition {
public:
MacroConditionAudio(Macro *m) : MacroCondition(m) {}
~MacroConditionAudio();
bool CheckCondition();
bool Save(obs_data_t *obj);
bool Load(obs_data_t *obj);
std::string GetShortDesc();
std::string GetId() { return id; };
static std::shared_ptr<MacroCondition> Create()
static std::shared_ptr<MacroCondition> Create(Macro *m)
{
return std::make_shared<MacroConditionAudio>();
return std::make_shared<MacroConditionAudio>(m);
}
static void SetVolumeLevel(void *data,
const float magnitude[MAX_AUDIO_CHANNELS],
@@ -33,10 +48,16 @@ public:
OBSWeakSource _audioSource;
int _volume = 0;
AudioCondition _condition = AudioCondition::ABOVE;
AudioConditionCheckType _checkType =
AudioConditionCheckType::OUTPUT_VOLUME;
AudioOutputCondition _outputCondition = AudioOutputCondition::ABOVE;
AudioVolumeCondition _volumeCondition = AudioVolumeCondition::ABOVE;
obs_volmeter_t *_volmeter = nullptr;
private:
bool CheckOutputCondition();
bool CheckVolumeCondition();
float _peak = -std::numeric_limits<float>::infinity();
static bool _registered;
static const std::string id;
@@ -63,10 +84,13 @@ private slots:
void SourceChanged(const QString &text);
void VolumeThresholdChanged(int vol);
void ConditionChanged(int cond);
void CheckTypeChanged(int cond);
signals:
void HeaderInfoChanged(const QString &);
protected:
QComboBox *_checkTypes;
QComboBox *_audioSources;
QComboBox *_condition;
QSpinBox *_volume;

View File

@@ -14,13 +14,14 @@ enum class CursorCondition {
class MacroConditionCursor : public MacroCondition {
public:
MacroConditionCursor(Macro *m) : MacroCondition(m) {}
bool CheckCondition();
bool Save(obs_data_t *obj);
bool Load(obs_data_t *obj);
std::string GetId() { return id; };
static std::shared_ptr<MacroCondition> Create()
static std::shared_ptr<MacroCondition> Create(Macro *m)
{
return std::make_shared<MacroConditionCursor>();
return std::make_shared<MacroConditionCursor>(m);
}
CursorCondition _condition = CursorCondition::REGION;

View File

@@ -13,27 +13,44 @@ enum class DateCondition {
BETWEEN,
};
enum class DayOfWeekSelection {
ANY = 0,
MONDAY,
TUESDAY,
WEDNESDAY,
THURSDAY,
FRIDAY,
SATURDAY,
SUNDAY,
};
class MacroConditionDate : public MacroCondition {
public:
MacroConditionDate(Macro *m) : MacroCondition(m) {}
bool CheckCondition();
bool Save(obs_data_t *obj);
bool Load(obs_data_t *obj);
std::string GetShortDesc();
std::string GetId() { return id; };
static std::shared_ptr<MacroCondition> Create()
static std::shared_ptr<MacroCondition> Create(Macro *m)
{
return std::make_shared<MacroConditionDate>();
return std::make_shared<MacroConditionDate>(m);
}
QDateTime _dateTime;
QDateTime _dateTime2;
DayOfWeekSelection _dayOfWeek = DayOfWeekSelection::ANY;
QDateTime _dateTime = QDateTime::currentDateTime();
QDateTime _dateTime2 = QDateTime::currentDateTime();
bool _ignoreDate = false;
bool _ignoreTime = false;
bool _repeat = false;
Duration _duration;
DateCondition _condition = DateCondition::AT;
bool _dayOfWeekCheck = false;
private:
bool checkDayOfWeek();
bool checkRegularDate();
static bool _registered;
static const std::string id;
};
@@ -55,28 +72,45 @@ public:
}
private slots:
void DayOfWeekChanged(int day);
void ConditionChanged(int cond);
void DateTimeChanged(const QDateTime &datetime);
void DateTime2Changed(const QDateTime &datetime);
void DateChanged(const QDate &date);
void TimeChanged(const QTime &time);
void Date2Changed(const QDate &date);
void Time2Changed(const QTime &time);
void IgnoreDateChanged(int state);
void IgnoreTimeChanged(int state);
void RepeatChanged(int state);
void DurationChanged(double seconds);
void DurationUnitChanged(DurationUnit unit);
void AdvancedSettingsToggleClicked();
signals:
void HeaderInfoChanged(const QString &);
protected:
QComboBox *_dayOfWeek;
QTimeEdit *_weekTime;
QComboBox *_condition;
QDateTimeEdit *_dateTime;
QDateTimeEdit *_dateTime2;
QDateEdit *_date;
QTimeEdit *_time;
QLabel *_separator;
QDateEdit *_date2;
QTimeEdit *_time2;
QCheckBox *_ignoreDate;
QCheckBox *_ignoreTime;
QCheckBox *_repeat;
DurationSelection *_duration;
QPushButton *_advancedSettingsTooggle;
QHBoxLayout *_simpleLayout;
QHBoxLayout *_advancedLayout;
QHBoxLayout *_repeatLayout;
std::shared_ptr<MacroConditionDate> _entryData;
private:
void SetWidgetStatus();
void ShowSecondDateSelection(bool visible);
bool _loading = true;
};

View File

@@ -2,7 +2,7 @@
#include "macro.hpp"
struct MacroConditionInfo {
using TCreateMethod = std::shared_ptr<MacroCondition> (*)();
using TCreateMethod = std::shared_ptr<MacroCondition> (*)(Macro *m);
using TCreateWidgetMethod =
QWidget *(*)(QWidget *parent, std::shared_ptr<MacroCondition>);
TCreateMethod _createFunc = nullptr;
@@ -15,7 +15,8 @@ class MacroConditionFactory {
public:
MacroConditionFactory() = delete;
static bool Register(const std::string &, MacroConditionInfo);
static std::shared_ptr<MacroCondition> Create(const std::string &);
static std::shared_ptr<MacroCondition> Create(const std::string &,
Macro *m);
static QWidget *CreateWidget(const std::string &id, QWidget *parent,
std::shared_ptr<MacroCondition>);
static auto GetConditionTypes() { return _methods; }
@@ -37,6 +38,7 @@ public:
bool IsRootNode();
void SetRootNode(bool);
void UpdateEntryData(const std::string &id);
void SetEntryData(std::shared_ptr<MacroCondition> *);
private slots:
void LogicSelectionChanged(int idx);

View File

@@ -1,13 +1,13 @@
#pragma once
#include "macro.hpp"
#include "file-selection.hpp"
#include "resizing-text-edit.hpp"
#include <QWidget>
#include <QComboBox>
#include <QDateTime>
#include <QLineEdit>
#include <QPushButton>
#include <QPlainTextEdit>
#include <QCheckBox>
enum class FileType {
@@ -17,14 +17,15 @@ enum class FileType {
class MacroConditionFile : public MacroCondition {
public:
MacroConditionFile(Macro *m) : MacroCondition(m) {}
bool CheckCondition();
bool Save(obs_data_t *obj);
bool Load(obs_data_t *obj);
std::string GetShortDesc();
std::string GetId() { return id; };
static std::shared_ptr<MacroCondition> Create()
static std::shared_ptr<MacroCondition> Create(Macro *m)
{
return std::make_shared<MacroConditionFile>();
return std::make_shared<MacroConditionFile>(m);
}
std::string _file = obs_module_text("AdvSceneSwitcher.enterPath");
@@ -74,7 +75,7 @@ signals:
protected:
QComboBox *_fileType;
FileSelection *_filePath;
QPlainTextEdit *_matchText;
ResizingPlainTextEdit *_matchText;
QCheckBox *_useRegex;
QCheckBox *_checkModificationDate;
QCheckBox *_checkFileContent;

View File

@@ -1,9 +1,9 @@
#pragma once
#include "macro.hpp"
#include "resizing-text-edit.hpp"
#include <QComboBox>
#include <QPushButton>
#include <QPlainTextEdit>
#include <QCheckBox>
enum class FilterCondition {
@@ -14,14 +14,15 @@ enum class FilterCondition {
class MacroConditionFilter : public MacroCondition {
public:
MacroConditionFilter(Macro *m) : MacroCondition(m) {}
bool CheckCondition();
bool Save(obs_data_t *obj);
bool Load(obs_data_t *obj);
std::string GetShortDesc();
std::string GetId() { return id; };
static std::shared_ptr<MacroCondition> Create()
static std::shared_ptr<MacroCondition> Create(Macro *m)
{
return std::make_shared<MacroConditionFilter>();
return std::make_shared<MacroConditionFilter>(m);
}
OBSWeakSource _source;
@@ -66,7 +67,7 @@ protected:
QComboBox *_filters;
QComboBox *_conditions;
QPushButton *_getSettings;
QPlainTextEdit *_settings;
ResizingPlainTextEdit *_settings;
QCheckBox *_regex;
std::shared_ptr<MacroConditionFilter> _entryData;

View File

@@ -5,15 +5,15 @@
class MacroConditionHotkey : public MacroCondition {
public:
MacroConditionHotkey();
MacroConditionHotkey(Macro *m);
~MacroConditionHotkey();
bool CheckCondition();
bool Save(obs_data_t *obj);
bool Load(obs_data_t *obj);
std::string GetId() { return id; };
static std::shared_ptr<MacroCondition> Create()
static std::shared_ptr<MacroCondition> Create(Macro *m)
{
return std::make_shared<MacroConditionHotkey>();
return std::make_shared<MacroConditionHotkey>(m);
}
void SetPressed() { _pressed = true; }

View File

@@ -7,13 +7,14 @@
class MacroConditionIdle : public MacroCondition {
public:
MacroConditionIdle(Macro *m) : MacroCondition(m) {}
bool CheckCondition();
bool Save(obs_data_t *obj);
bool Load(obs_data_t *obj);
std::string GetId() { return id; };
static std::shared_ptr<MacroCondition> Create()
static std::shared_ptr<MacroCondition> Create(Macro *m)
{
return std::make_shared<MacroConditionIdle>();
return std::make_shared<MacroConditionIdle>(m);
}
Duration _duration;

View File

@@ -21,14 +21,15 @@ enum class CounterCondition {
class MacroConditionMacro : public MacroRefCondition {
public:
MacroConditionMacro(Macro *m) : MacroRefCondition(m) {}
bool CheckCondition();
bool Save(obs_data_t *obj);
bool Load(obs_data_t *obj);
std::string GetShortDesc();
std::string GetId() { return id; };
static std::shared_ptr<MacroCondition> Create()
static std::shared_ptr<MacroCondition> Create(Macro *m)
{
return std::make_shared<MacroConditionMacro>();
return std::make_shared<MacroConditionMacro>(m);
}
MacroConditionMacroType _type = MacroConditionMacroType::STATE;

View File

@@ -43,15 +43,16 @@ enum class MediaSourceType {
class MacroConditionMedia : public MacroCondition {
public:
MacroConditionMedia(Macro *m) : MacroCondition(m) {}
~MacroConditionMedia();
bool CheckCondition();
bool Save(obs_data_t *obj);
bool Load(obs_data_t *obj);
std::string GetShortDesc();
std::string GetId() { return id; };
static std::shared_ptr<MacroCondition> Create()
static std::shared_ptr<MacroCondition> Create(Macro *m)
{
return std::make_shared<MacroConditionMedia>();
return std::make_shared<MacroConditionMedia>(m);
}
void ClearSignalHandler();
void ResetSignalHandler();

View File

@@ -0,0 +1,118 @@
#pragma once
#include "macro.hpp"
#include <QWidget>
#include <QComboBox>
#include <QDoubleSpinBox>
#include <util/platform.h>
enum class StatsType {
FPS,
CPU_USAGE,
DISK_USAGE, // not implemented
MEM_USAGE,
AVG_FRAMETIME,
RENDER_LAG,
ENCODE_LAG,
STREAM_DROPPED_FRAMES,
STREAM_BITRATE,
STREAM_MB_SENT,
RECORDING_DROPPED_FRAMES, // not sure if this makes sense
RECORDING_BITRATE,
RECORDING_MB_SENT,
};
enum class StatsCondition {
ABOVE,
EQUALS,
BELOW,
};
class MacroConditionStats : public MacroCondition {
public:
MacroConditionStats(Macro *m);
~MacroConditionStats();
bool CheckCondition();
bool Save(obs_data_t *obj);
bool Load(obs_data_t *obj);
std::string GetShortDesc();
std::string GetId() { return id; };
static std::shared_ptr<MacroCondition> Create(Macro *m)
{
return std::make_shared<MacroConditionStats>(m);
}
double _value = 0;
StatsType _type = StatsType::FPS;
StatsCondition _condition = StatsCondition::ABOVE;
private:
bool CheckFPS();
bool CheckCPU();
bool CheckMemory();
bool CheckAvgFrametime();
bool CheckRenderLag();
bool CheckEncodeLag();
bool CheckStreamDroppedFrames();
bool CheckStreamBitrate();
bool CheckStreamMBSent();
bool CheckRecordingDroppedFrames();
bool CheckRecordingBitrate();
bool CheckRecordingMBSent();
os_cpu_usage_info_t *_cpu_info = nullptr;
uint32_t _first_encoded = 0xFFFFFFFF;
uint32_t _first_skipped = 0xFFFFFFFF;
uint32_t _first_rendered = 0xFFFFFFFF;
uint32_t _first_lagged = 0xFFFFFFFF;
struct OutputInfo {
void Update(obs_output_t *output);
uint64_t lastBytesSent = 0;
uint64_t lastBytesSentTime = 0;
int first_total = 0;
int first_dropped = 0;
double dropped_relative = 0.0;
long double kbps = 0.0l;
};
OutputInfo _streamInfo;
OutputInfo _recordingInfo;
static bool _registered;
static const std::string id;
};
class MacroConditionStatsEdit : public QWidget {
Q_OBJECT
public:
MacroConditionStatsEdit(
QWidget *parent,
std::shared_ptr<MacroConditionStats> cond = nullptr);
void UpdateEntryData();
static QWidget *Create(QWidget *parent,
std::shared_ptr<MacroCondition> cond)
{
return new MacroConditionStatsEdit(
parent,
std::dynamic_pointer_cast<MacroConditionStats>(cond));
}
private slots:
void ValueChanged(double value);
void StatsTypeChanged(int type);
void ConditionChanged(int cond);
signals:
void HeaderInfoChanged(const QString &);
protected:
QComboBox *_stats;
QComboBox *_condition;
QDoubleSpinBox *_value;
std::shared_ptr<MacroConditionStats> _entryData;
private:
void SetWidgetVisibility();
bool _loading = true;
};

View File

@@ -4,22 +4,25 @@
#include <QComboBox>
enum class PluginStateCondition {
SCENESWITCHED,
SCENE_SWITCHED,
RUNNING,
SHUTDOWN,
};
class MacroConditionPluginState : public MacroCondition {
public:
MacroConditionPluginState(Macro *m) : MacroCondition(m) {}
~MacroConditionPluginState();
bool CheckCondition();
bool Save(obs_data_t *obj);
bool Load(obs_data_t *obj);
std::string GetId() { return id; };
static std::shared_ptr<MacroCondition> Create()
static std::shared_ptr<MacroCondition> Create(Macro *m)
{
return std::make_shared<MacroConditionPluginState>();
return std::make_shared<MacroConditionPluginState>(m);
}
PluginStateCondition _condition = PluginStateCondition::SCENESWITCHED;
PluginStateCondition _condition = PluginStateCondition::SCENE_SWITCHED;
private:
static bool _registered;

View File

@@ -6,14 +6,15 @@
class MacroConditionProcess : public MacroCondition {
public:
MacroConditionProcess(Macro *m) : MacroCondition(m) {}
bool CheckCondition();
bool Save(obs_data_t *obj);
bool Load(obs_data_t *obj);
std::string GetShortDesc();
std::string GetId() { return id; };
static std::shared_ptr<MacroCondition> Create()
static std::shared_ptr<MacroCondition> Create(Macro *m)
{
return std::make_shared<MacroConditionProcess>();
return std::make_shared<MacroConditionProcess>(m);
}
std::string _process;

View File

@@ -11,13 +11,14 @@ enum class RecordState {
class MacroConditionRecord : public MacroCondition {
public:
MacroConditionRecord(Macro *m) : MacroCondition(m) {}
bool CheckCondition();
bool Save(obs_data_t *obj);
bool Load(obs_data_t *obj);
std::string GetId() { return id; };
static std::shared_ptr<MacroCondition> Create()
static std::shared_ptr<MacroCondition> Create(Macro *m)
{
return std::make_shared<MacroConditionRecord>();
return std::make_shared<MacroConditionRecord>(m);
}
RecordState _recordState = RecordState::STOP;

View File

@@ -13,13 +13,14 @@ enum class ReplayBufferState {
class MacroConditionReplayBuffer : public MacroCondition {
public:
MacroConditionReplayBuffer(Macro *m) : MacroCondition(m) {}
bool CheckCondition();
bool Save(obs_data_t *obj);
bool Load(obs_data_t *obj);
std::string GetId() { return id; };
static std::shared_ptr<MacroCondition> Create()
static std::shared_ptr<MacroCondition> Create(Macro *m)
{
return std::make_shared<MacroConditionReplayBuffer>();
return std::make_shared<MacroConditionReplayBuffer>(m);
}
ReplayBufferState _state = ReplayBufferState::STOP;

View File

@@ -14,14 +14,15 @@ enum class SceneOrderCondition {
class MacroConditionSceneOrder : public MacroCondition {
public:
MacroConditionSceneOrder(Macro *m) : MacroCondition(m) {}
bool CheckCondition();
bool Save(obs_data_t *obj);
bool Load(obs_data_t *obj);
std::string GetShortDesc();
std::string GetId() { return id; };
static std::shared_ptr<MacroCondition> Create()
static std::shared_ptr<MacroCondition> Create(Macro *m)
{
return std::make_shared<MacroConditionSceneOrder>();
return std::make_shared<MacroConditionSceneOrder>(m);
}
SceneSelection _scene;

View File

@@ -2,21 +2,22 @@
#include "macro.hpp"
#include "scene-selection.hpp"
#include "scene-item-selection.hpp"
#include "resizing-text-edit.hpp"
#include <QSpinBox>
#include <QPlainTextEdit>
#include <QCheckBox>
class MacroConditionSceneTransform : public MacroCondition {
public:
MacroConditionSceneTransform(Macro *m) : MacroCondition(m) {}
bool CheckCondition();
bool Save(obs_data_t *obj);
bool Load(obs_data_t *obj);
std::string GetShortDesc();
std::string GetId() { return id; };
static std::shared_ptr<MacroCondition> Create()
static std::shared_ptr<MacroCondition> Create(Macro *m)
{
return std::make_shared<MacroConditionSceneTransform>();
return std::make_shared<MacroConditionSceneTransform>(m);
}
SceneSelection _scene;
@@ -60,7 +61,7 @@ protected:
SceneSelectionWidget *_scenes;
SceneItemSelectionWidget *_sources;
QPushButton *_getSettings;
QPlainTextEdit *_settings;
ResizingPlainTextEdit *_settings;
QCheckBox *_regex;
std::shared_ptr<MacroConditionSceneTransform> _entryData;

View File

@@ -12,14 +12,15 @@ enum class SceneVisibilityCondition {
class MacroConditionSceneVisibility : public MacroCondition {
public:
MacroConditionSceneVisibility(Macro *m) : MacroCondition(m) {}
bool CheckCondition();
bool Save(obs_data_t *obj);
bool Load(obs_data_t *obj);
std::string GetShortDesc();
std::string GetId() { return id; };
static std::shared_ptr<MacroCondition> Create()
static std::shared_ptr<MacroCondition> Create(Macro *m)
{
return std::make_shared<MacroConditionSceneVisibility>();
return std::make_shared<MacroConditionSceneVisibility>(m);
}
SceneSelection _scene;

View File

@@ -15,22 +15,23 @@ enum class SceneType {
class MacroConditionScene : public MacroCondition {
public:
MacroConditionScene(Macro *m) : MacroCondition(m) {}
bool CheckCondition();
bool Save(obs_data_t *obj);
bool Load(obs_data_t *obj);
std::string GetShortDesc();
std::string GetId() { return id; };
static std::shared_ptr<MacroCondition> Create()
static std::shared_ptr<MacroCondition> Create(Macro *m)
{
return std::make_shared<MacroConditionScene>();
return std::make_shared<MacroConditionScene>(m);
}
// This option is to be removed in a future version and be replaced by
// transition specific conditions
bool _waitForTransition = true;
SceneSelection _scene;
SceneType _type = SceneType::CURRENT;
// During a transition "current" scene could either stand for the scene
// being transitioned to or the scene still being transitioned away
// from.
bool _useTransitionTargetScene = false;
private:
std::chrono::high_resolution_clock::time_point _lastSceneChangeTime{};
@@ -57,14 +58,14 @@ public:
private slots:
void SceneChanged(const SceneSelection &);
void TypeChanged(int value);
void WaitForTransitionChanged(int state);
void UseTransitionTargetSceneChanged(int state);
signals:
void HeaderInfoChanged(const QString &);
protected:
SceneSelectionWidget *_scenes;
QComboBox *_sceneType;
QCheckBox *_waitForTransition;
QCheckBox *_useTransitionTargetScene;
std::shared_ptr<MacroConditionScene> _entryData;
private:

View File

@@ -1,9 +1,9 @@
#pragma once
#include "macro.hpp"
#include "resizing-text-edit.hpp"
#include <QComboBox>
#include <QPushButton>
#include <QPlainTextEdit>
#include <QCheckBox>
enum class SourceCondition {
@@ -14,14 +14,15 @@ enum class SourceCondition {
class MacroConditionSource : public MacroCondition {
public:
MacroConditionSource(Macro *m) : MacroCondition(m) {}
bool CheckCondition();
bool Save(obs_data_t *obj);
bool Load(obs_data_t *obj);
std::string GetShortDesc();
std::string GetId() { return id; };
static std::shared_ptr<MacroCondition> Create()
static std::shared_ptr<MacroCondition> Create(Macro *m)
{
return std::make_shared<MacroConditionSource>();
return std::make_shared<MacroConditionSource>(m);
}
OBSWeakSource _source = nullptr;
@@ -63,7 +64,7 @@ protected:
QComboBox *_sources;
QComboBox *_conditions;
QPushButton *_getSettings;
QPlainTextEdit *_settings;
ResizingPlainTextEdit *_settings;
QCheckBox *_regex;
std::shared_ptr<MacroConditionSource> _entryData;

View File

@@ -12,13 +12,14 @@ enum class StreamState {
class MacroConditionStream : public MacroCondition {
public:
MacroConditionStream(Macro *m) : MacroCondition(m) {}
bool CheckCondition();
bool Save(obs_data_t *obj);
bool Load(obs_data_t *obj);
std::string GetId() { return id; };
static std::shared_ptr<MacroCondition> Create()
static std::shared_ptr<MacroCondition> Create(Macro *m)
{
return std::make_shared<MacroConditionStream>();
return std::make_shared<MacroConditionStream>(m);
}
StreamState _streamState = StreamState::STOP;

View File

@@ -13,14 +13,15 @@ enum class StudioModeCondition {
class MacroConditionStudioMode : public MacroCondition {
public:
MacroConditionStudioMode(Macro *m) : MacroCondition(m) {}
bool CheckCondition();
bool Save(obs_data_t *obj);
bool Load(obs_data_t *obj);
std::string GetShortDesc();
std::string GetId() { return id; };
static std::shared_ptr<MacroCondition> Create()
static std::shared_ptr<MacroCondition> Create(Macro *m)
{
return std::make_shared<MacroConditionStudioMode>();
return std::make_shared<MacroConditionStudioMode>(m);
}
StudioModeCondition _condition =

View File

@@ -17,13 +17,14 @@ enum class TimerType {
class MacroConditionTimer : public MacroCondition {
public:
MacroConditionTimer(Macro *m) : MacroCondition(m) {}
bool CheckCondition();
bool Save(obs_data_t *obj);
bool Load(obs_data_t *obj);
std::string GetId() { return id; };
static std::shared_ptr<MacroCondition> Create()
static std::shared_ptr<MacroCondition> Create(Macro *m)
{
return std::make_shared<MacroConditionTimer>();
return std::make_shared<MacroConditionTimer>(m);
}
void Pause();
void Continue();

View File

@@ -18,14 +18,15 @@ enum class TransitionCondition {
class MacroConditionTransition : public MacroCondition {
public:
MacroConditionTransition(Macro *m) : MacroCondition(m) {}
bool CheckCondition();
bool Save(obs_data_t *obj);
bool Load(obs_data_t *obj);
std::string GetShortDesc();
std::string GetId() { return id; };
static std::shared_ptr<MacroCondition> Create()
static std::shared_ptr<MacroCondition> Create(Macro *m)
{
return std::make_shared<MacroConditionTransition>();
return std::make_shared<MacroConditionTransition>(m);
}
void ConnectToTransitionSignals();
void DisconnectTransitionSignals();

View File

@@ -12,13 +12,14 @@ enum class VCamState {
class MacroConditionVCam : public MacroCondition {
public:
MacroConditionVCam(Macro *m) : MacroCondition(m) {}
bool CheckCondition();
bool Save(obs_data_t *obj);
bool Load(obs_data_t *obj);
std::string GetId() { return id; };
static std::shared_ptr<MacroCondition> Create()
static std::shared_ptr<MacroCondition> Create(Macro *m)
{
return std::make_shared<MacroConditionVCam>();
return std::make_shared<MacroConditionVCam>(m);
}
VCamState _state = VCamState::STOP;

View File

@@ -6,14 +6,15 @@
class MacroConditionWindow : public MacroCondition {
public:
MacroConditionWindow(Macro *m) : MacroCondition(m) {}
bool CheckCondition();
bool Save(obs_data_t *obj);
bool Load(obs_data_t *obj);
std::string GetShortDesc();
std::string GetId() { return id; };
static std::shared_ptr<MacroCondition> Create()
static std::shared_ptr<MacroCondition> Create(Macro *m)
{
return std::make_shared<MacroConditionWindow>();
return std::make_shared<MacroConditionWindow>(m);
}
private:

View File

@@ -1,31 +0,0 @@
#pragma once
#include <QFrame>
#include <QPropertyAnimation>
#include <QScrollArea>
#include <QPushButton>
#include <QLayout>
#include <QWidget>
class MacroEntryControls : public QWidget {
Q_OBJECT
public:
explicit MacroEntryControls(const int animationDuration = 300,
QWidget *parent = 0);
void Show(bool visible = true);
signals:
void Add();
void Remove();
void Up();
void Down();
private:
QPushButton *_add;
QPushButton *_remove;
QPushButton *_up;
QPushButton *_down;
QPropertyAnimation *_animation = nullptr;
};

View File

@@ -0,0 +1,24 @@
#pragma once
#include <QLabel>
#include <QCheckBox>
#include <memory>
class Macro;
class MacroListEntryWidget : public QWidget {
Q_OBJECT
public:
MacroListEntryWidget(std::shared_ptr<Macro>, QWidget *parent);
void SetName(const QString &);
void SetMacro(std::shared_ptr<Macro> &);
private slots:
void PauseChanged(int);
private:
QLabel *_name;
QCheckBox *_running;
std::shared_ptr<Macro> _macro;
};

View File

@@ -0,0 +1,25 @@
#pragma once
#include <QWidget>
#include <QScrollArea>
#include <QVBoxLayout>
#include <QLabel>
class MacroSegmentList : public QScrollArea {
Q_OBJECT
public:
MacroSegmentList(QWidget *parent = nullptr);
void SetHelpMsg(const QString &msg);
void SetHelpMsgVisible(bool visible);
QVBoxLayout *ContentLayout() { return _contentLayout; }
signals:
void SelectionChagned(int idx);
protected:
void mousePressEvent(QMouseEvent *event);
private:
QVBoxLayout *_contentLayout;
QLabel *_helpMsg;
};

View File

@@ -1,9 +1,15 @@
#pragma once
#include <QWidget>
#include <QFrame>
#include <QVBoxLayout>
#include <obs.hpp>
class Macro;
class MacroSegment {
public:
MacroSegment(Macro *m) : _macro(m) {}
Macro *GetMacro() { return _macro; }
void SetIndex(int idx) { _idx = idx; }
int GetIndex() { return _idx; }
void SetCollapsed(bool collapsed) { _collapsed = collapsed; }
@@ -16,11 +22,13 @@ public:
protected:
int _idx = 0;
bool _collapsed = false;
private:
Macro *_macro = nullptr;
};
class Section;
class QLabel;
class MacroEntryControls;
class MacroSegmentEdit : public QWidget {
Q_OBJECT
@@ -31,13 +39,10 @@ public:
// list of actions and conditions
void SetFocusPolicyOfWidgets();
void SetCollapsed(bool collapsed);
void SetSelected(bool);
protected slots:
void HeaderInfoChanged(const QString &);
void Add();
void Remove();
void Up();
void Down();
void Collapsed(bool);
signals:
void MacroAdded(const QString &name);
@@ -46,18 +51,15 @@ signals:
void SceneGroupAdded(const QString &name);
void SceneGroupRemoved(const QString &name);
void SceneGroupRenamed(const QString &oldName, const QString newName);
void AddAt(int idx);
void RemoveAt(int idx);
void UpAt(int idx);
void DownAt(int idx);
void SelectionChagned(int idx);
protected:
void enterEvent(QEvent *e);
void leaveEvent(QEvent *e);
void mousePressEvent(QMouseEvent *event);
Section *_section;
QLabel *_headerInfo;
MacroEntryControls *_controls;
QFrame *_frame;
QVBoxLayout *_highLightFrameLayout;
private:
virtual MacroSegment *Data() = 0;

View File

@@ -1,5 +1,6 @@
#pragma once
#include <QComboBox>
#include <QDialog>
class Macro;
@@ -9,9 +10,22 @@ class MacroSelection : public QComboBox {
public:
MacroSelection(QWidget *parent);
void SetCurrentMacro(Macro *);
void HideSelectedMacro(); // Macro currently being edited
void ShowAllMacros();
private slots:
void MacroAdd(const QString &name);
void MacroRemove(const QString &name);
void MacroRename(const QString &oldName, const QString &newName);
};
class MacroSelectionDialog : public QDialog {
Q_OBJECT
public:
MacroSelectionDialog(QWidget *parent);
static bool AskForMacro(QWidget *parent, std::string &macroName);
private:
MacroSelection *_macroSelection;
};

View File

@@ -39,6 +39,7 @@ struct LogicTypeInfo {
class MacroCondition : public MacroSegment {
public:
MacroCondition(Macro *m) : MacroSegment(m) {}
virtual bool CheckCondition() = 0;
virtual bool Save(obs_data_t *obj) = 0;
virtual bool Load(obs_data_t *obj) = 0;
@@ -61,6 +62,7 @@ private:
class MacroAction : public MacroSegment {
public:
MacroAction(Macro *m) : MacroSegment(m) {}
virtual bool PerformAction() = 0;
virtual bool Save(obs_data_t *obj) = 0;
virtual bool Load(obs_data_t *obj) = 0;
@@ -73,8 +75,8 @@ public:
virtual ~Macro();
bool CeckMatch();
bool PerformAction(bool forceParallel = false,
bool ignorePause = false);
bool PerformActions(bool forceParallel = false,
bool ignorePause = false);
bool Matched() { return _matched; }
std::string Name() { return _name; }
void SetName(const std::string &name);
@@ -82,8 +84,11 @@ public:
bool RunInParallel() { return _runInParallel; }
void SetPaused(bool pause = true);
bool Paused() { return _paused; }
void SetMatchOnChange(bool onChange) { _matchOnChange = onChange; }
bool MatchOnChange() { return _matchOnChange; }
int GetCount() { return _count; };
void ResetCount() { _count = 0; };
void Stop() { _stop = true; }
std::deque<std::shared_ptr<MacroCondition>> &Conditions()
{
return _conditions;
@@ -101,6 +106,9 @@ public:
// Helper function for plugin state condition regarding scene change
bool SwitchesScene();
// UI helpers for the macro tab
bool WasExecutedRecently();
private:
void SetupHotkeys();
void ClearHotkeys();
@@ -114,12 +122,17 @@ private:
std::deque<std::shared_ptr<MacroAction>> _actions;
bool _runInParallel = false;
bool _matched = false;
bool _lastMatched = false;
bool _matchOnChange = false;
bool _paused = false;
int _count = 0;
obs_hotkey_id _pauseHotkey = OBS_INVALID_HOTKEY_ID;
obs_hotkey_id _unpauseHotkey = OBS_INVALID_HOTKEY_ID;
obs_hotkey_id _togglePauseHotkey = OBS_INVALID_HOTKEY_ID;
bool _wasExecutedRecently = false;
bool _die = false;
bool _stop = false;
bool _done = true;
std::thread _thread;
@@ -147,18 +160,21 @@ private:
class MacroRefCondition : public MacroCondition {
public:
MacroRefCondition(Macro *m) : MacroCondition(m) {}
void ResolveMacroRef();
MacroRef _macro;
};
class MacroRefAction : public MacroAction {
public:
MacroRefAction(Macro *m) : MacroAction(m) {}
void ResolveMacroRef();
MacroRef _macro;
};
class MultiMacroRefAction : public MacroAction {
public:
MultiMacroRefAction(Macro *m) : MacroAction(m) {}
void ResolveMacroRef();
std::vector<MacroRef> _macros;
};

View File

@@ -0,0 +1,17 @@
#pragma once
#include <QPlainTextEdit>
class ResizingPlainTextEdit : public QPlainTextEdit {
Q_OBJECT
public:
ResizingPlainTextEdit(QWidget *parent, const int scrollAt = 10,
const int minLines = 3,
const int paddingLines = 2);
private slots:
void ResizeTexteditArea();
private:
const int _scrollAt;
const int _minLines;
const int _paddingLines;
};

View File

@@ -4,10 +4,13 @@
#include <QImage>
#include <chrono>
class AdvSSScreenshotObj {
class ScreenshotHelper {
public:
AdvSSScreenshotObj(obs_source_t *source);
~AdvSSScreenshotObj();
ScreenshotHelper() = default;
ScreenshotHelper(obs_source_t *source);
ScreenshotHelper &operator=(const ScreenshotHelper &) = delete;
ScreenshotHelper(const ScreenshotHelper &) = delete;
~ScreenshotHelper();
void Screenshot();
void Download();
@@ -17,7 +20,6 @@ public:
gs_texrender_t *texrender = nullptr;
gs_stagesurf_t *stagesurf = nullptr;
OBSWeakSource weakSource;
std::string path;
QImage image;
uint32_t cx = 0;
uint32_t cy = 0;
@@ -26,4 +28,7 @@ public:
bool done = false;
std::chrono::high_resolution_clock::time_point time;
private:
bool _initDone = false;
};

View File

@@ -14,7 +14,8 @@ public:
explicit Section(const int animationDuration = 300,
QWidget *parent = 0);
void SetContent(QWidget *w, bool collapsed = true);
void SetContent(QWidget *w);
void SetContent(QWidget *w, bool collapsed);
void AddHeaderWidget(QWidget *);
void SetCollapsed(bool);

View File

@@ -5,11 +5,14 @@
#include <QTimer>
#include <obs-data.h>
class StatusDock : public QDockWidget {
class StatusControl : public QWidget {
Q_OBJECT
public:
StatusDock(QWidget *parent = 0);
StatusControl(QWidget *parent = 0, bool noLayout = false);
QPushButton *Button() { return _button; }
QLabel *StatusLabel() { return _status; }
QLabel *StatusPrefixLabel() { return _statusPrefix; }
private slots:
void ButtonClicked();
@@ -21,10 +24,18 @@ private:
QPushButton *_button;
QLabel *_status;
QLabel *_statusPrefix;
QTimer _timer;
QMetaObject::Connection _pulse;
bool _setToStopped = true;
};
extern StatusDock *dock;
class StatusDock : public QDockWidget {
Q_OBJECT
void saveDock(obs_data_t *obj);
void loadDock(obs_data_t *obj);
public:
StatusDock(QWidget *parent = 0);
};
void SetupDock();

View File

@@ -12,6 +12,8 @@ Most of this code is based on https://github.com/Palakis/obs-websocket
#include <QtCore/QThreadPool>
#include <mutex>
#include <condition_variable>
#include <functional>
#include <QRunnable>
#include <websocketpp/config/asio_no_tls_client.hpp>
#include <websocketpp/config/asio_no_tls.hpp>
@@ -117,3 +119,16 @@ enum class ClientStatus {
CONNECTED,
FAIL,
};
namespace Compatability {
// Reimplement QRunnable for std::function. Retrocompatability for Qt < 5.15
class StdFunctionRunnable : public QRunnable {
std::function<void()> cb;
public:
StdFunctionRunnable(std::function<void()> func);
void run() override;
};
QRunnable *CreateFunctionRunnable(std::function<void()> func);
}

View File

@@ -29,7 +29,7 @@ struct VideoSwitch : virtual SceneSwitcherEntry {
double duration = 0;
bool ignoreInactiveSource = false;
std::unique_ptr<AdvSSScreenshotObj> screenshotData = nullptr;
std::unique_ptr<ScreenshotHelper> screenshotData = nullptr;
std::chrono::high_resolution_clock::time_point previousTime{};
QImage matchImage;

View File

@@ -77,6 +77,7 @@ struct SwitcherData {
SwitcherThread *th = nullptr;
bool settingsWindowOpened = false;
int lastOpenedTab = -1;
bool firstBoot = true;
std::condition_variable cv;
@@ -86,6 +87,8 @@ struct SwitcherData {
bool stop = false;
bool verbose = false;
bool disableHints = false;
bool hideLegacyTabs = false;
bool highlightExecutedMacros = false;
bool showSystemTrayNotifications = false;
bool showFrame = false;
bool transitionOverrideOverride = false;
@@ -121,6 +124,8 @@ struct SwitcherData {
std::condition_variable macroTransitionCv;
bool macroSceneSwitched = false;
bool replayBufferSaved = false;
bool obsIsShuttingDown = false;
int shutdownConditionCount = 0;
std::deque<WindowSwitch> windowSwitches;
std::vector<std::string> ignoreIdleWindows;
@@ -210,6 +215,7 @@ struct SwitcherData {
obs_hotkey_id startHotkey = OBS_INVALID_HOTKEY_ID;
obs_hotkey_id stopHotkey = OBS_INVALID_HOTKEY_ID;
obs_hotkey_id toggleHotkey = OBS_INVALID_HOTKEY_ID;
obs_hotkey_id removeMacroSegment = OBS_INVALID_HOTKEY_ID;
bool saveWindowGeo = false;
QPoint windowPos = {};

View File

@@ -47,8 +47,7 @@ void deleteLayoutItem(QLayoutItem *item);
void clearLayout(QLayout *layout, int afterIdx = 0);
void setLayoutVisible(QLayout *layout, bool visible);
QMetaObject::Connection PulseWidget(QWidget *widget, QColor startColor,
QColor = QColor(0, 0, 0, 0),
QString specifier = "QLabel ",
QColor endColor = QColor(0, 0, 0, 0),
bool once = false);
void listAddClicked(QListWidget *list, QWidget *newWidget,
QPushButton *addButton = nullptr,

View File

@@ -34,6 +34,17 @@ void startStopToggleHotkeyFunc(void *, obs_hotkey_id, obs_hotkey_t *,
}
}
void removeMacroSegmentHotkeyFunc(void *, obs_hotkey_id, obs_hotkey_t *,
bool pressed)
{
if (pressed && switcher->settingsWindowOpened &&
AdvSceneSwitcher::window) {
QMetaObject::invokeMethod(AdvSceneSwitcher::window,
"DeleteMacroSegementHotkey",
Qt::QueuedConnection);
}
}
void registerHotkeys()
{
switcher->startHotkey = obs_hotkey_register_frontend(
@@ -49,6 +60,11 @@ void registerHotkeys()
obs_module_text(
"AdvSceneSwitcher.hotkey.startStopToggleSwitcherHotkey"),
startStopToggleHotkeyFunc, NULL);
switcher->removeMacroSegment = obs_hotkey_register_frontend(
"removeMacroSegmentSwitcherHotkey",
obs_module_text(
"AdvSceneSwitcher.hotkey.removeMacroSegmentHotkey"),
removeMacroSegmentHotkeyFunc, NULL);
switcher->hotkeysRegistered = true;
}
@@ -67,6 +83,12 @@ void SwitcherData::saveHotkeys(obs_data_t *obj)
obs_data_array_t *toggleHotkeyArrray = obs_hotkey_save(toggleHotkey);
obs_data_set_array(obj, "toggleHotkey", toggleHotkeyArrray);
obs_data_array_release(toggleHotkeyArrray);
obs_data_array_t *removeSegmentArrray =
obs_hotkey_save(removeMacroSegment);
obs_data_set_array(obj, "removeMacroSegmentHotkey",
removeSegmentArrray);
obs_data_array_release(removeSegmentArrray);
}
void SwitcherData::loadHotkeys(obs_data_t *obj)
@@ -89,4 +111,9 @@ void SwitcherData::loadHotkeys(obs_data_t *obj)
obs_data_get_array(obj, "toggleHotkey");
obs_hotkey_load(toggleHotkey, toggleHotkeyArrray);
obs_data_array_release(toggleHotkeyArrray);
obs_data_array_t *removeSegmentArrray =
obs_data_get_array(obj, "removeMacroSegmentHotkey");
obs_hotkey_load(removeMacroSegment, removeSegmentArrray);
obs_data_array_release(removeSegmentArrray);
}

View File

@@ -2,7 +2,6 @@
#include "headers/macro-action-edit.hpp"
#include "headers/macro-action-scene-switch.hpp"
#include "headers/section.hpp"
#include "headers/macro-controls.hpp"
#include "headers/utility.hpp"
std::map<std::string, MacroActionInfo> MacroActionFactory::_methods;
@@ -16,10 +15,11 @@ bool MacroActionFactory::Register(const std::string &id, MacroActionInfo info)
return false;
}
std::shared_ptr<MacroAction> MacroActionFactory::Create(const std::string &id)
std::shared_ptr<MacroAction> MacroActionFactory::Create(const std::string &id,
Macro *m)
{
if (auto it = _methods.find(id); it != _methods.end())
return it->second._createFunc();
return it->second._createFunc(m);
return nullptr;
}
@@ -57,6 +57,7 @@ static inline void populateActionSelection(QComboBox *list)
for (auto entry : MacroActionFactory::GetActionTypes()) {
list->addItem(obs_module_text(entry.second._name.c_str()));
}
list->model()->sort(0);
}
MacroActionEdit::MacroActionEdit(QWidget *parent,
@@ -75,9 +76,15 @@ MacroActionEdit::MacroActionEdit(QWidget *parent,
_section->AddHeaderWidget(_actionSelection);
_section->AddHeaderWidget(_headerInfo);
QVBoxLayout *mainLayout = new QVBoxLayout;
mainLayout->addWidget(_section);
mainLayout->addWidget(_controls);
QVBoxLayout *actionLayout = new QVBoxLayout;
actionLayout->setContentsMargins(0, 0, 0, 0);
actionLayout->setSpacing(0);
actionLayout->addWidget(_frame);
_highLightFrameLayout->addWidget(_section);
QHBoxLayout *mainLayout = new QHBoxLayout;
mainLayout->setContentsMargins(0, 0, 0, 0);
mainLayout->addLayout(actionLayout);
setLayout(mainLayout);
_entryData = entryData;
@@ -93,17 +100,18 @@ void MacroActionEdit::ActionSelectionChanged(const QString &text)
}
auto idx = _entryData->get()->GetIndex();
auto macro = _entryData->get()->GetMacro();
std::string id = MacroActionFactory::GetIdByName(text);
HeaderInfoChanged("");
std::lock_guard<std::mutex> lock(switcher->m);
_entryData->reset();
*_entryData = MacroActionFactory::Create(id);
*_entryData = MacroActionFactory::Create(id, macro);
(*_entryData)->SetIndex(idx);
auto widget = MacroActionFactory::CreateWidget(id, this, *_entryData);
QWidget::connect(widget, SIGNAL(HeaderInfoChanged(const QString &)),
this, SLOT(HeaderInfoChanged(const QString &)));
_section->SetContent(widget, false);
_section->SetContent(widget);
SetFocusPolicyOfWidgets();
}
@@ -120,6 +128,11 @@ void MacroActionEdit::UpdateEntryData(const std::string &id)
SetFocusPolicyOfWidgets();
}
void MacroActionEdit::SetEntryData(std::shared_ptr<MacroAction> *data)
{
_entryData = data;
}
MacroSegment *MacroActionEdit::Data()
{
return _entryData->get();
@@ -140,12 +153,12 @@ void AdvSceneSwitcher::AddMacroAction(int idx)
if (idx - 1 >= 0) {
id = macro->Actions().at(idx - 1)->GetId();
} else {
MacroActionSwitchScene temp;
MacroActionSwitchScene temp(nullptr);
id = temp.GetId();
}
std::lock_guard<std::mutex> lock(switcher->m);
macro->Actions().emplace(macro->Actions().begin() + idx,
MacroActionFactory::Create(id));
MacroActionFactory::Create(id, macro));
if (idx - 1 >= 0) {
auto data = obs_data_create();
macro->Actions().at(idx - 1)->Save(data);
@@ -154,9 +167,10 @@ void AdvSceneSwitcher::AddMacroAction(int idx)
}
macro->UpdateActionIndices();
clearLayout(ui->macroEditActionLayout, idx);
clearLayout(actionsList->ContentLayout(), idx);
PopulateMacroActions(*macro, idx);
HighlightAction(idx);
SetActionData(*macro);
}
void AdvSceneSwitcher::on_actionAdd_clicked()
@@ -166,8 +180,19 @@ void AdvSceneSwitcher::on_actionAdd_clicked()
return;
}
AddMacroAction((int)macro->Actions().size());
ui->macroEditActionHelp->setVisible(false);
if (currentActionIdx == -1) {
auto macro = getSelectedMacro();
if (!macro) {
return;
}
AddMacroAction((int)macro->Actions().size());
} else {
AddMacroAction(currentActionIdx + 1);
}
if (currentActionIdx != -1) {
MacroActionSelectionChanged(currentActionIdx + 1);
}
actionsList->SetHelpMsgVisible(false);
}
void AdvSceneSwitcher::RemoveMacroAction(int idx)
@@ -187,17 +212,40 @@ void AdvSceneSwitcher::RemoveMacroAction(int idx)
switcher->macroWaitCv.notify_all();
macro->UpdateActionIndices();
clearLayout(ui->macroEditActionLayout, idx);
clearLayout(actionsList->ContentLayout(), idx);
PopulateMacroActions(*macro, idx);
SetActionData(*macro);
}
void AdvSceneSwitcher::on_actionRemove_clicked()
{
auto macro = getSelectedMacro();
if (!macro) {
if (currentActionIdx == -1) {
auto macro = getSelectedMacro();
if (!macro) {
return;
}
RemoveMacroAction((int)macro->Actions().size() - 1);
} else {
RemoveMacroAction(currentActionIdx);
}
MacroActionSelectionChanged(-1);
}
void AdvSceneSwitcher::on_actionUp_clicked()
{
if (currentActionIdx == -1) {
return;
}
RemoveMacroAction((int)macro->Actions().size() - 1);
MoveMacroActionUp(currentActionIdx);
MacroActionSelectionChanged(currentActionIdx - 1);
}
void AdvSceneSwitcher::on_actionDown_clicked()
{
if (currentActionIdx == -1) {
return;
}
MoveMacroActionDown(currentActionIdx);
MacroActionSelectionChanged(currentActionIdx + 1);
}
void AdvSceneSwitcher::SwapActions(Macro *m, int pos1, int pos2)
@@ -216,16 +264,16 @@ void AdvSceneSwitcher::SwapActions(Macro *m, int pos1, int pos2)
auto a1 = m->Actions().begin() + pos1;
auto a2 = m->Actions().begin() + pos2;
auto item1 = ui->macroEditActionLayout->takeAt(pos1);
auto item2 = ui->macroEditActionLayout->takeAt(pos2 - 1);
auto item1 = actionsList->ContentLayout()->takeAt(pos1);
auto item2 = actionsList->ContentLayout()->takeAt(pos2 - 1);
deleteLayoutItem(item1);
deleteLayoutItem(item2);
auto widget1 = new MacroActionEdit(this, &(*a1), (*a1)->GetId());
auto widget2 = new MacroActionEdit(this, &(*a2), (*a2)->GetId());
ConnectControlSignals(widget1);
ConnectControlSignals(widget2);
ui->macroEditActionLayout->insertWidget(pos1, widget1);
ui->macroEditActionLayout->insertWidget(pos2, widget2);
actionsList->ContentLayout()->insertWidget(pos1, widget1);
actionsList->ContentLayout()->insertWidget(pos2, widget2);
}
void AdvSceneSwitcher::MoveMacroActionUp(int idx)
@@ -240,6 +288,7 @@ void AdvSceneSwitcher::MoveMacroActionUp(int idx)
}
SwapActions(macro, idx, idx - 1);
HighlightAction(idx - 1);
}
void AdvSceneSwitcher::MoveMacroActionDown(int idx)
@@ -254,4 +303,24 @@ void AdvSceneSwitcher::MoveMacroActionDown(int idx)
}
SwapActions(macro, idx, idx + 1);
HighlightAction(idx + 1);
}
void AdvSceneSwitcher::MacroActionSelectionChanged(int idx)
{
auto macro = getSelectedMacro();
if (!macro) {
return;
}
SetSelection(actionsList, idx);
SetSelection(conditionsList, -1);
if (idx < 0 || (unsigned)idx >= macro->Actions().size()) {
currentActionIdx = -1;
} else {
currentActionIdx = idx;
}
currentConditionIdx = -1;
HighlightControls();
}

View File

@@ -87,7 +87,7 @@ MacroActionFileEdit::MacroActionFileEdit(
: QWidget(parent)
{
_filePath = new FileSelection(FileSelection::Type::WRITE);
_text = new QPlainTextEdit();
_text = new ResizingPlainTextEdit(this);
_actions = new QComboBox();
populateActionSelection(_actions);
@@ -150,6 +150,9 @@ void MacroActionFileEdit::TextChanged()
std::lock_guard<std::mutex> lock(switcher->m);
_entryData->_text = _text->toPlainText().toStdString();
adjustSize();
updateGeometry();
}
void MacroActionFileEdit::ActionChanged(int value)

View File

@@ -98,7 +98,7 @@ MacroActionFilterEdit::MacroActionFilterEdit(
_actions = new QComboBox();
_getSettings = new QPushButton(
obs_module_text("AdvSceneSwitcher.action.filter.getSettings"));
_settings = new QPlainTextEdit();
_settings = new ResizingPlainTextEdit(this);
populateActionSelection(_actions);
populateSourcesWithFilterSelection(_sources);
@@ -211,6 +211,9 @@ void MacroActionFilterEdit::SettingsChanged()
std::lock_guard<std::mutex> lock(switcher->m);
_entryData->_settings = _settings->toPlainText().toStdString();
adjustSize();
updateGeometry();
}
void MacroActionFilterEdit::SetWidgetVisibility(bool showSettings)

View File

@@ -16,6 +16,7 @@ const static std::map<PerformMacroAction, std::string> actionTypes = {
{PerformMacroAction::RESET_COUNTER,
"AdvSceneSwitcher.action.macro.type.resetCounter"},
{PerformMacroAction::RUN, "AdvSceneSwitcher.action.macro.type.run"},
{PerformMacroAction::STOP, "AdvSceneSwitcher.action.macro.type.stop"},
};
bool MacroActionMacro::PerformAction()
@@ -35,7 +36,10 @@ bool MacroActionMacro::PerformAction()
_macro->ResetCount();
break;
case PerformMacroAction::RUN:
_macro->PerformAction();
_macro->PerformActions();
break;
case PerformMacroAction::STOP:
_macro->Stop();
break;
default:
break;
@@ -63,6 +67,9 @@ void MacroActionMacro::LogAction()
vblog(LOG_INFO, "run nested macro \"%s\"",
_macro->Name().c_str());
break;
case PerformMacroAction::STOP:
vblog(LOG_INFO, "stopped macro \"%s\"", _macro->Name().c_str());
break;
default:
break;
}
@@ -137,6 +144,10 @@ void MacroActionMacroEdit::UpdateEntryData()
}
_actions->setCurrentIndex(static_cast<int>(_entryData->_action));
_macros->SetCurrentMacro(_entryData->_macro.get());
if (_entryData->_action == PerformMacroAction::RUN ||
_entryData->_action == PerformMacroAction::STOP) {
_macros->HideSelectedMacro();
}
}
void MacroActionMacroEdit::MacroChanged(const QString &text)
@@ -159,6 +170,13 @@ void MacroActionMacroEdit::ActionChanged(int value)
std::lock_guard<std::mutex> lock(switcher->m);
_entryData->_action = static_cast<PerformMacroAction>(value);
if (_entryData->_action == PerformMacroAction::RUN ||
_entryData->_action == PerformMacroAction::STOP) {
_macros->HideSelectedMacro();
} else {
_macros->ShowAllMacros();
}
}
void MacroActionMacroEdit::MacroRemove(const QString &)

Some files were not shown because too many files have changed in this diff Show More