Skip to content

Set preview size based on camera capabilities #21

Open
@omares

Description

@omares

I would like to set the preview size depending on the camera capabilities. As example always use the middle size of the supported sizes. Unfortunately the size information is only available when the camera object is present, in the case of android-vision this is after CameraSource.Builder.Build() was called. As the builder requires the parameters before calling build you end up with a dead end.

Setting the preview size directly on the camera, after the the camera source class was build, currently leads to errors as the expected byte sizes differ.

Is there currently any possibility/hack to solve the issue above?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions