دوربین ایکس
این جدول تمام مصنوعات موجود در گروه androidx.camera را فهرست میکند.
| مصنوع | انتشار پایدار | کاندیدای انتشار | انتشار بتا | انتشار آلفا |
|---|---|---|---|---|
| دوربین-دوربین2 | ۱.۶.۰ | - | - | ۱.۷.۰-آلفا۰۱ |
| دوربین-هسته | ۱.۶.۰ | - | - | ۱.۷.۰-آلفا۰۱ |
| دوربین-نوشتن | ۱.۶.۰ | - | - | ۱.۷.۰-آلفا۰۱ |
| جلوههای دوربین | ۱.۶.۰ | - | - | ۱.۷.۰-آلفا۰۱ |
| افزونههای دوربین | ۱.۶.۰ | - | - | ۱.۷.۰-آلفا۰۱ |
| پرس و جو در مورد ترکیب ویژگیهای دوربین | - | - | - | ۱.۵.۰-آلفا۰۶ |
| خدمات-ترکیب-ویژگی-دوربین-پرسش-بازی | - | - | - | ۱.۵.۰-آلفا۰۶ |
| چرخه عمر دوربین | ۱.۶.۰ | - | - | ۱.۷.۰-آلفا۰۱ |
| دوربین-mlkit-vision | ۱.۶.۰ | - | - | ۱.۷.۰-آلفا۰۱ |
| نمای دوربین | ۱.۶.۰ | - | - | ۱.۷.۰-آلفا۰۱ |
| منظره یاب دوربین | - | - | ۱.۳.۰-بتا۰۲ | ۱.۴.۰-آلفا۰۷ |
| دوربین-فیلمبرداری | ۱.۶.۰ | - | - | ۱.۷.۰-آلفا۰۱ |
آزمایش دستگاه
CameraX روی بسیاری از دستگاههای آزمایشگاه ما آزمایش شده است. برای مشاهدهی فهرست دستگاههایی که در حال حاضر در آزمایشگاه هستند، به بخش دستگاههای آزمایششده در آزمایشگاه CameraX مراجعه کنید.
اعلام وابستگیها
برای افزودن وابستگی به CameraX، باید مخزن Google Maven را به پروژه خود اضافه کنید. برای اطلاعات بیشتر، مخزن Google's Maven را مطالعه کنید.
وابستگیهای مربوط به مصنوعات مورد نیاز خود را در فایل build.gradle برای برنامه یا ماژول خود اضافه کنید:
Groovy
dependencies { // CameraX core library using the camera2 implementation def camerax_version = "1.7.0-alpha01" // The following line is optional, as the core library is included indirectly by camera-camera2 implementation "androidx.camera:camera-core:${camerax_version}" implementation "androidx.camera:camera-camera2:${camerax_version}" // If you want to additionally use the CameraX Lifecycle library implementation "androidx.camera:camera-lifecycle:${camerax_version}" // If you want to additionally use the CameraX VideoCapture library implementation "androidx.camera:camera-video:${camerax_version}" // If you want to additionally use the CameraX View class implementation "androidx.camera:camera-view:${camerax_version}" // If you want to additionally add CameraX ML Kit Vision Integration implementation "androidx.camera:camera-mlkit-vision:${camerax_version}" // If you want to additionally use the CameraX Extensions library implementation "androidx.camera:camera-extensions:${camerax_version}" }
Kotlin
dependencies { // CameraX core library using the camera2 implementation val camerax_version = "1.7.0-alpha01" // The following line is optional, as the core library is included indirectly by camera-camera2 implementation("androidx.camera:camera-core:${camerax_version}") implementation("androidx.camera:camera-camera2:${camerax_version}") // If you want to additionally use the CameraX Lifecycle library implementation("androidx.camera:camera-lifecycle:${camerax_version}") // If you want to additionally use the CameraX VideoCapture library implementation("androidx.camera:camera-video:${camerax_version}") // If you want to additionally use the CameraX View class implementation("androidx.camera:camera-view:${camerax_version}") // If you want to additionally add CameraX ML Kit Vision Integration implementation("androidx.camera:camera-mlkit-vision:${camerax_version}") // If you want to additionally use the CameraX Extensions library implementation("androidx.camera:camera-extensions:${camerax_version}") }
بازخورد
بازخورد شما به بهبود Jetpack کمک میکند. اگر مشکلات جدیدی کشف کردید یا ایدههایی برای بهبود این کتابخانه دارید، به ما اطلاع دهید. لطفاً قبل از ایجاد یک کتابخانه جدید، نگاهی به مشکلات موجود در این کتابخانه بیندازید. میتوانید با کلیک بر روی دکمه ستاره، رأی خود را به یک مشکل موجود اضافه کنید.
برای اطلاعات بیشتر به مستندات ردیاب مشکل مراجعه کنید.
منظرهیاب دوربین، نسخه ۱.۰ را ترکیب میکند
نسخه ۱.۰.۰-آلفا۰۲
۱۲ ژوئن ۲۰۲۴
androidx.camera:camera-viewfinder-compose:1.0.0-alpha02 منتشر شد. نسخه 1.0.0-alpha02 شامل این کامیتها است.
نسخه ۱.۰.۰-آلفا۰۱
۱۴ مه ۲۰۲۴
androidx.camera:camera-viewfinder-compose:1.0.0-alpha01 منتشر شد. نسخه 1.0.0-alpha01 شامل این کامیتها است.
ویژگیهای جدید
- کتابخانه جدید. این کتابخانه یک منظرهیاب بومی Compose قابل ترکیب معرفی میکند که میتواند با CameraX و Camera2 مورد استفاده قرار گیرد. منظرهیاب قابل ترکیب از نسبتهای ابعاد مختلف و مدیریت رویدادهای لمسی پشتیبانی میکند.
منظرهیاب دوربین نسخه ۱.۴
نسخه ۱.۴.۰-آلفا۰۷
۱۲ ژوئن ۲۰۲۴
androidx.camera:camera-viewfinder:1.4.0-alpha07 و androidx.camera:camera-viewfinder-core:1.4.0-alpha07 منتشر شدند. نسخه 1.4.0-alpha07 شامل این کامیتها است.
نسخه ۱.۴.۰-alpha06
۱۴ مه ۲۰۲۴
androidx.camera:camera-viewfinder:1.4.0-alpha06 و androidx.camera:camera-viewfinder-core:1.4.0-alpha06 منتشر شدند. نسخه 1.4.0-alpha06 شامل این کامیتها است.
تغییرات API
- نام Enumهای
ImplementationModeدرViewfinderرا تغییر دهید تا پیادهسازیهای اساسی را بهتر منعکس کنید و ثابتهای ثابتی برایTransformationInfo.sourceRotationاضافه کنید. ( Ic6149 ) -
ZoomGestureDetector.ZoomEventبرای کپسولهسازی حالتهای یک حرکت بزرگنمایی اضافه شد. ( I84cdf )
نسخه ۱.۷
نسخه ۱.۷.۰-آلفا۰۱
۱۱ مارس ۲۰۲۶
androidx.camera:camera-*:1.7.0-alpha01 منتشر شد. نسخه 1.7.0-alpha01 شامل این کامیتها است.
تغییرات API
- API مربوط به
CameraController.setSessionConfig()را نمایش داد. این امکان ارائه یکSessionConfigسفارشی برای پیکربندیهای پیشرفتهUseCaseکه مستقیماً توسطCameraControllerنمایش داده نمیشوند را فراهم میکند. هنگامی کهSessionConfigفعال است، سایر متدهای پیکربندی درCameraControllerغیرفعال میشوند. ( I35cf1 , b/448525636 )
رفع اشکالات
- کتابخانهها را به سمت استفاده از نسخه هدف جاوا ۱۱ سوق میدهد. این یعنی بایتکد تولید شده جاوا ۱۱ (فایل کلاس نسخه ۵۵) خواهد بود و ممکن است برای استفاده از کتابخانه نیاز به desugaring داشته باشد ( If4c2a ، b/457821470 )
- اشکالی در
ImageAnalysisکه باعث میشد تصاویر هنگام فعال بودن چرخش تصویر خروجی و چرخش نسبی اولیه ۰ درجه، به درستی چرخانده نشوند، برطرف شد. ( Id46c2 ، b/487160584 )
دوربین نسخه ۱.۶
نسخه ۱.۶.۰
۲۵ مارس ۲۰۲۶
androidx.camera:camera-*:1.6.0 منتشر شد. نسخه ۱.۶.۰ شامل این کامیتها است.
تغییرات مهم از زمان ۱.۵.۰:
۱. به یک مجموعه دوربین یکپارچه و با کارایی بالا منتقل شده است
- CameraX اکنون از
CameraPipeاستفاده میکند - همان پشته مدرن و با کارایی بالا که دوربین Pixel را تغذیه میکند. این انتقال، کارایی معماری را ساده میکند و پایهای مقیاسپذیر برای آوردن ویژگیهای پیشرفته عکاسی محاسباتی به اکوسیستم توسعهدهندگان فراهم میکند.
۲. ادغام مدیا۳ با مکسِر
- CameraX اکنون Media3 Muxer را به طور پیشفرض در VideoCapture API ادغام میکند. این مهاجرت مزایای متعددی را ارائه میدهد:
- عملکرد بهبود یافته: پردازش و ترکیب ویدیو کارآمدتر.
- مقاومت در برابر خرابی: محافظت بهبود یافته در برابر خرابی فایل ویدیویی، تضمین میکند که حتی اگر برنامه هنگام ضبط از کار بیفتد، دادهها حفظ میشوند.
۳. بهبود گروه ویژگیها
- API گروه ویژگیها اکنون از تثبیتکننده ویدیو و ضبط 4K پشتیبانی میکند.
GroupableFeaturesشاملVIDEO_STABILIZATIONوUHD_RECORDINGاست تا به برنامهها اجازه دهد آنها را همراه با سایر ویژگیها فعال کنند.CameraEffectوImageAnalysisدرSessionConfigزمانی پشتیبانی میشوند که گروه ویژگی فعال باشد.
۴. API تثبیتشدهی SessionConfig
-
SessionConfigاز حالت آزمایشی به یک API عمومی کاملاً پایدار شاملSessionConfigوHighSpeedVideoSessionConfigارتقا یافته است. افزونههای CameraX اکنون میتوانند با یکExtensionSessionConfigAP جدید پیادهسازی شوند. یک API جدیدisSessionConfigSupportedمعرفی شده است که به توسعهدهندگان اجازه میدهد قبل از اتصال به چرخه عمر، بررسی کنند که آیا ترکیبی خاص از موارد استفاده و ویژگیها (مانند HDR، تثبیت، وضوحهای خاص، افزونههای CameraX یا حرکت آهسته) توسط دستگاه پشتیبانی میشود یا خیر.
رفع اشکالات
- مشکلی که در تمام برنامههای CameraX که روی دستگاههای اندروید ۱۷ جدید اجرا میشوند، به دلیل اضافه شدن یک حالت محدوده دینامیکی ناشناخته که CameraX به درستی آن را مدیریت نکرده بود، رخ میداد، برطرف شد. همین مشکل در نسخه ۱.۵.۲ نیز برطرف شده است. لطفاً نسخه CameraX خود را به ۱.۵.۲ یا ۱.۶.۰ بهروزرسانی کنید تا از مشکل هنگام انتشار اندروید ۱۷ جلوگیری شود . ( Ibd7b5 )
- API گروه ویژگی اکنون نتایج ثابتی را هنگام استفاده از
PREVIEW_STABILIZATIONباVideoCaptureارائه میدهد. این اشکالی را که باعث نتایج نامتناسب هنگام فعال نبودن مورد استفاده Preview میشد، اصلاح میکند. ( Ifed82 ، b/449913903 ) - مشکلی که باعث میشد ویژگیهای ترجیحی پشتیبانی نشده به اشتباه در دسترس قرار گیرند، برطرف شد. اکنون ویژگیها در صورت عدم برآورده شدن موارد استفاده مورد نیازشان، به درستی فیلتر میشوند. ( I38db8 , b/449532342 )
- مشکل قطعی ویدیو در سامسونگ گلکسی S6 ( I612d9 ، b/235127608 ) برطرف شد.
- مشکلی که باعث میشد
CameraInfo#isFeatureGroupSupportedدر صورتی کهSessionConfigدر کوئری از قبل با ویژگیهای دیگری پیکربندی شده باشد، به اشتباه برایPREVIEW_STABILIZATIONمقدار true برگرداند، برطرف شد. ( I2c355c ، b/437816469 ) - اندازههای خروجی مشکلساز فرمت YUV از دستگاه سامسونگ Z Fold 4 حذف شدند. تصاویر دریافتی هنگام استفاده از این اندازههای خروجی دارای مشکل اعوجاج هستند. ( I776bf ، b/460322307 )
- مشکلی که مختص دستگاه سامسونگ A53 بود و باعث میشد گاهی اوقات در صورت محدود بودن استفاده
VideoCaptureضبط تصویر با فعال بودن چراغ قوه با شکست مواجه شود، برطرف شد. ( I0f183 ، b/458197367 ) - مشکلی را که در برخی دستگاهها وجود داشت و استفاده از فلاش با دوربین فوق عریض ممکن بود منجر به تصاویر با نوردهی کم شود، برطرف میکند. ( Ib7530 ، b/444590340 )
- وابستگی
ExifInterfaceبهروزرسانی شد تا شامل اصلاحیهای برای تجزیه JPEG با padding0xFFباشد، که خطاهای ضبط تصویر را در دستگاههایی که رمزگذار JPEG قبل از نشانگرها بایتهای پرکننده اضافه میکند، برطرف میکند. ( I0eb49 )
نسخه ۱.۶.۰-rc01
۲۵ فوریه ۲۰۲۶
androidx.camera:camera-*:1.6.0-rc01 منتشر شد. نسخه 1.6.0-rc01 شامل این کامیتها است.
نسخه ۱.۶.۰-بتا۰۲
۱۱ فوریه ۲۰۲۶
androidx.camera:camera-*:1.6.0-beta02 منتشر شد. نسخه 1.6.0-beta02 شامل این کامیتها است.
رفع اشکالات
- مشکل ضبط درون حافظه
ImageCaptureOUTPUT_FORMAT_RAW_JPEG باIllegalArgumentExceptionبرطرف شد. ( Id4eec ، b/479990902 ) - به میکسر AndroidX Media3 مهاجرت شد. این مشکل ۱: خرابی ویدیو در هنگام وقفههای غیرمنتظره یا خاتمه برنامه و ۲: خرابی هنگام ذخیره ویدیوها در توصیفگرهای فایل پروکسی را برطرف کرد. ( I23b63 ، b/433649708 ، b/264812009 ، b/475750115 )
نسخه ۱.۶.۰-بتا۰۱
۲۸ ژانویه ۲۰۲۶
androidx.camera:camera-*:1.6.0-beta01 منتشر شد. نسخه 1.6.0-beta01 شامل این کامیتها است.
رفع اشکالات
- مشکل نوع فعلی
CameraExtensionsInfoدر CameraX 1.6.0-alpha که شیء LiveData نمیتوانست دادههای نوع بهروزرسانیشده را دریافت کند، برطرف شد. ( I2c7a5 ) - وابستگی ExifInterface بهروزرسانی شد تا شامل اصلاحیهای برای تجزیه JPEG با padding 0xFF باشد، که خطاهای ضبط تصویر را در دستگاههایی که رمزگذار JPEG قبل از نشانگرها بایتهای پرکننده اضافه میکند، برطرف میکند. ( I0eb49 )
نسخه ۱.۶.۰-آلفا۰۲
۱۷ دسامبر ۲۰۲۵
androidx.camera:camera-*:1.6.0-alpha02 منتشر شد. نسخه 1.6.0-alpha02 شامل این کامیتها است.
ویژگیهای جدید
- یک ویژگی قابل گروهبندی برای مشخص کردن ویژگی تثبیت ویدیو در پیکربندی جلسه اضافه شد. توسعهدهندگان اکنون میتوانند تثبیت ویدیو را به عنوان یک ویژگی مورد نیاز یا ترجیحی درخواست کنند و آن را با سایر ویژگیهای قابل گروهبندی مانند UHD_RECORDING، PREVIEW_STABILIZATION همسو کنند. ( Ic6757 ، b/419766630 )
- ویژگیهای گروهبندیشده برای نشان دادن کیفیت ضبط ویدیو در پیکربندی جلسه اضافه شد. توسعهدهندگان اکنون میتوانند یک کیفیت خاص (مثلاً UHD، FHD) را به عنوان یک ویژگی مورد نیاز یا ترجیحی درخواست کنند و آن را با سایر ویژگیهای گروهبندیشده مانند HDR و 60 FPS هماهنگ کنند. ( Ib5cd3 ، b/437820285 )
- پشتیبانی برای استفاده از
CameraEffectو API گروههای ویژگی درSessionConfigاضافه شد. ( I17f18 ، b/406370934 ) - پشتیبانی برای استفاده از هر دو API
ImageAnalysisو گروههای ویژگی درSessionConfigاضافه شد. ( I87833 ، b/406371720 )
تغییرات API
- تابع تنظیمکنندهی
addUseCaseبرایExtensionSessionConfig.Builderاضافه شد و getterهای فاقد آن برایExtensionSessionConfigاضافه شدند. ( I71e07 ، b/453988621 ) - API مربوط به
ExtensionsManager.getInstanceاضافه شد که نسخهای در حال تعلیق ازExtensionsManager.getInstanceAsyncاست ( I3a0a9 ، b/452208792 ) - نام
isFeatureGroupSupportedبهisSessionConfigSupportedتغییر داده شد و کاری کرد که از هر نوعSessionConfigپشتیبانی کند. ( I21616 , b/448781299 ) -
ExtensionsManagerبه پیادهسازی Kotlin تبدیل شد. ( I73091 ، b/452208792 ) -
CameraProvider#getCameraInfo(CameraSelector, SessionConfig)برای بازیابیCameraInfoزمانی کهSessionConfigمیتواند بر انتخاب دوربین تأثیر بگذارد، اضافه شد. برای مثال، هنگام استفاده ازExtensionSessionConfig. ( Ic548c , b/451891648 ) - API
ExtensionSessionConfigافشا شد. برنامهها میتوانند یکExtensionSessionConfigایجاد کرده و از آن برای ایجاد یک جلسه افزونهها استفاده کنند. ( I6354c ، b/448524373 ) - رابط برنامهنویسی کاربردی
androidx.camera.video.HighSpeedVideoSessionConfigدیگر آزمایشی نیست و اکنون یک رابط برنامهنویسی کاربردی عمومی کاملاً پایدار است. ( I492d4 , b/447558239 ) - رابط برنامهنویسی کاربردی
androidx.camera.core.SessionConfigدیگر آزمایشی نیست و اکنون یک رابط برنامهنویسی کاربردی عمومی کاملاً پایدار است. ( Idc87a , b/447558437 )
رفع اشکالات
- رفع مشکل از کار افتادن برنامه به دلیل خطای
IllegalArgumentException: Dynamic range profile cannot be converted to a DynamicRange object:در اندروید ۱۷ یا بالاتر. ( Ibd7b5 ، b/463465353 ) - اندازههای خروجی مشکلساز فرمت YUV از دستگاه سامسونگ Z Fold 4 حذف شدند. تصاویر دریافتی هنگام استفاده از این اندازههای خروجی دارای مشکل اعوجاج هستند. ( I776bf ، b/460322307 )
- رفع مشکل عدم اعمال
CaptureRequest.FLASH_MODEهنگام تنظیم از طریقCamera2InteropAPI ( I0004c ، b/459608684 ) - مشکلی که مختص دستگاه سامسونگ A53 بود و باعث میشد گاهی اوقات در صورت محدود بودن استفاده
VideoCaptureضبط تصویر با فعال بودن چراغ قوه با شکست مواجه شود، برطرف شد. ( I0f183 ، b/458197367 ) - مشکلی را که در برخی دستگاهها وجود داشت و استفاده از فلاش با دوربین فوق عریض ممکن بود منجر به تصاویر با نوردهی کم شود، برطرف میکند. ( Ib7530 ، b/444590340 )
نسخه ۱.۶.۰-آلفا۰۱
۲۲ اکتبر ۲۰۲۵
androidx.camera:camera-*:1.6.0-alpha01 منتشر شد. نسخه 1.6.0-alpha01 شامل این کامیتها است.
ویژگیهای جدید
- CameraX به یک مجموعه دوربین یکپارچه و با عملکرد بالا مهاجرت کرده است که توسط برنامه دوربین Pixel نیز استفاده میشود. این مجموعه جدید که با نام
CameraPipeشناخته میشود، حاصل همکاری بین تیمهای CameraX و Pixel Camera است. این امر تضمین میکند که همه پیشرفتها به اشتراک گذاشته میشوند و هم به نفع کاربران CameraX و هم به نفع برنامه دوربین Pixel خواهد بود.
تغییرات API
- APIهای جدیدی برای تشخیص پویای اضافه/حذف دوربین اضافه شده است. برای جزئیات بیشتر به API
CameraPresenceListenerمراجعه کنید. ( I41ead ، b/427182232 ، b/419441394 )
رفع اشکالات
- API گروه ویژگی اکنون نتایج ثابتی را هنگام استفاده از
PREVIEW_STABILIZATIONباVideoCaptureارائه میدهد. این اشکالی را که باعث نتایج نامتناسب هنگام فعال نبودن مورد استفادهPreviewمیشد، اصلاح میکند. ( Ifed82 ، b/449913903 ) - مشکلی که باعث میشد ویژگیهای ترجیحی پشتیبانی نشده به اشتباه در دسترس قرار گیرند، برطرف شد. اکنون ویژگیها در صورت عدم برآورده شدن موارد استفاده مورد نیازشان، به درستی فیلتر میشوند. ( I38db8 , b/449532342 )
- مشکل قطعی ویدیو در سامسونگ گلکسی S6 ( I612d9 ، b/235127608 ) برطرف شد.
- مشکلی که باعث میشد
CameraInfo#isFeatureGroupSupportedدر صورتی کهSessionConfigدر کوئری از قبل با ویژگیهای دیگری پیکربندی شده باشد، به اشتباه برایPREVIEW_STABILIZATIONمقدار true برگرداند، برطرف شد. ( I2c355c ، b/437816469 )
دوربین نسخه ۱.۵
نسخه ۱.۵.۳
۲۸ ژانویه ۲۰۲۶
androidx.camera:camera-*:1.5.3 منتشر شد. نسخه ۱.۵.۳ شامل این کامیتها است.
رفع اشکالات
- وابستگی ExifInterface به نسخه ۱.۴.۲ بهروزرسانی شد. این بهروزرسانی، خطای ثبت تصویر را که در دستگاههایی که JPEG با بایتهای اضافی (و مجاز) 0xFF قبل از نشانگر تولید میکنند، رخ میدهد، برطرف میکند. ( I16df4 )
نسخه ۱.۵.۲
۴ دسامبر ۲۰۲۵
androidx.camera:camera-*:1.5.2 منتشر شد. نسخه ۱.۵.۲ شامل این کامیتها است.
رفع اشکالات
- رفع مشکل از کار افتادن برنامه به دلیل خطای
IllegalArgumentException: Dynamic range profile cannot be converted to a DynamicRange object:در اندروید ۱۷ یا بالاتر ( Ic9184 ) - اشکالی که منجر به نتایج API گروه ویژگی متناقض میشد، زمانی که ویژگی
PREVIEW_STABILIZATIONبا مورد استفادهVideoCaptureاضافه شده بود، اما بدون مورد استفادهPreviewرفع شد. ( Ifed82 ) - رفع مشکل فیلتر نشدن ویژگیهای ترجیحی با وجود فقدان موارد استفاده مورد نیاز برای پشتیبانی از ویژگیها. ( I38db8 )
نسخه ۱.۵.۱
۸ اکتبر ۲۰۲۵
androidx.camera:camera-*:1.5.1 منتشر شد. نسخه ۱.۵.۱ شامل این کامیتها است.
رفع اشکالات
- پشتیبانی از
CameraEffectدر حالت ترکیب دوربین همزمان. این افکت روی خروجی ترکیب اعمال خواهد شد. لطفاً توجه داشته باشید کهmirrorModeدرVideoCaptureهنگام تنظیم افکت در حالت ترکیب دوربین همزمان نادیده گرفته میشود. ( If3d00 , b/425565129 ) - مشکلی که باعث میشد
mirrorModeدر حالت ترکیب دوربین همزمان به درستی روی دوربین ثانویه اعمال نشود، برطرف شد. ( I686cd ، b/446430827 ) - پشتیبانی از اتصال
Preview،ImageCaptureوVideoCaptureبا هم در حالت دوربین بدون ترکیببندی همزمان. ( Ib410a ، b/443009871 ) - مشکلی که باعث میشد UseCaseهایی مانند
ImageCaptureوVideoCaptureدر صورت ایجاد مجدد، اطلاعات چرخش هدف خود را از دست بدهند، برطرف شد. این امر میتوانست باعث شود تصاویر یا ویدیوها در صورت تغییر تنظیماتی مانندimageCaptureModeپس از چرخش دستگاه، جهتگیری نادرستی داشته باشند. ( I477c8 ، b/444734537 ) - مشکلی که مانع از انتخاب وضوح تصویر ۱۶:۹ توسط Preview و ضبط ویدیو با کیفیت ۱۰۸۰P توسط
VideoCapture، برطرف شد. این مشکل هنگام استفاده از پیکربندی وضوح تصویر پیشفرض Preview در حالی که ویژگیStreamSharingداخلی فعال بود (مثلاً وقتی چهار UseCase به طور همزمان متصل میشوند) رخ میداد. ( I493cb ، b/440364875 ) - مشکل از کار افتادن برنامه هنگام فعال شدن افکت پس از خاموش شدن
SurfaceProcessor( I2c450 ، b/414150174 ) برطرف شد. - اشکالی در
CameraControllerکه باعث ایجادIllegalStateExceptionمیشد، زمانی که یک UseCase اولیه حداکثر رزولوشن را انتخاب میکرد، که متعاقباً مانع از اتصال UseCaseهای دیگر میشد، برطرف شد. ( Ifb758 ، b/440374234 ) - اندازههای خروجی مشکلساز YUV_420_888 برای نوکیا ۷ پلاس که باعث مشکل خطای بیصدا و بدون گزارش هیچ پیام خطایی میشوند را شامل نمیشود. ( I3af47 ، b/436524501 )
- مشکلی که باعث میشد
CameraInfo#isFeatureGroupSupportedبه اشتباه برای ویژگیPREVIEW_STABILIZATIONمقدار true را برگرداند، برطرف شد. این مشکل گاهی اوقات هنگام پرسوجو باSessionConfigکه قبلاً با ویژگیهای دیگر پیکربندی شده بود، رخ میداد. ( I2c355 ، b/437816469 ) - با پیشفرض قرار دادن
TextureViewدر چنین سناریوهایی، پایداریCameraXViewfinderدر سطوح API قدیمیتر و دستگاههایی که با مشکلاتSurfaceViewمواجه بودند، بهبود یافت. این مکانیزم جایگزین، پیشفرض جدید است، اما میتوان آن را از طریق برنامهنویسی لغو کرد. ( Ieb476 ، b/437496463 ) - مشکل نشت حافظه در
PreviewViewکه میتوانست مانع از جمعآوری زباله توسط Activity شود، برطرف شد. این اتفاق زمانی رخ میدهد که یکSurfaceRequestجدید قبل از رسیدگی به درخواست قبلی برسد. ( I4aa0b , b/443112512 ) - مشکل ضبط با سرعت بالا/حرکت آهسته در گوشیهای هواوی پی اسمارت، اینفینیکس هات ۴۰i و ریلمی سی۵۳ ( ۴۰a۶۶۸e ، b/۴۴۲۹۸۴۲۰۰ ) برطرف شد.
نسخه ۱.۵.۰
۱۰ سپتامبر ۲۰۲۵
androidx.camera:camera-*:1.5.0 منتشر شد. نسخه ۱.۵.۰ شامل این کامیتها است.
تغییرات مهم از زمان ۱.۴.۰:
- ضبط با سرعت بالا و حرکت آهسته: به راحتی ضبط ویدیوی با سرعت بالا (120/240 فریم در ثانیه) و حرکت آهسته را با حداقل کد ادغام کنید. برای جزئیات بیشتر به
Recorder#getHighSpeedVideoCapabilities(CameraInfo)وHighSpeedVideoSessionConfigمراجعه کنید. -
SessionConfigوFeatureGroupAPI: API جدیدSessionConfigبه شما امکان میدهد جلسه دوربین را پیکربندی کنید و چندین ویژگی را با خیال راحت با هم فعال کنید، از جمله HLG (HDR)، UltraHDR، 60 FPS و تثبیت پیشنمایش. همچنین میتوانید یک گروه ویژگی ترجیحی را با اولویت تنظیم کنید و به CameraX اجازه دهید ترکیب پشتیبانیشده بهینه را تعیین کند. برای اطلاعات بیشتر بهSessionConfig.Builder#setPreferredFeatureGroup،SessionConfig.Builder#setRequiredFeatureGroupوCameraInfo#isFeatureGroupSupported(SessionConfig)مراجعه کنید. - API نرخ فریم قطعی: با استفاده از
CameraInfo.getSupportedFrameRateRanges(sessionConfig)برای پرسوجو وSessionConfig.setExpectedFrameRateRangeبرای تنظیم نرخ فریم دقیق و پشتیبانیشده، محدودیتهای قبلی را باsetTargetFrameRateبرطرف کنید. - افزونههای دوربین: فرمت UltraHDR اکنون با افزونهها پشتیبانی میشود.
ImageCapture.getImageCaptureCapabilities(cameraInfo).getSupportedOutputFormats()را بررسی کنید و آن را درImageCapture.Builder.setOutputFormatفعال کنید. نسبت بزرگنمایی و قابلیتهای تثبیت پیشنمایش اکنون هنگام فعال بودن افزونهها منعکس میشوند. - قدرت مشعل: قدرت مشعل را با استفاده از
CameraControl.setTorchStrengthLevelتنظیم کنید. - حالت تقویت نور کم: میتوانید حالت تقویت نور کم (
CONTROL_AE_MODE_ON_LOW_LIGHT_BOOST_BRIGHTNESS_PRIORITY) را توسط API های زیر فعال کنید: بهCameraInfo#isLowLightBoostSupported،CameraInfo#getLowLightBoostStateوCameraControl#enableLowLightBoostAsyncمراجعه کنید. - ضبط ویدئو:
VideoRecordEvent.Finalize.ERROR_INSUFFICIENT_STORAGEاکنون به دلیل فضای ذخیرهسازی ناکافی در حین ضبط فعال میشود.PendingRecording.withAudioEnabled(boolean initialMuted)امکان کنترل حالت بیصدای اولیه برای ضبط صدا را فراهم میکند. - ضبط تصویر: پشتیبانی از فرمتهای DNG (RAW) و JPEG + DNG (RAW) در
ImageCapture. برای پشتیبانی از RAWImageCaptureCapabilities(CameraInfo).getSupportedOutputFormats()را بررسی کنید. برای ضبط RAW+DNG از APIهایtakePictureبارگذاریشده با چندینOutputFileOptionsاستفاده کنید. - تحلیل تصویر: پشتیبانی از فرمت NV21 در
ImageAnalysis. آن را باImageAnalysis.Builder.setOutputImageFormat(OUTPUT_IMAGE_FORMAT_NV21)فعال کنید.
نسخه ۱.۵.۰-rc01
۱۳ آگوست ۲۰۲۵
androidx.camera:camera-*:1.5.0-rc01 منتشر شد. نسخه 1.5.0-rc01 شامل این کامیتها است.
رفع اشکالات
- انتقال minSdk پیشفرض از API 21 به API 23 ( Ibdfca ، b/380448311 ، b/435705964 ، b/435705223 )
- محدودیت خروجی ۱۰ بیتی برای حالت نوردهی خودکار تقویتشده در نور کم حذف شد. اکنون برنامهها میتوانند همزمان هر دو ویژگی را در دستگاههای پشتیبانیشده فعال کنند. ( I5a638 )
- مشکلی که باعث میشد دستگاههای دارای چیپست
UniSocهنگام گرفتن تصویر هنگ کنند، برطرف شد. این مشکل زمانی رخ میداد کهVideoCapture،PreviewوImageCaptureبه طور همزمان با تمام استریمهای تنظیم شده روی وضوح 1280x720 استفاده میشدند. ( Ia00c4 ، b/380802479 ) - مشکل سیاه شدن صفحه پیشنمایش در زمانی که هیچ نرخ فریم پرسرعتی برای ضبط پرسرعت/اسلوموشن تنظیم نشده باشد، برطرف شد ( cdf0ff2e9 )
- بهبود مدیریت خطا و ثبت وقایع در
getViewportAspectRatioInt( 82fca18 )
نسخه ۱.۵.۰-بتا۰۲
۱۶ ژوئیه ۲۰۲۵
androidx.camera:camera-*:1.5.0-beta02 منتشر شد. نسخه 1.5.0-beta02 شامل این کامیتها است.
تغییرات API
- APIهای جدیدی برای تنظیم یا پرسوجوی گروههایی از ویژگیهای باکیفیت، به صورت شهودیتر و دقیقتر اضافه شده است، زیرا این ویژگیها ممکن است به صورت ترکیبی در همه دستگاهها پشتیبانی نشوند.
SessionConfigاکنون شامل APIهای جدیدی برای مشخص کردن گروهی از ویژگیها به عنوان مورد نیاز یا ترجیحی است. APICameraInfo.isFeatureGroupSupportedاجازه میدهد قبل از اتصال یکSessionConfigاز پشتیبانی شدن یک گروه ویژگی مطلع شوید.SessionConfigهمچنین امکان تنظیم یک شنونده را برای اطلاع از اینکه کدام ویژگیها در نهایت هنگام اتصال یک پیکربندی session انتخاب میشوند، فراهم میکند. ( Ie4d60 ) - APIهای جدید
SessoinConfig.Builder.setFrameRateRange(Range<Integer>)وCameraInfo.getSupportedFrameRateRanges(SessionConfig)اضافه شدند که به توسعهدهندگان امکان میدهند نرخ فریمهای پشتیبانیشدهی تضمینشده را که توسط یکSessionConfigخاص محدود شدهاند، جستجو کنند و سپس نرخ فریم را رویSessionConfigاعمال کنند. ( Ieacf7 ) - API جدید
SessionConfigمعرفی شد که شامل انتزاع بهتری برای پیکربندی موارد استفاده، پارامترهای جلسه،CameraEffect،ViewPortو غیره است. اتصال یکSessionConfigبه یک LifecycleOwner، جلسه دوربین را باز میکند، آن را با استفاده از موارد استفاده و پارامترهای جلسه مشخص شده پیکربندی میکند وCameraEffectوViewPortتعیین شده را اعمال میکند. هنگام بهروزرسانی یکSessionConfigجدید به همانLifecycleOwner، میتوانید بدون نیاز به فراخوانی unbind یاunbindAllدر ابتدا، یکSessionconfigجدید را متصل کنید. ( Iedfc3 ) - APIهای جدیدی برای ضبط ویدیوی با سرعت بالا/حرکت آهسته اضافه شده است. برای جزئیات بیشتر به API
HighSpeedVideoSessionConfigمراجعه کنید. ( Ia16f3 )
رفع اشکالات
- مشکل گزارش پشتیبانی API مربوط به فرمتهای RAW در برخی از دستگاههایی که در واقع قابلیت RAW ندارند ( Ibcadb ) با نام
ImageCaptureCapabilities#getSupportedOutputFormats()برطرف شد. - رفع مشکل نشت حافظه که هنگام استفاده از
PreviewView، فعال بودنCameraEffectیا اتصال 4 مورد استفاده (StreamSharing) ( I87468 ) رخ میداد. - مشکل ضبط ویدیو که توسط
AssertionErrorایجاد شده بود، برطرف شد: وضعیت صدای داخلی نامعتبر: IDLING ( I38d4b ، b/414259796 ) - مشکل زمانی که برنامه در یک صفحه نمایش خارجی اجرا میشود و دستگاه در حالت افقی است، رفع شد، پیشنمایش در
PreviewViewکشیده یا به پهلو نمایش داده میشود ( Ia917a ) - مشکلی که باعث میشد تنظیمات تثبیت پیشنمایش (Preview Stabilization) هنگام اشتراکگذاری جریان دوربین بین پیشنمایش و ضبط ویدیو (VideoCapture) به درستی اعمال نشوند، برطرف شد. ( I5430e )
-
CameraXViewfinderاکنون به درستی جایگزینی سطح را درViewfinderزیرین مدیریت میکند. این شامل سناریوهایی مانند زمانی میشود که یک ViewfinderEXTERNALدر سطح API 28 یا پایینتر از صفحه خارج میشود یا اگر یکCameraXViewfinder(با هرImplementationMode) بخشی ازmoveableContentOf()باشد. در مواردی کهViewfinderSurfaceSessionزیرین را نمیتوان فعال نگه داشت،CameraXViewfinderدرخواست فعلی CameraXSurfaceRequestرا نامعتبر میکند و به CameraX اجازه میدهد ازSurfaceجدید استفاده کند. ( I79432 ) - مشکلی را در اندروید ۱۰/۱۱ برطرف میکند که در آن
EXTERNALCameraXViewfinderبه دلیل اعمال زودهنگام عملیات تبدیل (مانند مقیاسبندی یا ترجمه) ممکن بود کشیده یا نادرست به نظر برسد. اکنون سیستم قبل از اعمال این تبدیلات در مرحله طرحبندی، منتظر ایجاد Surface میماند تا خروجی صحیح تضمین شود. ( Icc77c ) - Composable
CameraXViewfinderاکنون به درستی باPagerمربوط به Compose کار میکند. این تغییر تضمین میکند که Composable میتواند با پیادهسازی تابعonResetدرAndroidViewکه از هر دو پیادهسازیEMBEDDEDوEXTERNALپشتیبانی میکند، با موفقیت ریست شود. ( I0d9be ) - مشکل نشت مالک چرخه عمر که هنگام لغو الزام استفاده از مالک چرخه عمر بدون خاموش کردن ارائه دهنده دوربین رخ میداد، برطرف شد.
نسخه ۱.۵.۰-بتا۰۱
۷ مه ۲۰۲۵
androidx.camera:camera-*:1.5.0-beta01 منتشر شد. نسخه 1.5.0-beta01 شامل این کامیتها است.
تغییرات API
- پروژههای منتشر شده با کاتلین ۲.۰ برای استفاده به KGP 2.0.0 یا جدیدتر نیاز دارند ( Idb6b5 )
- اکنون میتوان
ContentScaleو Alignment در منظرهیاب برای مقیاسبندی و قرار دادن سطح نمایش داده شده در ظرف آن استفاده کرد، مشابه نحوهی عملکردandroidx.compose.foundation.Image. ( Ibcea3 ) -
TransformationInfoاکنون برای همه آرگومانها مقادیر پیشفرض دارد. این امر به Viewfinders اجازه میدهد بدون هیچTransformationInfoایجاد شوند، که به طور پیشفرض روی چرخش منبع ۰، بدون آینهسازی منبع و بدون برش صحیح تنظیم شده است. ( I2b1b2 ) -
LifecycleCameraProviderاضافه شده است، که یک ارائه دهنده دوربین است که میتواند با پیکربندیهای مختلف برای ویژگیهایی مانند دسترسی به دوربین یک دستگاه مجازی با پیکربندی با یک زمینه سفارشی، نمونهسازی شود. ( Ia2992 )
رفع اشکالات
- مشکل توقف پیشنمایش هنگام استفاده از
ImageAnalysisبا جریان دیگری که ازTEMPLATE_RECORDدر دستگاه Samsung SM-E556B استفاده میکند، برطرف شد. ( Ic0e62 ، b/409478042 ) - مشکل توقف پیشنمایش هنگام استفاده از
ImageAnalysisبا جریان دیگری که ازTEMPLATE_RECORDدر دستگاه Samsung SM-M556B استفاده میکند، برطرف شد. ( Ic1a6a ، b/395822788 ) - رفع مشکل خطای
AssertErrorدر حالت شب در افزونهها در دستگاههای پیکسل اندروید ۱۵ هنگام انجام عملیات مربوط به بزرگنمایی ( I27a5d ، b/401460276 ) - رفع مشکل مختصات نادرست کادر محصورکننده ML Kit Analyzer هنگام استفاده از
CameraController. ( Iae91b , b/409808510 )
نسخه ۱.۵.۰-alpha06
۲۶ فوریه ۲۰۲۵
androidx.camera:camera-*:1.5.0-alpha06 منتشر شد. نسخه 1.5.0-alpha06 شامل این کامیتها است.
تغییرات API
- اضافه شدن
CameraInfo.getTorchStrengthLevel،CameraInfo.getMaxTorchStrengthLevelوCameraControl.setTorchStrengthLevelبرای امکان سفارشیسازی روشنایی چراغ قوه ( I00878 ) - یک API جدید
CameraController#setTapToFocusAutoCancelDurationاضافه شده است تا کاربران بتوانند رفتار لغو خودکار را برای رویدادهای ضربه زدن به فوکوسPreviewViewکنترل کنند. به طور پیشفرض، CameraX رویدادهای فوکوس را پس از ۵ ثانیه لغو میکند (یعنی فوکوس دوربین بازنشانی میشود) و این API امکان تغییر آن مدت زمان یا غیرفعال کردن لغو خودکار را به طور کلی فراهم میکند. ( Icf59a ) -
FLASH_STATE_READYبهNOT_FIREDتغییر نام داده شده است و نامهای دیگر ثابتهایFlashStateبرای خوانایی بهتر سادهسازی شدهاند. ( I8771d ) - API تقویت نور کم در معرض نور. دستگاههایی که اندروید ۱۵ یا بالاتر دارند میتوانند از تقویت نور کم پشتیبانی کنند. این ویژگی میتواند به طور خودکار روشنایی پیشنمایش، جریانهای تحلیل ویدیو یا تصویر را در شرایط کمنور تنظیم کند. برنامهها میتوانند از API جدید برای موارد زیر استفاده کنند: ۱. از
CameraInfo#isLowLightBoostSupportedبرای بررسی در دسترس بودن این ویژگی استفاده کنید. ۲. ازCameraControl#enableLowLightBoostAsyncبرای فعال کردن حالت در زمانی که دستگاهها میتوانند از آن پشتیبانی کنند استفاده کنید. ۳.CameraInfo#getLowLightBoostStateبرای نظارت بر وضعیت تقویت نور کم استفاده کنید. ( I937ed ) - کلاسهای compat را اضافه کنید تا امکان پرسوجوی سریعتر غیر از camera2 در camera-feature-combination-query فراهم شود. ( Ie97ee )
- برای رویدادهای tap-to-focus
CameraController)، یک API جدیدgetTapToFocusInfoState()اکنون موقعیت tap مربوطه را نیز با بازگرداندنLiveDataاز کلاسTapToFocusInfoنمایش میدهد، در حالی کهLiveData<Integer>قبلی کهgetTapToFocusState()را برمیگرداند، به نفع API جدید منسوخ شده است ( I238d2 ).
رفع اشکالات
- مشکل عدم اعمال تثبیت پیشنمایش هنگام فعال بودن تثبیت پیشنمایش با افزونهها ( I24ad7 ) برطرف شد.
- رفع مشکل عدم بازگشت رویداد وضعیت فوکوس
CameraControllerبهTAP_TO_FOCUS_NOT_STARTEDهنگام لغو خودکار رویداد فوکوس توسط CameraX که به طور پیشفرض پس از ۵ ثانیه اتفاق میافتد. ( I31954 ) - مشکل ثابت ماندن پیشنمایش هنگام استفاده از Zero Shutter Lag (ZSL) پس از چندین بار گرفتن عکس به دلیل عدم انتشار منابع تصویر، برطرف شد. ( Ic3c2a )
- مشکلی که باعث میشد در برخی دستگاهها، ویدیوهای UHD هنگام استفاده از
OpenGLبه رنگ قرمز نمایش داده شوند، برطرف شد ( IDcedc ).
نسخه ۱.۵.۰-آلفا۰۵
۱۵ ژانویه ۲۰۲۵
androidx.camera:camera-*:1.5.0-alpha05 منتشر شد. نسخه 1.5.0-alpha05 شامل این کامیتها است.
تغییرات API
- برای اطلاع از کیفیت انتخاب شده بر اساس
QualitySelectorتابعVideoCapture.getSelectedQuality()را اضافه کنید. ( I70508 , b/204288986 ) - وقتی یک ضبط تصویر با استفاده از API مربوط به
ImageCapture.OnImageCapturedCallbackفراخوانی میشود، اکنون میتوان از ImageInfo درImageProxyبرگشتی برای اطلاع از اینکه آیا فلش از طریق API جدیدImageInfo.getFlashState()فعال شده است یا خیر، استفاده کرد. ( Id2c61 , b/380527406 ) - پشتیبانی از فرمت خروجی
OUTPUT_IMAGE_FORMAT_NV21برایImageAnalysisاضافه شد. ( I484ab ) - حاشیهنویسی آزمایشی مصنوع
featurecombinationquery( I4427f ) را حذف کنید. - محدوده نسبت زوم مجاز برای
CameraControlرا با توجه به ویژگیهای خاص افزونهها هنگام فعال بودن حالت افزونهها تنظیم کنید. ( I85af1 )
رفع اشکالات
- برای استفاده از API مربوط به اندروید ۱۵،
compileSdkبه نسخه ۳۵ ارتقا داده شد. برنامههایی که از کتابخانههای CameraX استفاده میکنند نیز باید تنظیمات پیکربندیcompileSdkخود را ارتقا دهند. ( Ic80cd ) - این کتابخانه اکنون از حاشیهنویسیهای nullness از نوع JSpecify استفاده میکند که از نوع استفاده میکنند. توسعهدهندگان کاتلین باید از آرگومان کامپایلر زیر برای اعمال استفاده صحیح استفاده کنند:
-Xjspecify-annotations=strict(این پیشفرض است که از نسخه ۲.۱.۰ کامپایلر کاتلین شروع میشود). ( Idc6c6 ، b/326456246 )
نسخه ۱.۵.۰-آلفا۰۴
۱۱ دسامبر ۲۰۲۴
androidx.camera:camera-*:1.5.0-alpha04 منتشر شد. نسخه 1.5.0-alpha04 شامل این کامیتها است.
تغییرات API
-
ImageCapture.Builder#setOutputFormatوImageCaptureCapabilities#getSupportedOutputFormatsبه عنوان API های پایدار ( Ieb04a ) ارائه شده اند. - برای دریافت اطلاعات رزولوشن هنگام اتصال یک
VideoCaptureبه یک Lifecycle، تابعVideoCapture.getResolutionInfo()را اضافه کنید. ( Icb478 ) -
PreviewView.getScreenFlashوPreviewView.setScreenFlashOverlayColorبه عنوان API های پایدار ارائه شدند. ( I74fee )
رفع اشکالات
- مشکل عدم موفقیت در ثبت تصویر در دستگاه Vivo 1610 هنگام گرفتن عکس با فلش در تاریکی برطرف شد. ( I366f4 )
- مشکل خاموش شدن غیرمنتظره چراغ قوه پس از گرفتن عکس در ردمی نوت 6 پرو ( I2e0e8 ، b/377144569 ) برطرف شد.
- مشکلی در دستگاههای پیکسل اندروید ۱۵ که در آن حالت شب در افزونهها تا زمانی که دوربین روی یک شیء نزدیک فوکوس نمیکرد، تصاویر ثابت را ضبط نمیکرد، برطرف شد ( I228d4 )
- مشکل نقص در ضبط تصویر ثابت هنگام فعال بودن افزونهها و اتصال
VideoCaptureبه یکدیگر برطرف شد. ( I5c745 ) - پشتیبانی از ضبط تصویر ثابت
UltraHDRبرای افزونهها فعال شده است، در صورتی که دستگاه از آن پشتیبانی کند. ( I48300 ) - مشکل زمانبندی فلاش برای ضبط فلاش با
CameraEffectکه تصاویر ضبط شده را در دستگاههای TCL هدف قرار میدهد، برطرف شد. ( I7698c )
نسخه ۱.۵.۰-آلفا۰۳
۳۰ اکتبر ۲۰۲۴
androidx.camera:camera-*:1.5.0-alpha03 منتشر شد. نسخه 1.5.0-alpha03 شامل این کامیتها است.
تغییرات API
- APIهای فرمت خروجی را برای RAW و RAW + JPEG
ImageCaptureاضافه کنید، بررسی قابلیت دستگاه درImageCaptureCapabilities#getSupportedOutputFormatsقرار دارد.OUTPUT_FORMAT_RAWبرای ضبط تصویر RAW است که فرمت Adobe DNG است وOUTPUT_FORMAT_RAW_JPEGبرای ضبط همزمان تصاویر RAW و JPEG است. API جدیدImageCapture#takePictureبرای ضبط همزمان تصویر استفاده میشود و باید دوOutputFileOptionsارائه دهد، اولی برای تصویر RAW و دومی برای تصویر JPEG است. ( Ib0f3d )
رفع اشکالات
- مشکل پیشنمایش و نوردهی ناکافی ویدیو در دستگاههای TCL هنگام فعال بودن
VideoCaptureبرطرف شد. ( Id7a64 ) - مشکلی که باعث میشد هنگام فعال بودن یک افکت یا اتصال ۴ مورد استفاده (اشتراکگذاری جریان)، فراخوانی
startFocusMeteringباPreviewView.getMeteringPointFactoryمختصات صحیح حسگر را دریافت نکند، برطرف شد. ( I916c5 ، b/345993685 ) - رفع مشکل عدم اجرای رویداد
VideoRecordEvent.Finalize.ERROR_INSUFFICIENT_STORAGEهنگام ضبط ویدیو و عدم وجود فضای ذخیرهسازی کافی. ( I35779 ، b/356399842 )
نسخه ۱.۵.۰-آلفا۰۲
۲ اکتبر ۲۰۲۴
androidx.camera:camera-*:1.5.0-alpha02 منتشر شد. نسخه 1.5.0-alpha02 شامل این کامیتها است.
ویژگیهای جدید
- APIهای جدید برای جستجوی ویژگیهای دوربین پشتیبانیشده توسط دستگاه. برای مثال، بررسی اینکه آیا HDR و 60FPS میتوانند همزمان فعال شوند یا خیر. این شامل 2 مصنوع است: camera-feature-combination-query و camera-feature-combination-query-play-services. این یک نسخه سازگار از API
CameraManager#getCameraDeviceSetup#isSessionConfigurationSupportedدوربین2 با دادههای اضافی ارائه شده توسط سرویس Google Play است.
رفع اشکالات
- مشکل نرخ فریم هدف
Preview/VideoCaptureدر دستگاههای سطح LEGACY برطرف شد. نرخ فریم هدف تعیینشده از طریقsetTargetFrameRateیاCamera2InteropAPI همیشه روی مقداری که توسطAeFpsRangeLegacyQuirkارائه میشد، بازنویسی میشد. با این اصلاحیه، کتابخانه CameraX مقدار تعیینشده از طریقsetTargetFrameRateیاCamera2InteropAPI را در نظر میگیرد. ( Ie2d32 ) - قابلیتهای فلاش/چراغ قوه/3A برای ثبت تصویر با
CameraEffectاضافه شد. تصویر ثبت شده باCameraEffectاکنون باید همان پردازشهای قبل و بعد از ثبت (مثلاً تریگر فلاش، همگرایی 3A و غیره در صورت لزوم) را مانند تصویر ثبت شده بدونCameraEffectداشته باشد. ( I5ff30 ) - اندازههای خروجی مشکلساز برای
ImageAnalysisدر دستگاه Samsung SM-A057G حذف شدند. وقتیImageAnalysisاز وضوح تصویر بزرگتر یا مساوی 1920x1440 استفاده میکند، باعث مشکل پیشنمایش سیاه میشود. برای جلوگیری از این مشکلExcludedSupportedSizesQuirkرا روی دستگاه SM-A057G اعمال کنید. ( I63dfe ، b/365877975 ) - مشکل نرخ فریم هدف
Preview/VideoCaptureهنگامی که مکانیزم اشتراکگذاری جریان به صورت داخلی برای اشتراکگذاری جریان درPreviewوVideoCaptureفعال است، برطرف شد. ( I4fdac ) - راه حل موقت برای رفع مشکل نادرست بودن متادیتای تصویر JPEG در دستگاههای سامسونگ S10e و S10+ فعال شد. با این رفع مشکل، CameraX میتواند با موفقیت تصویر JPEG را ذخیره کند، یا در صورت بروز مشکل نادرست بودن متادیتای تصویر JPEG، اشیاء Bitmap صحیح هنگام فراخوانی تابع
ImageProxy.toBitmap()در این دستگاهها بازگردانده میشوند. ( Iae493 , b/356428987 ) - افزونههای دوربین پشتی سامسونگ A52s که شناسه آن 0 است غیرفعال شدهاند، زیرا ممکن است هنگام ضبط تصاویر HDR، کرشهای داخلی رخ دهد و پیکربندی جلسات ضبط برای حالتهای BOKEH یا FACE_RETOUCH با شکست مواجه شود. ( I03ec9 ، b/364152642 )
- رفع مشکل عدم اجرای رویداد
VideoRecordEvent.Finalize.ERROR_INSUFFICIENT_STORAGEهنگام ضبط ویدیو و عدم وجود فضای ذخیرهسازی کافی. ( Ia5b4f ، b/356399842 ) - مشکل عدم موفقیت تلاش برای ضبط ویدیوی دوم در گوشی Oppo A5 (CPH1931) برطرف شد. ( I181d6 )
نسخه ۱.۵.۰-آلفا۰۱
۴ سپتامبر ۲۰۲۴
androidx.camera:camera-*:1.5.0-alpha01 منتشر شد. نسخه 1.5.0-alpha01 شامل این کامیتها است.
ویژگیهای جدید
- یک مصنوع جدید،
camera-composeبرای CameraX Viewfinder Compose Adapter منتشر شده است که یک جریان پیشنمایش از CameraXSurfaceRequestازcamera-coreرا نمایش میدهد. ( I8666e ) - یک کامپوننت جدید به نام
CameraXViewfinderاضافه شد که به عنوان یک کامپوننت اصطلاحی عمل میکند و CameraXSurfaceRequestها را برایViewfinderکامپوننت پذیر تطبیق میدهد. ( I4770f )
تغییرات API
- ارائه API برای تنظیم تنظیمات ترکیببندی برای ضبط ویدیوی همزمان با دو دوربین. این تنظیمات شامل مقدار آلفا برای ترکیب، آفست در مختصات x، y، مقیاس عرض و ارتفاع پنجره نمایش قاب دوربین است. آفست، عرض و ارتفاع در مختصات نرمال شده دستگاه مشخص شدهاند. ( Ia2b8a )
-
CameraProvider.getCameraInfoبه عنوان یک API رسمی در معرض نمایش قرار گرفت. ( I901cd ) - API
PendingRecording.withAudioEnabled(boolean initialMuted)برای کنترل حالت اولیه بیصدا کردن اضافه شد. ( I635c3 ، b/354829267 )
رفع اشکالات
- مشکل از کار افتادن برنامه هنگام فراخوانی
bindToLifecycleباLifecycleOwnerاز بین رفته برطرف شد. ( I6e6d8 ) - مشکل سیاه شدن صفحه نمایش در دوربین جلو هنگام اتصال به
VideoCaptureدر موتورولا اج ۲۰ فیوژن ( I1fe88 ) برطرف شد. - پیکربندی تشخیص حرکات زوم در
PreviewViewبرای بهبود روان بودن، بهینه شد. ( I04ffc )
دوربین نسخه ۱.۴
نسخه ۱.۴.۲
۲۶ مارس ۲۰۲۵
androidx.camera:camera-*:1.4.2 منتشر شد. نسخه ۱.۴.۲ شامل این کامیتها است.
رفع اشکالات
- مشکل توقف پیشنمایش هنگام استفاده از
ImageAnalysisبا جریان دیگری که ازTEMPLATE_RECORDدر سامسونگ گلکسی M55 استفاده میکند، برطرف شد. ( Ic1a6a ، b/395822788 )
نسخه ۱.۴.۱
۱۱ دسامبر ۲۰۲۴
androidx.camera:camera-*:1.4.1 منتشر شد. نسخه ۱.۴.۱ شامل این کامیتها است.
رفع اشکالات
- مشکلی در دستگاههای پیکسل اندروید ۱۵ که در آن حالت شب در افزونهها تا زمانی که دوربین روی یک شیء نزدیک فوکوس نمیکرد، تصاویر ثابت را ضبط نمیکرد، برطرف شد ( I228d4 )
- مشکل نقص
ImageCapture#takePictureهنگام فعال بودن افزونهها و اتصالVideoCaptureبه یکدیگر برطرف شد. ( I5c745 )
نسخه ۱.۴.۰
۳۰ اکتبر ۲۰۲۴
androidx.camera:camera-*:1.4.0 منتشر شد. نسخه ۱.۴.۰ شامل این کامیتها است.
تغییرات مهم از زمان ۱.۳.۰
CameraX 1.4.0 مملو از بهروزرسانیهای هیجانانگیز است! خلاصهای از آنها به شرح زیر است:
ویژگی اصلی: HDR ده بیتی:
- عکسها و ویدیوهای HDR خیرهکننده را به راحتی ثبت کنید.
- پشتیبانی از کدگذاری HLG و HEVC 10 بیتی
- از قابلیتهای پیشنمایش و جستجوی دستگاه با HDR ده بیتی لذت ببرید.
- با تصاویر
UltraHDRو ویدیوهای HDR در طیف رو به رشدی از دستگاهها کار میکند.
سایر ویژگیهای جالب:
- افزونههای کاتلین: اضافه شدن توابع
takePictureوawaitInstancesuspend. - جلوههای بلادرنگ: جلوههایی مانند واترمارک و هایلایت کردن اشیاء را اعمال کنید.
- رابط برنامهنویسی CameraController: کنترلهای جدید برای پیکربندی ضبط ویدیو.
- پیشنمایش تثبیت: قابلیت دستگاه را جستجو کنید و تثبیت را فعال کنید.
- بهبود ضبط ویدیو: کنترل دقیقتر بر کیفیت و دسترسی به وضوح بالاتر.
- ادغام افزونههای CameraX: ادغام یکپارچه با
VideoCaptureو ویژگیهای جدیدImageCapture. - API صدای شاتر: به راحتی الزامات صدای شاتر منطقهای را بررسی کنید.
- فلش صفحه نمایش: بهبود عکسهای گرفته شده در نور کم برای دوربینهای جلو.
- APIهای فراداده افزونههای دوربین: APIهای پشتیبانیکننده برای تنظیم قدرت افزونهها و دریافت اعلان از حالت افزونههای فعلی در
ExtensionMode#AUTO. میتوانید رفع اشکالات بیشتر را در اطلاعیههای بتا و RC ما بیابید.
نسخه ۱.۴.۰-rc04
۱۶ اکتبر ۲۰۲۴
androidx.camera:camera-*:1.4.0-rc04 منتشر شد. نسخه 1.4.0-rc04 شامل این کامیتها است.
رفع اشکالات
- مشکلی که باعث میشد هنگام فعال بودن یک افکت یا اتصال ۴ مورد استفاده (اشتراکگذاری جریان)، فراخوانی
startFocusMeteringباPreviewView.getMeteringPointFactoryمختصات صحیح حسگر را دریافت نکند، برطرف شد. ( I916c5 ، b/345993685 )
نسخه ۱.۴.۰-rc03
۲ اکتبر ۲۰۲۴
androidx.camera:camera-*:1.4.0-rc03 منتشر شد. نسخه 1.4.0-rc03 شامل این کامیتها است.
رفع اشکالات
- قابلیتهای فلاش/چراغ قوه/3A برای ثبت تصویر با
CameraEffectاضافه شد. تصویر ثبت شده باCameraEffectاکنون باید همان پردازشهای قبل و بعد از ثبت (مثلاً تریگر فلاش، همگرایی 3A و غیره در صورت لزوم) را مانند تصویر ثبت شده بدونCameraEffectداشته باشد. ( I5ff30 ) - بهینهسازی نرمی حرکت دو انگشت برای بزرگنمایی در
PreviewView( I04ffc ) - قابلیت خروجی ۱۰ بیتی Ultra HDR را از آن جدا کنید، زیرا پشتیبانی از Ultra HDR دیگر نیازی به داشتن خروجی ۱۰ بیتی در دستگاهها ندارد. ( I96ff2 ، I0c3b3 )
نسخه ۱.۴.۰-rc02
۱۸ سپتامبر ۲۰۲۴
androidx.camera:camera-*:1.4.0-rc02 منتشر شد. نسخه 1.4.0-rc02 شامل این کامیتها است.
رفع اشکالات
- مشکل از کار افتادن برنامه هنگام فراخوانی
bindToLifecycleباLifecycleOwnerاز بین رفته برطرف شد. ( I6e6d8 ) - انیمیشن دید در
ScreenFlashViewبرایScreenFlash#applyاضافه شد که اشکالات ناشی از تکمیل ناهمزمان تغییر روشنایی پس از مدتی را نیز برطرف میکند. ( I37cdb ) - با نادیده گرفتن تنظیمات زوم در چارچوب در دستگاههای پشتیبانیشده، نرمی زوم بهبود یافته است.
نسخه ۱.۴.۰-rc01
۷ آگوست ۲۰۲۴
androidx.camera:camera-*:1.4.0-rc01 منتشر شد. نسخه 1.4.0-rc01 شامل این کامیتها است.
ویژگیهای جدید
-
CameraInfo.getCameraInfoآزمایشی اضافه شد تا اطلاعات خاص دوربین را بدون نیاز به اتصال موارد استفاده به دوربین ارائه دهد. ( I550d1 )
تغییرات API
- APIهای
PreviewView.getScreenFlashوPreviewView.setScreenFlashOverlayColorبرای مواردی کهScreenFlashViewبه صراحت اضافه نشده است، اضافه شد. ( I43945 )
رفع اشکالات
- مشکلات نوردهی و رنگ هنگام ثبت تصویر با فلاش فعال در نور کم با استفاده از VideoCapture (محدود به مورد) برطرف شد. ( Ic9814 )
- مشکلی که باعث میشد قطع درخواست
takePictureبا فعال بودن افزونهها منجر به عدم دریافت نتیجه شود و درخواست بعدیtakePictureدیگر کار نکند، برطرف شد ( Iae78f ) - مشکل نشت حافظه که هنگام فعال بودن افزونهها رخ میداد، برطرف شد. ( Iab276 )
- مشکل مربوط به افزونه CameraX در دستگاههایی مانند Pixel 7/8 و سری Samsung Galaxy S24 برطرف شد. این مشکل که ناشی از مشکل تبدیل
Camera2OutputConfigImplدر حالت انتشار بود، پس از ارتقاء AGP به 8.5.1 و فعال کردن minification ظاهر شد. ( I99598 ، b/354824993 )
نسخه ۱.۴.۰-بتا۰۲
۱۲ ژوئن ۲۰۲۴
androidx.camera:camera-*:1.4.0-beta02 منتشر شد. نسخه 1.4.0-beta02 شامل این کامیتها است.
تغییرات API
- مشابه
VideoCapture، برای مورد استفاده Preview،setMirrorModeاضافه کنید. این حالت آینهای را برای جریان Preview از طریقOutputConfiguration.setMirrorModeاز API 33 و بالاتر پشتیبانی میکند، برای APIهای قدیمیتر، بدون عملیات خواهد بود. ( I821f4 )
رفع اشکالات
- مشکلی که باعث میشد برنامهها در سامسونگ تب A8 وقتی
ImageCaptureدر ترکیبPreview+VideoCapture+ImageCaptureUseCaseتصویر 1920x1080 را انتخاب میکند، نتوانند با موفقیت عکس بگیرند، برطرف شد. ( I5a463 ، b/336925549 ) - ضبط مداوم اصلاحشده ممکن است پس از تعویض دوربین، ادامه ضبط را متوقف کند. ( Icb0a1 )
نسخه ۱.۴.۰-بتا۰۱
۱۴ مه ۲۰۲۴
androidx.camera:camera-*:1.4.0-beta01 منتشر شد. نسخه 1.4.0-beta01 شامل این کامیتها است.
تغییرات API
-
ZoomGestureDetector.ZoomEventبرای کپسولهسازی حالتهای یک حرکت بزرگنمایی اضافه شد. ( I84cdf )
رفع اشکالات
- اشکالی که باعث میشد ضبط و فوکوس لمسی همچنان از مقادیر درخواست تکرار FPS/حالت تثبیت استفاده نکنند، برطرف شد. این امر ممکن است جلسه ضبط را دوباره ایجاد کند و باعث ایجاد مشکلات تأخیر یا توقف پیشنمایش در برخی دستگاهها شود. ( I7dc0b )
- اشکالی که باعث میشد هنگام فعال بودن
CameraEffectدر برخی دستگاهها، وضوح بالا قابل انتخاب نباشد، برطرف شد. (مثلاً ۴۰۰۰x۳۰۰۰ در سامسونگ A32 5G). ( Ie3ed3 ، b/337336152 ) - رفع مشکل کرش کردن هنگام عکس گرفتن با پیشنمایش،
ImageCaptureوVideoCapture(UHD)که به Pixel 4XL API29 محدود شدهاند. ( I5b288 ) - پشتیبانی از دستگاههای مجازی: متن ارسالی به
ProcessCameraProviderشناسه دستگاه را حفظ میکند تا عملکرد آن در محیط دستگاه مجازی تضمین شود. ( I5ba48 )
نسخه ۱.۴.۰-آلفا۰۵
۱۷ آوریل ۲۰۲۴
androidx.camera:camera-*:1.4.0-alpha05 منتشر شد. نسخه 1.4.0-alpha05 شامل این کامیتها است.
ویژگیهای جدید
-
ProcessCameraProviderبه پیادهسازی کاتلین تبدیل شد. ( I46d4f ) - توابع تعلیق
ImageCapture.takePictureاضافه شد تا امکان فراخوانی آن به روشی اصطلاحی کاتلین فراهم شود. ( I920be )
تغییرات API
- APIهای فرمت خروجی را به
ImageCaptureاضافه کنید و متدgetSupportedOutputFormatsرا برای پرسوجو از قابلیت دستگاه بهImageCaptureCapabilitiesاضافه کنید. مقدار پیشفرض فرمت خروجیOUTPUT_FORMAT_JPEGاست که تصاویر SDR را با فرمت JPEG ضبط میکند. هنگامی که دستگاه از Ultra HDR پشتیبانی میکند و فرمت خروجی رویOUTPUT_FORMAT_JPEG_ULTRA_HDRتنظیم شده باشد، CameraX تصاویر فشردهشده Ultra HDR را با استفاده از فرمت تصویر JPEG/R ضبط میکند. این فرمت با فرمت SDR JPEG سازگار است و از رندر HDR محتوا پشتیبانی میکند. این بدان معناست که در برنامهها یا دستگاههای قدیمیتر، تصاویر به طور یکپارچه به عنوان JPEG معمولی نمایش داده میشوند. در برنامهها و دستگاههایی که برای پشتیبانی کامل از این فرمت بهروزرسانی شدهاند، تصاویر به صورت HDR نمایش داده میشوند. ( I5de50 ) - برای جستجوی اطلاعات دوربین فیزیکی
PhysicalCameraInfoدرCameraInfoاضافه کنید و تنظیمکننده/دریافتکننده شناسه دوربین فیزیکی را درCameraSelector( Ic5b90 ) اضافه کنید. -
CameraController#COORDINATE_SYSTEM_VIEW_REFERENCEDرا باImageAnalysis#COORDINATE_SYSTEM_VIEW_REFERENCEDجایگزین کنید. مقدار ثابت ثابت میماند. این برای تجمیع همه ثابتها در یک مکان است. ( I890bb ) - API جدید
RetryPolicyبه توسعهدهندگان این امکان را میدهد که رفتار تلاش مجدد را برای مقداردهی اولیه CameraX سفارشیسازی کنند. ( I36dd2 ) - فعال کردن ایجاد شیء
ImageCaptureLatencyEstimateبرای کمک به تستپذیری ( Iaba99 ) - یک
ImageAnalysis#COORDINATE_SYSTEM_SENSORاضافه کنید. وقتی از این استفاده میشود،MlKitAnalyzerمختصات را در سیستم مختصات حسگر دوربین برمیگرداند. ( I3ec61 ) - رابط برنامهنویسی کاربردی فراداده افزونهها افشا شد. رابطهای جدید
CameraExtensionsInfoوCameraExtensionsControlبه برنامهها اجازه میدهند تنظیمات قدرت افزونه را نظارت و تنظیم کنند. برنامهها میتوانند نمونهCameraExtensionsInfoیاCameraExtensionsControlرا از طریق متدهای تازه اضافه شدهExtensionsManager#getCameraExtensionsInfo()یاExtensionsManager#getCameraExtensionsControl()به دست آورند. ( I28e1a ) -
ProcessCameraProvider.awaitInstanceاضافه شد که نسخهای در حال تعلیق ازProcessCameraProvider.getInstanceاست ( Ib22b9 ) - یک رابط برنامهنویسی
PreviewView#getSensorToViewTransform()اضافه کنید. ماتریس، تبدیل مختصات حسگر دوربین به مختصاتPreviewViewرا نشان میدهد. این میتواند برای تبدیل مختصات از یکUseCaseبه UseCase دیگر استفاده شود. به عنوان مثال، تبدیل مختصات اشیاء شناسایی شده درImageAnalysisبهPreviewViewoverlay. ( I947ab ) - API
camera-viewfinder-coreرا عمومیتر کنید تا بتواند توسطcamera-viewfinderوcamera-viewfinder-composeاستفاده شود. ( I1e295 ) - تابع
getSurfaceبهViewfinderSurfaceRequestاضافه کنید. ( I781a0 ) -
camera-viewfinder-coreدرcamera-viewfinderاستفاده کنید وViewfinderSurfaceRequestوCameraViewfinderرا منسوخ کنید. ( I6198c ) -
ZoomGestureDetectorاضافه شد که حرکات مقیاسبندی را که بهطور خاص برای فعالیت زوم با دو انگشت پیکربندی شدهاند، تفسیر میکند. ( Ifafbf )
رفع اشکالات
- مشکل انتخاب رزولوشن در
ImageAnalysisمربوط به تنظیم پیشفرض رزولوشن هدف تحلیلگر برطرف شد: رزولوشن هدف به اشتباه روی 640x480 نگه داشته میشد، حتی اگر برنامهها تنظیمات پیشفرض رزولوشن متفاوتی را برای تحلیلگر تنظیم کرده باشند. اگر برنامهها با این مشکل مواجه شوند (1.3.0 ~ 1.3.2) و نتوانند برای استفاده از نسخههای جدیدتر که شامل این راهکار هستند، ارتقا یابند، تنظیم مستقیم یکResolutionSelectorبا رزولوشن ترجیحی و یکAspectRatioStrategyمنطبق باUseCaseدرImageAnalysisمیتواند این مشکل را حل کند. ( I81f72 ، b/330091012 ) - مشکلی که باعث میشد درخواست
takePictureدر صف انتظار، در صورت ناموفق بودن درخواست فعلی، اجرا نشود، برطرف شد ( Ie0801 ) - بررسی دادههای نامعتبر JPEG را روی دستگاههای Vivo X60 و X60 Pro اعمال کنید. این میتواند مشکل تصویر بزرگ غیرعادی را در این دستگاهها برطرف کند. ( I82247 ، b/288828159 )
- مشکل نادرست بودن متادیتای تصویر JPEG در دستگاههای سامسونگ A24 برطرف شد. با این رفع مشکل، CameraX میتواند با موفقیت تصویر JPEG را ذخیره کند، یا اشیاء Bitmap صحیح را میتوان هنگام فراخوانی تابع
ImageProxy.toBitmap()در دستگاههای سامسونگ A24 بازگرداند. ( I8d6eb ، b/309005680 ) - اگر تصویر گرفته شده بزرگتر از 10 مگابایت است، بررسی دادههای نامعتبر JPEG را برای همه دستگاههای سامسونگ اعمال کنید. این میتواند مشکل حجم تصویر غیرعادی بزرگ را در دستگاههای سامسونگ برطرف کند. ( Ic2a65 ، b/288828159 )
- پشتیبانی
ImageAnalysisدر افزونههای CameraX حذف شد، زیرا پیادهسازی افزونههای بسیاری از تولیدکنندگان اصلی تجهیزات (OEM) باImageAnalysisبه خوبی کار نمیکند و ممکن است باعث مشکلات ناسازگار شود. ( I2d926 )
نسخه ۱.۴.۰-آلفا۰۴
۲۴ ژانویه ۲۰۲۴
androidx.camera:camera-*:1.4.0-alpha04 منتشر شد. نسخه 1.4.0-alpha04 شامل این کامیتها است.
ویژگیهای جدید
- مصنوع جدید: camera-effects: کتابخانهای برای اعمال جلوههای بلادرنگ به خروجی CameraX، از جمله
Preview،VideoCaptureو/یاImageCapture. این مصنوع شامل پیادهسازیهای OpenGL از APICameraEffectاست که خروجی دوربین را به طور موثر دستکاری میکند. -
OverlayEffect: برای رسم لایهها با استفاده از Canvas API اندروید. این به برنامه اجازه میدهد تا یک واترمارک اعمال کند یا اشیاء شناسایی شده را در خروجیهای دوربین برجسته کند. - APIهای
DynamicRangeبرای مورد استفاده پیشنمایش: اکنون میتوان محدوده دینامیکی را در مورد استفاده پیشنمایش، مستقل از مورد استفاده ویدیو، تنظیم کرد. این امر امکان استفاده از محدودههای دینامیکی HDR مانند HLG10 را فقط برای پیشنمایش فراهم میکند. APIهای جدیدی نیز درCameraInfoموجود است تا بتوان محدودههای دینامیکی پشتیبانی شده توسط هر دوربین را جستجو کرد.
تغییرات API
- نام
ScreenFlashUiCompleterبهScreenFlashListenerتغییر داد و پارامترScreenFlashUiCompleter#getExpirationTimeMillisبهexpirationTimeMillisازScreenFlash#applyمنتقل کرد ( I13944 ). - APIهای جدیدی اضافه شدهاند تا امکان تنظیم محدوده دینامیکی در حالت استفاده پیشنمایش و جستجوی محدودههای دینامیکی پشتیبانیشده توسط هر دوربین فراهم شود. این امر به محدودههای دینامیکی HDR، مانند HLG10، اجازه میدهد تا تنها با حالت استفاده پیشنمایش استفاده شوند و دیگر نیازی به اتصال همزمان
VideoCaptureنباشد. ( If25e3 ) - تغییر نام
getMirroring()بهisMirroring()( I47063 ) - پشتیبانی از تخمین تأخیر ضبط بیدرنگ در CameraX اضافه شد. افزونههای دوربین به برنامهها این امکان را میدهند که از یک API استفاده کنند که تخمینی از مدت زمان ضبط ارائه میدهد. این تخمین، شرایط فعلی محیط، وضعیت دوربین و زمان صرف شده برای پردازش درخواستهای ضبط چند فریمی را به همراه هر زمان اضافی برای رمزگذاری بافرهای پردازش شده در صورت لزوم در نظر میگیرد. ( I05c3a )
- نام
ScreenFlashUiControlرا بهScreenFlash،ScreenFlashUiControl#applyScreenFlashUiبهScreenFlash#apply،ScreenFlashUiControl#clearScreenFlashUiبهScreenFlash#clearتغییر دادیم و به جای افشای مستقیمSCREEN_FLASH_UI_APPLY_TIMEOUT_SECONDS، متدgetScreenFlashUiApplyTimeoutSecondsاضافه کردیم ( Iccdd0 ).
رفع اشکالات
- مشکل نشت حافظه که منجر به عدم انتشار فعالیتها یا قطعات هنگام فعال بودن افزونهها میشد، برطرف شد ( I14215 )
- مشکلی که باعث میشد تابع
getZoomRatioهنگام اعمال نسبت بزرگنمایی افزایشی، به اشتباه مقدار کاهش یافته را برگرداند، برطرف شد. ( I4aa0d , b/317543616 ) - رویداد
ImageCapture#ScreenFlash#clearبلافاصله پس از عدم اتصالImageCaptureیا بسته شدن دوربین فراخوانی میشود، همچنین برخی از اشکالاتی را که در آن به دلیل عدم تکمیل صحیح ضبطها در این سناریوها، هرگز فراخوانی نمیشد، برطرف میکند. ( If99f9 ) - مشکل از کار افتادن برنامه که هنگام توقف چرخه حیات قبل از تکمیل درخواست
takePictureرخ میداد، برطرف شد ( Idf017 ، b/306202751 ) - مشکل سیاه شدن پیشنمایش دوربین هنگام فعال بودن افزونهها در برخی دستگاهها ( I1ffd0 ) برطرف شد.
- مدت زمان نادرست ضبط ویدیو در دستگاههایی که از پردازنده Snapdragon 778G SoC استفاده میکنند، برطرف شد. ( If6aa7 ، b/316057919 )
نسخه ۱.۴.۰-آلفا۰۳
۱۳ دسامبر ۲۰۲۳
androidx.camera:camera-*:1.4.0-alpha03 منتشر شد. نسخه 1.4.0-alpha03 شامل این کامیتها است.
ویژگیهای جدید
-
CameraInfo.mustPlayShutterSoundاضافه شد تا اطلاعاتی در مورد اینکه آیا صدای شاتر باید مطابق با محدودیتهای منطقهای پخش شود یا خیر، ارائه دهد. ( Ifda84 ) -
OnImageCapturedCallback.onCaptureStartedوOnImageSavedCallback.onCaptureStartedبرای اطلاعرسانی زمانی که دوربین شروع به نوردهی یک فریم کرده است، اضافه شد. توصیه میشود در این مرحله صدای شاتر یا انیمیشن شاتر پخش شود. ( Ic49b3 ) - پشتیبانی از قابلیت Screen Flash در CameraX برای ضبط تصویر دوربین جلو اضافه شد. CameraX مدیریت API سمت فریمورک را بر عهده میگیرد و زمانبندی را با تغییرات رابط کاربری برنامه در صورت نیاز (مثلاً فعال شدن پیشضبط AE پس از تغییر رنگ/روشنایی صفحه برنامه) همگامسازی میکند. برنامهها فقط باید پیادهسازیهای سمت رابط کاربری خود را در رابط
ScreenFlashUiControlارائه شده به CameraX اضافه کنند. ( I8ae84 ) - پشتیبانی از پیادهسازی سمت رابط کاربری ویژگی Screen Flash در CameraX اضافه شد. برنامهها قادر خواهند بود پیادهسازی اولیه
ImageCapture.ScreenFlashUiControlرا ازPreviewViewیاScreenFlashViewکه به تازگی اضافه شده است، دریافت کنند که یک نمای پوششی تک رنگ اضافه میکند و روشنایی صفحه را در طول ثبت عکس با فلاش صفحه به حداکثر میرساند. ( I1810e )
تغییرات API
- پشتیبانی از ویژگیهای جدید افزونهها (مشاهدهی پسنمایش و ثبت پیشرفت فرآیند): APIهای
ImageCapture#getImageCaptureCapabilities()برای برنامهها اضافه شده است تا قابلیتهای فراخوانی پسنمایش و ثبت پیشرفت فرآیند را بررسی کنند. برنامهها میتوانند با استفاده ازImageCapture.Builder#setPostviewEnabled()، پسنمایش را فعال کنند. اندازهی پسنمایش را میتوان با استفاده ازImageCapture.Builder#setPostviewResolutionSelector()انتخاب کرد. هنگام فراخوانیtakePicture()،onPostviewBitmapAvailableوonCaptureProcessProgressedمیتوانند درOnImageSavedCallbackیاOnImageCapturedCallbackپیادهسازی شوند تا در صورت پشتیبانی، اعلان پیشرفت پسنمایش و فرآیند را دریافت کنند. ( I5cd88 ) - رابطهای برنامهنویسی کاربردی (API) برای محاسبه تبدیل مختصات از حسگر به بافر فعلی، به همراه یک پرچم که نشان میدهد آیا سطح شامل اطلاعات جهت دوربین است یا خیر. ( I59096 )
- API را برای پرسوجوی
PreviewCapabitlityدر PreviewUseCaseنمایش دهید. ( Ie5b6c ) - APIهایی برای پشتیبانی از کیفیتهای بیشتر برای
VideoCaptureاضافه شده است.Recorder.Builder#setVideoCapabilitiesSource(int)میتواند به همراهVIDEO_CAPABILITIES_SOURCE_CODEC_CAPABILITIESبرای ایجاد یک نمونهRecorderکه از کیفیتهای بیشتری نسبت بهVIDEO_CAPABILITIES_SOURCE_CAMCORDER_PROFILEپشتیبانی میکند، استفاده شود. یک مورد استفاده رایج زمانی است که برنامه تلاش میکند تا در صورت امکان، ویدیوی UHD ضبط کند، اماCamcorderProfileدستگاه شامل تنظیمات UHD نیست، حتی اگر کدک قادر به ضبط ویدیوی UHD باشد. ( Iedbe2 ، b/263961771 ) - تابع دریافت/تنظیم فرمت خروجی
ImageAnalysisرا بهCameraControllerاضافه کنید. ( I9a96c ، b/308240643 )
رفع اشکالات
- از دوربین
1.3.1: بهبود عملکردProcessCameraProvider#bindToLifecycle(). تغییر عمده، بهینهسازی فرآیند شناسایی مناسبترین ترکیبهای اندازه برایUseCasesاست. نتایج بهینه بر اساس ترکیبهایUseCaseخاص و تعداد اندازههای خروجی پشتیبانیشده برای دستگاههای هدف متفاوت است. ( I454f2 ) - اجازه استفاده از
VideoCaptureرا هنگام فعال بودن افزونهها بدهید. ( I91f32 ) - مشکل تصاویر JPEG گرفته شده با حجم بالا در دستگاههای سری A71 و M51 سامسونگ برطرف شد. تصاویر JPEG گرفته شده حاوی دادههای اضافی 0 در بخش داده فشرده JFIF هستند. این امر باعث میشود تصاویر گرفته شده حجم فایل بسیار بالایی داشته باشند. این دادههای اضافی 0 حذف میشوند تا تصاویر گرفته شده حجم فایل تصویر عادی داشته باشند. ( I01afc ، b/288828159 )
- پشتیبانی
ImageAnalysisرا روی Pixels غیرفعال کنید تا از باگ Pixel که بهطور تصادفی اندازههای پشتیبانیشدهیImageAnalysisغیرخالی را برمیگرداند، جلوگیری شود ( I7ec31 ). - مشکل عملکرد که باعث افزایش بارگذاری CPU و مصرف برق هنگام فعال بودن افزونهها میشد، برطرف شد. ( Ibdccb )
- اسنپدراگون ۴۸۰ به
CameraUseInconsistentTimebaseQuirkاضافه شد. این مشکل در اندروید ۱۲ برای دستگاههایی که از این چیپست استفاده میکنند، برطرف میشود که در آن صدای ضبط شده با مدت زمانی که دستگاه در حالت تعلیق است، جبران میشود. ( I58010 )
نسخه ۱.۴.۰-آلفا۰۲
۱۸ اکتبر ۲۰۲۳
androidx.camera:camera-*:1.4.0-alpha02 منتشر شد. نسخه 1.4.0-alpha02 شامل این کامیتها است.
تغییرات API
- نام API را به
setCameraOpenRetryMaxTimeoutInMillisWhileResumingتغییر دهید و نام آرگومان را نیز تغییر دهید. ( I72370 ) - افزودن APIها برای پرسوجو از قابلیت دستگاه و فعال کردن تثبیتکننده ویدیو/پیشنمایش. ( I87544 )
- ارائه API برای سفارشیسازی حداکثر زمان تلاش مجدد برای باز شدن دوربین. ( I0c642 )
-
ProcessCameraProvider.shutdownAsyncبه عنوان یک API تست عمومی منتشر شد تا به ارائه دهنده دوربین فرآیند اجازه دهد در مجموعههای تستی که ممکن است نیاز به مقداردهی اولیه CameraX به روشهای مختلف بین تستها داشته باشند، استفاده شود. ( I9eca7 ) - اضافه کردن API برای پیکربندی محدوده دینامیکی ضبط ویدئو، نرخ فریم و حالت آینه. ( Ifb8f7 )
-
OutputSizeمنسوخ کنید و آن را باResolutionSelectorجایگزین کنید.ResolutionSelectorروش جامعتری برای انتخاب رزولوشنها است و با API هسته دوربین سازگار است. ( I93abd , b/286801438 )
رفع اشکالات
- مشکل پیشنمایش سیاه در سامسونگ گلکسی S23 اولترا 5G هنگام فعال بودن افزونههای بوکه یا روتوش چهره با
ImageAnalysisدر دوربین عقب برطرف شد. ( I2e8b1 ) - مشکلات مربوط به پیشنمایش و
VideoCaptureدر Moto E5 Play برطرف شد. ( 73dce2 )
نسخه ۱.۴.۰-آلفا۰۱
۲۰ سپتامبر ۲۰۲۳
androidx.camera:camera-*:1.4.0-alpha01 منتشر شد. نسخه 1.4.0-alpha01 شامل این کامیتها است.
تغییرات API
- اضافه شدن API جدید برای دسترسی به اطلاعات دامنه صدا هنگام ضبط. ( Id4925 )
رفع اشکالات
- با اطمینان از اینکه رویدادهای مقداردهی اولیه و مقداردهی اولیه به ترتیب صحیح اجرا میشوند، پایداری افزونهها را بهبود بخشید. ( Ib3b8e )
- رفع مشکل عدم موفقیت پیکربندی جلسه ضبط به دلیل تجاوز از ترکیب سطح پشتیبانی شده به دلیل اضافه کردن سطح تکرار شونده اضافی به صورت داخلی. ( Id718c )
- مشکل تصاویر JPEG ضبط شده با حجم بالا در دستگاه Vivo S16 برطرف شد. تصاویر JPEG ضبط شده حاوی دادههای padding 0 اضافی در بخش داده فشرده JFIF هستند. این امر باعث میشود تصاویر ضبط شده حجم فایل زیادی داشته باشند. این دادههای padding 0 اضافی حذف میشوند تا تصاویر ضبط شده حجم فایل تصویر عادی داشته باشند. ( I79505 ، b/299069235 )
- مشکلی که باعث میشد
ImageAnalysisنتواند باImageCaptureو Preview در برخی دستگاهها که حالتهای افزونه فعال هستند، ترکیب شود، برطرف شد. این اصلاحیه، وقتی برنامهها از طریقExtensionsManager#isImageAnalysisSupported()درخواست دسترسی بهImageAnalysisرا میکنند، مقدار صحیح را برمیگرداند. ( I7d538 ) - JavaDoc را برای تطبیق رفتار بهروزرسانی کنید. به جای تکمیل فوری،
#setZoomRatio،#setLinearZoomو#enableTorchمنتظر میمانند تا دوربین آماده شود. همچنین اطلاعاتی در مورد نحوه دستیابی به حداکثر میدان دید (FOV) با API#takePictureاضافه شده است. ( I23588 )
نسخه ۱.۳
نسخه ۱.۳.۴
۱۲ ژوئن ۲۰۲۴
androidx.camera:camera-*:1.3.4 منتشر شد. نسخه ۱.۳.۴ شامل این کامیتها است.
رفع اشکالات
- مشکلی که باعث میشد تابع
getZoomRatioهنگام اعمال نسبت بزرگنمایی افزایشی، به اشتباه مقدار کاهش یافته را برگرداند، برطرف شد. ( I4aa0d , b/317543616 ) - مشکل عدم استفاده از مقادیر FPS/حالت تثبیتکننده در حالت ضبط ثابت/ضربه برای فوکوس که ممکن است جلسه ضبط را دوباره ایجاد کند و باعث مشکلات تأخیر یا توقف پیشنمایش در برخی دستگاهها شود، برطرف شد ( I7dc0b ).
- مشکل تنظیم نرخ فریم روی مقدار پایینتر هنگام فراخوانی
setTargetFrameRateباFRAME_RATE_RANGE_UNSPECIFIEDبرطرف شد. ( I78c61 )
نسخه ۱.۳.۳
۱۷ آوریل ۲۰۲۴
androidx.camera:camera-*:1.3.3 منتشر شد. نسخه ۱.۳.۳ شامل این کامیتها است.
رفع اشکالات
- مشکل انتخاب رزولوشن در
ImageAnalysisمربوط به تنظیم پیشفرض رزولوشن هدف تحلیلگر برطرف شد: رزولوشن هدف به اشتباه روی 640x480 نگه داشته میشد، حتی اگر برنامهها تنظیمات پیشفرض رزولوشن متفاوتی را برای تحلیلگر تنظیم کرده باشند. اگر برنامهها با این مشکل مواجه شوند (1.3.0 ~ 1.3.2) و نتوانند برای استفاده از نسخههای جدیدتر که شامل این راهکار هستند، ارتقا یابند، تنظیم مستقیم یکResolutionSelectorبا رزولوشن ترجیحی و یکAspectRatioStrategyمنطبق با UseCase درImageAnalysisمیتواند این مشکل را حل کند. ( I81f72 ، b/330091012 )
نسخه ۱.۳.۲
۶ مارس ۲۰۲۴
androidx.camera:camera-*:1.3.2 منتشر شد. نسخه ۱.۳.۲ شامل این کامیتها است.
رفع اشکالات
- مشکل متادیتای JPEG در دستگاههای سامسونگ A24 برطرف شد. CameraX اکنون تصاویر را به طور دقیق ذخیره میکند و تابع
ImageProxy.toBitmap()اشیاء Bitmap صحیح را برمیگرداند. ( I8d6eb ، b/309005680 ) - به دلیل مشکلاتی، گزینه وضوح ۹۲۸۰x۶۹۴۴ در دستگاههای Redmi Note 9 Pro حذف شد. ( Ia23da )
نسخه ۱.۳.۱
۱۳ دسامبر ۲۰۲۳
androidx.camera:camera-*:1.3.1 منتشر شد. نسخه ۱.۳.۱ شامل این کامیتها است.
رفع اشکالات
عملکرد ProcessCameraProvider#bindToLifecycle() بهبود یافته است. تغییر عمده، بهینهسازی فرآیند شناسایی مناسبترین ترکیبهای اندازه برای UseCases است. نتایج بهینه بر اساس ترکیبهای UseCase خاص و تعداد اندازههای خروجی پشتیبانی شده برای دستگاههای هدف متفاوت است. ( I454f2 )
در اینجا نتایج مرجع برای سناریوهای مختلف آورده شده است:
چهار
UseCases:Preview+ImageCapture+ImageAnalysis+VideoCapture- گوگل پیکسل ۷: تقریباً ۴۳۰ تا ۶۰ میلیثانیه
- سامسونگ گلکسی S23 اولترا: تقریباً ۵۴۰ میلیثانیه تا ۴۵ میلیثانیه
- سامسونگ A53 5G: تقریباً ۱۱۵ تا ۷۰ میلیثانیه
سه
UseCases:Preview+ImageCapture+ImageAnalysis- گوگل پیکسل ۷: تقریباً ۹ تا ۷ میلیثانیه
- سامسونگ گلکسی S23 اولترا: تقریباً 6 تا 5 میلیثانیه
- سامسونگ A53 5G: تقریباً ۳۲ میلیثانیه تا ۱۲ میلیثانیه
اسنپدراگون ۴۸۰ به
CameraUseInconsistentTimebaseQuirkاضافه شد. این مشکل در اندروید ۱۲ برای دستگاههایی که از این چیپست استفاده میکنند، برطرف میشود که در آن صدای ضبط شده با مدت زمانی که دستگاه در حالت تعلیق است، جبران میشود. ( I58010 )
نسخه ۱.۳.۰
۱۸ اکتبر ۲۰۲۳
androidx.camera:camera-*:1.3.0 منتشر شد. نسخه ۱.۳.۰ شامل این کامیتها است.
تغییرات مهم از زمان ۱.۲.۰
- ویژگیهای ویدیویی شامل HDR ده بیتی ، برش ، آینهای/غیر آینهای ، بیصدا/بدون بیصدا ، تنظیم نرخ فریم و موارد دیگر.
- دوربین دوگانه همزمان
- کتابخانه افکت
- انتخابگر وضوح تصویر
- انتخاب دوربین فوق عریض و تلسکوپی
- تعویض دوربین در حین ضبط ویدیو (ویژگی آزمایشی)
نسخه ۱.۳.۰-rc02
۲۰ سپتامبر ۲۰۲۳
androidx.camera:camera-*:1.3.0-rc02 منتشر شد. نسخه 1.3.0-rc02 شامل این کامیتها است.
رفع اشکالات
- با اطمینان از اینکه رویدادهای مقداردهی اولیه و حذف مقداردهی اولیه به ترتیب صحیح اجرا میشوند، پایداری افزونهها را بهبود بخشید. این مورد برخی از مشکلات پیشنمایش سیاه هنگام تغییر حالت افزونهها یا تغییر دوربینها را برطرف کرد. ( Iddaac )
- مشکلی که باعث میشد
ImageAnalysisنتواند باImageCaptureو Preview در برخی دستگاهها که حالتهای افزونه فعال هستند، ترکیب شود، برطرف شد. این اصلاحیه، وقتی برنامهها از طریقExtensionsManager#isImageAnalysisSupported()درخواست دسترسی بهImageAnalysisرا میکنند، مقدار صحیح را برمیگرداند. ( I7d538 ) - مشکلی که باعث میشد هنگام فعال بودن حالت آینهسازی در شیائومی پوکو X3 NFC، صدا و تصویر ضبطشده با هم هماهنگ نباشند، برطرف شد. ( I20b4c )
نسخه ۱.۳.۰-rc01
۲۳ آگوست ۲۰۲۳
androidx.camera:camera-*:1.3.0-rc01 منتشر شد. نسخه 1.3.0-rc01 شامل این کامیتها است.
تغییرات API
-
PendingRecording.asPersistentRecordingاضافه شد تا به یک ضبط اجازه دهد تا در حالی کهVideoCaptureکه ضبطکننده به آن متصل است، در حال بازگشت است، به طور مداوم ضبط کند. ( I517c6 )
رفع اشکالات
- مشکل از کار افتادن برنامه هنگام اشتراکگذاری استریم با هر دو
VideoCaptureو Preview برطرف شد. همچنین مشکل صفحه سیاه در دستگاههای LEGACY هنگام فعال بودن اشتراکگذاری استریم برطرف شد. - مشکل تصاویر JPEG گرفته شده با حجم بالا در دستگاههای سری سامسونگ S7 (SM-G930T، SM-G930V) برطرف شد. تصاویر JPEG گرفته شده حاوی دادههای padding 0 اضافی در بخش داده فشرده JFIF هستند. این باعث میشود تصاویر گرفته شده حجم فایل زیادی داشته باشند. این دادههای padding 0 اضافی حذف میشوند تا تصاویر گرفته شده حجم فایل تصویر عادی داشته باشند. ( I407b0 ، b/288828159 )
- مشکل تصاویر JPEG گرفته شده با حجم بالا در دستگاههای سری سامسونگ S22 (SM-S901B، SM-S901B/DS) و S22+ (SM-S906B) برطرف شد. تصاویر JPEG گرفته شده حاوی دادههای اضافی 0 در بخش داده فشرده JFIF هستند. این امر باعث میشود تصاویر گرفته شده در دستگاه S22 SM-S901B/DS حجم فایل بزرگی در حدود ۱۳ مگابایت داشته باشند. این دادههای اضافی 0 حذف میشوند تا تصاویر گرفته شده حجم فایل تصویر عادی داشته باشند. ( I73be9 ، b/288828159 )
- مشکل تصاویر JPEG گرفته شده با حجم بالا در دستگاههای سری A5، A52، A70 و A72 سامسونگ برطرف شد. تصاویر JPEG گرفته شده حاوی دادههای اضافی 0 در بخش داده فشرده JFIF هستند. این باعث میشود تصاویر گرفته شده حجم فایل بسیار بالایی داشته باشند (مثلاً حدود 32 مگابایت یا حتی 96 مگابایت). این دادههای اضافی 0 حذف میشوند تا تصاویر گرفته شده حجم فایل تصویر عادی داشته باشند. ( I97c4d ، b/288828159 )
- رفع مشکل کرش کردن برنامه هنگام عکس گرفتن با افزونههای فعال ( I698f5 )
نسخه ۱.۳.۰-بتا۰۲
۲۶ ژوئیه ۲۰۲۳
androidx.camera:camera-*:1.3.0-beta02 منتشر شد. نسخه 1.3.0-beta02 شامل این کامیتها است.
رفع اشکالات
- برای بهبود کیفیت عکاسی در نور کم، از چراغ قوه به عنوان فلاش در مدلهای پیکسل ۴ و ۵ استفاده کنید ( I56ff5 ، b/280221967 )
- مشکل تصاویر JPEG گرفته شده با حجم بالا در دستگاههای سری سامسونگ A5 (2017) برطرف شد. تصاویر JPEG گرفته شده حاوی دادههای اضافی 0 در بخش داده فشرده JFIF هستند. این باعث میشود تصاویر گرفته شده حدود 32 مگابایت حجم داشته باشند. این دادههای اضافی 0 حذف میشوند تا تصاویر گرفته شده اندازه فایل عادی داشته باشند. ( I29837 ، b/288828159 )
- رفع مشکل عدم اجرای صحیح تلاش مجدد در صورت عدم موفقیت در ضبط در دستگاههای مشکلدار ذکر شده در
CaptureFailedRetryQuirk( I7b589 )
نسخه ۱.۳.۰-بتا۰۱
۲۱ ژوئن ۲۰۲۳
androidx.camera:camera-*:1.3.0-beta01 منتشر شد. نسخه 1.3.0-beta01 شامل این کامیتها است.
تغییرات API
- نام تابع
ResolutionSelector.Builder#setHighResolutionEnabledFlag(int)را بهsetAllowedResolutionModeتغییر داد و ثابتهایResolutionSelector#HIGH_RESOLUTION_FLAG_OFF/ONرا بهPREFER_CAPTURE_RATE_OVER_HIGHER_RESOLUTION/PREFER_HIGHER_RESOLUTION_OVER_CAPTURE_RATEتغییر داد. ( اگر84e8 باشد ) - API منسوخ شدهی
ImageAnalysis.setTargetRotationDegrees(int)،ImageCapture.setTargetRotationDegrees(int)وVideoCapture.setTargetRotationDegrees(int)حذف شد. ( ID8e77 ) - کلاس
DynamicRangeنشاندهندهی محدودهی دینامیکی تصاویر است. این کلاس میتواند برای انتخاب فرمتهای High Dynamic Range به عنوان خروجیVideoCaptureاز طریقVideoCapture.Builder#setDynamicRange()استفاده شود. ( Ib0377 ) - یک API
isImageAnalysisSupportedبهExtensionsManagerاضافه شد که برنامهها میتوانند تعیین کنند که آیا یک مورد استفادهImageAnalysisمیتواند همراه با Preview وImageCaptureدر هنگام فعال بودن Extensions متصل شود یا خیر. ( I1bc63 ) - کلاس جدید
VideoCapabilitiesکه ازRecorderگرفته شده است، میتواند برای جستجوی محدودههای دینامیکی و کیفیتهای پشتیبانیشده برای ضبط ویدیو در دستگاه استفاده شود. متدهایgetSupportedQualities()وisQualitySupported()ازQualitySelectorمنسوخ شدهاند. لطفاً به جای آن از متدهایgetSupportedQualities()وisQualitySupported()ازVideoCapabilitiesاستفاده کنید. ( I04014 ) -
CameraController#setVideoCaptureTargetQuality()بهsetVideoCaptureQualitySelectorتغییر نام داده و آرگومانQualitySelectorدریافت میکند که انعطافپذیری بیشتری برای تنظیم کیفیت ویدیو فراهم میکند.CameraController#getVideoCaptureTargetQuality()نیز بهgetVideoCaptureQualitySelectorتغییر یافته است. ( I520ed ) - حاشیهنویسی آزمایشی برای ویژگیهای ویدیویی حذف شد. ویژگیهای ویدیویی اکنون پایدار هستند. ( I1a113 )
رفع اشکالات
- در مدلهای سامسونگ SM-A320 از چراغ قوه به عنوان فلاش استفاده کنید تا سرعت و کیفیت تصویر گرفته شده در نور کم بهبود یابد. ( I6a022 ، b/286190938 )
- پشتیبانی از فرمت
ImageFormat.JPEGبرایImageProxy.toBitmap()اضافه کنید. اگر آرایه بایت JPEG قابل رمزگشایی نباشد، خطایUnsupportedOperationExceptionرخ میدهد. ( I81958 , b/282057603 )
نسخه ۱.۳.۰-آلفا۰۷
۲۴ مه ۲۰۲۳
androidx.camera:camera-*:1.3.0-alpha07 منتشر شد. نسخه 1.3.0-alpha07 شامل این کامیتها است.
ویژگیهای جدید
- API جدید
VideoCapture.Builder# setTargetFrameRate(Range)امکان ضبط ویدیو با نرخ فریمهای دیگری علاوه بر پیشفرض دستگاه را فراهم میکند. نرخ فریمهای موجود برای ضبطها را میتوان از طریق API جدیدCameraInfo#getSupportedFrameRates()جستجو کرد.
تغییرات API
- نام ثابتهای
ResolutionSelector#HIGH_RESOLUTION_FLAG_OFF/ONرا بهALLOWED_RESOLUTIONS_NORMAL/SLOWتغییر داده و نام تابع سازندهsetHighResolutionEnabledFlagرا بهsetAllowedResolutionModeتغییر داده است. ( Iae817 ) -
CameraInfo#getSupportedFrameRateRanges()اکنون به جایList، یکSet(Set) برمیگرداند تا بهتر نشان دهد که محدودهها نامرتب هستند. ( I02f43 ) - برای مدیریت خطاهای غیرقابل بازیابی ( Ice471 ) یک شنونده خطا به
CameraEffectاضافه کنید - برای تستپذیری بهتر، سازنده عمومی را در
ResolutionInfoاضافه کنید ( If6d1c ) - یک API
UseCase.snapToSurfaceRotation(int)ارائه شده است تا جایگزین استفاده ازsetTargetRotationDegreesشود و APIهایImageAnalysis.setTargetRotationDegrees(int)،ImageCapture.setTargetRotationDegrees(int)وVideoCapture.setTargetRotationDegrees(int)را منسوخ کند. ( Ia9010 ) - APIهای جدید
Preview#getTargetFrameRateوPreview.Builder#setTargetFrameRateاضافه شدند تا بتوان نرخ فریم هدف را برای حالت استفاده پیشنمایش ( If4f22 ) تنظیم و بازیابی کرد. - وقتی شیء
Recordingبه دلیل جمعآوری زباله متوقف شود،VideoRecordEvent.Finalizeاکنون با کد خطایERROR_RECORDING_GARBAGE_COLLECTED( Iba974 ) تکمیل میشود.
رفع اشکالات
- رفع خطای
NullPointerExceptionزمانی که اندازه خروجیهای کش شده درStreamConfigurationMapCompatتهی بودند. ( Idf124 ، b/282025204 ) - مشکلی که
Preview.setSurfaceProvider(null)پیشنمایش را در Extensions ( Ia903e ) متوقف نمیکرد، برطرف شد. - مشکلی که باعث میشد هنگام اتصال
VideoCaptureهنگام باز شدن دوربین،ConcurrentModificationExceptionرخ دهد، برطرف شد. ( Ic8ac4 )
نسخه ۱.۳.۰-alpha06
۱۹ آوریل ۲۰۲۳
androidx.camera:camera-*:1.3.0-alpha06 منتشر شد. نسخه 1.3.0-alpha06 شامل این کامیتها است.
ویژگیهای جدید
- دوربین همزمان یک ویژگی جدید معرفی شده از اندروید ۱۱ است که از پخش همزمان دستگاههای دوربین پشتیبانی میکند، به عنوان مثال، به یک دستگاه اجازه میدهد تا دوربینهای جلو و عقب را همزمان فعال کند. CameraX در حال حاضر فقط از دو دوربین همزمان پشتیبانی میکند که به دو دوربین اجازه میدهد همزمان فعال باشند و حداکثر دو {@link UseCase} برای هر کدام در نظر گرفته شده است. حداکثر وضوح ۷۲۰p یا ۱۴۴۰p است، جزئیات بیشتر را در لینک زیر ببینید، به CameraManager#getConcurrentCameraIds() مراجعه کنید.
- معرفی رابط برنامهنویسی کاربردی (API) جدید
ResolutionSelectorکه ویژگیهای زیر را پوشش میدهد:- برنامهها میتوانند نسبت ابعاد و استراتژیهای وضوح تصویر را برای انتخاب بهترین وضوح متناسب با نیازهای خود مشخص کنند.
- تمام اندازهها و پارامترهای نسبت ابعاد در مختصات حسگر دستگاه دوربین بیان میشوند.
- برنامهها میتوانند یک فیلتر رزولوشن سفارشی پیادهسازی کنند تا اندازههای پشتیبانیشده را به ترتیب دلخواه مرتب کنند.
- Applications can also enable high resolution capture to obtain higher resolution images. However, please note that using a high resolution may result in slower capture times.
- Added
VideoCapturemirroring APIs. Videos recorded byVideoCaptureare not mirrored by default. However, the camera preview is mirrored on the front camera by default.VideoCapturemirroring APIs make it possible to align to the camera preview when using the front camera. There are threeMirrorMode,OFF,ONandON_FRONT_ONLY. To align to the camera preview, it is recommended to useON_FRONT_ONLYwhich means that mirroring is not enabled for the rear camera but is enabled for the front camera.
تغییرات API
- Exposed new
ResolutionSelectorAPI. Applications can specify aspect ratio and resolution strategies with fallback rules or a custom resolution filter to get the desired results. Applications can specify a flag to enable high resolution capture. This will allow CameraX to select higher resolutions when taking photos or videos. However, please note that using a high resolution may result in slower capture times. ( Ibed95 ) - The FPS ranges supported by the AE algorithm can now be queried via
CameraInfo#getSupportedFrameRateRanges(). ( Iaa67f ) - Consolidate the names of all frame rate methods into using 'FrameRate'. Correct the javadoc mistake in
VideoCapture#getTargetFrameRate()( I83304 ) - Deprecated the legacy
setTargetAspectRatioandsetTargetResolutionAPI. Please use the newResolutionSelectorAPI instead. ( I542c3 ) - Added public APIs for concurrent dual camera, including
-
List<List<CameraInfo>> getAvailableConcurrentCameraInfos() -
ConcurrentCamera bindToLifecycle(@NonNull ConcurrentCameraConfig concurrentCameraConfig) -
boolean isConcurrentCameraModeOn()andConcurrentCameraConfig,SingleCameraConfigandConcurrentCamera( Iab1c1 )
-
- Make
ImageProcessor.Response#getOutputImageNonNull ( Ib9c60 ) - Added
VideoCapturemirroring APIs, includingVideoCapture.Builder.setMirrorMode(int)andVideoCapture.getMirrorMode(). The APIs are useful for applications require the video recording to be consistent with common camera preview behavior, ie the rear camera preview is not mirrored but the front camera preview is mirrored. ( I713b6 , b/194634656 ) - Add
setTargetFrameRate()API in theVideoCapture.BuilderandgetTargetFramerate()API inVideoCapture( I109d4 ) - Make
SurfaceOutputextending Closable and hide SurfaceOutput.Event's public constructor. ( I60ea8 ) - Added
Recording.muteto dynamically mute or unmute an in-processing recording.RecordingStatswill containAudioStats.AUDIO_STATE_MUTEDwhen the in-processing recording is muted explicitly. ( Ie17fc ) - Made
#setEffects()parameter non-null. Add a#clearEffects()API for clearing effects. The app should call#clearEffects()to remove effects. ( I4b4d9 ) - Add a second constructor for
ViewfinderSurfaceRequest.Builderto take a builder for copy constructor ( I621a7 )
رفع اشکالات
- Fixed the issue where apps invoking Extensions API could crash when closing the camera ( Ib27e5 )
- Fixed an issue where
VideoCapturecould not work with the front camera on some devices. For example, on Samsung Galaxy S23 and Xiaomi 2107113SG. ( Ibec7e , b/270656244 ) - Fixed the issue where taking pictures using File in the external storage public folder will always fail in Android 10 or above. Please note that in Android 10, taking pictures using File in the external storage public folder also requires setting
requestLegacyExternalStorageto true in application tag. ( I11b2c ) - Fixed a
RejectedExecutionExceptioncrash inDefaultSurfaceProcessor. The crash could happen whenVideoCaptureis bound and the activity is paused. ( Idb46a , b/273713906 )
نسخه ۱.۳.۰-آلفا۰۵
۲۲ مارس ۲۰۲۳
androidx.camera:camera-*:1.3.0-alpha05 is released. Version 1.3.0-alpha05 contains these commits.
تغییرات API
- Added
VideoCapturerotation APIs, includingVideoCapture.Builder.setTargetRotation(int),VideoCapture.setTargetRotation(int),VideoCapture.setTargetRotationDegrees(int)andVideoCapture.getTargetRotation(). The APIs are useful for applications that lock the device orientation.ImageCapture.setTargetRotationDegrees(int)andImageAnalysis.setTargetRotationDegrees(int)are also added. ( Id3ffe , b/205242781 ) - Allow
VIDEO_CAPTUREandPREVIEW|VIDEO_CAPTUREas effects target. Effects that targetsVIDEO_CAPTUREwill be applied to theVideoCaptureUseCase; Effects that targetsPREVIEW|VIDEO_CAPTUREwill be applied to a shared stream before copying to Preview andVideoCapturestream. ( Iee6f3 )
رفع اشکالات
- From Camera
1.2.2: Fixed the issue where CameraX Extensions don't work properly when proguard is enabled on some devices such as Pixel ( I90aa2 ) - Fixed a
PreviewViewbug that if the app handles screen orientation itself. the preview might become distorted upon rotation. This only happens on certain devices. It can be reproduced on Pixel a4, Pixel 5, and Pixel 6a. ( I14340 , b/223488673 )
نسخه ۱.۳.۰-آلفا۰۴
۲۲ فوریه ۲۰۲۳
androidx.camera:camera-*:1.3.0-alpha04 is released. Version 1.3.0-alpha04 contains these commits.
ویژگیهای جدید
A new feature to support previously unsupported Surface combinations by sharing one stream to multiple UseCases.
- Previously, when binding “Preview, VideoCapture, ImageAnalysis” on camera hardware level FULL and below, or binding “Preview, VideoCapture, ImageCapture” on hardware level LEGACY, CameraX throws
IllegalArgumentException. - The new behavior is that the bindings will work without throwing exceptions. Instead, CameraX uses OpenGL to copy a shared stream to both Preview and VideoCapture.
- As the cost of the buffer copy, the app may see an increase in latency and power consumption.
تغییرات API
- Add API to convert
ImageProxytoBitmap. The supportedImageProxyformat isImageFormat.YUV_420_888andPixelFormat.RGBA_8888. If the format is invalid,IllegalArgumentExceptionwill be thrown. ( Ic7110 ) - Add
CoroutineCameraViewfinderto support configuring viewfinder using suspending functions in Kotlin. ( I657bc ) - Add new public constructor for
ViewfinderSurfaceRequest. It provides the flexibility when user cannot provideCameraCharacteristics. ( Ie6549 )
رفع اشکالات
- Fixed the Extensions crash that happens on some Samsung devices when pausing/resuming the app too quickly ( Iaca26 )
نسخه ۱.۳.۰-آلفا۰۳
۲۵ ژانویه ۲۰۲۳
androidx.camera:camera-*:1.3.0-alpha03 is released. Version 1.3.0-alpha03 contains these commits.
تغییرات API
- Added
CameraInfo.getIntrinsicZoomRatioto provide angle of view information relative to the default camera. ( Ib300c ) - Added
CameraInfo.getLensFacingto provide lens facing information. AddedCameraSelector#LENS_FACING_EXTERNALas an experimental feature for selecting external cameras. ( Icaf3e ) - Add
#setEffect()toCameraControllerthat allows adding effects to camera output. ( I1d21f ) - Add
invalidate()method toSurfaceRequest. The Surface provider can notify that the previously provided surface is no longer valid. ( Idc649 ) - Add a
ImageProcessorAPI. This interface is for inject post-processing effects into theImageCapturepipeline. ( I575c6 ) - Added API
Recorder.Builder.setAspectRatio()which can be combined withQualitySelectorto support more video resolutions. ( I8a082 ) - Added
Recorder.Builder#setTargetVideoEncodingBitRateto set Target Video EncodingBitRateandRecorder#getTargetVideoEncodingBitRateto get Target Video Encoding BitRate. ( I5984d )
رفع اشکالات
- Fixed
ImageCapturefailed when there is no flash unit and flash mode is on. ( I9e8b4 , b/263391112 ) - Fixed JPEG image corruption issue if writing Exif location data on some Samsung Android 12 devices. ( Ib7086 , b/263747161 , b/263289024 )
- when setting torch/zoom prior before camera initialization compelets, eg calling
CameraController#enableTorch, the pending action is cached and submitted once the initialization compeltes. ( I11e92 , b/264157663 )
نسخه ۱.۳.۰-آلفا۰۲
۷ دسامبر ۲۰۲۲
androidx.camera:camera-*:1.3.0-alpha02 is released. Version 1.3.0-alpha02 contains these commits.
تغییرات API
- add a new API for applying post-processing effect to Preview output. ( Ic17d5 )
- Renamed
OutputOptions.getDurationLimittoOutputOptions.getDurationLimitMillisandOutputOptions.setDurationLimittoOutputOptions.setDurationLimitMillis. ( I91f0c ) - Add
AudioConfigclass to handle the audio related setting while recording video. The@RequiresPermissionannotation is moved fromstartRecordingfunctions toAudioConfigto avoid unnecessary permission requests for the cases that audio is not needed. ( I28755 ) - Remove Metadata,
OnVideoSavedCallback,OutputFileOptionsandOutputFileResultsclasses that are no longer used after applying the new video capture API. ( I38cd8 ) - Apply the new video capture API. The
getVideoCaptureTargetSizeandsetVideoCaptureTargetSizemethods are replaced with thegetVideoCaptureTargetQualityand thesetVideoCaptureTargetQualitymethods accordingly, assetTargetResolutionis no longer supported. ( I2a1d5 )
رفع اشکالات
- Remove deprecated
core.VideoCaptureAPI. ( I531e0 ) - Fixed the issue that the
onErrorcallback is not called when taking pictures without the storage permission.( I936db , b/244807669 ) - Improve camera extensions quality and reliability. Camera extensions are disabled on Motorola devices using Camera Extensions v1.1.0 and older due to issues with Bokeh support, image capture, and preview not resuming. ( Id3ce3 )
- Fixed native crash when video cropping via
ViewPortis enabled on legacy devices. ( I16b8a , b/251357665 )
نسخه ۱.۳.۰-آلفا۰۱
۹ نوامبر ۲۰۲۲
androidx.camera:camera-*:1.3.0-alpha01 is released. Version 1.3.0-alpha01 contains these commits.
ویژگیهای جدید
-
Camera-viewfinderhas been published officially.Camera-viewfinderprovides a base viewfinder widget that can display the camera feed for Camera2. Please check the sample code for an example.
تغییرات API
- Added
OutputOptions.setDurationLimitto allow setting of video duration limit. The recording will be automatically finalized when exceeding the specified duration limit. ( I902a0 ) - Add video recording audio error state
AudioStats.AUDIO_STATE_SOURCE_ERROR. Sent when audio source setup fails or some error occurs. ( I37410 )
رفع اشکالات
- Add quirk to allow some problematic devices to retry capture once when encountering capture failures. ( Id4795 )
- Fix
PreviewViewSurfaceViewimplementation black screen issue onViewPager2. As part of the fix,PreviewViewwill reuse itsSurfaceViewif the requested resolution is not changed. ( Ib3f27 ) - Support video cropping (WYSIWYG feature) when
ViewPortorCameraControllerAPI is used. ( Ifbba8 , b/201085351 ) - Fixed video captured with front camera fails to record on Huawei P40 lite. ( I87c57 , b/250807400 )
نسخه ۱.۲
Version 1.2.3
۲۴ مه ۲۰۲۳
androidx.camera:camera-*:1.2.3 is released. Version 1.2.3 contains these commits.
رفع اشکالات
- Fixed an issue where
VideoCapturecould not work with the front camera on some devices. For example, on Samsung Galaxy S23 and Xiaomi 2107113SG. ( Ibec7e , b/270656244 )
نسخه ۱.۲.۲
۲۲ مارس ۲۰۲۳
androidx.camera:camera-*:1.2.2 is released. Version 1.2.2 contains these commits.
رفع اشکالات
- Fixed the issue where CameraX Extensions don't work properly when proguard is enabled on some devices such as Pixel ( I90aa2 )
نسخه ۱.۲.۱
۲۵ ژانویه ۲۰۲۳
androidx.camera:camera-*:1.2.1 is released. Version 1.2.1 contains these commits.
رفع اشکالات
- Fix JPEG image corruption issue if writing Exif location data on some Samsung Android 12 devices. ( b/263289024 )
نسخه ۱.۲.۰
۷ دسامبر ۲۰۲۲
androidx.camera:camera-*:1.2.0 is released. Version 1.2.0 contains these commits.
تغییرات مهم از زمان ۱.۱.۰
- New library camera-mlkit-vision. Easily integrate CameraX with many MLKit features, including barcode scanning, face detection, text detection, etc. Added
MLKitAnalyzeras new APIs. - New experimental Zero-Shutter Lag API. Optimizes capture pipeline to have better latency while keeping good image quality. When the capture mode is set to
CAPTURE_MODE_ZERO_SHUTTER_LAG, the latency between the shutter button is clicked and the picture is taken is expected to be minimized, compared with other capture modes. On devices that don't supportZERO_SHUTTER_LAG, it'll fallback toCAPTURE_MODE_MINIMIZE_LATENCY. - Deprecate
android.camera.core.VideoCapture. - Added
setStreamUseCase()as a publicCamera2InteropAPI. - Added API level requirement for
setOutputImageRotationEnabled. - Renamed
ImageAnalysis.Analyzer#getTargetResolutionOverride()toImageAnalysis.Analyzer#getDefaultTargetResolution(). - Added API for setting location metadata to the saved video.
- Fixed low framerate when using
VideoCaptureand Preview use cases with 16:9 aspect ratio - Fixed the black preview issue that happens when BOKEH extension is enabled on some Samsung devices and the user switches the cameras.
- Fixed Samsung J7 Prime (SM-G610M) and J7 (SM-J710MN)
Preview/VideoCapturestretched issue on API level 27 devices. - Disabled the workaround to flip the AF region horizontally of front cameras on Samsung Android T since the issue was fixed
نسخه ۱.۲.۰-rc01
۲۴ اکتبر ۲۰۲۲
androidx.camera:camera-*:1.2.0-rc01 is released. Version 1.2.0-rc01 contains these commits.
تغییرات API
- Add
setStreamUseCaseAPI forOutputConfiguration. User can specify the Stream Use Case for the stream session, overrding CameraX's internal logics to choose Stream Use Case in order to optimize according to their need. ( Ib1a95 )
رفع اشکالات
- Fixed Samsung J7 Prime (SM-G610M) and J7 (SM-J710MN)
Preview/VideoCapturestretched issue on API level 27 devices. Resolution 1920x1080 causes thePreview/VideoCaptureimages to be stretched. Added workaround to not select the 1920x1080 resolution for Preview orVideoCaptureto avoid the image stretched problem. ( I0e04e ) - Fixed low framerate when using
VideoCaptureand Preview use cases with 16:9 aspect ratio on some Huawei devices. ( If8c88 , b/223643510 ) - Fixed camera open failure when Preview's
SurfaceProvideris not set. As part of the fix, Preview with noSurfaceProviderset will now not be configured into the camera capture session. ( I99681 )
Version 1.2.0-beta02
۲۱ سپتامبر ۲۰۲۲
androidx.camera:camera-*:1.2.0-beta02 is released. Version 1.2.0-beta02 contains these commits.
تغییرات API
- Add API level requirement for
setOutputImageRotationEnabled( I26e3e , b/240993561 )
رفع اشکالات
- Disabled the workaround to flip the AF region horizontally of front cameras on Samsung Android T since the issue was fixed. ( I05f69 )
- Fixed the black preview issue that happens when
BOKEHextension is enabled on some Samsung devices and user switches the cameras. ( If6168 )
نسخه ۱.۲.۰-بتا۰۱
۲۴ آگوست ۲۰۲۲
androidx.camera:camera-*:1.2.0-beta01 is released. Version 1.2.0-beta01 contains these commits.
ویژگیهای جدید
- New library
camera-mlkit-vision. Easily integrate CameraX with many MLKit features, including barcode scanning, face detection, text detection, etc. Please find the sample code here . - New experimental Zero-Shutter Lag API . Optimizes capture pipeline to have better latency while keeping good image quality. When the capture mode is set to CAPTURE_MODE_ZERO_SHUTTER_LAG, the latency between the shutter button is clicked and the picture is taken is expected to be minimized, compared with other capture modes. On devices that don't support ZERO_SHUTTER_LAG, it'll fallback to CAPTURE_MODE_MINIMIZE_LATENCY.
- Made
ImageAnalysis.AnalyzerandMLKitAnalyzeras official APIs. - Exposed API for setting location metadata to the saved video.
- Rename
ImageAnalysis.Analyzer#getTargetResolutionOverride()toImageAnalysis.Analyzer#getDefaultTargetResolution().
رفع اشکالات
- Fixed Alps k61v1_basic_ref image capture issue. The captured JPEG images from HAL have incorrect Exif metadata. The Exif metadata doesn't have the 0xffd9 or 0xffda tag to make
ExifInterfacecorrectly parse the attributes. Capturing the images in YUV format and then compressing them to JPEG output images to workaround this issue. ( I45abb )
نسخه ۱.۲.۰-آلفا۰۴
۲۷ ژوئیه ۲۰۲۲
androidx.camera:camera-*:1.2.0-alpha04 is released. Version 1.2.0-alpha04 contains these commits.
تغییرات API
- Rename
ImageAnalysis.Analyzer#getTargetResolutionOverride()toImageAnalysis.Analyzer#getDefaultTargetResolution(). The behavior is also changed so that the value returned by this method can be overridden by the value ofImageAnalysis#setTargetResolution(). ( If1d36 ) - Exposed API for setting location metadata to the saved video. An
android.location.Locationobject can be set via new APIandroidx.camera.video.OutputOptions.Builder.setLocation(Location). ( I313a0 , b/204197544 )
رفع اشکالات
- Fix the issue to take picture with unbind preview ( Ie70b6 , b/235119898 )
- Fixed crash in
Recorderwhen attempting to record while audio source is unavailable. ( I9f652 )
نسخه ۱.۲.۰-آلفا۰۳
۲۹ ژوئن ۲۰۲۲
androidx.camera:camera-*:1.2.0-alpha03 is released. Version 1.2.0-alpha03 contains these commits.
تغییرات API
- Removed the experimental annotation for
ImageAnalysis.AnalyzerandMLKitAnalyzer. ( I0ff22 )
رفع اشکالات
- Added auto focus default timeout 5000ms that will complete the AF part with
isFocusSuccessfulfalse if theFocusMeteringActionis not cancelled and the AF part is not converged in the duration. ( Ibc2e3 ) - Fix the issue to take picture with unbind preview ( I1d3a2 , b/235119898 )
- Enabled advanced extender implementation and update the CameraX support extensions-interface version to 1.2 ( I92256 )
نسخه ۱.۲.۰-آلفا۰۲
۱ ژوئن ۲۰۲۲
androidx.camera:camera-*:1.2.0-alpha02 is released. Version 1.2.0-alpha02 contains these commits.
ویژگیهای جدید
- Expose CameraX Zero-Shutter Lag API as experimental.
تغییرات API
- Add new capture mode
CAPTURE_MODE_ZERO_SHUTTER_LAGinImageCaptureand addisZslSupportedinCameraInfoto query the device capability.CAPTURE_MODE_ZERO_SHUTTER_LAGmode is aiming to provide the minimum latency for instant capture. It is implemented based on a ring buffer, which caches intermediate capture results for later reprocessing when the user presses buttons to take pictures. If {@link VideoCapture} is bound or flash mode is not OFF or OEM Extension is ON, this mode will be disabled automatically. ( I9ae74 ) - Add
ImageAnalysis.getBackgroundExecutor()method ( Icc945 )
رفع اشکالات
- Fixed
ImageCapturetakePicture method turns torch off on the reported devices. ( Ib5eb5 , b/228272227 ) - Fixed a bug where
AssertionErrornot being handled when getting theCONTROL_ZOOM_RATIO_RANGEcharacteristic.( /Ia248a , b/231701345 )
نسخه ۱.۲.۰-آلفا۰۱
۱۸ مه ۲۰۲۲
androidx.camera:camera-*:1.2.0-alpha01 is released. Version 1.2.0-alpha01 contains these commits.
ویژگیهای جدید
- New library camera-mlkit-vision is launched
رفع اشکالات
- Fixed
QualitySelectorfails to record a UHD video when a fallback strategy is enabled. The issue happens whenVideoCaptureis bound withImageCaptureand Preview on a FULL or higher hardware level camera device. A fallback strategy ofQualitySelectorcausesVideoCaptureincorrectly to get a FHD resolution. UHD resolution is actually supported for this use case combination and should be adopted. ( I0e788 , b/230651237 ) - Fixed
NullPointerExceptiononImageCapture.takePicture(). ( I92366 , b/230454568 , b/229766155 ) - Fix async pause behavior of
androidx.camera.video.Recorder( Ia8ce8 )
Camera-Camera2, Camera-Core, Camera-Lifecycle, & Camera-Video Version 1.1.0
نسخه ۱.۱.۰
۲۹ ژوئن ۲۰۲۲
androidx.camera:camera-*:1.1.0 is released. Version 1.1.0 contains these commits.
تغییرات مهم از زمان ۱.۰.۰
- Landed View, Extension and Video Capture libraries as their first RC version. From 1.1.0-beta01, all CameraX libraries will align the same version number. This will help developers track versions much easier and reduce the complexity of large version compatibility matrices.
- Introduced new public APIs and features which including:
- Add the official camera-video library to support video capture use cases.
- YUV to RGB conversion and rotation capability (
ImageAnalysis.Builder.setOutputImageRotationEnabledandsetOutputImageFormat) - Support multi-window mode by allowing CameraX applications to resume the camera when the camera is interrupted by another app and focus is back.
- Ensures CameraX works well in foldable devices by fixing some preview issues.
- Added a
CameraStateAPI that will be exposed through CameraInfo. - Added an API
ProcessCameraProvider.getAvailableCameraInfos()to directly retrieve information about the available cameras - Output JPEG format for
ImageCapture#OnImageCapturedCallbackwhen Extensions are enabled. - Added a API
isFocusMeteringSupportedinCameraInfowhich allows applications to check if the givenFocusMeteringActionis supported on current camera or not. - Exposed
getResolutionInfoAPI to provide the resolution information for Preview,ImageCaptureandImageAnalysis. - Added a new API
ImageCapture.Builder#setJpegQualityto allow changing the output JPEG image compression quality when taking pictures. - Added
CameraSelector#filterto the public API to filter a list ofCameraInfosbased on aCameraSelector. - Added
Camera2CameraControl.clearCaptureRequestOptionsfor clearing the existing capture request options. - Added an experimental API for using
CameraControllerwith external image processing libraries. eg MLKit - Added experimental API
CameraInfo#getCameraSelector()which returns aCameraSelectorunique to its camera - Promoted several experimental APIs to formal public APIs
- Replaced annotation
@Experimentalwith@RequiresOptInto experimental APIs. For calling experimental APIs, use androidx.annotation.OptIn instead of deprecated androidx.annotation.experimental.UseExperimental. - Promoted the following experimental APIs to official APIs:
CameraXConfig.Builder#setAvailableCamerasLimiter(),CameraXConfig.Builder#setMinimumLoggingLevel(),CameraXconfig.Builder#setSchedulerHandler(),CameraXConfig#getAvailableCamerasLimiter(),CameraXConfig#getMinimumLoggingLevel(),CameraXConfig#getCameraExecutor(),CameraXConfig#getSchedulerHandler(), -
@ExperimentalCameraFilterAPIs - experimental exposure compensation APIs.
- Promoted the experimental
UseCaseGroupAPI for camera-core, camera-lifecycle and camera-video. AddedViewPort#getLayoutDirection,ViewPort.Builder#setLayoutDirectionandViewPort.Builder#setScaleTypefor customizing viewport. - Promoted the
ExperimentalUseCaseGroupLifecycleto formal public APIs. - Changes to the existing APIs
-
Renamed MediaStoreOutputOptions.getCollectiontoMediaStoreOutputOptions.getCollectionUri. -
ActiveRecordinghas been renamed to "Recording" to reduce verbosity. - Changed
QualitySelectorcreator API to a list-based API
رفع اشکالات
- Fixed
YuvToJpegProcessorEOFExceptionissue when extension mode is enabled andImageCapture#CAPTURE_MODE_MAX_QUALITYmode is set. - Fixed codec configuration failed due to video recording is closing
- Fixed stretched preview/video aspect ratio when recording at FHD
- Fixed audio/video out of sync after pause and resume on some devices
- Fixed the issue where flash is triggered during tap-to-focus (
startFocusAndMetering) when flash mode is auto or always_on in low-light environment.
نسخه ۱.۱.۰-rc02
۱ ژوئن ۲۰۲۲
androidx.camera:camera-*:1.1.0-rc02 is released. Version 1.1.0-rc02 contains these commits.
رفع اشکالات
- Fixed
NullPointerExceptiononImageCapture.takePicture(). ( I92366 , b/230454568 , b/229766155 ) - Fixed a bug where
AssertionErrornot being handled when getting theCONTROL_ZOOM_RATIO_RANGEcharacteristic. ( Ia248a , b/231701345 )
نسخه ۱.۱.۰-rc01
۱۱ مه ۲۰۲۲
androidx.camera:camera-*:1.1.0-rc01 is released. Version 1.1.0-rc01 contains these commits.
ویژگیهای جدید
- Release the first RC version for camera-video, camera-view, and camera-extension
رفع اشکالات
- Fixed an issue where the video codec wasn't released when
VideoCapture<Recorder>was unbound, causing subsequent uses ofVideoCapture<Recorder>to fail on recording withMediaCodec.CodecException, especially on API 21-22 devices. ( Ie7f68 ) - Fix captured images of
CameraExtensionsActivitydo not be deleted inImageCaptureTest
Version 1.1.0-beta03
۶ آوریل ۲۰۲۲
androidx.camera:camera-*:1.1.0-beta03 is released. Version 1.1.0-beta03 contains these commits.
تغییرات API
- Made
CaptureRequestOptionsconstructor restricted. ( I261b6 ) - Added an experimental API for using
CameraControllerwith external image processing libraries. eg MLKit ( I4ea71 )
رفع اشکالات
- Fixed the issue that preview becomes sideway in
PreviewViewwhen activity is not restarted after rotating devices in multi-window. ( I1ea36 , b/223488673 ) - Fix a multi-window issue that when focus changes back to the app it fails to resume the camera when (1) other high priority app opens a different camera (2) the device is Samsung Android 12 devices. ( I7e9f2 )
- Workaround included for devices that crash when checking availability of flash. These devices will not have torch available. ( If26a3 , b/216667482 )
- Fix
AbstractMethodErrorissue happened when apps use extensions and enable proguard. ( I7cbaf , b/222726805 ) - Force disable bokeh extension mode on Motorola razr 5G device which will cause black preview screen issue. ( I35d49 )
- Fixed audio/video out of sync after pause and resume on some Samsung devices pre-API 29. ( I64622 , b/202798609 , b/202798572 )
- Fixed audio/video out of sync after pause and resume on Sony G3125. ( I2a1a5 , b/202799148 )
- Fixed a crash when the Recorder encountered an
InvalidConfigException. However, this fix only prevents app from crashing, but doesn't resolve the cause of theInvalidConfigException. If theRecorderstill cannot be configured, applications will receive error callback when it starts recording. ( I89c29 , b/213617227 )
مشارکت خارجی
- updated :compose:ui:ui-test api (updateApi) due to test-coroutines-lib migration ( I3366d )
نسخه ۱.۱.۰-بتا۰۲
۲۳ فوریه ۲۰۲۲
androidx.camera:camera-*:1.1.0-beta02 is released. Version 1.1.0-beta02 contains these commits.
تغییرات API
- Add the ability to specify physical camera ID through Camera2Interop. ( I5aed8 )
رفع اشکالات
- Fixed the stretched preview issue on Oppo Find N ( I7d004 )
- Fixed a Galaxy J7 Prime issue that the preview is distorted. ( I4c500 )
- Use compatible bitrate to find video encoder. ( d969052 )
نسخه ۱.۱.۰-بتا۰۱
۲۶ ژانویه ۲۰۲۲
androidx.camera:camera-*:1.1.0-beta01 is released. Version 1.1.0-beta01 contains these commits.
ویژگیهای جدید
- From 1.1.0-beta01, all CameraX libraries will align the same version number. This will help developers track versions much easier and reduce the complexity of large version compatibility matrix.
تغییرات API
- Added
Camera2CameraControl.clearCaptureRequestOptionsfor clearing the existing capture request options. ( Ifa07d )
رفع اشکالات
- Fixed the crash when recording the video on some pre-Android O(API 26) devices. ( I88fdf , b/212328261 )
- Fixed the incorrect AF region issue when using
cameraControl#startFocusAndMetering()on front lens-facing camera in Samsung devices ( Ifbf59 , b/210548792 ) - Use torch as flash on Pixel 3a/Pixel 3a XL to improve the speed and the captured image quality in dark ( Ib12b6 , b/211474332 )
- Enabled applications to resume the camera when camera is interrupted by other higher priority application in the multi-window mode and the focus changes back to the application. Please note that there could be some latency(1 second to 10 seconds or more) between focus changes and camera reopened due to some framework issue. ( I4d092 )
نسخه ۱.۱.۰-آلفا۱۲
۱۵ دسامبر ۲۰۲۱
androidx.camera:camera-*:1.1.0-alpha12 is released. Version 1.1.0-alpha12 contains these commits.
تغییرات API
- Removed unnecessary
@RequiresApi(21)annotations from the inner classes/interfaces. ( I8e286 , b/204917951 ) - The quality constants and fallback strategy constants of
QualitySelectorhave been changed to be represented by class objects. For example,QualitySelector.QUALITY_HDis changed toQuality.HD, andQualitySelector.FALLBACK_STRATEGY_LOWERis changed to the instance returned byFallbackStrategy.lowerQualityOrHigherThan(Quality). The API used to createQualitySelectorhas been changed to a list-based API. The new APIQualitySelector.fromOrderedList(List<Quality>)will refer to the order of the input quality list instead of the order created byQualitySelector.Procedure.QualitySelector.Procedureclass has been removed. ( I43343 ) -
PendingRecording.withEventListener()was removed and the event listener must now be passed toPendingRecording.start(). This event listener requirement is meant to encourage handling of asynchronous errors that are reported in theVideoRecordEvent.Finalizeevent. ( I1e71d ) -
ActiveRecordinghas been renamed toRecordingto reduce verbosity. ( I77ceb )
رفع اشکالات
- Fixed the issue that captured photos in
FLASH_AUTOmode is underexposed in dark conditions on Pixel 3a and Pixel 3a XL ( I13f19 , b/205373142 ) - Always use latest display size to determine the preview
Resolution. ( I4a694 ) - Filtered out cameras which do not have
REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE. Cameras withREQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLEhave the minimal set of capabilities that every camera device supports. Camera withoutREQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLEmight be a camera to support special functionality and does not support standard color output.CameraXcan't support thePreview,ImageCapture,ImageAnalysisorVideoCaptureuse cases for those cameras. Therefore, those cameras should be filtered out to prevent incorrect usage. ( Ib8cda ) -
CameraSelector#filterno longer throws anIllegalArgumentExceptionwhen the result set is empty. ( I27804 ) - Smarter heuristics are now used to select encoder settings based on OEM specified profiles. ( Iaeef0 )
- Fixed Preview will have interlaced color lines after start UHD video recording on Pixel1. ( I833c6 , b/205340278 )
نسخه ۱.۱.۰-آلفا۱۱
۱۷ نوامبر ۲۰۲۱
androidx.camera:camera-*:1.1.0-alpha11 is released. Version 1.1.0-alpha11 contains these commits.
تغییرات API
- Added CameraSelector#filter to the public API to filter a list of CameraInfos based on a CameraSelector. ( I105d0 )
Add setOutputImageRotationEnabled API for ImageAnalysis config. User can enable rotation for YUV/RGB image buffer. The rotation degree is a relative rotation calculated based on sensor rotation and target rotation to keep image upfront.
Add setOutputImageRotationEnabled API for ImageAnalysis config. User can enable rotation for YUV/RGB image buffer. The rotation degree is a relative rotation calculated based on sensor rotation and target rotation to keep image upfront.
Add
getSensorToBufferTransformMatrixAPI in ImageInfo. The returned matrix is a mapping from sensor coordinates to buffer coordinates, which is, from the value ofCameraCharacteristics.SENSOR_INFO_ACTIVE_ARRAY_SIZEto(0, 0, image.getWidth, image.getHeight). The matrix can be used to map the coordinates from one {UseCase} to another. For example, mapping coordinates of the face detected with ImageAnalysis to Preview. ( I9ff1e )Added a new API ImageCapture.Builder#setJpegQuality to allow changing the output JPEG image compression quality when taking picture. ( I8dcf4 )
Renamed MediaStoreOutputOptions.getCollection to MediaStoreOutputOptions.getCollectionUri. ( I16639 )
رفع اشکالات
- Fixed the issue where flash being triggered during tap-to-focus (startFocusAndMetering) when flash mode is auto or always_on in low-light environment. ( Id4c11 )
- Disabled HDR+ on Pixel 2 XL / Pixel 3 XL in MINIMIZE_LATENCY mode to reduce latency. ( Ib6270 , b/203505523 )
مشارکت خارجی
نسخه ۱.۱.۰-آلفا۱۰
۱۳ اکتبر ۲۰۲۱
androidx.camera:camera-*:1.1.0-alpha10 is released. Version 1.1.0-alpha10 contains these commits.
ویژگیهای جدید
- Released
androidx.camera:camera-video:1.1.0-alpha10as the first alpha version for Video officially. There are several known issues to be fixed in the later releases.
تغییرات API
- Added
@RequiresApi(21)annotation to all CameraX classes and dropped minSdkVersion from AndroidManifest.xml. This will allow camera-core to be easily integrated into applications that have a minSdkVersion less than 21, but want to conditionally use code paths that rely on API 21 and higher. For any application with minSdkVersion 21 or higher, this change requires no action. ( Ie7f2e , b/200599470 )
رفع اشکالات
- Throw an InitializationException to make the app be able to gracefully handle the AssertionError happened when creating CameraCharacteristics. ( Ibec79 )
نسخه ۱.۱.۰-آلفا۰۹
۲۹ سپتامبر ۲۰۲۱
androidx.camera:camera-camera2:1.1.0-alpha09 , androidx.camera:camera-core:1.1.0-alpha09 , and androidx.camera:camera-lifecycle:1.1.0-alpha09 are released. Version 1.1.0-alpha09 contains these commits.
تغییرات API
- ExperimentalUseCaseGroup annotation is removed now that the APIs are no longer experimental. ( I01ef5 )
رفع اشکالات
- Fix the issue where the captured photos are blurred in
MAXIMIZE_QUALITYmode. ( I173a9 , b/193823892 ) - Fixed a Samsung Galaxy J5 issue that camera gets stuck after taking pictures with flash on/auto in dark environment ( I3aab9 )
- When cropping is needed for ImageCapture, compressing the output cropped image with the specified JPEG quality level according to the set capture mode. If the capture mode is
CAPTURE_MODE_MINIMIZE_LATENCY, the JPEG compression quality will be 95. If the capture mode isCAPTURE_MODE_MAXIMIZE_QUALITY, the JPEG compression quality will be 100. ( Ieb37c , b/142856426 )
نسخه ۱.۱.۰-آلفا۰۸
۱۸ آگوست ۲۰۲۱
androidx.camera:camera-camera2:1.1.0-alpha08 , androidx.camera:camera-core:1.1.0-alpha08 , and androidx.camera:camera-lifecycle:1.1.0-alpha08 are released. Version 1.1.0-alpha08 contains these commits.
ویژگیهای جدید
- Add setOutputImageFormat API for image analysis config. User can select ImageAnalysis.OUTPUT_IMAGE_FORMAT_YUV_420_888 or ImageAnalysis.OUTPUT_IMAGE_FORMAT_RGBA_8888. By default, ImageAnalysis.OUTPUT_IMAGE_FORMAT_YUV_420_888 will be selected. ( I7902d )
تغییرات API
- ExperimentalUseCaseGroupLifecycle annotation is removed now that the APIs are no longer experimental. ( I17b85 )
رفع اشکالات
- Fixed Preview screen is too bright on the Huawei P20 Lite. This problem only occurs when certain special Preview resolutions are used together with a large zoom in value. ( Idefce , b/192129158 )
- Fixed an issue that flash is not working on some devices when setting flash mode to FLASH_MODE_ON shortly followed by taking pictures. ( Ieb49b )
- Fixed the issue where Preview will halt for a while when taking pictures if VideoCapture, ImageCapture and Preview are bound. ( I56197 , b/193864120 )
- Allows ImageAnalysis to select a resolution larger than 1080p. A LIMITED-level above device can support a RECORD size resolution for ImageAnalysis when it is bound together with Preview and ImageCapture. The trade-off is the selected resolution for the ImageCapture will also need to be a RECORD size resolution. To successfully select a RECORD size resolution for ImageAnalysis, a RECORD size target resolution should be set on both ImageCapture and ImageAnalysis. This indicates that the application clearly understands the trade-off and prefers the ImageAnalysis to have a larger resolution rather than the ImageCapture to have a MAXIMUM resolution. For the definitions of RECORD, MAXIMUM sizes and more details see https://developer.android.com/reference/android/hardware/camera2/CameraDevice#regular-capture. The RECORD size refers to the camera device's maximum supported recording resolution, as determined by CamcorderProfile. The MAXIMUM size refers to the camera device's maximum output resolution for that format or target from StreamConfigurationMap.getOutputSizes(int). ( I1ee97 , b/192911449 )
- Add the Exif info to the captured image. ( I01ff0 , b/193342619 )
- In ImageCapture, return the URI of the saved image if the saving location is File. ( Ib5b49 , b/149241379 )
- Fixed an issue that captured images with flash is dark on many devices. ( I4e510 )
نسخه ۱.۱.۰-آلفا۰۷
۲۱ ژوئیه ۲۰۲۱
androidx.camera:camera-camera2:1.1.0-alpha07 , androidx.camera:camera-core:1.1.0-alpha07 , and androidx.camera:camera-lifecycle:1.1.0-alpha07 are released. Version 1.1.0-alpha07 contains these commits.
رفع اشکالات
- Fixed a Samsung Galaxy Note 5 issue that camera gets stuck after taking pictures with flash on/auto in dark environment ( If6871 )
- Fixed
YuvToJpegProcessorEOFException issue when extension mode is enabled andImageCapture#CAPTURE_MODE_MAX_QUALITYmode is set. ( I538bd , b/192017012 )
نسخه ۱.۱.۰-alpha06
۳۰ ژوئن ۲۰۲۱
androidx.camera:camera-camera2:1.1.0-alpha06 , androidx.camera:camera-core:1.1.0-alpha06 , and androidx.camera:camera-lifecycle:1.1.0-alpha06 are released. Version 1.1.0-alpha06 contains these commits.
تغییرات API
- Promote the experimental exposure compensation APIs for camera-core ( I08ee8 )
- Added a API isFocusMeteringSupported in CameraInfo which allows applications to check if the given FocusMeteringAction is supported on current camera or not. ( Ib45ae , b/188606490 )
- Exposed getResolutionInfo API to provide the resolution information for Preview, ImageCapture and ImageAnalysis. ( I2b613 , b/188600718 )
- Promoted the following experimental APIs to official APIs: CameraXConfig.Builder#setAvailableCamerasLimiter(), CameraXConfig.Builder#setMinimumLoggingLevel(), CameraXconfig.Builder#setSchedulerHandler(), CameraXConfig#getAvailableCamerasLimiter(), CameraXConfig#getMinimumLoggingLevel(), CameraXConfig#getCameraExecutor(), CameraXConfig#getSchedulerHandler(). ( I2ade2 )
- Exposed the CameraProvider interface to provide access to a set of cameras. ( I1a7b1 )
- Promote the experimental UseCaseGroup API for camera-core, camera-lifecycle and camera-video. Added
ViewPort#getLayoutDirection,ViewPort.Builder#setLayoutDirectionandViewPort.Builder#setScaleTypefor customizing viewport. ( I7cee8 )
نسخه ۱.۱.۰-آلفا۰۵
۲ ژوئن ۲۰۲۱
androidx.camera:camera-camera2:1.1.0-alpha05 , androidx.camera:camera-core:1.1.0-alpha05 , and androidx.camera:camera-lifecycle:1.1.0-alpha05 are released. Version 1.1.0-alpha05 contains these commits.
تغییرات API
- Removed
Camera2CameraFilterclass. Suggest to select camera by CameraFilter and retrieve CameraCharacteristics or other Camera2 related information through Camera2CameraInfo if needed. ( Ib887c ) -
ExperimentalCameraFilterAPIs are now out of experimental stage and become formal APIs. They can be used without annotated OptIn. ( I4bc94 ) - Added camera state API that's exposed through
CameraInfo#getCameraState(). ( Ia86b4 ) - Added experimental API
CameraInfo#getCameraSelector()which returns a CameraSelector unique to its camera ( I77f9f )
رفع اشکالات
- Fixed the issue that ListenableFuture returned in setZoomRatio and setLinearZoom cannot complete on some android 11 devices ( I716d7 )
- Speed up Camera switching and reduce the error happen rate of the camera device ( I34c99 )
- Replaced ExperimentalUseCaseGroupLifecycle with ExperimentalUseCaseGroup. ( I3b2ef , b/159033688 )
نسخه ۱.۱.۰-آلفا۰۴
۲۱ آوریل ۲۰۲۱
androidx.camera:camera-camera2:1.1.0-alpha04 , androidx.camera:camera-core:1.1.0-alpha04 , and androidx.camera:camera-lifecycle:1.1.0-alpha04 are released. Version 1.1.0-alpha04 contains these commits.
رفع اشکالات
- Fixed a memory leak caused by multiple threads concurrently accessing the same collection. The memory leak may cause the Activity or Fragment to be retained by a Preview instance. ( I7b4b8 )
- Replaced annotation
@Experimentalwith@RequiresOptInto experimental APIs. For calling experimental APIs, useandroidx.annotation.OptIninstead of deprecatedandroidx.annotation.experimental.UseExperimental. ( Iff226 ) - Fixed ImageCapture with flash On/Auto takes washed out images on Samsung Galaxy S7. ( I30001 )
- Added a CameraState API that will be exposed through CameraInfo. ( I75392 )
نسخه ۱.۱.۰-آلفا۰۳
۲۴ مارس ۲۰۲۱
androidx.camera:camera-camera2:1.1.0-alpha03 , androidx.camera:camera-core:1.1.0-alpha03 , and androidx.camera:camera-lifecycle:1.1.0-alpha03 are released. Version 1.1.0-alpha03 contains these commits.
رفع اشکالات
- Output JPEG format for
ImageCapture#OnImageCapturedCallbackwhen Extensions modes is enabled. ( I0d7b1 ) - Fixed initialization failure on UMIDIGI BISON devices ( I57d9e , b/180818665 )
- Fixed Samsung A3 stretched preview in PreviewView. ( Iacb30 , b/180121821 )
نسخه ۱.۱.۰-آلفا۰۲
۲۴ فوریه ۲۰۲۱
androidx.camera:camera-camera2:1.1.0-alpha02 , androidx.camera:camera-core:1.1.0-alpha02 , and androidx.camera:camera-lifecycle:1.1.0-alpha02 are released. Version 1.1.0-alpha02 contains these commits.
تغییرات API
- Added an API
ProcessCameraProvider.getAvailableCameraInfos()to directly retrieve information about the available cameras, which are either all of the device's cameras, or those selected by theCameraSelectorprovided inCameraXConfig.Builder.setAvailableCamerasLimiter(CameraSelector). ( Ieac08 )
رفع اشکالات
- CameraX now tries to force open a camera on the initial attempt, this may result in CameraX stealing the camera away from other camera clients when its app has a higher priority. ( Iab069 , b/175820568 )
- Fixed the Robolectric test failure when setAvailableCamerasLimiter is used in CameraXConfig. ( Ice307 )
- This change catches the exception when the image queue is maxed out in ImageAnalysis. So instead of crashing, you may notice other use cases being frozen or sluggish. eg frozen/sluggish preview. ( Ic12da , b/175851631 )
- Fixed ExtensionsErrorListener to report errors when only Preview or ImageCapture is bound. ( I5ae39 )
- Fixed ImageCapture performance regression by removing the validation of image saved location before taking a picture. After making this change, if the save destination is invalid, it will take longer to get the failure response because it will try to save the image after the photo is taken. ( I1fd4e , b/177061560 )
- Fixed ImageCapture performance regression with "File" type OutputFileOptions. ( I5164a , b/177061560 )
- Documentation updated to recommend against using
ProcessCameraProvider.configureInstance(...)from library code. ( Ib8a9f )
نسخه ۱.۱.۰-آلفا۰۱
۲۷ ژانویه ۲۰۲۱
androidx.camera:camera-camera2:1.1.0-alpha01 , androidx.camera:camera-core:1.1.0-alpha01 , and androidx.camera:camera-lifecycle:1.1.0-alpha01 are released. Version 1.1.0-alpha01 contains these commits.
رفع اشکالات
- Workaround included for intermittent corrupt image data in JPEGs on SM-G930T back-facing camera. ( I52001 , b/159831206 )
- Fixed
IllegalArgumentExceptionissue that happened when all preview supported sizes are smaller than 640x480 and display size is larger than 640x480. ( I2a63c , b/150506192 ) - Resources in libraries with no explicitly declared public resources (ex. via public.xml) are now private by default. ( Ia1dcc , b/170882230 )
Camera-Camera2, Camera-Core, & Camera-Lifecycle Version 1.0.2
Version 1.0.2
۲۹ سپتامبر ۲۰۲۱
androidx.camera:camera-camera2:1.0.2 , androidx.camera:camera-core:1.0.2 , and androidx.camera:camera-lifecycle:1.0.2 are released. Version 1.0.2 contains these commits.
رفع اشکالات
- Fix the issue where the captured photos are blurred in
MAXIMIZE_QUALITYmode. ( I173a9 , b/193823892 ) - Fixed a issue that captured image with flash is dark on many devices. ( I4e510 )
Camera-Camera2, Camera-Core, & Camera-Lifecycle Version 1.0.1
نسخه ۱.۰.۱
۲۱ ژوئیه ۲۰۲۱
androidx.camera:camera-camera2:1.0.1 , androidx.camera:camera-core:1.0.1 , and androidx.camera:camera-lifecycle:1.0.1 are released. Version 1.0.1 contains these commits.
رفع اشکالات
Fixed the issue that the
ListenableFuturereturned insetZoomRatioandsetLinearZoomcannot complete on some android 11 devices ( I716d7 )Fixed the issue that the camera gets stuck at closing camera state on some devices and causes black preview. ( I34c99 )
Camera-Camera2, Camera-Core, & Camera-Lifecycle Version 1.0.0
نسخه ۱.۰.۰
۵ مه ۲۰۲۱
androidx.camera:camera-camera2:1.0.0 , androidx.camera:camera-core:1.0.0 , and androidx.camera:camera-lifecycle:1.0.0 are released. Version 1.0.0 contains these commits.
ویژگیهای اصلی نسخه ۱.۰.۰
- CameraX supports Preview , ImageCapture , and Analysis
- CameraX manages the camera lifecycle within an easy to use API
- CameraX aims to provide a compatibility layer that fixes many issues in the Android Camera Ecosystem
مشکلات شناخته شده
- See Known Issue list
Version 1.0.0-rc05
۲۱ آوریل ۲۰۲۱
androidx.camera:camera-camera2:1.0.0-rc05 , androidx.camera:camera-core:1.0.0-rc05 , and androidx.camera:camera-lifecycle:1.0.0-rc05 are released. Version 1.0.0-rc05 contains these commits.
رفع اشکالات
- Fixed ImageCapture with flash On/Auto takes washed out images on Samsung Galaxy S7. ( I30001 )
Version 1.0.0-rc04
۲۴ مارس ۲۰۲۱
androidx.camera:camera-camera2:1.0.0-rc04 , androidx.camera:camera-core:1.0.0-rc04 , and androidx.camera:camera-lifecycle:1.0.0-rc04 are released. Version 1.0.0-rc04 contains these commits.
رفع اشکالات
- Fixed initialization failure on UMIDIGI BISON devices ( I57d9e , b/180818665 )
Version 1.0.0-rc03
۲۴ فوریه ۲۰۲۱
androidx.camera:camera-camera2:1.0.0-rc03 , androidx.camera:camera-core:1.0.0-rc03 , and androidx.camera:camera-lifecycle:1.0.0-rc03 are released. Version 1.0.0-rc03 contains these commits.
رفع اشکالات
- Fix format error in the document of
ProcessCameraProvider#getInstance - Fixed the Robolectric test failure when setAvailableCamerasLimiter is used in CameraXConfig.
- Fixed ImageCapture performance regression by removing the validation of image saved location before taking a picture. After making this change, if the save destination is invalid, it will take longer to get the failure response because it will try to save the image after the photo is taken
- This change catches the exception when the image queue is maxed out in ImageAnalysis. So instead of crash, you may notice other use cases being frozen or sluggish. eg frozen/sluggish preview.
- Workaround included for intermittent corrupt image data in JPEGs on SM-G930T back-facing camera. ( I52001 , b/159831206 )
- This change catches the exception when the image queue is maxed out in ImageAnalysis. So instead of crashing, you may notice other use cases being frozen or sluggish. eg frozen/sluggish preview. ( Ic12da , b/175851631 )
- Fixed the Robolectric test failure when setAvailableCamerasLimiter is used in CameraXConfig. ( Ice307 )
- Fixed ImageCapture performance regression by removing the validation of image saved location before taking a picture. After making this change, if the save destination is invalid, it will take longer to get the failure response because it will try to save the image after the photo is taken. ( I1fd4e , b/177061560 )
- Fixed ImageCapture performance regression with "File" type OutputFileOptions. ( I5164a , b/177061560 )
نسخه ۱.۰.۰-rc02
۲۷ ژانویه ۲۰۲۱
androidx.camera:camera-camera2:1.0.0-rc02 , androidx.camera:camera-core:1.0.0-rc02 , and androidx.camera:camera-lifecycle:1.0.0-rc02 are released. Version 1.0.0-rc02 contains these commits.
رفع اشکالات
- Fixed IllegalArgumentException issue happened when all preview supported sizes are smaller than 640x480 and display size is larger than 640x480. ( b/150506192 )
Limit number of camera reopen attempts. While attempting to recover from certains issues when opening the camera, CameraX will no longer attempt to reopen the camera indefinitely, instead it will stop after retrying for 10 seconds. I435d2
Fixed
IllegalArgumentExceptionissue that happened when all preview supported sizes are smaller than 640x480 and display size is larger than 640x480. ( I2a63c , b/150506192 )
نسخه ۱.۰.۰-rc01
۱۶ دسامبر ۲۰۲۰
androidx.camera:camera-camera2:1.0.0-rc01 , androidx.camera:camera-core:1.0.0-rc01 , and androidx.camera:camera-lifecycle:1.0.0-rc01 are released. Version 1.0.0-rc01 contains these commits.
تغییرات API
- Changed CameraFilter and Camera2Filter to take in CameraInfo. ( I6883d )
- Added experimental class Camera2CameraControl to allow interoperating with Camera2 APIs dynamically. ( I45cf3 )
- Renamed Camera2CameraInfo#fromCameraInfo to #from. ( Ia2bd6 )
- Added an experimental setAvailableCamerasLimiter API to CameraXConfig to allow apps to optimize the initialization latency by avoiding initializing unused cameras. ( I6cf88 )
- Added experimental method
CameraXConfig.Builder#setMinimumLoggingLevel()to allow setting a minimum logging level for CameraX logs. When not set, it defaults toLog#DEBUG. ( Ic3245 )
رفع اشکالات
- Workaround included for intermittent corrupt image data in JPEGs on SM-G930V back-facing camera. ( I5aca5 , b/159831206 )
- Fixed the issue that taking pictures doesn't receive results when flash is always/on and the environment is dark on Samsung SM-A716 devices. ( If98b2 , b/172036589 )
- Fixed the issue that the Preview cannot be stopped by calling
Preview.setSurfaceProvider(null). ( I3ac18 ) - Fixed orientation issue when capturing 4:3 images on some devices. ( I0e3fb , b/171492111 )
دوربین Camera2، هسته و چرخه عمر نسخه ۱.۰.۰-بتا۱۲
۱۱ نوامبر ۲۰۲۰
androidx.camera:camera-camera2:1.0.0-beta12 , androidx.camera:camera-core:1.0.0-beta12 , and androidx.camera:camera-lifecycle:1.0.0-beta12 are released. Version 1.0.0-beta12 contains these commits.
رفع اشکالات
- Disabled auto flash on Samsung A3 devices to fix the crash when taking a photo with auto flash AE mode on Samsung A3 devices. ( Ia5fe3 , b/157535165 )
- Fixed an issue where the preview was stretched on Nexus 4 devices running Android L (API levels 21 and 22). ( I4d407 , b/158749159 )
-
OnImageCapturedCallback#onCaptureSuccessbase class implementation no longer closes the image. This is for preventing unexpected behavior to developers. Developers should not rely on super.onCaptureSuccess to close the image. ( Ifbf9c ) - The androidx variant of the Experimental annotation has been deprecated to provide parity with Kotlin. It has been replaced by the RequiresOptIn annotation, and the Java-facing linter has been updated to support both the new Kotlin annotation and the new androidx variant. ( I52495 , b/151331381 )
دوربین-دوربین۲ نسخه ۱.۰.۰-بتا۱۱
۱۴ اکتبر ۲۰۲۰
androidx.camera:camera-camera2:1.0.0-beta11 is released. Version 1.0.0-beta11 contains these commits.
ویژگیهای جدید
- Supports android 11
CONTROL_ZOOM_RATIOAPI for zoom on android 11 or later devices which contains validCONTROL_ZOOM_RATIO_RANGE. ( I62cc6 )
رفع اشکالات
- Fixed the NumberFormatException issue happened when the camera Id is a non-integer camera Id. ( Ib2228 )
- Improved the latency of CameraX initialization and bindToLifecycle ( I61dc5 )
- Creation of UseCases do not require initialization of CameraX to complete. All implementation specific configurations are set on UseCase once it is attached to a Camera instance which for the public API is
ProcessCameraProvider.bindToLifecycle(). ( Ia5411 ) -
<UseCase>.getTargetRotation()will returnSurface.ROTATION_0if called before being attached to a Camera instance unless a targetRotation has been set on the Builder or UseCase. ( I80fcd )
نسخه دوربین-هسته ۱.۰.۰-بتا۱۱
۱۴ اکتبر ۲۰۲۰
androidx.camera:camera-core:1.0.0-beta11 is released. Version 1.0.0-beta11 contains these commits.
New Features - Supports android 11 CONTROL_ZOOM_RATIO API for zoom on android 11 or later devices which contains valid CONTROL_ZOOM_RATIO_RANGE . ( I62cc6 )
رفع اشکالات
- Fixed the NumberFormatException issue happened when the camera Id is a non-integer camera Id. ( Ib2228 )
- Creation of UseCases do not require initialization of CameraX to complete. All implementation specific configurations are set on UseCase once it is attached to a Camera instance which for the public API is
ProcessCameraProvider.bindToLifecycle(). ( Ia5411 ) -
<UseCase>.getTargetRotation()will returnSurface.ROTATION_0if called before being attached to a Camera instance unless a targetRotation has been set on the Builder or UseCase. ( I80fcd )
نسخه اصلی دوربین ۱.۰.۰-بتا۱۰
۲۳ سپتامبر ۲۰۲۰
androidx.camera:camera-core:1.0.0-beta10 is released. Version 1.0.0-beta10 contains these commits.
رفع اشکالات
- Fix bug in validating file save destination for image capture ( I8c565 , b/167697553 )
دوربین-دوربین۲ نسخه ۱.۰.۰-بتا۱۰
۲۳ سپتامبر ۲۰۲۰
androidx.camera:camera-camera2:1.0.0-beta10 is released. Version 1.0.0-beta10 contains these commits.
رفع اشکالات
- Release to support Camera-Core 1.0.0-beta10
دوربین-دوربین۲ نسخه ۱.۰.۰-بتا۰۹
۱۶ سپتامبر ۲۰۲۰
androidx.camera:camera-camera2:1.0.0-beta09 is released. Version 1.0.0-beta09 contains these commits.
تغییرات API
- Instead of providing static methods, Camera2CameraInfo takes in a CameraInfo instance when created to retrieve Camera2 related information from. ( I5b844 )
رفع اشکالات
- Fixed target aspect ratio issue on tablet devices. A 16:9 size should be selected when the target aspect ratio is set as
AspectRatio.RATIO_16_9. ( Ib7fcf , b/151969438 ) - Throw an
InitializationExceptionto make the app be able to gracefully handle the AssertionError happened when creating CameraCharacteristics. ( I89c8c , b/160524721 ) - Added experimental interfaces for ExposureCompensation ( If96c7 )
نسخه دوربین-هسته ۱.۰.۰-بتا۰۹
۱۶ سپتامبر ۲۰۲۰
androidx.camera:camera-core:1.0.0-beta09 is released. Version 1.0.0-beta09 contains these commits.
تغییرات API
- fixed the bug where viewport is marked as non-null on UseCaseGroup. Developers should be able to create a viewport without setting a viewport. ( Ie3d2e )
- Added experimental interfaces for
ExposureCompensation( If96c7 ) - Allow arbitrary target rotation for Preview. The transformation info is calculated and returned to user on-the-fly via a new
TranformationInfoListenercallback. ( I21470 )
رفع اشکالات
- Fixed the issue that flash on some devices would not turn off. It happens when the flash mode is set to
FLASH_MODE_ONto take a picture, and is changed toFLASH_MODE_OFFwhen the flash is fired. The symptom is like torch mode enabled. ( Ib4451 , b/162568128 ) - Forced PreviewView to use TextureView if extension effect is enabled and the vendor library implementation needs to do a special process on the output surface. ( I0c3cc )
- Fixed the activity/fragment leak when an activity/fragment context is passed to
ProcessCameraProvider.getInstance(Context).
مشکلات شناخته شده
- When ViewPort is set, the crop rect of ImageCapture might be incorrect on devices who rotate the image buffer in HAL. This will be fixed in the next release.
دوربین-دوربین۲ نسخه ۱.۰.۰-بتا۰۸
۱۹ آگوست ۲۰۲۰
androidx.camera:camera-camera2:1.0.0-beta08 is released. Version 1.0.0-beta08 contains these commits.
رفع اشکالات
- Optimized bindToLifecycle to run quickly on the main thread. ( I1d57e )
- DisplayOrientedMeteringPointFactory takes in a CameraInfo instance instead of a CameraSelector so there is a direct mapping to which Camera the factory will be generating points for. All classes which use DisplayOrientedMeteringPointFactory also take in a CameraInfo instance instead of CameraSelector. ( I400c1 )
- Fixed auto-resolution aspect ratio size grouping issue that a 16:9 mod16 size (864x480) is selected when the target resolution setting is 2016x1080 and there is another 1920x1080 16:9 size supported. ( I53167 , b/159363774 )
- Fix the CameraControl issue where it's unable to work by a race condition ( I2279f , b/152333890 , b/160714166 )
نسخه دوربین-هسته ۱.۰.۰-بتا۰۸
۱۹ آگوست ۲۰۲۰
androidx.camera:camera-core:1.0.0-beta08 is released. Version 1.0.0-beta08 contains these commits.
تغییرات API
-
DisplayOrientedMeteringPointFactorytakes in aCameraInfoinstance instead of aCameraSelectorso there is a direct mapping to which Camera the factory will be generating points for. All classes which useDisplayOrientedMeteringPointFactoryalso take in aCameraInfoinstance instead ofCameraSelector. ( I400c1 )
رفع اشکالات
- For image capture, overwrite the flip horizontal flag in metadata based on camera direction. ( I28499 )
- Initialization should no longer crash when using a Context that does not return an Application object from
Context.getApplicationContext(). ( I3d3c9 , b/160817073 )
دوربین-دوربین۲ نسخه ۱.۰.۰-بتا۰۷
۲۲ ژوئیه ۲۰۲۰
androidx.camera:camera-camera2:1.0.0-beta07 is released. Version 1.0.0-beta07 contains these commits.
رفع اشکالات
- Fixed the issue that the preview is stretched on android 5.0 legacy device. ( I0c03a )
- Excluded some JPEG supported sizes that will cause WYSIWYG issue on some devices. ( Ib5128 )
نسخه دوربین-هسته ۱.۰.۰-بتا۰۷
۲۲ ژوئیه ۲۰۲۰
androidx.camera:camera-core:1.0.0-beta07 is released. Version 1.0.0-beta07 contains these commits.
تغییرات API
- Merge
FIT_CENTER,FIT_START, andFIT_ENDfit style withFIT.FITmeans that the returned crop rect will be the max possible sensor rect. ( Ia73c3 ) - Preview's crop rect is configured by viewport. Only the area covered by the crop rect should be visible to end users. ( I142a4 )
رفع اشکالات
- Fixed the issue that the preview is stretched on android 5.0 legacy device. ( I0c03a )
- Fixed the
ConcurrentModificationExceptionexception issue when unbinding use cases. ( I371c0 )
دوربین-دوربین۲ نسخه ۱.۰.۰-بتا۰۶
۲۴ ژوئن ۲۰۲۰
androidx.camera:camera-camera2:1.0.0-beta06 is released. Version 1.0.0-beta06 contains these commits.
تغییرات API
- Added experimental interfaces for filtering cameras by camera ID and CameraCharacteristics. ( I28f61 )
رفع اشکالات
- Fixed the issue where startFocusAndMetering fails to focus successfully on Samsung Galaxy S7. ( If3be7 , b/159039233 )
- Fix the camera can't be closed after quit the app. ( I7a7b3 )
- Fix repeated camera switching breaks preview when using SurfaceView implementation of PreviewView ( I920ce )
-
CameraControl#startFocusAndMeteringwill fail if none of the specified MeteringPoint can generate valid metering rectangles. ( Id53ce )
نسخه دوربین-هسته ۱.۰.۰-بتا۰۶
۲۴ ژوئن ۲۰۲۰
androidx.camera:camera-core:1.0.0-beta06 is released. Version 1.0.0-beta06 contains these commits.
تغییرات API
- Added experimental interfaces for filtering cameras by camera ID and CameraCharacteristics. ( I28f61 )
رفع اشکالات
- CameraX can now be configured with
ProcessCameraProvider#configureInstance()before callingProcessCameraProvider#getInstance(). This allows for customization of theCameraXConfigwithout requiring implementingCameraXConfig.Providerin the app's Application class. ( Ia1a8d ) -
CameraControl#startFocusAndMeteringwill fail if none of the specified MeteringPoint can generate valid metering rectangles. ( Id53ce )
دوربین-دوربین۲ نسخه ۱.۰.۰-بتا۰۵
۱۰ ژوئن ۲۰۲۰
androidx.camera:camera-camera2:1.0.0-beta05 is released. Version 1.0.0-beta05 contains these commits.
رفع اشکالات
- Fix the crash on app startup when initialising CameraX while phone is in Do Not Disturb mode. An
InitializationExceptioncontains aCameraUnavailableExceptionthat will be set to theListenableFutureof the intialization result instead of crashing the application. ( I9909a , b/149413835 ) - Fixed the crash when calling
startFocusAndMeteringon devices thatCONTROL_AF_STATEis null. ( Ife55e , b/157084254 )
نسخه دوربین-هسته ۱.۰.۰-بتا۰۵
۱۰ ژوئن ۲۰۲۰
androidx.camera:camera-core:1.0.0-beta05 is released. Version 1.0.0-beta05 contains these commits.
تغییرات API
- Fix the crash on app startup when initialising CameraX while phone is in Do Not Disturb mode. An
InitializationExceptioncontains aCameraUnavailableExceptionwill be set to theListenableFutureof the intialization result instead of crashing the application. ( I9909a , b/149413835 )
رفع اشکالات
- Updated javadocs of
setTargetResolutionandsetTargetRotation. ( Iae16f )
دوربین-دوربین۲ نسخه ۱.۰.۰-بتا۰۴
۲۷ مه ۲۰۲۰
androidx.camera:camera-camera2:1.0.0-beta04 is released. Version 1.0.0-beta04 contains these commits.
رفع اشکالات
- Allowed applications to set any camera2 capture request parameters via
Camera2Interopwithout causing a crash. Please note that if there are issues that arise as a result of overriding parameters. Stability and behaviour are not guaranteed when overriding parameters using Camera2Interop. ( Ibe5a1 , b/149103700 ) - Auto-initialization is fixed when using an app on a device that is using a pseudo-locale. ( I3bef3 , b/154767663 )
- Converted error log related to detached use case to a debug log on Camera2CameraImpl. ( I1a565 , b/154422490 )
- Fixed issue where image taken is too dark sometimes even though flash is fired. ( I5d9fa , b/149729613 )
- Fix bug where buffer in
ImageProxyfromImageCapturewas not rewound ( I0c455 , b/153249512 ) - Fixed the issues where binding ImageCapture only: (1) Failed to take photos with MAX_QUALITY; (2) Generated bad Image quality because auto exposure does not work. ( I17782 , b/145326998 )
- Improved reliability of re-opening camera when CameraX is disconnected by another process or codepath stealing the camera ( I1fbc3 , b/153714651 )
نسخه دوربین-هسته ۱.۰.۰-بتا۰۴
۲۷ مه ۲۰۲۰
androidx.camera:camera-core:1.0.0-beta04 is released. Version 1.0.0-beta04 contains these commits.
تغییرات API
- Adds an experimental API,
CameraXConfig.Builder#setSchedulerHandler()for setting the handler used internally by the CameraX camera stack. This new API along withCameraXConfig.Builder#setCameraExecutor()should allow full control over the threads being used by the CameraX camera stack. ( I7bf32 , b/121160431 )
رفع اشکالات
- Fixes crash in
ImageAnalysiswhere theImageProxyis accessed after theImageReaderProxyhas been closed. This also makes it so that allImageProxyreceived by theAnalyzermust be closed before theImageReaderProxywill be closed. ( I4b299 , b/145956416 , b/154155377 , b/156357269 ) - Removed the
CameraInfoparameter fromPreviewView#createSurfaceProvider(),PreviewViewnow internally retrieves it from theSurfaceRequest. ( If18f0 , b/154652477 ) - Auto-initialization is fixed when using an app on a device that is using a pseudo-locale. ( I3bef3 , b/154767663 )
- Fixed issue where image taken is too dark sometimes even though flash is fired. ( I5d9fa , b/149729613 )
- Fix issue with
ImageAnalysiswhere multiple calls to setAnalyzer/clearAnalyzer resulted in the analyzer not receiving images to analyze. ( I6169f , b/151605317 , b/153514544 ) - Fix bug where buffer in
ImageProxyfromImageCapturewas not rewound ( I0c455 , b/153249512 ) - Fixed the issue that the first camera in the supported list from
CameraManageris not always selected to use. ( I4c624 , b/153418028 ) - Fixed intermittent crash caused by setting
Preview.SurfaceProvidernot releasing the previously requested surface.“java.lang.IllegalStateException: Camera surface session should only fail with request cancellation”( I8e4e7 , b/155936225 )
دوربین-دوربین۲ نسخه ۱.۰.۰-بتا۰۳
۱۵ آوریل ۲۰۲۰
androidx.camera:camera-camera2:1.0.0-beta03 is released. Version 1.0.0-beta03 contains these commits.
رفع اشکالات
- Fixes to support the release of
camera-core
نسخه دوربین-هسته ۱.۰.۰-بتا۰۳
۱۵ آوریل ۲۰۲۰
androidx.camera:camera-core:1.0.0-beta03 is released. Version 1.0.0-beta03 contains these commits.
رفع اشکالات
- Fixed regression from beta03 where calling
bindToLifecycle()with zeroUseCases would cause a thrown exception. This prevented retrieval of aCamerawithout binding aUseCase.
دوربین-دوربین۲ نسخه ۱.۰.۰-بتا۰۲
۱ آوریل ۲۰۲۰
androidx.camera:camera-camera2:1.0.0-beta02 is released. Version 1.0.0-beta02 contains these commits.
رفع اشکالات
- Fixed the
ImageInfo.getRotationDegrees()from theImageProxyproduced byImageCaptureso that it matches the EXIF orientation rotational value. ( Id4281 , b/150802561 ) - Explicit ordering of CameraX dependencies within
build.gradleis no longer required to use the default CameraX/Camera2 implementation. For cases where declaring strict dependencies is required, all CameraX dependencies can now be included in the build file. ( I46e88 ) - Fixed the
IllegalArgumentExceptionissue happening on the devices where the display size is smaller than 640x480. ( Ife3f2 , b/150506192 ) - Fixed
bindToLifecycleso that it only modifies the UseCase if it successfully binds. Previously when callingbindToLifecyclein order to do resolution calculations the UseCase is updated. Now it no longer needs to update the UseCase to do the calculations ( I78d9e )
Camera-Core Version 1.0.0-beta02
۱ آوریل ۲۰۲۰
androidx.camera:camera-core:1.0.0-beta02 is released. Version 1.0.0-beta02 contains these commits.
رفع اشکالات
- Fixed the
ImageInfo.getRotationDegrees()from theImageProxyproduced byImageCaptureso that it matches the EXIF orientation rotational value. ( Id4281 , b/150802561 ) - Fixed
bindToLifecycleso that it only modifies the UseCase if it successfully binds. Previously when callingbindToLifecyclein order to do resolution calculations the UseCase is updated. Now it no longer needs to update the UseCase to do the calculations ( I78d9e ) - Fixed an issue where the
Previewuse case's capture session wasn't being updated when the preview surface changed after callingPreview.setSurfaceProvider()more than once.
Camera-Camera2 Version 1.0.0-beta01
February 26, 2020
androidx.camera:camera-camera2:1.0.0-beta01 is released. Version 1.0.0-beta01 contains these commits.
رفع اشکالات
- Renamed
SurfaceRequest.setSurface(Surface)toSurfaceRequest.provideSurface(Surface), andSurfaceRequest.setWillNotComplete()toSurfaceRequest.willNotProvideSurface(). ( I224fe ) - Fixed an issue with the aspect ratio of a saved image not being correct after changing the target rotation value using
ImageCapture.setTargetRotation(). ( I474ea , b/148763432 ) - Fixed initialization of app variants with ProGuard enabled by preserving the flag that sets the default
CameraXConfigprovider. ( I2d6c1 )
Camera-Core Version 1.0.0-beta01
February 26, 2020
androidx.camera:camera-core:1.0.0-beta01 is released. Version 1.0.0-beta01 contains these commits.
تغییرات API
- Replaced the
ListenableFutureonSurfaceRequest.provideSurface()with anExecutorandCallback. This simplifies the API by no longer requiring handling of exceptions onprovideSurface()and enforces that theprovideSurface()callback cannot be cancelled. This is to prevent crashes on older devices caused by prematurely releasing surfaces. TheSurfaceRequest.Resultobject is now used for tracking how aSurfaceRequestuses the providedSurface. ( I7854b ) - Renamed
SurfaceRequest.setSurface(Surface)toSurfaceRequest.provideSurface(Surface)andSurfaceRequest.setWillNotComplete()toSurfaceRequest.willNotProvideSurface(). ( I224fe )
رفع اشکالات
- Fixed an issue with the aspect ratio of a saved image not being correct after changing the target rotation value using
ImageCapture.setTargetRotation(). ( I474ea , b/148763432 ) - Fixed initialization of app variants with ProGuard enabled by preserving the flag that sets the default
CameraXConfigprovider. ( I2d6c1 ) - Updated documentation for flash mode APIs to include possible values. ( I4a3ec )
Camera-Camera2 Version 1.0.0-alpha10
February 10, 2020
androidx.camera:camera-camera2:1.0.0-alpha10 is released. Version 1.0.0-alpha10 contains these commits .
رفع اشکالات
- Improved stability on
INFO_SUPPORTED_HARDWARE_LEVEL_LEGACYdevices by ensuringSurfaces are only retained for duration of use by Camera2. ( I9dac2 ) - Fixed underexposed preview issue on LEGACY devices by adjusting
CONTROL_AE_TARGET_FPS_RANGEproperly. ( 1224638 )
Camera-Core Version 1.0.0-alpha10
February 10, 2020
androidx.camera:camera-core:1.0.0-alpha10 is released. Version 1.0.0-alpha10 contains these commits .
تغییرات API
- Updated
ImageCaptureto allow saving images toUriandOutputStream. Combined overloadedtakePicturemethods into one. Updated test app to useUrias the canonical example. ( Ia3bec ) -
Preview.PreviewSurfaceProviderhas been renamed toPreview.SurfaceProvider.SurfaceProviders no longer require developers to create their ownListenableFuture, and providing aSurfaceis now done through a newSurfaceRequestobject. ThePreview.getPreviewSurfaceProvider()method has been removed due to its potential for misuse whenPreviewis paired with other classes such asPreviewView. ( I20105 ) - Added
getTargetRotation()andgetTargetName()toPreview. ( Iceee7 ) - Added
getTargetRotation(),getBackpressureStrategy(), andgetImageQueueDepth()inImageAnalysis. ( I9d6d9 ) - Added
getTargetRotation()andgetCaptureMode()inImageCapture()( I5bc17 ) - The arguments that were previously passed in
ImageCapture.OnImageSavedCallback.onError()andImageCapture.OnImageCapturedCallback.onError()have now been replaced by a single argumentImageCaptureException, which still contains all the information that was previously passed. - The file argument previously passed in
ImageCapture.OnImageSavedCallback.onImageSaved()has been removed. ( I750d2 ) -
PreviewandImageCaptureclasses are now marked final. ( I2500b ) - API updated, with
getZoomRatio(),getMaxZoomRatio(),getMinZoomRatio(), andgetLinearZoom()methods ofCameraInfomerging intogetZoomState()which returns aZoomStateinstance. ( Ib19fe ) - Removed API fields
OPTION_TARGET_CLASSandOPTION_TARGET_NAMEfromCameraXConfigas they are intended for internal library use only. Removed constructor forCameraXConfig.Builder. ( I96912 ) - Removed requirement that app must extend
Applicationin order to initialize CameraX. CameraX will now be initialized with a default Camera2 configuration as long as thecamera-camera2artifact is included in the application'sbuild.gradle. ( I58ff5 ) ( b/146923574 )
Camera-Camera2 Version 1.0.0-alpha09
۲۲ ژانویه ۲۰۲۰
androidx.camera:camera-camera2:1.0.0-alpha09 is released. Version 1.0.0-alpha09 contains these commits .
تغییرات API
Add camera2 interop path for extracting a Camera2 camera ID. You can extract the camera ID from
CameraInfousingCamera2CameraInfo.extractCameraId(). The following code sample shows how to use this:Camera camera = provider.bindToLifecycle(...); String cameraId = Camera2CameraInfo.extractCameraId(camera.getCameraInfo());The
Camera2CameraInfoclass requires theExperimentalCamera2InteropmarkerClass.
Camera-Core Version 1.0.0-alpha09
۲۲ ژانویه ۲۰۲۰
androidx.camera:camera-core:1.0.0-alpha09 is released. Version 1.0.0-alpha09 contains these commits .
تغییرات API
- The
SurfaceOrientedMeteringPointFactoryparameteruseCaseForSurfacewas renamed touseCaseForAspectRatioand the reference documentation was expanded. -
FocusMeteringAction.Builder.from()methods are replaced by the constructorsFocusMeteringAction.Builder(). - Removed
DisplayOrientedMeteringPointFactory(android.content.Context, androidx.camera.core.CameraSelector, float, float). Applications should use the constructor that takes aDisplayparameter and pass in the current display. - Javadoc improvements for focus and metering APIs regarding
MeteringModeand 3A Flags, and usage ofDisplayparameter. - Expanded the reference documentation for
setZoomRatioandsetLinearZoom.
رفع اشکالات
- Fixed issues when closing then opening cameras resulting in "Precondition" check failure.
- Fixed a
ConcurrentModificationExceptionthat could occur when using torch and zoom APIs. - Fixed issue to now select resolutions closer to requested resolution when a mod16 dimensions size is available.
-
startFocusMeteringandcancelFocusMeteringAPIs now behave as documented, with correct timing and potentially returning errors when they occur. - Fixed issue when a specific target resolution was requested with a crop aspect ratio on a device that doesn't support such sizes. Now, a non-cropped size of sufficient resolution to bound the original request will be selected when available.
Camera-Camera2 Version 1.0.0-alpha08
۱۸ دسامبر ۲۰۱۹
androidx.camera:camera-camera2:1.0.0-alpha08 is released. Version 1.0.0-alpha08 contains these commits .
مشکلات شناخته شده
- Not all Camera2 capture request options work when using the Camera2 interop. If the requested option is not supported, the session fails to start and an error like this may occur:
09-09 14:04:13.643 10117 26020 26036 E AndroidRuntime: java.lang.IllegalArgumentException: Unsupported session configuration combination
رفع اشکالات
- Fixed an issue in which a preview black screen occurred after rotating or switching the camera for API Levels 21 and 22.
تغییرات API
- Experimental : Added a camera2 interop path for extracting the Camera ID.
Camera-Core Version 1.0.0-alpha08
۱۸ دسامبر ۲۰۱۹
androidx.camera:camera-core:1.0.0-alpha08 is released. Version 1.0.0-alpha08 contains these commits .
مشکلات شناخته شده
- Apps using the
PreviewVieworCameraViewmay have the wrong aspect ratio preview. This happens after pause or resume on some FULL devices, such as the Pixel2.
رفع اشکالات
- Updated the documentation for
FocusMeteringActionandCameraControl. - Implemented
TorchControlforenableTorch()andgetTorchState().
تغییرات API
- Hid IntDefs and moved IntDef constants outside of the IntDef definition.
- Moved
rotationDegreesfrom classOnImageCaptureCallbacktoImageInfo. - Moved
rotationDegreesfrom classAnalyzertoImageInfo.
Camera-Camera2 Version 1.0.0-alpha07
۴ دسامبر ۲۰۱۹
androidx.camera:camera-camera2:1.0.0-alpha07 is released. Version 1.0.0-alpha07 of camera-camera2 contains these commits
-
Camera2Configis now available for use with initializing and configuring a Camera2-based implementation for CameraX. More details on how to use this in initialization are in the camera-core section of the release notes. - The camera2 interop functionally is now marked as experimental and moved to a separate package,
androidx.camera.camera2.interop.
Camera-Core Version 1.0.0-alpha07
۴ دسامبر ۲۰۱۹
androidx.camera:camera-core:1.0.0-alpha07 is released. Version 1.0.0-alpha07 of camera-core contains these commits
Note that there are some substantial changes in this Alpha release as we prepare for Beta. We recommend you review the changes and share any feedback you may have on the CameraX Google group . For those developers using CameraX in apps that are on the Play store, we recommend waiting for the formal Beta release before upgrading the library within your applications.
تغییرات API
Important : CameraX initialization has changed. Applications should implement
CameraXConfig.Provider, and use the defaultCamera2Configprovided byandroidx.camera.camera2. A typical usage is:import androidx.camera.camera2.Camera2Config import androidx.camera.core.CameraXConfig public class MyCameraXApplication : Application(), CameraXConfig.Provider { override fun getCameraXConfig(): CameraXConfig { return Camera2Config.defaultConfig(this) } }The CameraX class has been removed. The
bindToLifecycle(),unbind(),unbindAll(),isBound(), andhasCamera()previously provided by the CameraX class call are now available via theProcessCameraProvider.A per-process instance of
ProcessCameraProvideris obtained asynchronously using the static methodProcessCameraProvider.getInstance(), which returns a listenable future, which provides theProcessCameraProvideron completion. Here it is shown inonCreate()for a typical usage. You can place calls togetInstance()later in the activity's lifecycle to defer initialization latency to a later time (such as when a user action opens a camera UI).import androidx.camera.lifecycle.ProcessCameraProvider import com.google.common.util.concurrent.ListenableFuture class MainActivity : AppCompatActivity() { private lateinit var cameraProviderFuture : ListenableFuture<ProcessCameraProvider> override fun onCreate(savedInstanceState: Bundle?) { cameraProviderFuture = ProcessCameraProvider.getInstance(this); }A listener can be added to the
ListenableFuturereturned bygetInstance(). This ensures the camera provider can be retrieved from theFuturewithout blocking onFuture.get()cameraProviderFuture.addListener(Runnable { val cameraProvider = cameraProviderFuture.get() cameraProvider.bindToLifecycle(...) }, ContextCompat.getMainExecutor(this))Camera selection is now done by a camera selector, instead of per-use case
val cameraSelector = CameraSelector.Builder().requireLensFacing(LensFacing.BACK).build()CameraProvider.bindToLifecycleis given the lifecycle owner, the camera selector, and use cases, which are then bound to the given lifecycle owner and run for the selected camera.cameraProvider.bindToLifecycle(this as LifecycleOwner, cameraSelector, preview, imageAnalysis)Use case “Config” classes are removed. Instead, build use cases directly, setting options on each use case builder. For example:
preview = Preview.Builder().setTargetAspectRatio(AspectRatio.RATIO_16_9).build()The Preview use case has been updated to accept a surface created and managed by the application to ensure Android best practices. It is highly recommended to use the
PreviewViewview class provided in the camera-view package.preview.setPreviewSurfaceProvider(previewView.previewSurfaceProvider)See documentation for attaching an app-managed surface. In these cases the app manages the lifecycle of the surface.
Important : The
ImageAnalysisAnalyzer method implementation must callimage.close()on received images when finished using them. Otherwise, new images may not be received or the camera may stall, depending on back pressure setting. Refer to the reference docs for details.ImageAnalysis ImageReaderModeis now changed to a backpressure strategyintdef.ImageProxy.getImage()is marked as experimental. Applications should annotate usage for example via@androidx.camera.core.ExperimentalGetImageThe
UIThreadannotation requirement for theAnalyzerhas been removed.The
ImageAnalysis.clearAnalyzer()function is added for removing an analyzer.Listeners with more than 1 method have been renamed to Callback:
-
ImageCapture.OnImageCapturedListeneris nowImageCapture.OnImageCapturedCallback -
ImageCapture.OnImageSavedListeneris nowImageCapture.OnImageSavedCallback -
VideoCapture.OnVideoSavedListeneris nowVideoCapture.OnVideoSavedCallback
-
Enums have changed to IntDef
Zoom controls have been added:
-
CameraControl.setLinearZoom() -
CameraControl.setZoomRatio() -
CameraInfo.getLinearZoom() -
CameraInfo.getMaxZoomRatio() -
CameraInfo.getZoomRatio()
-
CameraInfo.hasFlashUnit()is added to determine if flash/torch hardware is present.CameraInfo.isFlashAvailable()has been removed. Torch overrides flash functionality. More detail is included in the reference documentation .ImageCapture.Metadatafields are replaced by get/set/is accessors.startFocusMeteringandcancelFocusMeteringnow returnListenableFutureswhich represent the asynchronous operation of the call.MeteringPointsare now functioning as handles to metering actions, and are produced by factories. Apps should use the existing factories rather than custom factories.
Fixed issues
- Fixed issue when taking a picture on resuming (after a previous pause had take pictures pending completion).
- Known Issue:
CameraControl.enableTorch()is functional but the returnedListenableFuture<Void>is always an immediatecomplete(success)future, even if there is no flash unit. Future versions will fix this to the final behavior: When there is no flash unit,enableTorch(true)fails immediately (won't send request toCaptureSession), andTorchStateremain Off. - Known Issue:
startFocusAndMeteringandcancelFocusAndMeteringstart and cancel focus metering, but return an immediatelycompleted (success)future not representing the documented behavior. TheFocusMeteringResultfromListenableFuture<FocusMeteringResult> CameraControl.startFocusAndMetering()is a fake result whichisFocusSuccessful()and is always "false," differing from intended, documented behavior. - Known Issue: A metering point factory for use with
PreviewViewtouch events is being developed. For now, apps connecting custom managed surfaces can use the existing metering point factories, and otherwise no touch focus functionality is available forPreviewView.
Camera-Camera2 and Camera-Core Version 1.0.0-alpha06
۹ اکتبر ۲۰۱۹
androidx.camera:camera-camera2:1.0.0-alpha06 and androidx.camera:camera-core:1.0.0-alpha06 are released. These are the commits included in camera-camera2:1.0.0-alpha06 and these are the commits included in camera-core:1.0.0-alpha06 .
ویژگیهای جدید
Changes to setting aspect ratios:
-
setTargetAspectRatioMode()was added and accepts an enum argument. This sets the Aspect Ratio Mode with optionsRATIO_4_3orRATIO_16_9instead of an arbitrary aspect ratio. This closer reflects the fact that only certain aspect ratios are provided from the camera, rather than any arbitrary ratio.- Currently, the only available ratios are 16:9 and 4:3. In the case of 1:1, only certain devices have this available from the camera, and then only at limited resolutions. Applications designing a 1:1 interface or processing should use the more flexible 16:9 or 4:3 choices and crop the display or process a subregion.
- These aspect ratios are oriented to use the maximum sensor area.
-
getTargetAspectRatio()was added to use case config APIs, returning the aspect ratio the use case output is targeted for. - The method
setTargetAspectRatio(Rational aspectRatio)has been changed for ImageCapture tosetTargetAspectRatioCustom(Rational aspectRatio). When set, the ImageCapture output crops accordingly.
Executor APIs
- The following functions accept an executor parameter, which allows the app to control which executor the function runs on.
-
Preview.setOnPreviewOutputUpdateListener()API. If the executor is not present for that function, it executes on the main thread. -
Preview.setOnPreviewOutputUpdateListener -
FocusMeteringAction.Builder.setAutoFocusCallback -
ImageAnalysis.setAnalyzer -
ImageCapture.takePicture -
CameraView.takePicture -
CameraView.startRecording -
VideoCapture.startRecording
-
CameraInfo added with check Flash Available and Sensor Rotation APIs
Added
CameraInfoand agetCameraInfomethod, which allows apps to check if a lens facing CameraInfo is available and if a flash is available on that camera. For example:try { CameraInfo cameraInfo = CameraX.getCameraInfo(currentCameraLensFacing); LiveData<Boolean> isFlashAvailable = cameraInfo.isFlashAvailable(); flashToggle.setVisibility(isFlashAvailable.getValue() ? View.VISIBLE : View.INVISIBLE); } catch (CameraInfoUnavailableException e) { Log.w(TAG, "Cannot get flash available information", e); flashToggle.setVisibility(View.VISIBLE); }CameraInfo.getSensorRotationDegrees()was added. It provides the camera sensor orientation relative to the device's natural orientation, or for convenience, relative to an orientation described by a Surface rotation (which describes an orientation relative to natural orientation).
API changes and bug fixes
- Aspect Ratios: For each use case, applications should call only one of
setTargetResolution()orsetTargetAspectRatio(). Calling both on the same builder returns an error.- In general it's recommended to use
setTargetAspectRatio()based on the application's UI design. Specific resolutions are based on the use case. For example, preview is near screen resolutions and image capture provides high resolution stills. See the automatic resolutions table for more information. - Use
setTargetResolution()for more specific cases, such as when minimum (to save computation) or maximum resolutions (for processing details) are required.
- In general it's recommended to use
- Executor API: Removed the
setCallbackHandler()call from use case configuration APIs. Instead, applications can set the executor as a parameter in various other APIs that set a callback. - Updated null annotations for various functions.
- Fixed an issue that caused
java.lang.IllegalStateException at Camera$StateCallback.onErrorto be thrown when opening the camera. - Fixed issue where resolutions would be selected that were too small (less than 640x480) when app is requesting larger or default resolutions resulting in a blocky or blurry preview image. Applications that specifically need smaller resolutions can explicitly request them.
- Fixed an issue where the camera would show black screen (failed to start the camera) after returning from an intent that launched another camera application.
- Fixed a bug that threw the following error when apps are repeatedly started or stopped;
java.lang.IllegalArgumentException: CaptureRequest contains unconfigured Input/Output Surface! - Fixed the following error that occurs when disabling ImageAnalysis:
java.lang.IllegalStateException: maxImages (4) has already been acquired, call #close before acquiring more. - Added additional tests for camera disconnect flow.
- Improved test system robustness when running back-to-back camera tests.
Camera-Camera2 and Camera-Core Version 1.0.0-alpha05
۵ سپتامبر ۲۰۱۹
androidx.camera:camera-camera2:1.0.0-alpha05 and androidx.camera:camera-core:1.0.0-alpha05 are released. These are the commits included in camera-camera2:1.0.0-alpha05 and these are the commits included camera-core:1.0.0-alpha05 .
API Change: Renamed use case error variables:
-
ImageCapture.UseCaseErroris renamedImageCapture.ImageCaptureError -
VideoCapture.UseCaseErroris renamedVideoCapture.VideoCaptureError
-
Added
CameraControlAPI w/Tap-to-Focus APIsAdded API to get a
CameraControlfrom CameraX for a camera, selected by lens facing:CameraX.getCameraControl(LensFacing lensFacing)Added
MeteringPointFactory,MeteringPoint,MeteringMode, andFocusMeteringActionto run Tap-to-Focus:MeteringPointFactory factory = new SensorOrientedMeteringPointFactory(width, height); MeteringPoint point = factory.createPoint(x, y); FocusMeteringAction action = FocusMeteringAction.Builder.from(point, MeteringMode.AF_ONLY) .addPoint(point2, MeteringMode.AE_ONLY) // could have many .setAutoFocusCallback(new OnAutoFocusListener(){ public void onFocusCompleted(boolean isSuccess) { } }) // auto calling cancelFocusAndMetering in 5 sec. .setAutoCancelDuration(5, TimeUnit.Second) .build();Added API for
CameraControlto start and cancel focus metering:getCameraControl(lensFacing).startFocusAndMetering(action);getCameraControl(lensFacing).cancelFocusAndMetering();Added APIs for Metering Point Factories that assist translating tap coordinates to sensor coordinates, based on view classes:
MeteringPointFactory factory = new TextureViewMeteringPointFactory(textureView);MeteringPointFactory factory = new DisplayOrientedMeteringPointFactory(context, lensFacing, viewWidth, viewHeight);
Enforce calling the following methods on the Main (UI) thread, throwing an
IllegalStateExceptionwhen they are not. Future versions will allow usage on other threads and ensure serialization.-
CameraX.bindToLifecycle() -
CameraX.unbind() -
CameraX.unbindAll() -
ImageAnalysis.setAnalyzer() -
ImageAnalysis.getAnalyzer() -
ImageAnalysis.removeAnalyzer() -
Preview.removePreviewOutputListener() -
Preview.getOnPreviewOutputUpdateListener() -
Preview.setOnPreviewOutputUpdateListener()
-
Various config settings now accept null parameters and corresponding getters may return null.
Fixed issue when testing on emulators that do not support AF/AE/AWB settings.
Fixed crash bug on rotation while analyzing image.
Fixed bug where preview appears black on start (no camera data), after rotation or switching between front and back cameras.
Removed testing for multiple concurrent image analysis use cases. To ensure compatibility, applications should only attach a single image analysis use case.
Added initial robolectric tests for fake camera in camera-testing suite (WIP).
Camera2Inititalizer test removed, as its coverage was unclear/misleading.
Camera-Camera2 and Camera-Core Version 1.0.0-alpha04
۷ آگوست ۲۰۱۹
androidx.camera:camera-camera2:1.0.0-alpha04 and androidx.camera:camera-core:1.0.0-alpha04 are released. Version 1.0.0-alpha04 contains these commits .
ویژگیهای جدید
Changes to Aspect Ratio and Resolution selection
CameraX's goal is to successfully initialize a camera session. This means CameraX compromises on resolution/aspect ratios based on device capability, in order to start a capture session as its first goal, and so exact requests may not be honored. This may be due to:
- Devices not supporting the requested resolution
- Compatibility issues such as on LEGACY devices where certain resolutions must be used to operate correctly
- On some devices, certain formats are only available at certain aspect ratios
- A preference for a “nearest mod16” for JPEG or video encoding. See
CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP
Although CameraX creates and manages the session, you should always check the returned image sizes on the use case output in your code and adjust accordingly.
Some changes have been made for setting resolutions and aspect ratios, intended to make the API more clear:
- Preview use case is now considered to have a default 4:3 aspect ratio when none is set.
- When CameraX internally considers changes to requested resolutions and aspect ratios based on device capability, it first tries to maintain the same aspect ratio (as determined by any of
setTargetAspectRatioorsetTargetResolutioncalls) - A “Nearest mod16” version of the resolution is considered as the same aspect ratio.
ImageAnalysis Non-Blocking Mode
- The behaviour of
ImageReaderMode.ACQUIRE_LATEST_IMAGEis now non-blocking. It acquires the latest image in the queue, but discards unused images continuously to allow the camera pipeline to avoid blocking. - The analyzer can hold a single image indefinitely without stalling the pipeline.
- If the application provides an executor which then blocks, the ImageAnalysis use case blocks.
- The default executor set internally behaves as a non-blocking executor.
رفع اشکالات
- Fixed timeout issues waiting for 3A convergence when capturing images on devices with no auto-focus, auto exposure, and auto-whitebalance
- Fixed issue when rapidly taking pictures with ImageCapture. Fixes error:
java.lang.IllegalStateException: maxImages (2) has already been acquired - Fixed issue when
setLensFacingwas not called for a use case, resulting injava.lang.IllegalArgumentException: Unable to get camera ID for use case. - Fixed issue where LEGACY device required specific aspect ratio as maximum JPEG resolution
- Fixed issue when backgrounding the app while camera is opening
- Fixed issue on API < 25, removing error
checkAndUpdateEglState: invalid current EGLDisplay - Fixed issue when unbinding preview after enabling and starting extensions
- Build artifacts for camera-view and camera-extensions are now published as alpha versions
Camera-Camera2 and Camera-Core Version 1.0.0-alpha03
۲ ژوئیه ۲۰۱۹
androidx.camera:camera-core:1.0.0-alpha03 and androidx.camera:camera-camera2:1.0.0-alpha03 are released. Version 1.0.0-alpha03 contains these commits .
تغییرات API
- Added javadoc clarification for “target” in setTarget configuration calls
Camera-Core
- Fixed unconfigured Input/Output Surface crash on rapid open/close or bind/unbind
- Move to new Futures implementations
- Test fixes for more robust testing
- Core integration test now shows capture time for photos
- Developed internal compat class for Executors
- Timing test app capture images waits for previous to complete & improved stability
افزونهها
- Added versioning checks
- Additional test coverage - extension event callbacks
- Improvements for internally corresponding image and meta-data
- Fixes to mode switching in test app
Camera-Camera2 and Camera-Core Version 1.0.0-alpha02
۵ ژوئن ۲۰۱۹
androidx.camera:camera-core:1.0.0-alpha02 and androidx.camera:camera-camera2:1.0.0-alpha02 are released. Version 1.0.0-alpha02 contains these commits .
رفع اشکالات
- Fixed div by zero issue when using emulator
- Fixed NullPointerException/Surface Abandoned error occurring on some devices when quickly taking photos while unbinding and rebinding use cases rapidly.
- Fixed internal issue to ensure capture request updates affect all surfaces consistently
- Stability improvements when restarting use cases in new app instances
- Internal architecture changes to prepare for supporting executors in the API
- Additional Javadoc clarifications on CameraX class and lifecycle management
- Added instrumented testing for Antelope performance test app
- Remove need for '-keepattributes Signature' in app Proguard config
Camera-Camera2 and Camera-Core 1.0.0-alpha01
۷ مه ۲۰۱۹
androidx.camera:camera-core:1.0.0-alpha01 and androidx.camera:camera-camera2:1.0.0-alpha01 are released. Version 1.0.0-alpha01 contains these commits .
چرخه عمر دوربین نسخه ۱.۰.۰-بتا۱۱
۱۴ اکتبر ۲۰۲۰
androidx.camera:camera-lifecycle:1.0.0-beta11 is released. Version 1.0.0-beta11 contains these commits.
رفع اشکالات
-
<UseCase>.getTargetRotation()will returnSurface.ROTATION_0if called before being attached to a Camera instance unless a targetRotation has been set on the Builder or UseCase. ( I80fcd )
چرخه عمر دوربین نسخه ۱.۰.۰-بتا۱۰
۲۳ سپتامبر ۲۰۲۰
androidx.camera:camera-lifecycle:1.0.0-beta10 is released. Version 1.0.0-beta10 contains these commits.
رفع اشکالات
- Release to support Camera-Core 1.0.0-beta10
چرخه عمر دوربین نسخه ۱.۰.۰-بتا۰۹
۱۶ سپتامبر ۲۰۲۰
androidx.camera:camera-lifecycle:1.0.0-beta09 is released. Version 1.0.0-beta09 contains these commits.
چرخه عمر دوربین نسخه ۱.۰.۰-بتا۰۸
۱۹ آگوست ۲۰۲۰
androidx.camera:camera-lifecycle:1.0.0-beta08 is released. Version 1.0.0-beta08 contains these commits.
رفع اشکالات
- Initialization should no longer crash when using a Context that does not return an Application object from
Context.getApplicationContext(). ( I3d3c9 , b/160817073 )
چرخه عمر دوربین نسخه ۱.۰.۰-بتا۰۷
۲۲ ژوئیه ۲۰۲۰
androidx.camera:camera-lifecycle:1.0.0-beta07 is released. Version 1.0.0-beta07 contains these commits.
چرخه عمر دوربین نسخه ۱.۰.۰-بتا۰۶
۲۴ ژوئن ۲۰۲۰
androidx.camera:camera-lifecycle:1.0.0-beta06 is released. Version 1.0.0-beta06 contains these commits.
تغییرات API
- CameraX can now be configured with ProcessCameraProvider#configureInstance() before calling ProcessCameraProvider#getInstance(). This allows for customization of the CameraXConfig without requiring implementing CameraXConfig.Provider in the app's Application class. ( Ia1a8d )
چرخه عمر دوربین نسخه ۱.۰.۰-بتا۰۵
۱۰ ژوئن ۲۰۲۰
androidx.camera:camera-lifecycle:1.0.0-beta05 is released. Version 1.0.0-beta05 contains these commits.
رفع اشکالات
- Fix the crash on app startup when initialising CameraX while phone is in Do Not Disturb mode. An
InitializationExceptioncontains aCameraUnavailableExceptionwill be set to theListenableFutureof the intialization result instead of crashing the application. ( I9909a , b/149413835 )
چرخه عمر دوربین نسخه ۱.۰.۰-بتا۰۴
۲۷ مه ۲۰۲۰
androidx.camera:camera-lifecycle:1.0.0-beta04 is released. Version 1.0.0-beta04 contains these commits.
چرخه عمر دوربین نسخه ۱.۰.۰-بتا۰۳
۱۵ آوریل ۲۰۲۰
androidx.camera:camera-lifecycle:1.0.0-beta03 is released. Version 1.0.0-beta03 contains these commits.
رفع اشکالات
- Fixed regression from beta03 where calling
bindToLifecycle()with zeroUseCases would cause a thrown exception. This prevented retrieval of aCamerawithout binding aUseCase. - Fixes to support the release of
camera-core
Camera-Lifecycle Version 1.0.0-beta01
February 26, 2020
androidx.camera:camera-lifecycle:1.0.0-beta01 is released. Version 1.0.0-beta01 contains these commits.
رفع اشکالات
- Fixed documentation to note that when obtaining a
ProcessCameraProviderduring initialization, a default configuration is used and that extendingApplicationis optional. ( I5e395 )
Camera-Lifecycle Version 1.0.0-beta02
۱ آوریل ۲۰۲۰
androidx.camera:camera-lifecycle:1.0.0-beta02 is released. Version 1.0.0-beta02 contains these commits.
رفع اشکالات
- Updated to support the bug fixes in the
camera-camera2:1.0.0-beta02andcamera-core:1.0.0-beta02artifacts.
Camera-Lifecycle Version 1.0.0-alpha10
February 10, 2020
androidx.camera:camera-lifecycle:1.0.0-alpha10 is released. Version 1.0.0-alpha10 contains these commits .
تغییرات API
- Added
@MainThreadannotation to BindToLifecycle, unbind and unbindAll methods. ( I990d2 )
Camera-Lifecycle Version 1.0.0-alpha03
۲۲ ژانویه ۲۰۲۰
androidx.camera:camera-lifecycle:1.0.0-alpha03 is released. Version 1.0.0-alpha03 contains these commits .
بهروزرسانیها
- Various fixes and updates to support Camera Core & Camera2 changes.
Camera-Lifecycle Version 1.0.0-alpha02
۱۸ دسامبر ۲۰۱۹
androidx.camera:camera-lifecycle:1.0.0-alpha02 is released. Version 1.0.0-alpha02 contains these commits .
Dependency changes
- Updated to use
androidx.camera:camera-core:1.0.0-alpha08.
Camera-Lifecycle Version 1.0.0-alpha01
۴ دسامبر ۲۰۱۹
androidx.camera:camera-lifecycle:1.0.0-alpha01 is released. Version 1.0.0-alpha01 of camera-lifecycle contains these commits
API notes
- The camera-lifecycle artifact is added, providing
LifeCycleCameraProviderinterface, and an implementation calledProcessCameraProviderwhich provides many of the functions of the previous CameraX class in core and is obtained via agetInstance()method. - Apps should include the camera-lifecycle library to use CameraX.
- See notes in the camera-core section for how to perform initialization of CameraX using a
ProcessCameraProvider.
Camera-Extensions and Camera-View Version 1.0.0
Version 1.0.0-alpha32
۱۵ دسامبر ۲۰۲۱
androidx.camera:camera-extensions:1.0.0-alpha32 and androidx.camera:camera-view:1.0.0-alpha32 are released. Version 1.0.0-alpha32 contains these commits.
تغییرات API
- Removed unnecessary
@RequiresApi(21)annotations from the inner classes/interfaces. ( I8e286 , b/204917951 ) - Update api files for camera-extensions artifact. ( If683a , b/161377155 )
رفع اشکالات
- Disallow the app to enable extension modes when binding
VideoCapture. CameraX Extensions only supportImageCaptureandPreview. TheVideoCapturecan't be supported yet. If the app bindsVideoCaptureand enables any extension mode, anIllegalArgumentExceptionwill be thrown. ( I0d87b ) -
CameraSelector#filterno longer throws anIllegalArgumentExceptionwhen the result set is empty. ( I27804 ) - Renamed
ExtensionsManager#getInstanceAPI asgetInstanceAsyncbecause it returnsListenableFuture. The Async suffix of the function name can clearly present that it is an async function. ( I279d2 ) - Remove resolution parameter from the
ExtensionsManager#getEstimatedCaptureLatencyRangeAPI since users can't know which sizes are supported for theImageCaptureuse case and can't distinguish whether the returned latency information is for the maximum capture output size or the input resolution parameter. ( I74bb2 ) - Move
CameraProviderparameter ofExtensionsManagerfunctions to thegetInstance()API. So that the users don't need to input theCameraProviderparameter each time when calling theExtensionsManagerfunctions. ( Ic7e48 )
Version 1.0.0-alpha31
۱۷ نوامبر ۲۰۲۱
androidx.camera:camera-extensions:1.0.0-alpha31 and androidx.camera:camera-view:1.0.0-alpha31 are released. Version 1.0.0-alpha31 contains these commits.
تغییرات API
- Added CameraSelector#filter to the public API to filter a list of CameraInfos based on a CameraSelector. ( I105d0 )
رفع اشکالات
- Fixed a crash when switching extensions mode quickly on certain devices. ( Iebbef )
Version 1.0.0-alpha30
۱۳ اکتبر ۲۰۲۱
androidx.camera:camera-extensions:1.0.0-alpha30 and androidx.camera:camera-view:1.0.0-alpha30 are released. Version 1.0.0-alpha30 contains these commits.
تغییرات API
- Added @RequiresApi(21) annotation to all CameraX classes and dropped minSdkVersion from AndroidManifest.xml. This will allow camera-core to be easily integrated into applications that have a minSdkVersion less than 21, but want to conditionally use code paths that rely on API 21 and higher. For any application with minSdkVersion 21 or higher, this change requires no action. ( Ie7f2e , b/200599470 )
رفع اشکالات
- Fixed the AbstractMethodError issue which happens when proguard is enabled. ( Iae468 , b/201177844 )
Version 1.0.0-alpha29
۲۹ سپتامبر ۲۰۲۱
androidx.camera:camera-extensions:1.0.0-alpha29 and androidx.camera:camera-view:1.0.0-alpha29 are released. Version 1.0.0-alpha29 contains these commits.
تغییرات API
- ExperimentalUseCaseGroup annotation is removed now that the APIs are no longer experimental. ( I01ef5 )
- remove
RotationProvider#removeAllListeners(). Please useRotationProvider#removeListener(...)instead. ( Id9d4a ) - Updated the RotationReceiver class: changed set/clear Listener to add/remove/removeAll, remove the setListener variation that uses the main thread by default and added annotation of methods. ( Ib1669 )
رفع اشکالات
- Renamed ExtensionMode#BEAUTY to FACE_RETOUCH to correctly present what is done by the extension mode. ( I61f54 , b/198515274 )
- Fixed the issue that camera is closed unexpectedly when multiple CameraController and PreviewView are used in one Activity. ( Ibfd18 , b/197539358 )
Version 1.0.0-alpha28
۱۸ آگوست ۲۰۲۱
androidx.camera:camera-extensions:1.0.0-alpha28 and androidx.camera:camera-view:1.0.0-alpha28 are released. Version 1.0.0-alpha28 contains these commits.
تغییرات API
- ExperimentalUseCaseGroupLifecycle annotation is removed now that the APIs are no longer experimental. ( I17b85 )
- refactored RotationListener and renamed it to RotationProvider. It continues to provide the same feature with slightly different API. ( Idffc5 )
- rename TAP_TO_FOCUS_UNSUCCESSFUL to TAP_TO_FOCUS_NOT_FOCUSED and TAP_TO_FOCUS_SUCCESSFUL to TAP_TO_FOCUS_FOCUSED. Made OutputSize final ( I099fa )
رفع اشکالات
- Removed deprecated
<EffectName><UseCase>Extenderclasses, ExtensionsErrorListener and related ExtensionsManager APIs. ( I3b8c3 )
Version 1.0.0-alpha27
۲۱ ژوئیه ۲۰۲۱
androidx.camera:camera-extensions:1.0.0-alpha27 and androidx.camera:camera-view:1.0.0-alpha27 are released. Version 1.0.0-alpha27 contains these commits.
تغییرات API
- Promoted the viewport API out of experimental. Remove the experimental annotation of the API. ( I717ea )
- Renamed
CoordinateTransform#getTransformtoCoordinateTransform#transformand update JavaDoc ( I864ae )
رفع اشکالات
- Fixed
PreviewView PERFORMANCEmode stretch issue when using it together with Compose UI. ( Ie1137 , b/183864890 )
Version 1.0.0-alpha26
۳۰ ژوئن ۲۰۲۱
androidx.camera:camera-extensions:1.0.0-alpha26 and androidx.camera:camera-view:1.0.0-alpha26 are released. Version 1.0.0-alpha26 contains these commits.
تغییرات API
- add a new method
CameraController#getTapToFocusState()that exposes the latest tap-to-focus result. ( Iaccb0 ) - adding more camera-core features to CameraController: getters/setters for target aspect ratio, target resolution, capture mode, CameraControl and custom executors. ( Iea8f2 )
- add a RotationReceiver class that receives Surface rotation changes. This can be used to set the target rotation when the device is in fixed portrait/landscape mode. ( Ib278f )
- Exposed new getEstimatedCaptureLatencyRange public APIs in ExtensionsManager class. ( I6a8ec )
- Deprecated ExtensionsErrorListener. Currently, this interface is only used to monitor whether a Preview or ImageCapture is lacking when enabling extension modes. CameraX will automatically add an extra Preview or ImageCapture to make the extension functions work well. After that, no error will be reported via this interface. ( I47d9e )
- Exposed new ExtensionsManager getInstance, isExtensionAvailable and getExtensionEnabledCameraSelector public APIs and deprecated old
<EffectName><UseCase>Extenderclasses and related APIs. ( I329e6 )
Version 1.0.0-alpha25
۲ ژوئن ۲۰۲۱
androidx.camera:camera-extensions:1.0.0-alpha25 and androidx.camera:camera-view:1.0.0-alpha25 are released. Version 1.0.0-alpha25 contains these commits.
تغییرات API
- ExperimentalCameraFilter APIs are now out of experimental stage and become formal APIs. They can be used without annotated OptIn. ( I4bc94 )
- Add a utility that transforms coordinates between use cases. Example usage: transforming the coordinates detected in ImageAnalysis use case and highlight the detected object in preview. ( I63ab1 , b/137515129 )
- Removed
CameraView.CameraViewhas been replaced byCameraController. Please see the migration guide for how to migrate.: ( Id5005 )
رفع اشکالات
- Replaced
ExperimentalUseCaseGroupLifecyclewithExperimentalUseCaseGroup. ( I3b2ef , b/159033688 )
Version 1.0.0-alpha24
۲۱ آوریل ۲۰۲۱
androidx.camera:camera-extensions:1.0.0-alpha24 and androidx.camera:camera-view:1.0.0-alpha24 are released. Version 1.0.0-alpha24 contains these commits.
رفع اشکالات
- Replaced annotation
@Experimentalwith@RequiresOptInto experimental APIs. For calling experimental APIs, useandroidx.annotation.OptIninstead of deprecatedandroidx.annotation.experimental.UseExperimental. ( Iff226 ) - Fixed the PreviewView stretched issue on Samsung J5 Prime ( Ib10b6 )
Camera Extensions & View Version 1.0.0-alpha23
۲۴ مارس ۲۰۲۱
androidx.camera:camera-extensions:1.0.0-alpha23 and androidx.camera:camera-view:1.0.0-alpha23 are released. Version 1.0.0-alpha23 contains these commits.
تغییرات API
- CameraView is being deprecated. Please use
LifecycleCameraControllerinstead. See the migration guide ( Idac2c ) - Added FloatRange annotation to setLinearZoom() ( I69971 )
رفع اشکالات
- Pinned camera-view dependencies to rely on 1.0.0 artifacts. Depending on camera-view will not longer cause gradle's dependency resolution to automatically upgrade camera-core, camera-camera2 and camera-lifecycle to the latest 1.1.0 artifacts, though camera-view is still compatible with those artifacts if they are explicitly set to use 1.1.0. ( Ic8fa1 , b/181599852 )
- Fixed Samsung A3 stretched preview in PreviewView. ( Iacb30 , b/180121821 )
- Fixed the issue where if camera selector cannot be set before camera is initialized. ( Ic8bd0 )
Camera Extensions & View Version 1.0.0-alpha22
۲۴ فوریه ۲۰۲۱
androidx.camera:camera-extensions:1.0.0-alpha22 and androidx.camera:camera-view:1.0.0-alpha22 are released. Version 1.0.0-alpha22 contains these commits.
تغییرات API
- add a CameraInfo getter to CameraController. ( Ib8138 , b/178251727 )
رفع اشکالات
- Fixed ExtensionsErrorListener to report errors when only Preview or ImageCapture is bound. ( I5ae39 )
Camera Extensions & View Version 1.0.0-alpha21
۲۷ ژانویه ۲۰۲۱
androidx.camera:camera-extensions:1.0.0-alpha21 and androidx.camera:camera-view:1.0.0-alpha21 are released. Version 1.0.0-alpha21 contains these commits.
Releasing to support other camera library artifacts.
Camera Extensions & View Version 1.0.0-alpha20
۱۶ دسامبر ۲۰۲۰
androidx.camera:camera-extensions:1.0.0-alpha20 and androidx.camera:camera-view:1.0.0-alpha20 are released. Version 1.0.0-alpha20 contains these commits.
Releasing to support other camera library artifacts.
Camera-Extensions & Camera-View Version 1.0.0-alpha19
۱۱ نوامبر ۲۰۲۰
androidx.camera:camera-extensions:1.0.0-alpha19 and androidx.camera:camera-view:1.0.0-alpha19 are released. Version 1.0.0-alpha19 contains these commits.
رفع اشکالات
-
@ExperimentalVideoannotation was introduced to camera-view. This annotation marks APIs which expose experimental video functionality which is subject to change as the features are fully developed. Any method using these APIs should use the@UseExperimentalannotation withExperimentalVideoas themarkerClass. ( I6d729 )
Camera-Extensions Version 1.0.0-alpha18
۱۴ اکتبر ۲۰۲۰
androidx.camera:camera-extensions:1.0.0-alpha18 is released. Version 1.0.0-alpha18 contains these commits.
رفع اشکالات
- Improved the latency of CameraX initialization and bindToLifecycle ( I61dc5 )
-
<UseCase>.getTargetRotation()will returnSurface.ROTATION_0if called before being attached to a Camera instance unless a targetRotation has been set on the Builder or UseCase. ( I80fcd )
Camera-View Version 1.0.0-alpha18
۱۴ اکتبر ۲۰۲۰
androidx.camera:camera-view:1.0.0-alpha18 is released. Version 1.0.0-alpha18 contains these commits.
Releasing to support other camera library artifacts.
Camera-Extensions Version 1.0.0-alpha17
۲۳ سپتامبر ۲۰۲۰
androidx.camera:camera-extensions:1.0.0-alpha17 is released. Version 1.0.0-alpha17 contains these commits.
رفع اشکالات
- Release to support Camera-Core 1.0.0-beta10
Camera-View Version 1.0.0-alpha17
۲۳ سپتامبر ۲۰۲۰
androidx.camera:camera-view:1.0.0-alpha17 is released. Version 1.0.0-alpha17 contains these commits.
رفع اشکالات
- Release to support Camera-Core 1.0.0-beta10
Camera-Extensions Version 1.0.0-alpha16
۱۶ سپتامبر ۲۰۲۰
androidx.camera:camera-extensions:1.0.0-alpha16 is released. Version 1.0.0-alpha16 contains these commits.
رفع اشکالات
- Added method in
ExtensionsManagerto get anExtensionsobject which is used to enable and query extensions on Camera instances ( I4fb7e )
Camera-View Version 1.0.0-alpha16
۱۶ سپتامبر ۲۰۲۰
androidx.camera:camera-view:1.0.0-alpha16 is released. Version 1.0.0-alpha16 contains these commits.
تغییرات API
- Removed
PreviewView#setDeviceRotationForRemoteDisplayMode()andPreviewView#getDeviceRotationForRemoteDisplayMode(). The two methods are for customizing preview rotation, when desired rotation is not display rotation, eg remote display. To handle the non-display preview rotation now, set the desired rotation withPreview#setTargetRotation()and the newly addedPreviewView#getViewPort(targetRotation). ( Ib62cc ) - Renamed
createSurfaceProvider()togetSurfaceProvider(). The method will always return the same instance of Preview.SurfaceProvider. ( Iff83c )
رفع اشکالات
- Forced PreviewView to use TextureView if extension effect is enabled and the vendor library implementation needs to do a special process on the output surface. ( I0c3cc )
- Allow arbitrary target rotation for Preview. The transformation info is calculated and returned to user on-the-fly via a new
TranformationInfoListenercallback. ( I21470 )
مشکلات شناخته شده
- In PreviewView,
OnClickListener#onClick()is not invoked when the end user clicks PreviewView. The touch event is mistakenly consumed by PreviewView#onTouchEvent(). The issue will be fixed in the next release. - The MeteringPoint obtained from
PreviewView#getMeteringPointFactory()may be wrong if ViewPort is used with PreviewView.
Camera-Extensions Version 1.0.0-alpha15
۱۹ آگوست ۲۰۲۰
androidx.camera:camera-extensions:1.0.0-alpha15 is released. Version 1.0.0-alpha15 contains these commits.
رفع اشکالات
- The
ExtensionsManager.init()method now takes in a Context as a parameter instead of having 0 args. ( Ife754 ) Initialization should no longer crash when using a Context that does not return an Application object from
Context.getApplicationContext(). ( I3d3c9 , b/160817073 )Camera-View Version 1.0.0-alpha15
۱۹ آگوست ۲۰۲۰
androidx.camera:camera-view:1.0.0-alpha15 is released. Version 1.0.0-alpha15 contains these commits.
رفع اشکالات
-
DisplayOrientedMeteringPointFactorytakes in aCameraInfoinstance instead of aCameraSelectorso there is a direct mapping to which Camera the factory will be generating points for. All classes which useDisplayOrientedMeteringPointFactoryalso take in aCameraInfoinstance instead ofCameraSelector. ( I400c1 ) - Removed
TextureViewMeteringPointFactory.PreviewViewprovides a public API (createMeteringPointFactory()) to create a metering point factory regardless of whether it's using aTextureVieworSurfaceView. ( Ide693 ) - rename PreviewView's
SURFACE_VIEW/TEXTURE_VIEWimplementation modes toPERFORMANCE/COMPATIBLE.PERFORMANCEis the oldSURFACE_VIEWmode, andCOMPATIBLEis the oldTEXTURE_VIEWmode. ( I0edc2 ) - For image capture, overwrite the flip horizontal flag in metadata based on camera direction. ( I28499 )
Camera-Extensions Version 1.0.0-alpha14
۲۲ ژوئیه ۲۰۲۰
androidx.camera:camera-extensions:1.0.0-alpha14 is released. Version 1.0.0-alpha14 contains these commits.
Camera-View Version 1.0.0-alpha14
۲۲ ژوئیه ۲۰۲۰
androidx.camera:camera-view:1.0.0-alpha14 is released. Version 1.0.0-alpha14 contains these commits.
Camera-Extensions Version 1.0.0-alpha13
۲۴ ژوئن ۲۰۲۰
androidx.camera:camera-extensions:1.0.0-alpha13 is released. Version 1.0.0-alpha13 contains these commits.
رفع اشکالات
- Added experimental interfaces for filtering cameras by camera ID and CameraCharacteristics. ( I28f61 )
Camera-View Version 1.0.0-alpha13
۲۴ ژوئن ۲۰۲۰
androidx.camera:camera-view:1.0.0-alpha13 is released. Version 1.0.0-alpha13 contains these commits.
رفع اشکالات
- CameraView no longer crashes with an IllegalArgumentException when binding to a LifecycleOwner whose Lifecycle transitions to a DESTROYED state shortly after being bound. Binding Lifecycles in a DESTROYED state will not attempt to open the camera. ( I7c2b8 )
- PreviewView StreamState is now available through CameraView.getPreviewStreamState() ( I21a2b )
Camera-Extensions Version 1.0.0-alpha12
۱۰ ژوئن ۲۰۲۰
androidx.camera:camera-extensions:1.0.0-alpha12 is released. Version 1.0.0-alpha12 contains these commits.
Bug Fixes
- Fix the crash on app startup when initialising CameraX while phone is in Do Not Disturb mode. An
InitializationExceptioncontains aCameraUnavailableExceptionwill be set to theListenableFutureof the intialization result instead of crashing the application. ( I9909a , b/149413835 )
Camera-View Version 1.0.0-alpha12
۱۰ ژوئن ۲۰۲۰
androidx.camera:camera-view:1.0.0-alpha12 is released. Version 1.0.0-alpha12 contains these commits.
رفع اشکالات
- Add
PreviewView#getBitmap()API which returns a Bitmap representation of the content displayed on the preview surface. ( I9b500 , b/157659818 )
Camera-Extensions Version 1.0.0-alpha11
۲۷ مه ۲۰۲۰
androidx.camera:camera-extensions:1.0.0-alpha11 is released. Version 1.0.0-alpha11 contains these commits.
Camera-View Version 1.0.0-alpha12
۱۰ ژوئن ۲۰۲۰
androidx.camera:camera-view:1.0.0-alpha12 is released. Version 1.0.0-alpha12 contains these commits.
ویژگیهای جدید
تغییرات API
Bug Fixes
- Add
PreviewView#getBitmap()API which returns a Bitmap representation of the content displayed on the preview surface. ( I9b500 , b/157659818 )
Camera-View Version 1.0.0-alpha11
۲۷ مه ۲۰۲۰
androidx.camera:camera-view:1.0.0-alpha11 is released. Version 1.0.0-alpha11 contains these commits.
تغییرات API
- Add
PreviewView#getPreviewStreamStateAPI which allows apps to observe if preview is streaming or not. When the PreviewView is in TEXTURE_VIEW mode, the STREAMING state also guarantees the preview image is visible. ( Ic0906 , b/154652477 ) - Added
PreviewView#setDeviceRotationForRemoteDisplayMode()API to provide device rotation for transform calculations if the application is running in remote display mode. ( I59b95 , b/153514525 )
Bug Fixes
- Fixed the preview distortion issue on
FULL/LIMITED/LEVEL_3cameras running android 7.0 and below. Forced useImplementationMode#TEXTURE_VIEWmode when the android version is 7.0 or below. ( I83e30 , b/155085307 ) - Removed the
CameraInfoparameter fromPreviewView#createSurfaceProvider(),PreviewViewnow internally retrieves it from theSurfaceRequest. ( If18f0 , b/154652477 ) - Fixed the VideoCapture's default aspect ratio to be 16:9 in CameraView. ( Ie6a7b , b/153237864 )
- Fix
PreviewViewblack screen issues when swiped outPreviewfragment and then swiped back in ViewPager2. Also fixed the issue whenremoveView(previewview)and thenaddView(previewView). ( Iab555 , b/149877652 , b/147354615 ) - Update the
CameraView#takePicture()API to allow saving images toUriandOutputStream. Update the test app to useUrias the canonical example. ( Ia2459 , b/153607583 ) - You can set PreviewView's scale type from a XML layout by setting the
ScaleTypeattribute. ( I08565 , b/153015659 ) -
CameraView.ScaleTypehas been removed. Instead, usePreviewView.ScaleTypeto set/get a scale type with CameraView. ( Ia8974 , b/153014831 ) - Give
PreviewViewa background color by default if it doesn't already have one. This prevents content behind it from being visible before the preview stream starts. ( I09fad )
Camera-Extensions Version 1.0.0-alpha10
۱۵ آوریل ۲۰۲۰
androidx.camera:camera-extensions:1.0.0-alpha10 is released. Version 1.0.0-alpha10 contains these commits.
Bug Fixes
- Fixes to support the release of Camera-Core
Camera-View Version 1.0.0-alpha10
۱۵ آوریل ۲۰۲۰
androidx.camera:camera-view:1.0.0-alpha010 is released. Version 1.0.0-alpha010 contains these commits.
Bug Fixes
- Fixes a previous known issue where
PreviewView's surfaceView implementation wasn't working well on certain devices, and would cause the app to crash after resuming preview. ( I5ed6b )
Camera-Extensions Version 1.0.0-alpha09
۱ آوریل ۲۰۲۰
androidx.camera:camera-extensions:1.0.0-alpha09 is released. Version 1.0.0-alpha09 contains these commits.
Bug Fixes
- Updated to support the bug fixes in the
camera-camera2:1.0.0-beta02,camera-core:1.0.0-beta02, andcamera-lifecycle:1.0.0-beta02artifacts
Camera-View Version 1.0.0-alpha09
April 1, 2020 androidx.camera:camera-view:1.0.0-alpha09 is released. Version 1.0.0-alpha09 contains these commits.
مشکلات شناخته شده
- Using
ImplementationMode.SURFACE_VIEWwithPreviewViewmay not work well on certain devices, this is because theSurfaceViewused for preview invalidates its surface when the lifecycle of the window it's in is stopped, when it restarts, the camera is reopened and may attempt to resume preview before theSurfaceView's surface is valid again. For now, you should useImplementationMode.TEXTURE_VIEW.
تغییرات API
- Renamed
PreviewView.setImplementationMode()toPreviewView.setPreferredImplementationMode(). - Renamed
PreviewView.getImplementationMode()toPreviewView.getPreferredImplementationMode(). - Replaced
PreviewView.getSurfaceProvider()byPreviewView.createSurfaceProvider(CameraInfo), which takes a nullableCameraInfoinstance used to optimize preview by usingImplementationMode.SURFACE_VIEWwhenever possible. If a null instance is passed, or if you set the preferred implementation mode toImplementationMode.TEXTURE_VIEW,ImplementationMode.TEXTURE_VIEWis used internally. The following code sample shows how a preview use case used to previously be used with PreviewView.
preview.setSurfaceProvider(previewView.previewSurfaceProvider) cameraProvider.bindToLifecycle(lifecycleOwner, cameraSelector, preview)Right now, you can write the following:
val camera = cameraProvider.bindToLifecycle(lifecycleOwner, cameraSelector, preview) previewView.preferredImplementationMode = ImplementationMode.TEXTURE_VIEW preview.setSurfaceProvider(previewView.createSurfaceProvider(camera.cameraInfo))The
@UiThreadannotation has been added toPreviewView.getSurfaceProvider(), meaning it must be called from the main thread. ( I192f3 )Added
PreviewView.setScaleType()which allows to set the scale type of the preview. It accepts one of the values inPreviewView.ScaleType, and defaults toPreviewView.ScaleType.FILL_CENTER.Added
PreviewView.getScaleType().Removed support for setting the implementation mode for
PreviewViewin a XML layout using theimplementationModeattribute.Add
createMeteringPointFactory()API to PreviewView to support converting (x, y) inPreviewViewtoMeteringPoint. ( Ib36d7 )
Bug Fixes
- Fixed cases where an incorrect preview is displayed after
PreviewView's size changes. ( I71101 )
Camera-Extensions Version 1.0.0-alpha08
February 26, 2020
androidx.camera:camera-extensions:1.0.0-alpha08 is released. Version 1.0.0-alpha08 contains these commits.
Camera-View Version 1.0.0-alpha08
February 26, 2020
androidx.camera:camera-view:1.0.0-alpha08 is released. Version 1.0.0-alpha08 contains these commits.
Bug Fixes
- Replaced the
ListenableFutureonSurfaceRequest.provideSurface()with anExecutorandCallback. This simplifies the API by no longer requiring handling of exceptions onprovideSurface()and enforces that theprovideSurface()callback cannot be cancelled. This is to prevent crashes on older devices caused by prematurely releasing surfaces. TheSurfaceRequest.Resultobject is now used for tracking how aSurfaceRequestuses the providedSurface. ( I7854b ) - Renamed
SurfaceRequest.setSurface(Surface)toSurfaceRequest.provideSurface(Surface)andSurfaceRequest.setWillNotComplete()toSurfaceRequest.willNotProvideSurface(). ( I224fe ) - Fixed initialization of app variants with ProGuard enabled by preserving the flag that sets the default
CameraXConfigprovider. ( I2d6c1 )
Camera-Extensions Version 1.0.0-alpha07
February 10, 2020
androidx.camera:camera-extensions:1.0.0-alpha07 is released. Version 1.0.0-alpha07 contains these commits .
Bug Fixes
- The arguments that were previously passed in
ImageCapture.OnImageSavedCallback.onError()andImageCapture.OnImageCapturedCallback.onError()have now been replaced by a single argumentImageCaptureException, which still contains all the information that was previously passed. - The file argument previously passed in
ImageCapture.OnImageSavedCallback.onImageSaved()has been removed. ( I750d2 )
Camera-View Version 1.0.0-alpha07
February 10, 2020
androidx.camera:camera-view:1.0.0-alpha07 is released. Version 1.0.0-alpha07 contains these commits .
تغییرات API
-
PreviewView'sTextureViewimplementation now sets theTextureView's size to the camera sensor output size before scaling it to fill its parentPreviewView. If you want the camera preview to fill an entire part of the UI (the whole screen for instance), you should not set thePreviewView's size to a fixed value, or have it wrap its content (by using the attribute "wrap_content" for example), this may result in the camera preview only filling part of thePreviewView(if the camera sensor output size is smaller). Instead, you should set thePreviewViewas big as its parent (by using the attribute "match_parent" for example). ( 1204869 )
Bug Fixes
- Updated
ImageCaptureto allow saving images toUriandOutputStream. Combined overloadedtakePicturemethods into one. Updated test app to useUrias the canonical example. ( Ia3bec ) -
Preview.PreviewSurfaceProviderhas been renamed toPreview.SurfaceProvider.SurfaceProviders no longer require developers to create their ownListenableFuture, and providing aSurfaceis now done through a newSurfaceRequestobject. ThePreview.getPreviewSurfaceProvider()method has been removed due to its potential for misuse whenPreviewis paired with other classes such asPreviewView. ( I20105 ) - The arguments that were previously passed in
ImageCapture.OnImageSavedCallback.onError()andImageCapture.OnImageCapturedCallback.onError()have now been replaced by a single argumentImageCaptureException, which still contains all the information that was previously passed. - The file argument previously passed in
ImageCapture.OnImageSavedCallback.onImageSaved()has been removed. ( I750d2 ) - API updated, with
getZoomRatio(),getMaxZoomRatio(),getMinZoomRatio(), andgetLinearZoom()methods ofCameraInfomerging intogetZoomState()which returns aZoomStateinstance. ( Ib19fe )
Camera-Extensions Version 1.0.0-alpha06
۲۲ ژانویه ۲۰۲۰
androidx.camera:camera-extensions:1.0.0-alpha06 is released. Version 1.0.0-alpha06 contains these commits .
بهروزرسانیها
- Various fixes and updates to support Camera Core & Camera2 changes.
Camera-View Version 1.0.0-alpha06
۲۲ ژانویه ۲۰۲۰
androidx.camera:camera-view:1.0.0-alpha06 is released. Version 1.0.0-alpha06 contains these commits .
بهروزرسانیها
- Various fixes and updates to support Camera Core & Camera2 changes.
Camera-Extensions Version 1.0.0-alpha05
۱۸ دسامبر ۲۰۱۹
androidx.camera:camera-extensions:1.0.0-alpha05 is released. Version 1.0.0-alpha05 contains these commits .
رفع اشکالات
- Updated to match the internal Camera Core APIs.
Camera-View Version 1.0.0-alpha05
۱۸ دسامبر ۲۰۱۹
androidx.camera:camera-view:1.0.0-alpha05 is released. Version 1.0.0-alpha05 contains these commits .
مشکلات شناخته شده
- The aspect ratio may be incorrect when using PreviewView ( b/146215202 ).
ویژگیهای جدید
- Implemented a new class called
PreviewView.TextureViewImplementationthat syncs the SurfaceTexture's lifecycle with the camera's usage of the TextureView's surface.
Camera-Extensions Version 1.0.0-alpha04
۴ دسامبر ۲۰۱۹
androidx.camera:camera-extensions:1.0.0-alpha04 is released. Version 1.0.0-alpha04 of camera-extensions contains these commits
تغییرات API
Checking for the availability and enabling of an extension now takes in a
CameraSelectoras an input parameter. This needs to be the sameCameraSelectorthat is used for binding the use case.val cameraSelector = CameraSelector.DEFAULT_BACK_CAMERA val builder = ImageCapture.Builder() val bokehImageCaptureExtender = BokehImageCaptureExtender.create(builder) if (bokehImageCaptureExtender.isExtensionAvailable(cameraSelector)) { bokehImageCaptureExtender.enableExtension(cameraSelector) } val imageCapture = builder.build() mCameraProvider?.bindToLifecycle(this, cameraSelector, imageCapture)You must initialize extensions before using the extension library.
val availability = ExtensionsManager.init() Futures.addCallback<ExtensionsManager.ExtensionsAvailability>( availability, object : FutureCallback<ExtensionsManager.ExtensionsAvailability> { override fun onSuccess(availability: ExtensionsManager.ExtensionsAvailability?) { // Ready to make extensions calls } override fun onFailure(throwable: Throwable) { // Extensions could not be initialized } }, Executors.newSingleThreadExecutor() )
Camera-View Version 1.0.0-alpha04
۴ دسامبر ۲۰۱۹
androidx.camera:camera-view:1.0.0-alpha04 is released. Version 1.0.0-alpha04 of camera-view contains these commits
تغییرات API
- A
PreviewViewclass is provided for easily displaying the output from the Preview use case in an application. PreviewViewcan be included in the layout:<androidx.camera.view.PreviewView android:id="@+id/preview_view" … />PreviewViewprovides aPreviewSurfaceProviderto easily connect a Preview use casepreview.setPreviewSurfaceProvider(previewView.previewSurfaceProvider)“
ZoomLevel” is now “ZoomRatio” in API-namingSome method parameters have changed nullability
Camera-Extensions and Camera-View Version 1.0.0-alpha03
۹ اکتبر ۲۰۱۹
androidx.camera:camera-extensions:1.0.0-alpha03 and androidx.camera:camera-view:1.0.0-alpha03 are released. These are the commits included in camera-extensions:1.0.0-alpha03 and these are the commits included in camera-view:1.0.0-alpha03 .
ویژگیهای جدید
- Added Context initializer for extensions. Extensions version incremented to 1.1.0
Camera-Extensions and Camera-View Version 1.0.0-alpha02
۵ سپتامبر ۲۰۱۹
androidx.camera:camera-extensions:1.0.0-alpha02 and androidx.camera:camera-view:1.0.0-alpha02 are released. These are the commits included in camera-extensions:1.0.0-alpha02 and these are the commits included camera-view:1.0.0-alpha02 .
- Added tests to verify
PreviewImageProcessorImplhas correctly implemented timestamps. - Fix
ExtensionTesttest failure on Nexus 5 (API level 21) and ensure preview is available.
Camera-Extensions and Camera-View Version 1.0.0-alpha01
۷ آگوست ۲۰۱۹
androidx.camera:camera-extensions:1.0.0-alpha01 and androidx.camera:camera-view:1.0.0-alpha01 are released. These are the commits included in camera-extensions:1.0.0-alpha01 and these are the commits included camera-view:1.0.0-alpha01
- New library for future Camera Extensions for accessing effects on supported devices. This library is a work in progress.
- New Camera View class. This library is a work in progress.