Skip to content

Commit

Permalink
fix requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
Avasam committed Oct 20, 2024
1 parent a083f91 commit c4f8348
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
4 changes: 0 additions & 4 deletions scripts/requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,3 @@ types-pyinstaller
types-python-xlib ; sys_platform == 'linux'
types-pywin32>=306.0.0.20240130 ; sys_platform == 'win32'
types-toml
# Type references not used at runtime
winrt-Windows.Foundation>=2.2.0 ; sys_platform == 'win32' # Python 3.13 support
winrt-Windows.Graphics>=2.2.0 ; sys_platform == 'win32' # Python 3.13 support
winrt-Windows.Graphics.DirectX.Direct3D11>=2.2.0 ; sys_platform == 'win32' # Python 3.13 support
13 changes: 8 additions & 5 deletions scripts/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ typing-extensions>=4.4.0 # @override decorator support

#
# Build and compile resources
#
pyinstaller>=5.13 # Python 3.12 support

#
Expand All @@ -31,11 +30,15 @@ comtypes<1.4.5 ; sys_platform == 'win32' # https://github.com/pyinstaller/pyins
pygrabber>=0.2 ; sys_platform == 'win32' # Completed types
pywin32>=301 ; sys_platform == 'win32'
typed-D3DShot[numpy]>=1.0.1 ; sys_platform == 'win32'
winrt-Windows.Graphics.Capture>=2.2.0 ; sys_platform == 'win32' # Python 3.13 support
winrt-Windows.Graphics.Capture.Interop>=2.2.0 ; sys_platform == 'win32' # Python 3.13 support
winrt-Windows.Graphics.DirectX>=2.2.0 ; sys_platform == 'win32' # Python 3.13 support
winrt-Windows.Foundation>=2.2.0 ; sys_platform == 'win32' # Python 3.13 support
winrt-Windows.Graphics.Capture>=2.3.0 ; sys_platform == 'win32' # Python 3.13 support
winrt-Windows.Graphics.Capture.Interop>=2.3.0 ; sys_platform == 'win32' # Python 3.13 support
winrt-Windows.Graphics.DirectX>=2.3.0 ; sys_platform == 'win32' # Python 3.13 support
winrt-Windows.Graphics.DirectX.Direct3D11>=2.3.0 ; sys_platform == 'win32' # Python 3.13 support
winrt-Windows.Graphics.DirectX.Direct3D11.Interop>=2.3.0 ; sys_platform == 'win32'
winrt-Windows.Graphics.Imaging>=2.2.0 ; sys_platform == 'win32' # Python 3.13 support
winrt-Windows.Graphics>=2.2.0 ; sys_platform == 'win32' # Python 3.13 support
winrt-Windows.Graphics.Imaging>=2.3.0 ; sys_platform == 'win32' # Python 3.13 support

#
# Linux-only dependencies
PyScreeze ; sys_platform == 'linux'
Expand Down
7 changes: 3 additions & 4 deletions src/capture_method/WindowsGraphicsCaptureMethod.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@
import win32gui
from cv2.typing import MatLike
from typing_extensions import override
from winrt.windows.graphics import SizeInt32
from winrt.windows.graphics.capture import Direct3D11CaptureFramePool, GraphicsCaptureSession
from winrt.windows.graphics.capture.interop import create_for_window
from winrt.windows.graphics.directx import DirectXPixelFormat
from winrt.windows.graphics.directx.direct3d11 import IDirect3DSurface
from winrt.windows.graphics.directx.direct3d11.interop import (
create_direct3d11_device_from_dxgi_device,
)
Expand All @@ -22,15 +24,12 @@
from utils import BGRA_CHANNEL_COUNT, WGC_MIN_BUILD, WINDOWS_BUILD_NUMBER, is_valid_hwnd

if TYPE_CHECKING:
from winrt.windows.graphics import SizeInt32
from winrt.windows.graphics.directx.direct3d11 import IDirect3DSurface

from AutoSplit import AutoSplit

WGC_NO_BORDER_MIN_BUILD = 20348


async def convert_d3d_surface_to_software_bitmap(surface: "IDirect3DSurface | None"):
async def convert_d3d_surface_to_software_bitmap(surface: IDirect3DSurface | None):
return await SoftwareBitmap.create_copy_from_surface_async(surface)


Expand Down

0 comments on commit c4f8348

Please sign in to comment.