mirror of
https://github.com/iperov/DeepFaceLive
synced 2025-07-16 10:03:42 -07:00
code release
This commit is contained in:
parent
b941ba41a3
commit
a902f11f74
354 changed files with 826570 additions and 1 deletions
24
xlib/qt/gui/QXImageSequence.py
Normal file
24
xlib/qt/gui/QXImageSequence.py
Normal file
|
@ -0,0 +1,24 @@
|
|||
from typing import List
|
||||
|
||||
from .QXImage import QXImage
|
||||
|
||||
|
||||
class QXImageSequence:
|
||||
"""
|
||||
contains a list of QXImage with defined FPS
|
||||
"""
|
||||
|
||||
def __init__(self, frames : List[QXImage], fps : float):
|
||||
super().__init__()
|
||||
self._frames = frames
|
||||
self._fps = fps
|
||||
self._frame_count = len(frames)
|
||||
|
||||
def get_fps(self) -> float: return self._fps
|
||||
def get_frame_count(self) -> int: return self._frame_count
|
||||
def get_frame(self, i) -> QXImage: return self._frames[i]
|
||||
def get_duration(self) -> int:
|
||||
"""
|
||||
return duration in ms
|
||||
"""
|
||||
return int( (self._frame_count / self._fps) * 1000 )
|
Loading…
Add table
Add a link
Reference in a new issue