Search in sources :

Example 1 with CameraHelper

use of jp.co.cyberagent.android.gpuimage.sample.utils.CameraHelper in project android-gpuimage by CyberAgent.

the class ActivityCamera method onCreate.

@Override
public void onCreate(final Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_camera);
    ((SeekBar) findViewById(R.id.seekBar)).setOnSeekBarChangeListener(this);
    findViewById(R.id.button_choose_filter).setOnClickListener(this);
    findViewById(R.id.button_capture).setOnClickListener(this);
    mGPUImage = new GPUImage(this);
    mGPUImage.setGLSurfaceView((GLSurfaceView) findViewById(R.id.surfaceView));
    mCameraHelper = new CameraHelper(this);
    mCamera = new CameraLoader();
    View cameraSwitchView = findViewById(R.id.img_switch_camera);
    cameraSwitchView.setOnClickListener(this);
    if (!mCameraHelper.hasFrontCamera() || !mCameraHelper.hasBackCamera()) {
        cameraSwitchView.setVisibility(View.GONE);
    }
}
Also used : SeekBar(android.widget.SeekBar) GPUImage(jp.co.cyberagent.android.gpuimage.GPUImage) GLSurfaceView(android.opengl.GLSurfaceView) View(android.view.View) CameraHelper(jp.co.cyberagent.android.gpuimage.sample.utils.CameraHelper)

Aggregations

GLSurfaceView (android.opengl.GLSurfaceView)1 View (android.view.View)1 SeekBar (android.widget.SeekBar)1 GPUImage (jp.co.cyberagent.android.gpuimage.GPUImage)1 CameraHelper (jp.co.cyberagent.android.gpuimage.sample.utils.CameraHelper)1