/// <summary> /// Method to be implemented by the provider to similar to /// <see cref="ConvertAsync(int, XRCameraImageConversionParams)"/> but takes a delegate to invoke when the /// request is complete, rather than returning a request id. /// </summary> /// <remarks> /// If the first parameter to <paramref name="callback"/> is /// <see cref="AsyncCameraImageConversionStatus.Ready"/> then the <c>dataPtr</c> parameter must be valid /// for the duration of the invocation. The data may be destroyed immediately upon return. The /// <paramref name="context"/> parameter must be passed back to the <paramref name="callback"/>. /// </remarks> /// <param name="nativeHandle">A unique identifier for the camera image to convert.</param> /// <param name="conversionParams">The parameters to use during the conversion.</param> /// <param name="callback">A delegate which must be invoked when the request is complete, whether the /// conversion was successfully or not.</param> /// <param name="context">A native pointer which must be passed back unaltered to /// <paramref name="callback"/>.</param> /// <exception cref="System.NotSupportedException">Thrown if the implementation does not support camera /// image.</exception> public virtual void ConvertAsync( int nativeHandle, XRCameraImageConversionParams conversionParams, OnImageRequestCompleteDelegate callback, IntPtr context) { throw new NotSupportedException("camera image conversion is not supported by this implementation"); }
/// <summary> /// Similar to <see cref="ConvertAsync(int, XRCameraImageConversionParams)"/> but takes a delegate to invoke /// when the request is complete, rather than returning a request id. /// </summary> /// <remarks> /// If the first parameter to <paramref name="callback"/> is /// <see cref="AsyncCameraImageConversionStatus.Ready"/> then the <c>dataPtr</c> parameter must be valid for /// the duration of the invocation. The data may be destroyed immediately upon return. The /// <paramref name="context"/> parameter must be passed back to the <paramref name="callback"/>. /// </remarks> /// <param name="nativeHandle">A unique identifier for the camera image to convert.</param> /// <param name="conversionParams">The parameters to use during the conversion.</param> /// <param name="callback">A delegate which must be invoked when the request is complete, whether the /// conversion was successfully or not.</param> /// <param name="context">A native pointer which must be passed back unaltered to <paramref name="callback"/>. /// </param> /// <exception cref="System.NotSupportedException">Thrown if the implementation does not support camera image. /// </exception> internal void ConvertAsync( int nativeHandle, XRCameraImageConversionParams conversionParams, OnImageRequestCompleteDelegate callback, IntPtr context) { m_Provider.ConvertAsync(nativeHandle, conversionParams, callback, context); }
/// <summary> /// Similar to <see cref="ConvertAsync(int, XRCpuImage.ConversionParams)"/> but takes a delegate to /// invoke when the request is complete, rather than returning a request id. /// </summary> /// <remarks> /// If the first parameter to <paramref name="callback"/> is /// <see cref="XRCpuImage.AsyncConversionStatus.Ready"/> then the <c>dataPtr</c> parameter must be valid /// for the duration of the invocation. The data may be destroyed immediately upon return. The /// <paramref name="context"/> parameter must be passed back to the <paramref name="callback"/>. /// </remarks> /// <param name="nativeHandle">A unique identifier for the camera image to convert.</param> /// <param name="conversionParams">The parameters to use during the conversion.</param> /// <param name="callback">A delegate which must be invoked when the request is complete, whether the /// conversion was successfully or not.</param> /// <param name="context">A native pointer which must be passed back unaltered to /// <paramref name="callback"/>.</param> public override void ConvertAsync( int nativeHandle, XRCpuImage.ConversionParams conversionParams, OnImageRequestCompleteDelegate callback, IntPtr context) { Native.CreateAsyncConversionRequestWithCallback( nativeHandle, conversionParams, callback, context); }
/// <summary> /// Similar to <see cref="ConvertAsync(int, XRCameraImageConversionParams)"/> but takes a delegate to /// invoke when the request is complete, rather than returning a request id. /// </summary> /// <remarks> /// If the first parameter to <paramref name="callback"/> is /// <see cref="AsyncCameraImageConversionStatus.Ready"/> then the <c>dataPtr</c> parameter must be valid /// for the duration of the invocation. The data may be destroyed immediately upon return. The /// <paramref name="context"/> parameter must be passed back to the <paramref name="callback"/>. /// </remarks> /// <param name="nativeHandle">A unique identifier for the camera image to convert.</param> /// <param name="conversionParams">The parameters to use during the conversion.</param> /// <param name="callback">A delegate which must be invoked when the request is complete, whether the /// conversion was successfully or not.</param> /// <param name="context">A native pointer which must be passed back unaltered to /// <paramref name="callback"/>.</param> public override void ConvertAsync( int nativeHandle, XRCameraImageConversionParams conversionParams, OnImageRequestCompleteDelegate callback, IntPtr context) { NativeApi.UnityARCore_Camera_CreateAsyncConversionRequestWithCallback( nativeHandle, conversionParams, callback, context); }
public static extern void CreateAsyncConversionRequestWithCallback( int nativeHandle, XRCpuImage.ConversionParams conversionParams, OnImageRequestCompleteDelegate callback, IntPtr context);
public void ConvertAsync(int nativeHandle, CameraImageConversionParams conversionParams, OnImageRequestCompleteDelegate callback, IntPtr context) { callback(AsyncCameraImageConversionStatus.Disposed, conversionParams, IntPtr.Zero, 0, context); }
public static void CreateAsyncConversionRequestWithCallback( int nativeHandle, XRCpuImage.ConversionParams conversionParams, OnImageRequestCompleteDelegate callback, IntPtr context) { throw new System.NotImplementedException(k_ExceptionMsg); }