diff --git a/sender/screenshare.py b/sender/screenshare.py index b042a51..d750760 100644 --- a/sender/screenshare.py +++ b/sender/screenshare.py @@ -14,6 +14,7 @@ gi.require_version("Gdk", "3.0") from gi.repository import Gdk from service import Service +from typing import List, Tuple class ScreenShare(Service): @@ -28,13 +29,13 @@ def video_source(self) -> str: def icon(self) -> str: return "video-display" - def parameters(self) -> tuple[int, int, int]: + def parameters(self) -> Tuple[int, int, int]: monitor = Gdk.Display().get_default().get_monitor(0) scale, geometry = monitor.get_scale_factor(), monitor.get_geometry() return (scale * geometry.width, scale * geometry.height, 30, {}) def pipeline(self, width: int, height: int, fps: int, - **kwargs) -> list[str]: + **kwargs) -> List[str]: caps = ( "colorimetry=2:4:7:1," "chroma-site=none," diff --git a/sender/service.py b/sender/service.py index 085a039..39acbd1 100644 --- a/sender/service.py +++ b/sender/service.py @@ -12,7 +12,7 @@ import os import struct import sys -from typing import Optional, NoReturn +from typing import Optional, NoReturn, List, Tuple import gi @@ -65,13 +65,13 @@ def icon(self) -> str: raise NotImplementedError("Pure virtual method called!") def pipeline(self, width: int, height: int, fps: int, - **kwargs) -> list[str]: + **kwargs) -> List[str]: """ Return a set-up GStreamer pipeline """ raise NotImplementedError("Pure virtual method called!") - def parameters(self) -> tuple[int, int, int, dict]: + def parameters(self) -> Tuple[int, int, int, dict]: """ Compute the parameters. Return a (width, height, fps) tuple. """