aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/livestreamer/packages/flashmedia/f4v.py
blob: c4e57ef8f1a58d2529fa3d5b03a21b0399a0e1b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/env python

from .box import Box
from .compat import is_py2

class F4V(object):
    def __init__(self, fd=None):
        self.fd = fd

    def __iter__(self):
        return self

    def __next__(self):
        try:
            box = Box.deserialize(self.fd)
        except IOError:
            raise StopIteration

        return box

    if is_py2:
        next = __next__


__all__ = ["F4V"]