Unable to get the chosen quality as an Int

68 views
Skip to first unread message

Mohit Shetty

unread,
Oct 26, 2021, 1:04:44 PM10/26/21
to Android CameraX Discussion Group
The new CameraX video library does offers different ways to get the highest/lowest selector, but there is no way to know the quality that is being selected so that it can actually be stored in a persistent storage like SharedPreferences (maybe as an Integer), so as to remember the user's preferences and later render them in a dropdown with custom text. 

For e.g. If we use Recorder.DEFAULT_QUALITY_SELECTOR, I could get the instance of a QualitySelector, but would have no way to persistently store it or render an option like (UHD/FHD/...) as no value would be known beforehand. There is a method called `getPrioritizedQualities` whose scope is restricted to the library, but not really sure how reliable is it + if it requires cameraInfo which isn't available before the camera is binded and updating the quality of the output requires rebinding the camera as of now.

Even if there is way to get the selected quality (that corresponds to the constants defined in the QualitySelector class for UHD/FHD/...), maybe from the binded `VideoCapture` use cases or elsewhere, this issue should get resolved.

The basic issue is that QualitySelector doesn't have any public method to get the selected quality as an Int that would correspond to a (publicly defined) constant.

Hope this issue soon gets resolved and sorry for frequently troubling you'll by creating conversations here 😅

Thanks a lot in advance.

Regards,
Mohit

tonyt...@google.com

unread,
Oct 27, 2021, 7:00:54 AM10/27/21
to Android CameraX Discussion Group, shetty...@gmail.com
Hi,
We will consider it as a feature request (created https://issuetracker.google.com/204288986). Thanks for bringing this up!

Message has been deleted

Mohit Shetty

unread,
Oct 28, 2021, 4:21:57 AM10/28/21
to Android CameraX Discussion Group, tonyt...@google.com, Mohit Shetty
Thanks a lot for considering this and creating a feature request.
Reply all
Reply to author
Forward
0 new messages