Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I record with filter in Show + Capture Camera? #8

Closed
thenopen opened this issue Jul 22, 2014 · 1 comment
Closed

How can I record with filter in Show + Capture Camera? #8

thenopen opened this issue Jul 22, 2014 · 1 comment

Comments

@thenopen
Copy link

I've started android programming. I tried to review your code to CameraCameraActivity.
I don't know how can I record both video and filters to a file.
Please show me your hint.

@fadden
Copy link
Contributor

fadden commented Jul 22, 2014

For drawing on screen, CameraCaptureActivity sets up a GLES program with a filter and renders with it. For recording to video, a separate (but shared) EGL context is used. You'd need to modify TextureViewEncoder to set up and use a filter. An easy way to do that would be to clone CameraCaptureActivity#updateFilter() into TextureViewEncoder, which also uses a FullFrameRect for rendering.

Another approach would be to structure the code more like ContinuousCaptureActivity, which uses a single EGL context for rendering to the screen and to the video output file. CameraCaptureActivity uses separate EGL contexts because there's no real choice with GLSurfaceView.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants