Skip to content

rewrite CameraController.java to work with both camera1 and camera2#1

Open
opiumfive wants to merge 1 commit into
bugfixfrom
camera2
Open

rewrite CameraController.java to work with both camera1 and camera2#1
opiumfive wants to merge 1 commit into
bugfixfrom
camera2

Conversation

@opiumfive

@opiumfive opiumfive commented Feb 14, 2021

Copy link
Copy Markdown
Owner

Made Telegram CameraController support both camera1 and camera2, that brings camera2 features to the Telegram app.

Added Camera2 support in Camera2Controller class for all use cases like camera previews, photo captures, video records and instant video capture. Code for Camera2 follows the same style as the existing code base.

Added an interface and a fabric class CameraController that decides which camera API to use on a given device.

The original CameraController is kept intact, except for adding the interface implementation and renaming to Camera1Controller,
so minimal changes added in original code => no bugs added for Camera1 usage, ensuring backward compatibility with Android 4.x -6.0 and devices, which don't support Camera2 API.

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

Successfully merging this pull request may close these issues.

1 participant