Loading camera/cameraserver/Android.bp +2 −1 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ cc_binary { "libui", "libgui", "libbinder", "libbinder_ndk", "libhidlbase", "android.hardware.camera.common@1.0", "android.hardware.camera.provider@2.4", Loading @@ -59,6 +60,6 @@ cc_binary { init_rc: ["cameraserver.rc"], vintf_fragments: [ "manifest_android.frameworks.cameraservice.service@2.2.xml", "manifest_android.frameworks.cameraservice.service.xml", ], } camera/cameraserver/cameraserver.rc +1 −0 Original line number Diff line number Diff line Loading @@ -6,3 +6,4 @@ service cameraserver /system/bin/cameraserver task_profiles CameraServiceCapacity MaxPerformance rlimit rtprio 10 10 onrestart class_restart cameraWatchdog interface aidl android.frameworks.cameraservice.service.ICameraService/default camera/cameraserver/main_cameraserver.cpp +9 −2 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ //#define LOG_NDEBUG 0 #include "CameraService.h" #include <android/binder_process.h> #include <hidl/HidlTransportSupport.h> using namespace android; Loading @@ -26,15 +27,21 @@ int main(int argc __unused, char** argv __unused) { signal(SIGPIPE, SIG_IGN); // Set 5 threads for HIDL calls. Now cameraserver will serve HIDL calls in // addition to consuming them from the Camera HAL as well. // Set 5 threads for HIDL calls. Now cameraserver will serve HIDL calls. hardware::configureRpcThreadpool(5, /*willjoin*/ false); // Set 5 threads for VNDK AIDL calls. Now cameraserver will serve // VNDK AIDL calls in addition to consuming them from the Camera HAL as well. ABinderProcess_setThreadPoolMaxThreadCount(5); sp<ProcessState> proc(ProcessState::self()); sp<IServiceManager> sm = defaultServiceManager(); ALOGI("ServiceManager: %p", sm.get()); CameraService::instantiate(); ALOGI("ServiceManager: %p done instantiate", sm.get()); ProcessState::self()->startThreadPool(); ABinderProcess_startThreadPool(); IPCThreadState::self()->joinThreadPool(); ABinderProcess_joinThreadPool(); } camera/cameraserver/manifest_android.frameworks.cameraservice.service@2.2.xml→camera/cameraserver/manifest_android.frameworks.cameraservice.service.xml +9 −0 Original line number Diff line number Diff line Loading @@ -8,4 +8,13 @@ <instance>default</instance> </interface> </hal> <hal format="aidl"> <name>android.frameworks.cameraservice.service</name> <version>1</version> <interface> <name>ICameraService</name> <instance>default</instance> </interface> </hal> </manifest> camera/ndk/Android.bp +5 −6 Original line number Diff line number Diff line Loading @@ -141,6 +141,7 @@ cc_library_shared { ], shared_libs: [ "libbinder_ndk", "libfmq", "libhidlbase", "libhardware", Loading @@ -151,15 +152,13 @@ cc_library_shared { "libcutils", "libcamera_metadata", "libmediandk", "android.frameworks.cameraservice.device@2.0", "android.frameworks.cameraservice.device@2.1", "android.frameworks.cameraservice.common@2.0", "android.frameworks.cameraservice.service@2.0", "android.frameworks.cameraservice.service@2.1", "android.frameworks.cameraservice.service@2.2", "android.frameworks.cameraservice.common-V1-ndk", "android.frameworks.cameraservice.device-V1-ndk", "android.frameworks.cameraservice.service-V1-ndk", ], static_libs: [ "android.hardware.camera.common@1.0-helper", "libaidlcommonsupport", "libarect", ], // TODO: jchowdhary@, use header_libs instead b/131165718 Loading Loading
camera/cameraserver/Android.bp +2 −1 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ cc_binary { "libui", "libgui", "libbinder", "libbinder_ndk", "libhidlbase", "android.hardware.camera.common@1.0", "android.hardware.camera.provider@2.4", Loading @@ -59,6 +60,6 @@ cc_binary { init_rc: ["cameraserver.rc"], vintf_fragments: [ "manifest_android.frameworks.cameraservice.service@2.2.xml", "manifest_android.frameworks.cameraservice.service.xml", ], }
camera/cameraserver/cameraserver.rc +1 −0 Original line number Diff line number Diff line Loading @@ -6,3 +6,4 @@ service cameraserver /system/bin/cameraserver task_profiles CameraServiceCapacity MaxPerformance rlimit rtprio 10 10 onrestart class_restart cameraWatchdog interface aidl android.frameworks.cameraservice.service.ICameraService/default
camera/cameraserver/main_cameraserver.cpp +9 −2 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ //#define LOG_NDEBUG 0 #include "CameraService.h" #include <android/binder_process.h> #include <hidl/HidlTransportSupport.h> using namespace android; Loading @@ -26,15 +27,21 @@ int main(int argc __unused, char** argv __unused) { signal(SIGPIPE, SIG_IGN); // Set 5 threads for HIDL calls. Now cameraserver will serve HIDL calls in // addition to consuming them from the Camera HAL as well. // Set 5 threads for HIDL calls. Now cameraserver will serve HIDL calls. hardware::configureRpcThreadpool(5, /*willjoin*/ false); // Set 5 threads for VNDK AIDL calls. Now cameraserver will serve // VNDK AIDL calls in addition to consuming them from the Camera HAL as well. ABinderProcess_setThreadPoolMaxThreadCount(5); sp<ProcessState> proc(ProcessState::self()); sp<IServiceManager> sm = defaultServiceManager(); ALOGI("ServiceManager: %p", sm.get()); CameraService::instantiate(); ALOGI("ServiceManager: %p done instantiate", sm.get()); ProcessState::self()->startThreadPool(); ABinderProcess_startThreadPool(); IPCThreadState::self()->joinThreadPool(); ABinderProcess_joinThreadPool(); }
camera/cameraserver/manifest_android.frameworks.cameraservice.service@2.2.xml→camera/cameraserver/manifest_android.frameworks.cameraservice.service.xml +9 −0 Original line number Diff line number Diff line Loading @@ -8,4 +8,13 @@ <instance>default</instance> </interface> </hal> <hal format="aidl"> <name>android.frameworks.cameraservice.service</name> <version>1</version> <interface> <name>ICameraService</name> <instance>default</instance> </interface> </hal> </manifest>
camera/ndk/Android.bp +5 −6 Original line number Diff line number Diff line Loading @@ -141,6 +141,7 @@ cc_library_shared { ], shared_libs: [ "libbinder_ndk", "libfmq", "libhidlbase", "libhardware", Loading @@ -151,15 +152,13 @@ cc_library_shared { "libcutils", "libcamera_metadata", "libmediandk", "android.frameworks.cameraservice.device@2.0", "android.frameworks.cameraservice.device@2.1", "android.frameworks.cameraservice.common@2.0", "android.frameworks.cameraservice.service@2.0", "android.frameworks.cameraservice.service@2.1", "android.frameworks.cameraservice.service@2.2", "android.frameworks.cameraservice.common-V1-ndk", "android.frameworks.cameraservice.device-V1-ndk", "android.frameworks.cameraservice.service-V1-ndk", ], static_libs: [ "android.hardware.camera.common@1.0-helper", "libaidlcommonsupport", "libarect", ], // TODO: jchowdhary@, use header_libs instead b/131165718 Loading