Commit d49e4eb5 authored by Olivier Aubert's avatar Olivier Aubert

python-ctypes: implement iterator protocol for Log

parent f60c1042
......@@ -140,3 +140,15 @@ class MediaListPlayer:
class LogIterator:
def __iter__(self):
return self
def next(self):
if not self.has_next():
raise StopIteration
buffer=LogMessage()
e=VLCException()
ret=libvlc_log_iterator_next(self, buffer, e)
return ret
class Log:
def __iter__(self):
return self.get_iterator()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment