Skip to content

CameraPreviewInput not working (including in examples) #10

@leeicmobile

Description

@leeicmobile

The View just remains blank with no camera preview updating, it does appear the render loops are being called and camTex.update is called, perhaps an issue with the shaders or the transform matrix? Any help much appreciated. code below:

protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);

    setContentView(R.layout.camera_layout);

    mGPUImageView = (FastImageProcessingView) findViewById(R.id.gpuImageView);

    pipeline = new FastImageProcessingPipeline();
    mGPUImageView.setPipeline(pipeline);

    input = new CameraPreviewInput(mGPUImageView);

    screen = new ScreenEndpoint(pipeline);

    input.addTarget(screen);

    pipeline.addRootRenderer(input);
    pipeline.startRendering();

}

onResume calls ((CameraPreviewInput) input).onResume();

onPause calls ((CameraPreviewInput) input).onPause();

R.layout.cameralayout includes:
<project.android.imageprocessing.FastImageProcessingView
android:id="@+id/gpuImageView"
android:layout_width="match_parent"
android:layout_height="match_parent" />

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions