Please select Into the mobile phone version | Continue to access the computer ver.
Mobile SDK differences for M300/M2ED
Uploading and Loding Picture ...(0/1)
o(^-^)o
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
1-8 02:03
Use props
kv886
Second Officer

South Africa
Offline

Because UXSDK is not compatible with H20
1-8 02:45
Use props
mick11
lvl.2

Australia
Offline

kv886 Posted at 1-8 02:45
Because UXSDK is not compatible with H20

Oh that's a shame, though it's weird that if I don't set the SurfaceTextureListener the FPVWidget works as you would expect (though I have not tried to do much else with it).

Can you suggest another way I could grab frames from the video feed?
1-8 04:42
Use props
Advanced
You need to log in before you can reply Login | Register now

Credit Rules