Reputation: 135
I used grafika library to continuous encode video frames with old camera API.
Because the old camera API needs a visible SurfaceView
to receive data from camera, so I'm trying to use camera2 to replace old camera API.
The camera2 API can use ImageReader
to receive data without visible View, so I try to use ImageReader
to repleace SurfaceView. But I face a strange problem that I can not do createCaptureSession
successfully after I do mDisplaySurface = WindowSurface(mEglCore, imageReader.surface, false)
from grafika example
There has no message from onConfigureFailed
of createCaptureSession
, so I don't know what happened with these.
Can someone help me figure it out? or tell me how to use camera2 to encode video's frame data?
Upvotes: 0
Views: 230