GetNativeTexturePtr() to CVPixelBufferRef (plugin)

Hello,

I’m struggling with this. I have a renderTexture that I call GetNativeTexturePtr() and pass this as a parameter in a plugin call.

In the native iOS code, I wish to somehow convert this ptr into a CVPixelBufferRef that I want to pass as a parameter in a Google Cast Remote Display function:

  • (void)enqueueVideoFrame: (CVPixelBufferRef)frame pts: (CFTimeInterval)pts;

Does anyone have ideas as on how to do this?

The following is some code…

Unity:

[DllImport (“__Internal”)]
private static extern void _castFrame(System.IntPtr texturePtr);

_castFrame( _chromeCastTexture.GetNativeTexturePtr());

plugin code:

convert _chromeCastTexture.GetNativeTexturePtr() into a CVPixelBufferRef.

Same question here. Because I want to process AR face detection via Unity & ARCore. Looking answer. Thank you