# AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/01f_pipes.iter.visualizers.ipynb.

# %% auto 0
__all__ = ['SimpleVideoRunner']

# %% ../nbs/01f_pipes.iter.visualizers.ipynb 3
# Python native modules
import os
# Third party libs
from fastcore.all import *
import torchdata.datapipes as dp
# Local modules

# %% ../nbs/01f_pipes.iter.visualizers.ipynb 5
class SimpleVideoRunner(dp.iter.IterDataPipe):
    def __init__(self, 
                 source_datapipe, 
                 between_frame_wait_seconds:float=0.1
        ):
        self.source_datapipe = source_datapipe
        self.between_frame_wait_seconds = 0.1
        
    def __iter__(self) -> typing.Tuple[typing.NamedTuple]:
        for step in self.source_datapipe:
            
            
            yield step
add_docs(
    SimpleVideoRunner,
    """Displays video from a `source_datapipe` that produces `typing.NamedTuples` that contain an `image` field""",
)
