Open clintlombard opened 2 years ago
I am interested in this issue too because I also had similar problem.
Do you have any progress for this?
Could you provide runnable sample code including main()?
I want look into it later.
The only solution I could come up with using appsink
was:
buffer.Map(gst.MapRead).Bytes()
which makes a copy.
However, if you use an identity
element and use it's handoff
signal then the no copy access works. There must be something special with appsink
that breaks this.
@clintlombard move this issue to https://github.com/go-gst/go-gst (where future development of the bindings will take place) if you think it is necessary.
There seems to be a memory leak (or unbounded memory growth) when using and
appsink
element and mapping a new sample's buffer but not copying the data out. This can be reproduced using the appsink example, and changing to thevideotestsrc
, as follows :The main change from this
to this
By not calling
AsInt16LESlice()
(or any of the other methods that make a copy of the data, e.g.Bytes()
), the memory will grow.I'm trying to get zero-copy access to the underlying data, as follows: