aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/livestreamer/packages/flashmedia/f4v.py
diff options
context:
space:
mode:
authorGravatar Christopher Rosell <chrippa@tanuki.se>2012-10-04 14:11:17 +0200
committerGravatar Christopher Rosell <chrippa@tanuki.se>2012-10-04 14:14:20 +0200
commit1af7ca5f01989565fefe3bbfb4e5a387f0558602 (patch)
tree2d6a6085a4b10342df99969f9d26c1bcdd05c191 /src/livestreamer/packages/flashmedia/f4v.py
parent9bf96226fd76e1e318cc111a308b4289d91858e5 (diff)
Add support for AkamaiHD's HTTP streaming protocol.
Diffstat (limited to 'src/livestreamer/packages/flashmedia/f4v.py')
-rw-r--r--src/livestreamer/packages/flashmedia/f4v.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/livestreamer/packages/flashmedia/f4v.py b/src/livestreamer/packages/flashmedia/f4v.py
new file mode 100644
index 0000000..c4e57ef
--- /dev/null
+++ b/src/livestreamer/packages/flashmedia/f4v.py
@@ -0,0 +1,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"]