Skip to content

Commit

Permalink
Fix filename annotated type
Browse files Browse the repository at this point in the history
  • Loading branch information
Mario Ruiz committed Jan 18, 2022
1 parent e1ea8f4 commit ffe857f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pynq_composable/video.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from pynq.ps import CPU_ARCH, ZU_ARCH, ZYNQ_ARCH
from time import sleep
import threading
from typing import Union


__author__ = "Mario Ruiz"
Expand Down Expand Up @@ -277,13 +278,13 @@ def modeout(self):
class OpenCVPLVideo:
"""Wrapper for a OpenCV video stream pipeline that sinks on PL"""

def __init__(self, ol: Overlay, filename: str,
def __init__(self, ol: Overlay, filename: Union[int, str],
mode=VideoMode(1280, 720, 24, 60)):
""" Returns a OpenCVPL object
Parameters
----------
filename : int
filename : [int, str]
video filename
mode : VideoMode
Expand Down Expand Up @@ -420,13 +421,13 @@ def _tievdma(self):
class OpenCVDPVideo(OpenCVPLVideo):
"""Wrapper for a webcam/file video pipeline streamed to DisplayPort"""

def __init__(self, ol: Overlay, filename: str,
def __init__(self, ol: Overlay, filename: Union[int, str],
mode=VideoMode(1280, 720, 24, 60)):
""" Returns a OpenCVDP object
Parameters
----------
filename : int
filename : [int, str]
video filename
mode : VideoMode
webcam configuration
Expand Down

0 comments on commit ffe857f

Please sign in to comment.