Using OBS CEF with OnAcceleratedPaint2 #9939
Unanswered
andypmatrox
asked this question in
Development Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I would like to use the OnAcceleratedPaint2 callback in the OBS CEF library to read texture images from CEF into host memory. I know that OnAcceleratedPaint2 only gets called when the D3D shared texture handle changes so, for a given simple HTML 5 web page, OnAcceleratedPaint2 is most likely only going to be called once.
I have written code in a separate thread that reads the texture image (via a D3D staging texture) back into CPU memory at a given frame rate but I am concerned that on occasions the code maybe reading the same image twice.
Is it possible to synchronize the texture image reading with the CEF rendering cycle?
In other words, how can I find out that the image inside the shared texture has changed since the last time it was read?
I have seen comments suggesting the use of a IDXGIKeyedMutex but I have not seen any relevant code showing how this mutex is used.
Beta Was this translation helpful? Give feedback.
All reactions