Hi, Everyone.
I’m trying to get raw bitmap data with setting preview callback by setPreviewCallback on ThetaX.
But it doesn’t work well. Because null has been passed to the callback first parameter always.
It should be byte array of raw bitmap data.
Below is my code based on plugin sample for ThetaX.
fun executeStartPreview() {
Log.i(TAG,"startPreview")
if (isPreview) {
//return
}
mCamera!!.apply {
setCameraParameters(MODE.PREVIEW)
// modify start here.
setPreviewCallback { data, _ ->
Log.d(TAG, "onPreviewCallback data=$data")
}
// modify end here.
startPreview()
}
isPreview = true
}
Below is execute result of above code.
2022-08-19 23:54:57.316 3928-3928/com.theta360.sample.camera D/Camera_API_Sample: onPreviewCallback data=null
2022-08-19 23:54:57.383 3928-3928/com.theta360.sample.camera D/Camera_API_Sample: onPreviewCallback data=null
I succeeded to get raw bitmap data on ThetaV by same way.
Could you help me if anyone knows the cause?
BR