// Path: apps/android/ONIRecorder/src/org/pointclouds/onirec/grab/ColorGenerator.java
// public interface ColorGenerator extends Generator {
//     ImageMetaData getMetaData();
// }
// 
// Path: apps/android/ONIRecorder/src/org/pointclouds/onirec/grab/ContextFactory.java
// public interface ContextFactory {
//     Context createContext() throws GeneralException;
// }
// 
// Path: apps/android/ONIRecorder/src/org/pointclouds/onirec/grab/DepthGenerator.java
// public interface DepthGenerator extends Generator {
//     DepthMetaData getMetaData();
// }


import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Rect;
import android.os.Handler;
import android.os.HandlerThread;
import android.os.Looper;
import android.os.SystemClock;
import android.util.Log;
import android.view.SurfaceHolder;
import org.pointclouds.onirec.grab.ColorGenerator;
import org.pointclouds.onirec.grab.ContextFactory;
import org.pointclouds.onirec.grab.DepthGenerator;
import org.OpenNI.*;
import java.io.File;
package org.pointclouds.onirec;



public class CaptureThreadManager {
    public interface Feedback {
        public enum Error {FailedToStartCapture, FailedDuringCapture, FailedToStartRecording}

        void setFps(double fps);

        void reportError(Error error, String oniMessage);

        void reportRecordingFinished();

        void reportCaptureStarted(MapOutputMode[] colorModes, MapOutputMode currentColorMode,
                                  MapOutputMode[] depthModes, MapOutputMode currentDepthMode);
    }

    private static final String TAG = "onirec.CaptureThreadManager";
    private final HandlerThread thread;
    private final Handler handler;
    private final Handler uiHandler = new Handler();
    private final SurfaceHolder holderColor;
    private final SurfaceHolder holderDepth;
    private final Feedback feedback;
    private final boolean enableVisualization;

    private org.pointclouds.onirec.grab.Context context;
// Path: apps/android/ONIRecorder/src/org/pointclouds/onirec/grab/ColorGenerator.java
// public interface ColorGenerator extends Generator {
//     ImageMetaData getMetaData();
// }
// 
// Path: apps/android/ONIRecorder/src/org/pointclouds/onirec/grab/ContextFactory.java
// public interface ContextFactory {
//     Context createContext() throws GeneralException;
// }
// 
// Path: apps/android/ONIRecorder/src/org/pointclouds/onirec/grab/DepthGenerator.java
// public interface DepthGenerator extends Generator {
//     DepthMetaData getMetaData();
// }


// Path: apps/android/ONIRecorder/src/org/pointclouds/onirec/CaptureThreadManager.java
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Rect;
import android.os.Handler;
import android.os.HandlerThread;
import android.os.Looper;
import android.os.SystemClock;
import android.util.Log;
import android.view.SurfaceHolder;
import org.pointclouds.onirec.grab.ColorGenerator;
import org.pointclouds.onirec.grab.ContextFactory;
import org.pointclouds.onirec.grab.DepthGenerator;
import org.OpenNI.*;
import java.io.File;

package org.pointclouds.onirec;



public class CaptureThreadManager {
    public interface Feedback {
        public enum Error {FailedToStartCapture, FailedDuringCapture, FailedToStartRecording}

        void setFps(double fps);

        void reportError(Error error, String oniMessage);

        void reportRecordingFinished();

        void reportCaptureStarted(MapOutputMode[] colorModes, MapOutputMode currentColorMode,
                                  MapOutputMode[] depthModes, MapOutputMode currentDepthMode);
    }

    private static final String TAG = "onirec.CaptureThreadManager";
    private final HandlerThread thread;
    private final Handler handler;
    private final Handler uiHandler = new Handler();
    private final SurfaceHolder holderColor;
    private final SurfaceHolder holderDepth;
    private final Feedback feedback;
    private final boolean enableVisualization;

    private org.pointclouds.onirec.grab.Context context;
    private ColorGenerator color;