I need to write a frame from a video stream to an image file. The stream is coming from a GStreamer Player, so it needs to be directed to a Surface
object (it won't accept an EGLSurface
). However, I'm trying to use Grafika's OffscreenSurface
as the output so that I can call saveFrame(File file)
to save the latest frame to a file.
So the problem is OffscreenSurface
uses an EGLSurface
rather than a Surface
, so I can't set it as the output location for the stream since Player#setSurface(Surface surface)
requires a Surface
.
Is there a way to get a Surface
object when creating an EGLSurface
, or possibly when creating an OffscreenSurface
from Grafika?