Skip to content

Added "Video Capture Device" as a capture method #143

New issue

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

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

Already on GitHub? Sign in to your account

Closed
wants to merge 157 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
157 commits
Select commit Hold shift + click to select a range
f1cb1a6
Fix #52 Comparisons with empty masks
Avasam Nov 27, 2021
3b30aa6
Save 'Check For Updates On Open' immediatly
Avasam Nov 28, 2021
c1b8c85
showErrorSignal to show error message box from another thread
Avasam Nov 28, 2021
2e3336a
Fixes #86 Stop uncaught exceptions from silently crashing the app
Avasam Nov 28, 2021
5f98309
Merge pull request #72 from Avasam/Fix-#52-Comparisons-with-empty-masks
Toufool Nov 28, 2021
393ca84
Merge pull request #116 from Avasam/show-errors-outside-main-thread
Toufool Nov 28, 2021
25dece7
Fixes #86 Stop uncaught exceptions from silently crashing the app
Avasam Nov 28, 2021
cc6066c
Merge branch 'dev' of https://github.com/Toufool/Auto-Split into show…
Avasam Nov 28, 2021
0d6ccf6
Merge pull request #118 from Avasam/show-errors-outside-main-thread
Toufool Nov 28, 2021
3cb2aa6
Fix #114, try to load Start Image on browse & load settings, don't al…
Toufool Nov 28, 2021
3f23c55
First linting pass
Avasam Nov 29, 2021
667696c
Merge pull request #92 from Avasam/linting
Toufool Nov 29, 2021
13b4d43
Moved most settings to pyproject.toml and ran autopep8
Avasam Nov 29, 2021
9840fd9
Removed mypy and Fixed import-outside-toplevel
Avasam Nov 29, 2021
feda2ad
Double quotes and pylint complete linting
Avasam Nov 29, 2021
09b34fc
Configured linting workflow
Avasam Nov 30, 2021
5c17beb
Async check for updates
Avasam Nov 30, 2021
458ed20
Merge branch 'dev' of https://github.com/Toufool/Auto-Split into Save…
Avasam Nov 30, 2021
ab9b2c0
Merge pull request #115 from Avasam/Save-'Check-For-Updates-On-Open'-…
Toufool Dec 3, 2021
4cd2b9e
Merge pull request #122 from Avasam/github-actions
Toufool Dec 3, 2021
3602d5f
Fix crash on LiveSplit open and missing link in error message
Avasam Dec 3, 2021
fd0721e
Merge branch '2.0.0' of https://github.com/Toufool/Auto-Split into li…
Avasam Dec 3, 2021
cb4b293
Merge pull request #121 from Avasam/linting
Toufool Dec 3, 2021
002b097
Merge
Avasam Dec 3, 2021
6bfd4cb
Merge branch 'dev' of https://github.com/Toufool/Auto-Split into 2.0.0
Avasam Dec 3, 2021
0b704d6
Merge branch '2.0.0' into Save-'Check-For-Updates-On-Open'-immediatly
Avasam Dec 3, 2021
fdcffa9
Fixed certificate error and random crash on open when compiled
Avasam Dec 5, 2021
a2b1f3c
Merge pull request #125 from Avasam/2.0.0
Toufool Dec 5, 2021
f621fac
Using python/typeshed/pull/6492
Avasam Dec 5, 2021
f0fa0e2
PEP8 naming convention
Avasam Dec 5, 2021
fd97eba
Added build artifact
Avasam Dec 6, 2021
7c92122
AutoSplitImage Class and simplified code
Avasam Dec 6, 2021
e1e77ea
Average FPS over all images with all actions
Avasam Dec 6, 2021
0686ea4
Merge pull request #124 from Avasam/Save-'Check-For-Updates-On-Open'-…
Toufool Dec 6, 2021
b2e4e2a
Merge pull request #126 from Avasam/naming-convention
Toufool Dec 6, 2021
1663465
Merge pull request #127 from Avasam/SplitImage-as-class
Toufool Dec 6, 2021
e4566ea
Added badges
Avasam Dec 7, 2021
82a2d05
Merge pull request #128 from Avasam/main
Toufool Dec 7, 2021
c07b771
Fixed "Select Window" not working for windows with negative coordinates
Avasam Dec 8, 2021
84a5bb4
Ability to recover window
Avasam Dec 8, 2021
f234fe9
Merge branch 'master' of https://github.com/Toufool/Auto-Split into R…
Avasam Dec 8, 2021
709e6c1
Merge pull request #129 from Avasam/Recover-from-closed-capture-window
Toufool Dec 10, 2021
69ffb11
Differentiate "undo/skip split" from "previous/next image"
Avasam Dec 10, 2021
822c8aa
Merge pull request #131 from Avasam/Feature-Request--Previous/Next-Im…
Toufool Dec 11, 2021
93b089f
Make Save Settings more intuitive
Avasam Dec 11, 2021
1736443
Merge pull request #132 from Avasam/Make-Save-Settings-more-intuitive
Toufool Dec 14, 2021
bbb257f
Initial UI update for 2.0.0. Add settings window.
Toufool Dec 14, 2021
0b267a6
hooked new settings window to actual values
Avasam Dec 15, 2021
f0149f5
Implemented image specific comparison method and default delay time.
Avasam Dec 15, 2021
4f89007
Better "seconds remaining" text
Avasam Dec 16, 2021
2eee9de
Support modifiers the same way LiveSplit does. Closes #34
Avasam Dec 16, 2021
33a49c6
Linted pyi files
Avasam Dec 16, 2021
9be8afc
Initial UI update for 2.0.0. Add settings window.
Toufool Dec 14, 2021
2d8cb6b
hooked new settings window to actual values
Avasam Dec 15, 2021
5838931
Better "seconds remaining" text
Avasam Dec 16, 2021
0399bbc
Merge branch '2.0.0' of https://github.com/Toufool/Auto-Split into 2.0.0
Avasam Dec 17, 2021
21947d0
Undo split goes to the end of the group
Avasam Dec 22, 2021
a196113
Merge branch '2.0.0' into image-comparison-method-and-default-delay-time
Avasam Dec 29, 2021
ff97b81
Merge branch '2.0.0' into support-hotkeys-with-modifiers
Avasam Dec 29, 2021
ef26562
Merge branch '2.0.0' into Linted-pyi-files
Avasam Dec 29, 2021
b8c1bbe
Turn off pyright(reportFunctionMemberAccess) in favor of pylint(no-me…
Avasam Dec 29, 2021
509274c
Merge branch 'support-hotkeys-with-modifiers' into complete
Avasam Dec 29, 2021
e00cacd
Merge branch 'Linted-pyi-files' into complete
Avasam Dec 29, 2021
83039c6
Fixed images comparison method defaulting to 0 rather than none
Avasam Dec 29, 2021
15b4c13
Merge branch 'image-comparison-method-and-default-delay-time' into co…
Avasam Dec 29, 2021
7e5004d
Fixed start image comparison not starting when loading settings from …
Avasam Jan 3, 2022
c7af588
Fixed threshold_from_filename to support 0.0 and 1.0
Avasam Jan 26, 2022
660276d
Reset similarity labels
Avasam Jan 27, 2022
a7b07f7
Visually update threshold labels when changed from settings
Avasam Mar 12, 2022
c831838
Keep pause timer running when undoing split
Avasam Mar 12, 2022
714c8cc
Prevent text flash when reloading start image
Avasam Mar 12, 2022
23b0206
Reverted pause before start image
Avasam Mar 12, 2022
c2deb11
TOML Settings
Avasam Mar 13, 2022
048b948
Trying out Python 3.10 build
Avasam Mar 13, 2022
17e3e81
Further pyi linting
Avasam Mar 13, 2022
125d4b2
Updated some messages
Avasam Apr 2, 2022
a64c5ce
Implement D3D Desktop Duplication
Avasam Apr 3, 2022
6d334c3
d3dshot stub
Avasam Apr 3, 2022
7d4f860
Split dropdown for supported imread filetypes
Avasam Apr 3, 2022
54c68c0
Finished implementing desktop duplicaton
Avasam Apr 3, 2022
886b596
Fixed dropdown height on first open and added tooltip
Avasam Apr 3, 2022
a7a1308
Prevent some infinite error loops
Avasam Apr 4, 2022
fa6037b
Massively sped up Flake tests
Avasam Apr 4, 2022
9398787
Merge branch 'use-pywin32-stubs-fork' of https://github.com/Avasam/Au…
Avasam Apr 4, 2022
834ad36
WIP camera capture
Avasam Apr 5, 2022
f4b64b0
Merge branch 'use-pywin32-stubs-fork' of https://github.com/Avasam/Au…
Avasam Apr 4, 2022
d29a450
wip WindowsGraphicsCapture, missing bindings
Avasam Apr 7, 2022
784a9fe
Working WindowsGraphicsCapture picker
Avasam Apr 7, 2022
274cef1
Completed WindowsGraphicsApi support
Avasam Apr 8, 2022
e5a185d
Merge pull request #19 from Avasam/wip-WindowsGraphicsCapture
Avasam Apr 8, 2022
7bfd7e1
Merge branch 'More-capture-options' of https://github.com/Avasam/Auto…
Avasam Apr 8, 2022
1f50eb1
Cleaner capture device selection
Avasam Apr 9, 2022
6df5975
Specify OBS' Virtualcam plugin and pickup cam on load
Avasam Apr 9, 2022
993e077
Fixed WindowsGraphicsCapture max FPS detection
Avasam Apr 9, 2022
3a8e9e3
Massively sped up Flake tests
Avasam Apr 4, 2022
4f20ef1
Turn off pyright(reportFunctionMemberAccess) in favor of pylint(no-me…
Avasam Dec 29, 2021
0003771
Centralized qWait typing fix
Avasam Apr 8, 2022
74b58e8
Autosort imports
Avasam Apr 8, 2022
3f9254b
Resynced settings
Avasam Apr 11, 2022
b2d2174
Merge branch 'toml-settings' into More-capture-options
Avasam Apr 11, 2022
724149e
post-merge fix linting
Avasam Apr 11, 2022
abf49e7
Merge branch 'toml-settings' into More-capture-options
Avasam Apr 11, 2022
24df1a3
post-merge linting fixes
Avasam Apr 11, 2022
1cf68dd
Merge branch 'More-capture-options' into camera-capture-split-cam-option
Avasam Apr 11, 2022
23694d9
Re-introduced region selection for WGC API.
Avasam Apr 13, 2022
74edfc2
Fixed linting with updated pyright
Avasam Apr 13, 2022
81da593
Merge branch 'More-capture-options' into camera-capture-split-cam-option
Avasam Apr 13, 2022
fece8e7
Fixed linting with updated pyright
Avasam Apr 13, 2022
87c7ac6
Restored all functionalities for CaptureMethod.WINDOWS_GRAPHICS_CAPTURE
Avasam May 1, 2022
500dd37
Merge branch 'More-capture-options' into camera-capture-split-cam-option
Avasam May 1, 2022
17afb4f
Updated pyi linting
Avasam May 1, 2022
bc16b8c
Merge branch 'More-capture-options' into camera-capture-split-cam-option
Avasam May 1, 2022
063595f
Include backend in camera name
Avasam May 1, 2022
53004fd
Restored all functionalities for CaptureMethod.WINDOWS_GRAPHICS_CAPTURE
Avasam May 1, 2022
a8f89cb
Updated pyi linting
Avasam May 1, 2022
4cc5d7a
Fixed an error when changing similarity while the comparison is not r…
Avasam May 3, 2022
68128c5
More constants for image comparison
Avasam May 3, 2022
d91ce2f
Parallel device scan and attempt at adding some names
Avasam May 4, 2022
20100ee
Merge branch 'More-capture-options' into camera-capture-split-cam-option
Avasam May 4, 2022
9710e61
Fixed error when CaptureDevices haven't loaded yet
Avasam May 4, 2022
0c5c107
Constants and more specific ignores
Avasam May 4, 2022
7bfd2f7
More accurate filename
Avasam May 7, 2022
2bc112b
Test for MediaCapture and simplified coroutine
Avasam May 7, 2022
0e53b59
Updated README and some messages
Avasam May 7, 2022
0f63e69
Fixed a few issues with the video capture device implementation
Avasam Jun 2, 2022
2ecfa85
Updated some text
Avasam Jun 3, 2022
59f7dd0
Fixed start images threshold
Avasam Jun 6, 2022
a91323c
Updated typings
Avasam Jun 6, 2022
3a88ae6
Fixes #22
Avasam Jun 10, 2022
51888f3
Reset image now indicates that its paused when starting a run
Avasam Jun 10, 2022
8027d1f
Updated pyright and some scripts
Avasam Jun 11, 2022
fc21a2b
headless opencv is enough
Avasam Jun 11, 2022
a4dda9d
Updated versioning
Avasam Jun 15, 2022
0e6ce0b
Set camera size
Avasam Jun 15, 2022
2cb3068
enumarate cameras using pygrabber
Avasam Jun 15, 2022
46e5392
Don't pickup inexistant window on load
Avasam Jun 15, 2022
cbf489e
Updated pylint, python job, and split requireemnts
Avasam Jun 16, 2022
b5aa78f
Add splash screen. Closes Avasam#25
Avasam Jun 16, 2022
74a538a
Check version for is_border_required
Avasam Jun 16, 2022
391cbe4
Fix a handful of Win11 high DPI scaling issues + Build task
Avasam Jun 16, 2022
ad72917
Fix yet another issue on Windows Graphics Capture + oopsie
Avasam Jun 16, 2022
3ca7dbe
bugfix: get_method_by_index should return first element with negative…
Avasam Jun 17, 2022
dc1e9dd
Properly fix region alignement
Avasam Jun 17, 2022
0ad99bf
Removed simplejson
Avasam Jun 17, 2022
0af8ce3
More capture method readme update
Avasam Jun 17, 2022
97fbe26
Fix #27
Avasam Jun 17, 2022
a1c1dd9
round down floats shown in UI
Avasam Jun 19, 2022
45aab97
disable unused hotkeys when autocontrolled
Avasam Jun 19, 2022
920fcfd
Allow to move / set an existing hotkey
Avasam Jun 19, 2022
2587fd3
don't double send skip and undo splits hotkey
Avasam Jun 19, 2022
c3ac350
Extract all constants and shared utils methods
Avasam Jun 19, 2022
33c46d4
Better guards
Avasam Jun 25, 2022
37f3173
Windows Graphics Capture border doc update
Avasam Jul 3, 2022
1c2b3fc
Update codeql-action to v2
Avasam Jul 3, 2022
6dbb6da
Updated Scripts to OS agnostic powershell
Avasam Jul 12, 2022
9fec474
Bumped numpy
Avasam Jul 26, 2022
4e89cf1
Fixed Flake8
Avasam Jul 26, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[flake8]
color=always
max-line-length=120
; Auto generated
exclude=src/gen/, typings/cv2-stubs/__init__.pyi
ignore=
W503, ; Linebreak before binary operator
E402, ; Allow imports at the bottom of file
Y026, ; Not using typing_extensions
per-file-ignores=
; Docstrings in type stubs
; Function bodys contain other than just ... (eg: raise)
; Single quote docstrings
typings/cv2-stubs/__init__.pyi: Q000,E704,E501,N8, Y021,Y010,Q002

; Quotes
; Allow ... on same line as def
; Line too long
; Naming conventions can't be controlled for external libraries
typings/**: Q000,E704,E501,N8
; PyQt methods
ignore-names=closeEvent,paintEvent,keyPressEvent,mousePressEvent,mouseMoveEvent,mouseReleaseEvent
; McCabe max-complexity is also taken care of by Pylint and doesn't fail the build there
; So this is the hard limit
max-complexity=32
inline-quotes="
67 changes: 67 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ main, master, develop, dev, 2.0.0]
pull_request:
# The branches below must be a subset of the branches above
branches: [ develop, dev, 2.0.0 ]
schedule:
- cron: '26 13 * * 6'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
language: [ 'python' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
130 changes: 130 additions & 0 deletions .github/workflows/lint-and-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions
name: Lint and build
on:
push:
branches:
- main
- master
paths:
- '**.py'
- '**.pyi'
- '**.ui'
pull_request:
branches:
- main
- master
- dev
- dev*
- 2.0.0
paths:
- '**.py'
- '**.pyi'
- '**.ui'
jobs:
Pyright:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10"]
steps:
- name: Checkout ${{ github.repository }}/${{ github.ref }}
uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: 'scripts/requirements-dev.txt'
- name: Install dependencies
run: |
pip install -r "scripts/requirements-dev.txt"
npm install -g pyright
npm list -g pyright
- run: scripts/compile_resources.ps1
- name: Analysing the code with Pyright
run: pyright --warnings
Pylint:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10"]
steps:
- name: Checkout ${{ github.repository }}/${{ github.ref }}
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: 'scripts/requirements-dev.txt'
- name: Install dependencies
run: pip install -r "scripts/requirements-dev.txt"
- run: scripts/compile_resources.ps1
- name: Analysing the code with Pylint
run: pylint --reports=y --output-format=colorized src/
Flake8:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10"]
steps:
- name: Checkout ${{ github.repository }}/${{ github.ref }}
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: 'scripts/requirements-dev.txt'
- name: Install dependencies
run: pip install -r "scripts/requirements-dev.txt"
- run: scripts/compile_resources.ps1
- name: Analysing the code with Flake8
run: flake8
Bandit:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10"]
steps:
- name: Checkout ${{ github.repository }}/${{ github.ref }}
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: 'scripts/requirements-dev.txt'
- name: Install dependencies
run: pip install -r "scripts/requirements-dev.txt"
- run: scripts/compile_resources.ps1
- name: Analysing the code with Bandit
run: bandit -n 1 --severity-level medium --recursive src
Build:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10"]
steps:
- name: Checkout ${{ github.repository }}/${{ github.ref }}
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
run: pip install -r "scripts/requirements.txt"
- run: scripts/build.ps1
- name: Upload Build Artifact
uses: actions/upload-artifact@v3
with:
name: AutoSplit (Python ${{ matrix.python-version }})
path: dist/AutoSplit.exe
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# Caches
.cache/

# Byte-compiled / optimized / DLL files
__pycache__/

# Distribution / packaging
env/
build/
dist/
*.prof
# Generated
**/gen/*.py
!**/gen/*.pyi

# PyInstaller
# Usually these files are written by a python script from a template
Expand All @@ -16,3 +23,4 @@ dist/

# Dev settings
*.pkl
settings.toml
6 changes: 6 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"default": true,
"MD001": false,
"MD013": false,
"MD025": false
}
21 changes: 16 additions & 5 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,25 @@
// Keep in alphabetical order
{
"recommendations": [
"ms-python.vscode-pylance",
"ms-python.python",
"sonarsource.sonarlint-vscode",
"bungcip.better-toml",
"davidanson.vscode-markdownlint",
"eamodio.gitlens",
"ms-python.python",
"ms-python.vscode-pylance",
"pkief.material-icon-theme",
"shardulm94.trailing-spaces",
"eamodio.gitlens"
"sonarsource.sonarlint-vscode"
],
"unwantedRecommendations": [
// VSCode has implemented an optimized version
"coenraads.bracket-pair-colorizer",
"coenraads.bracket-pair-colorizer-2",
// Lots of conflicts
"esbenp.prettier-vscode",
// Replaced by ESLint
"eg2.tslint",
"ms-vscode.vscode-typescript-tslint-plugin",
// Obsoleted by Pylance
"ms-pyright.pyright",
"esbenp.prettier-vscode"
]
}
16 changes: 16 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: AutoSplit",
"type": "python",
"request": "launch",
"program": "src/AutoSplit.py",
"console": "integratedTerminal",
"justMyCode": true
}
]
}
Loading