Add files via upload

This commit is contained in:
Akascape
2021-11-13 16:15:14 +05:30
committed by GitHub
parent 97c2c5c55b
commit afec2dd728

View File

@@ -0,0 +1,27 @@
from .container import avi
__all__ = ['Index']
class Index(object):
"""Index is an index of video frame data."""
def __init__(self):
pass
@staticmethod
def from_file(filename: str):
instance = Index()
instance.filename = filename
instance.index = None
# Assume AVI for now
instance.index = avi.AVIFile.from_file(filename)
return instance
def __getattr__(self, index):
return getattr(self.index, index)
def __iter__(self):
return iter(self.index)