本文整理汇总了Java中jp.co.cyberagent.android.gpuimage.GPUImage.setGLSurfaceView方法的典型用法代码示例。如果您正苦于以下问题:Java GPUImage.setGLSurfaceView方法的具体用法?Java GPUImage.setGLSurfaceView怎么用?Java GPUImage.setGLSurfaceView使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类jp.co.cyberagent.android.gpuimage.GPUImage
的用法示例。
在下文中一共展示了GPUImage.setGLSurfaceView方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreate
import jp.co.cyberagent.android.gpuimage.GPUImage; //导入方法依赖的package包/类
@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);
}
}
示例2: onCreate
import jp.co.cyberagent.android.gpuimage.GPUImage; //导入方法依赖的package包/类
@Override
public void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
((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);
}
}
示例3: onCreate
import jp.co.cyberagent.android.gpuimage.GPUImage; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.activity_realtime_camera_preview);
mSurfaceView = (GLSurfaceView) findViewById(R.id.gl_surface_view);
mGPUImage = new GPUImage(this);
mGPUImage.setGLSurfaceView(mSurfaceView);
mSeekBar = (SeekBar) findViewById(R.id.seekBar1);
mSeekBar.setMax(100);
mSeekBar.setEnabled(false);
mSeekBar.setOnSeekBarChangeListener(this);
// セピア
mSepia = new GPUImageSepiaFilter();
// 白黒
mGray = new GPUImageGrayscaleFilter();
// シャープ
// -4.0 to 4.0
mSharp = new GPUImageSharpenFilter();
// エッジ
// 0.0 to 5.0
mEdge = new GPUImageSobelEdgeDetection();
findViewById(R.id.sepia).setOnClickListener(this);
findViewById(R.id.gray).setOnClickListener(this);
findViewById(R.id.sharp).setOnClickListener(this);
findViewById(R.id.edge).setOnClickListener(this);
}
开发者ID:android-opensource-library-56,项目名称:android-opensource-library-56,代码行数:35,代码来源:RealtimeCameraPreviewActivity.java