Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c66aa06b authored by Avichal Rakesh's avatar Avichal Rakesh Committed by Android (Google) Code Review
Browse files

Merge changes from topic "cam_vndk_hidl2aidl"

* changes:
  cameraservice: Add AIDL vndk client support
  camera: Migrate ndk_vendor client implementation to AIDL.
parents 24ee9c33 fcb78cb6
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@ cc_binary {
        "libui",
        "libgui",
        "libbinder",
        "libbinder_ndk",
        "libhidlbase",
        "android.hardware.camera.common@1.0",
        "android.hardware.camera.provider@2.4",
@@ -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",
    ],
}
+1 −0
Original line number Diff line number Diff line
@@ -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
+9 −2
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@
//#define LOG_NDEBUG 0

#include "CameraService.h"
#include <android/binder_process.h>
#include <hidl/HidlTransportSupport.h>

using namespace android;
@@ -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();
}
+9 −0
Original line number Diff line number Diff line
@@ -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>
+5 −6
Original line number Diff line number Diff line
@@ -141,6 +141,7 @@ cc_library_shared {
    ],

    shared_libs: [
        "libbinder_ndk",
        "libfmq",
        "libhidlbase",
        "libhardware",
@@ -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