Re: PixelBuffer API threading model?

2020-02-25 Thread Michael Paus
Am 25.02.20 um 15:51 schrieb Neil C Smith: In there, we have a small amount of locking between the GStreamer callback and the OpenGL thread to cover buffer swap and texture upload. Being able to do likewise with the PixelBuffer API, to swap or null the underlying buffer, would cover both use cas

Re: PixelBuffer API threading model?

2020-02-25 Thread Neil C Smith
Hi, On Tue, 25 Feb 2020 at 13:25, Kevin Rushforth wrote: > This points out a flaw in the specification. ... > To answer your other question about adding an API to PixelBuffer to swap > out the underlying Buffer (to avoid yet another copy), I'm not sure how > hard that would be (we currently assum

Re: PixelBuffer API threading model?

2020-02-25 Thread Kevin Rushforth
Hi Neil, I didn't look at your use case in detail, so I missed that you were talking about freeing the native memory that is backing your DirectBuffer. No, freeing the memory immediately after calling setImage(null) will not work. The JavaFX rendering is done in a different thread, which coul

Re: PixelBuffer API threading model?

2020-02-25 Thread Neil C Smith
On Fri, 21 Feb 2020 at 12:39, Kevin Rushforth wrote: > I missed seeing this yesterday. Since you have a test program, can you > file a bug at: > > https://bugreport.java.com/ > > and include your test case? Thanks Kevin. I need to replicate without a particular dependency, but will do ASAP. Can

Re: PixelBuffer API threading model?

2020-02-21 Thread Kevin Rushforth
I missed seeing this yesterday. Since you have a test program, can you file a bug at: https://bugreport.java.com/ and include your test case? Thanks. -- Kevin On 2/21/2020 3:17 AM, Neil C Smith wrote: Hi, On Tue, 18 Feb 2020 at 13:09, Neil C Smith wrote: the new JavaFX PixelBuffer API

Re: PixelBuffer API threading model?

2020-02-21 Thread Neil C Smith
Hi, On Tue, 18 Feb 2020 at 13:09, Neil C Smith wrote: > the new JavaFX PixelBuffer API ... > will result in occasional access attempts and segfaults in texture upload. Is this the wrong place to discuss the documentation and/or enhancement to the implementation of the PixelBuffer API? I have a

PixelBuffer API threading model?

2020-02-18 Thread Neil C Smith
Hi, I'm working on a project at the moment that is integrating GStreamer with the new JavaFX PixelBuffer API. The threading behaviour of that seems somewhat under documented. Assuming an Image backed by an externally provided ByteBuffer, when is it actually safe to free that native memory? Usin