mick11
lvl.2
Australia
Offline
|
I have developed an app that posts frames from the camera along with metadata using HTTP. To get the frames I have set a new SurfaceTextureListener on the fpvWidget in initUI:
fpvWidget = findViewById<View>(R.id.fpv_widget) as FPVWidget
fpvWidget?.surfaceTextureListener = object : SurfaceTextureListener {
override fun onSurfaceTextureAvailable(surface: SurfaceTexture, surf_width: Int, surf_height: Int) {
codecManager = DJICodecManager(applicationContext, surface, width, height)
}
}
This means I can get the raw image data later with:
val data = codecManager?.getYuvData(width, height)
This works perfectly on the Mavic 2 Enterprise Dual.
This does not work on the M300 with H20T.
Setting the SurfaceTextureListener on the fpvWidget on the M300 kills the video display on the widget and I can't access the image data. If I don't set the listener I can see the video display fine.
Can someone tell me why the behaviour is different, and how I can get screen grabs from the H20T feed on the M300?
Thanks,
Mick
|
|