RUVIDEO
Поделитесь видео 🙏

How to use android camera2 API's - Part 2 Setting preview surface width & height

Please note that I don't respond to questions on the youtube channel but for those that require help I provide paid consultancy services here https://www.codementor.io/mobapptuts

Part 2 of the camera2 API tutorial series which concentrates on the initial part of creating a preview to be assigned to a camera surface.

For more info checkout - https://www.nigeapptuts.com/?p=199

Part 1 - https://youtu.be/dfeencf-TpM

First of all the width & height of the TextureView in the xml layout has to be calculated.
A simple way of working this out is to create a SurfaceTextureListener whose onSurfaceTextureAvailable callback will provide the TextureView width & height.
Once we have these dimensions we then have to get the CameraCharacteristics of the particular camera we want to use and get the output sizes that will support the preview surface.

Once we find a close match for our requested TextureView width & height we will save those values. At this stage we will also have found the cameraId we will be using and that will also be saved to a member.

API's covered:
- CameraManager
- CameraManager.getSystemService
- CameraManager.getCameraIdList
- CameraManager.getCameraCharacteristics
- CameraCharacteristics.get
- StreamConfigurationMap

Android studio (1.3) is the editor of choice (IDE) for this tutorial series.

This tutorial series is the start of what I expect to be many so I encourage comments and feedback to improve the quality and viewing experience.

Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «How to use android camera2 API's - Part 2 Setting preview surface width & height», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.

Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.

Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!

Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.