SetCallback() static private method

Connect a callback to a camera for access to the pixels. This is not recommended for display but for applications requiring access to the HAL_PIXEL_FORMAT_YV12 pixel data. The camera is selected via TangoCameraId. Currently only TANGO_CAMERA_COLOR and TANGO_CAMERA_FISHEYE are supported. The onImageAvailable callback will be called when a new frame is available from the camera. The Enable Video Overlay option must be enabled for this to succeed. Note: The first scan-line of the color image is reserved for metadata instead of image pixels.
static private SetCallback ( TangoEnums cameraId, TangoService_onImageAvailable onImageAvailable ) : void
cameraId TangoEnums /// The ID of the camera to connect this texture to. Only TANGO_CAMERA_COLOR and /// TANGO_CAMERA_FISHEYE are supported. ///
onImageAvailable TangoService_onImageAvailable Function called when a new frame is available from the camera.
return void
        /// <summary>
        /// Register to get Tango image events for getting the texture byte buffer callback.
        ///
        /// NOTE: Tango image events happen on a different thread than the main
        /// Unity thread.
        /// </summary>
        internal static void SetCallbackByteBufferMethod()
        {
            if (m_onImageAvailable != null)
            {
                Debug.Log("VideoOverlayProvider.SetCallbackByteBufferMethod() called when a callback is already set.");
                return;
            }

            Debug.Log("VideoOverlayProvider.SetCallbackByteBufferMethod()");
            m_onImageAvailable = new VideoOverlayProvider.APIOnImageAvailable(_OnImageAvailable);
            VideoOverlayProvider.SetCallback(COLOR_CAMERA_ID, m_onImageAvailable);
        }
        /// <summary>
        /// Register to get Tango texture events when the camera is updated.
        ///
        /// NOTE: Tango texture events happen on a different thread than the main Unity thread.
        /// </summary>
        internal static void SetCallbackTextureMethod()
        {
            if (m_onTextureAvailable != null)
            {
                Debug.Log("VideoOverlayProvider.SetCallbackTextureMethod() called when a callback is already set.");
                return;
            }

            Debug.Log("VideoOverlayProvider.SetCallbackTextureMethod()");
            m_onTextureAvailable = new VideoOverlayProvider.APIOnTextureAvailable(_OnTangoCameraTextureAvailable);
            VideoOverlayProvider.SetCallback(COLOR_CAMERA_ID, m_onTextureAvailable);
        }
 /// <summary>
 /// Register to get Tango image events for getting the texture byte buffer callback.
 ///
 /// NOTE: Tango image events happen on a different thread than the main
 /// Unity thread.
 /// </summary>
 internal void SetCallbackByteBufferMethod()
 {
     m_previousImageBuffer = new TangoUnityImageData();
     m_onImageAvailable    = new VideoOverlayProvider.TangoService_onImageAvailable(_OnImageAvailable);
     VideoOverlayProvider.SetCallback(COLOR_CAMERA_ID, m_onImageAvailable);
 }
 /// <summary>
 /// Register to get Tango texture events when the camera is updated.
 ///
 /// NOTE: Tango texture events happen on a different thread than the main Unity thread.
 /// </summary>
 internal void SetCallbackTextureMethod()
 {
     m_onTextureAvailable = new VideoOverlayProvider.TangoService_onTextureAvailable(_OnTangoCameraTextureAvailable);
     VideoOverlayProvider.SetCallback(COLOR_CAMERA_ID, m_onTextureAvailable);
     Debug.Log("VideoOverlayListener.SetCallback() : Texture listener hooked up");
 }