/// <summary> /// Adds a pre-allocated buffer to the preview callback buffer queue. Applications can add one or more buffers /// to the queue. When a preview frame arrives and there is still at least one available buffer, the buffer will /// be used and removed from the queue. Then preview callback is invoked with the buffer. If a frame arrives and /// there is no buffer left, the frame is discarded. Applications should add buffers back when they finish /// processing the data in them. /// </summary> /// <param name="self">Camera object.</param> /// <param name="callbackBuffer">The buffer to add to the queue.</param> public static void AddCallbackBuffer(this Camera self, FastJavaByteArray callbackBuffer) { if (id_addCallbackBuffer_arrayB == IntPtr.Zero) { id_addCallbackBuffer_arrayB = JNIEnv.GetMethodID(self.Class.Handle, "addCallbackBuffer", "([B)V"); } JNIEnv.CallVoidMethod(self.Handle, id_addCallbackBuffer_arrayB, new JValue(callbackBuffer.Handle)); }
internal FastJavaByteArrayEnumerator(FastJavaByteArray arr) { if (arr == null) { throw new ArgumentNullException(); } _arr = arr; _idx = 0; }