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

Method mix_buffers

examples/plugins/python/mixer.py:67–80  ·  view source on GitHub ↗
(self, agg, pad, bdata)

Source from the content-addressed store, hash-verified

65 )
66
67 def mix_buffers(self, agg, pad, bdata):
68 buf = pad.pop_buffer()
69 _, info = buf.map(Gst.MapFlags.READ)
70
71 img = Image.frombuffer('RGBA', (320, 240), info.data, "raw", 'RGBA', 0, 1)
72
73 bdata.outimg = Image.blend(bdata.outimg, img, alpha=0.5)
74 bdata.pts = buf.pts
75
76 buf.unmap(info)
77
78 bdata.eos = False
79
80 return True
81
82 def do_aggregate(self, timeout):
83 outimg = Image.new('RGBA', (320, 240), 0x00000000)

Callers

nothing calls this directly

Calls 2

mapMethod · 0.45
unmapMethod · 0.45

Tested by

no test coverage detected