aboutsummaryrefslogtreecommitdiff
path: root/voctocore/lib/helper.py
diff options
context:
space:
mode:
Diffstat (limited to 'voctocore/lib/helper.py')
-rw-r--r--voctocore/lib/helper.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/voctocore/lib/helper.py b/voctocore/lib/helper.py
new file mode 100644
index 0000000..ac9bfe5
--- /dev/null
+++ b/voctocore/lib/helper.py
@@ -0,0 +1,12 @@
+from gi.repository import Gst
+
+def iteratorHelper(it):
+ while True:
+ result, value = it.next()
+ if result == Gst.IteratorResult.DONE:
+ break
+
+ if result != Gst.IteratorResult.OK:
+ raise IteratorError(result)
+
+ yield value