MCPcopy Create free account
hub / github.com/GStreamer/gst-python / do_create

Method do_create

old_examples/filesrc.py:52–60  ·  view source on GitHub ↗
(self, offset, size)

Source from the content-addressed store, hash-verified

50 self.fd = open(value, 'r')
51
52 def do_create(self, offset, size):
53 if offset != self.curoffset:
54 self.fd.seek(offset, 0)
55 data = self.fd.read(self.blocksize)
56 if data:
57 self.curoffset += len(data)
58 return gst.FLOW_OK, gst.Buffer(data)
59 else:
60 return gst.FLOW_UNEXPECTED, None
61gobject.type_register(FileSource)
62
63def main(args):

Callers

nothing calls this directly

Calls 1

seekMethod · 0.45

Tested by

no test coverage detected