Что такое android hardware camera provider
blob: ee40ce506de5178d64ce2d61eff083d5385e6339 [file] [log] [blame]
| cc_library_shared |
| name : «android.hardware.camera.provider@2.4-impl» , |
| relative_install_path : «hw» , |
| srcs : [ «CameraProvider.cpp» ], |
| shared_libs : [ |
| «libhidlbase» , |
| «libhidltransport» , |
| «libhwbinder» , |
| «libutils» , |
| «libcutils» , |
| «android.hardware.camera.device@1.0» , |
| «android.hardware.camera.device@3.2» , |
| «android.hardware.camera.device@3.2-impl» , |
| «android.hardware.camera.provider@2.4» , |
| «android.hardware.camera.common@1.0» , |
| «liblog» , |
| «libhardware» , |
| «libcamera_metadata» |
| ], |
| static_libs : [ |
| «android.hardware.camera.common@1.0-helper» |
| ] |
| > |
| cc_binary |
| name : «android.hardware.camera.provider@2.4-service» , |
| relative_install_path : «hw» , |
| srcs : [ «service.cpp» , «CameraProvider.cpp» ], |
| compile_multilib : «32» , |
| init_rc : [ «android.hardware.camera.provider@2.4-service.rc» ], |
| shared_libs : [ |
| «libhidlbase» , |
| «libhidltransport» , |
| «liblog» , |
| «libhwbinder» , |
| «libutils» , |
| «libhardware» , |
| «android.hardware.camera.device@1.0» , |
| «android.hardware.camera.device@3.2» , |
| «android.hardware.camera.provider@2.4» , |
| «android.hardware.camera.common@1.0» , |
| «libcutils» , |
| «android.hardware.camera.device@3.2-impl-binderized» , |
| «libcamera_metadata» |
| ], |
| static_libs : [ |
| «android.hardware.camera.common@1.0-helper» |
| ] |
| > |
Powered by Gitiles txt json
New [20.10.15] Mi Note 10 Battery Consumption
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.
skenek
Members
Oct 18, 2020 3 3
This thing android.hardware.camera.provider@2.4-service_64 is responsible for almost half of the battery consumption which i think is funny because the camera barely works.
Attachments
Screenshot_2020-10-22-18-02-33-646_com.miui.securitycenter.jpg
Camera Class
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
This class is obsoleted in this android platform
The Camera class is used to set image capture settings, start/stop preview, snap pictures, and retrieve frames for encoding for video.
[Android.Runtime.Register("android/hardware/Camera", DoNotGenerateAcw=true)] [System.Obsolete("This class is obsoleted in this android platform")] public class Camera : Java.Lang.Object
[] [] type Camera = class inherit Object
Inheritance
Attributes
Remarks
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Constructors
A constructor used when creating managed representations of JNI objects; called by the runtime.
Fields
Obsolete.
Broadcast Action: A new picture is taken by the camera, and the entry of the picture has been added to the media store.
Obsolete.
Broadcast Action: A new video is recorded by the camera, and the entry of the video has been added to the media store.
Properties
Returns the runtime class of this Object .
The handle to the underlying Android instance.
Obsolete.
Returns the number of physical cameras available on this device.
This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
Methods
Obsolete.
Adds a pre-allocated buffer to the preview callback buffer queue.
Obsolete.
Starts camera auto-focus and registers a callback function to run when the camera is focused.
Obsolete.
Cancels any auto-focus function in progress.
Creates and returns a copy of this object.
Obsolete.
Enable or disable the default shutter sound when taking a picture.
Indicates whether some other object is «equal to» this one.
Obsolete.
Returns the information about a particular camera.
Returns a hash code value for the object.
Obsolete.
Returns the current settings for this Camera service.
Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
Obsolete.
Re-locks the camera to prevent other processes from accessing it.
Wakes up a single thread that is waiting on this object’s monitor.
Wakes up all threads that are waiting on this object’s monitor.
Obsolete.
Creates a new Camera object to access the first back-facing camera on the device.
Obsolete.
Creates a new Camera object to access a particular hardware camera.
Obsolete.
Reconnects to the camera service after another process used it.
Obsolete.
Disconnects and releases the Camera object resources.
Obsolete.
Sets camera auto-focus move callback.
Obsolete.
Set the clockwise rotation of preview display in degrees.
Obsolete.
Registers a callback to be invoked when an error occurs.
Obsolete.
Registers a listener to be notified about the faces detected in the preview frame.
Sets the Handle property.
Obsolete.
Installs a callback to be invoked for the next preview frame in addition to displaying it on the screen.
Obsolete.
Changes the settings for this Camera service.
Obsolete.
Installs a callback to be invoked for every preview frame in addition to displaying them on the screen.
Obsolete.
Installs a callback to be invoked for every preview frame, using buffers supplied with #addCallbackBuffer(byte[]) , in addition to displaying them on the screen.
Obsolete.
Sets the Surface to be used for live preview.
Obsolete.
Sets the SurfaceTexture to be used for live preview.
Obsolete.
Registers a listener to be notified when the zoom value is updated by the camera driver during smooth zoom.
Obsolete.
Starts the face detection.
Obsolete.
Starts capturing and drawing preview frames to the screen.
Obsolete.
Zooms to the requested value smoothly.
Obsolete.
Stops the face detection.
Obsolete.
Stops capturing and drawing preview frames to the surface, and resets the camera for a future call to #startPreview() .
Obsolete.
Stops the smooth zoom.
Obsolete.
Obsolete.
Returns a string representation of the object.
Obsolete.
Unlocks the camera to allow another process to access it.
Causes the current thread to wait until another thread invokes the java.lang.Object#notify() method or the java.lang.Object#notifyAll() method for this object.
Causes the current thread to wait until either another thread invokes the java.lang.Object#notify() method or the java.lang.Object#notifyAll() method for this object, or a specified amount of time has elapsed.
Causes the current thread to wait until another thread invokes the java.lang.Object#notify() method or the java.lang.Object#notifyAll() method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
Events
Explicit Interface Implementations
| IJavaPeerable.Disposed() | (Inherited from Object) |
| IJavaPeerable.DisposeUnlessReferenced() | (Inherited from Object) |
| IJavaPeerable.Finalized() | (Inherited from Object) |
| IJavaPeerable.JniManagedPeerState | (Inherited from Object) |
| IJavaPeerable.SetJniIdentityHashCode(Int32) | (Inherited from Object) |
| IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) | (Inherited from Object) |
| IJavaPeerable.SetPeerReference(JniObjectReference) | (Inherited from Object) |
Extension Methods
Performs an Android runtime-checked type conversion.
EVS and V4L in Android Emulator
I’d like to use EVS camera system from Android Automotive in Android Emulator. I’ve added a camera of my computer to the emulated OS with hw.camera.back=webcam0 in the emulator’s config.ini file. Then I’ve built sdk_car_x86_64 with ENABLE_CAMERA_SERVICE , Gallery2 package and some camera-related permissions from frameworks/native/data/etc/ . Now I can open the standard AOSP Camera application, and it works. Then, I’ve added few more services: [email protected] , [email protected] , [email protected] and camera.v4l2 package. With some extra configuration the EvsEnumerator starts and I can run evs_app, but it’s empty — it shows black screen and the ‘close’ button only. Well, it’s obvious, because etc/automotive/evs/evs_configuration_override.xml points to /dev/video0 and there is no /dev/video* device in my system — therefore V4L2 returns no devices to EvsDriver (evs-related logs below).
2023-10-06 13:49:08.661 250-250 evsmanagerd pid-250 I EVS manager starting 2023-10-06 13:49:08.674 250-250 evsmanagerd pid-250 I Main thread entering thread pool 2023-10-06 13:49:08.674 250-257 evsmanagerd pid-250 I EVS managed service connecting to hardware service at hw/1 2023-10-06 13:49:08.674 250-257 evsmanagerd pid-250 I hardwareServiceName: hw/1 2023-10-06 13:49:14.693 250-257 evsmanagerd pid-250 I EVS managed service is starting as android.hardware.automotive.evs.IEvsEnumerator/default 2023-10-06 13:49:14.696 250-257 evsmanagerd pid-250 I Registration complete 2023-10-06 13:49:08.748 251-251 EvsDriver pid-251 I EVS Hardware Enumerator service is starting 2023-10-06 13:49:08.750 251-251 EvsDriver pid-251 I Parsing configuration file takes 9.145000e-01 ms. 2023-10-06 13:49:08.750 251-251 EvsDriver pid-251 I enumerateCameras: Starting dev/video* enumeration 2023-10-06 13:49:08.750 251-251 EvsDriver pid-251 I Found 0 qualified video capture devices of 0 checked. 2023-10-06 13:49:08.750 251-251 EvsDriver pid-251 I enumerateDisplays: Starting display enumeration 2023-10-06 13:49:13.725 251-251 EvsDriver pid-251 I Display 401cec6a7a2b7b00 is detected on the port, 0 2023-10-06 13:49:13.725 251-251 EvsDriver pid-251 I Found 1 displays 2023-10-06 13:49:13.726 251-251 EvsDriver pid-251 I EVS Hardware Enumerator is ready 2023-10-06 13:49:13.726 251-543 EvsDriver pid-251 I Start monitoring new V4L2 devices 2023-10-06 13:49:14.708 251-640 EvsDriver pid-251 I Display resolution is 1024x768 2023-10-06 13:49:08.678 249-249 EvsApp pid-249 I EVS app starting 2023-10-06 13:49:08.680 249-249 EvsApp pid-249 I Acquiring EVS Enumerator 2023-10-06 13:49:14.696 249-249 EvsApp pid-249 I Acquiring EVS Display 2023-10-06 13:49:14.698 249-249 EvsApp pid-249 I Connecting to Vehicle HAL 2023-10-06 13:49:14.703 249-249 EvsApp pid-249 I Constructing state controller 2023-10-06 13:49:24.705 249-249 EvsApp evs_app I Camera list callback received 0cameras. 2023-10-06 13:49:24.705 249-249 EvsApp evs_app I Entering running state 2023-10-06 13:49:24.708 249-784 EvsApp evs_app I Activated state 4
From static code analysis I found that Camera API (used by Camera applications) uses some EmulatedCameraProvider to access the emulated camera, probably without V4L2. I don’t know, what can I do next. It seems the kernel supports the camera itself (Camera app works) but V4L2 doesn’t create /dev/video* representations, and the workaround from Google (EmulatedCameraProvider) applies to Camera API only, not the EVS. Any help will be appreciated.
