// Path: player-android/src/com/dxyh/fqrtmpplayer/util/Util.java
// public static void Assert(boolean cond) {
//     if (!cond) {
//         throw new AssertionError();
//     }
// }


import static com.dxyh.fqrtmpplayer.util.Util.Assert;
import java.io.IOException;
import android.hardware.Camera;
import android.hardware.Camera.CameraInfo;
import android.hardware.Camera.Parameters;
import android.os.Handler;
import android.os.HandlerThread;
import android.os.Looper;
import android.os.Message;
import android.util.Log;

                        if (CameraHolder.this.mUsers == 0)
                            releaseCamera();
                    }
                    break;
            }
        }
    }
    
    private CameraHolder() {
        HandlerThread ht = new HandlerThread("CameraHolder");
        ht.start();
        mHandler = new MyHandler(ht.getLooper());
        mNumberOfCameras = android.hardware.Camera.getNumberOfCameras();
        mInfo = new CameraInfo[mNumberOfCameras];
        for (int i = 0; i < mNumberOfCameras; ++i) {
            mInfo[i] = new CameraInfo();
            android.hardware.Camera.getCameraInfo(i, mInfo[i]);
        }
    }
    
    public int getNumberOfCameras() {
        return mNumberOfCameras;
    }

    public CameraInfo[] getCameraInfo() {
        return mInfo;
    }
    
    public synchronized android.hardware.Camera open(int cameraId)
            throws CameraHardwareException {

// Path: player-android/src/com/dxyh/fqrtmpplayer/util/Util.java
// public static void Assert(boolean cond) {
//     if (!cond) {
//         throw new AssertionError();
//     }
// }


// Path: player-android/src/com/dxyh/fqrtmpplayer/camera/CameraHolder.java
import static com.dxyh.fqrtmpplayer.util.Util.Assert;
import java.io.IOException;
import android.hardware.Camera;
import android.hardware.Camera.CameraInfo;
import android.hardware.Camera.Parameters;
import android.os.Handler;
import android.os.HandlerThread;
import android.os.Looper;
import android.os.Message;
import android.util.Log;

                        if (CameraHolder.this.mUsers == 0)
                            releaseCamera();
                    }
                    break;
            }
        }
    }
    
    private CameraHolder() {
        HandlerThread ht = new HandlerThread("CameraHolder");
        ht.start();
        mHandler = new MyHandler(ht.getLooper());
        mNumberOfCameras = android.hardware.Camera.getNumberOfCameras();
        mInfo = new CameraInfo[mNumberOfCameras];
        for (int i = 0; i < mNumberOfCameras; ++i) {
            mInfo[i] = new CameraInfo();
            android.hardware.Camera.getCameraInfo(i, mInfo[i]);
        }
    }
    
    public int getNumberOfCameras() {
        return mNumberOfCameras;
    }

    public CameraInfo[] getCameraInfo() {
        return mInfo;
    }
    
    public synchronized android.hardware.Camera open(int cameraId)
            throws CameraHardwareException {

        Assert(mUsers == 0);
