Loading camera/cameraserver/manifest_android.frameworks.cameraservice.service.xml +1 −1 Original line number Diff line number Diff line Loading @@ -11,7 +11,7 @@ <hal format="aidl"> <name>android.frameworks.cameraservice.service</name> <version>1</version> <version>2</version> <interface> <name>ICameraService</name> <instance>default</instance> Loading services/camera/libcameraservice/Android.bp +3 −2 Original line number Diff line number Diff line Loading @@ -66,6 +66,7 @@ cc_defaults { "libmedia_codeclist", "libmedia_omx", "libmemunreachable", "libnativewindow", "libprocessgroup", "libprocinfo", "libsensorprivacy", Loading Loading @@ -95,8 +96,8 @@ cc_defaults { "android.frameworks.cameraservice.device@2.0", "android.frameworks.cameraservice.device@2.1", "android.frameworks.cameraservice.common-V1-ndk", "android.frameworks.cameraservice.service-V1-ndk", "android.frameworks.cameraservice.device-V1-ndk", "android.frameworks.cameraservice.service-V2-ndk", "android.frameworks.cameraservice.device-V2-ndk", "android.hardware.camera.common-V1-ndk", "android.hardware.camera.device-V2-ndk", "android.hardware.camera.metadata-V2-ndk", Loading services/camera/libcameraservice/aidl/AidlUtils.cpp +38 −13 Original line number Diff line number Diff line Loading @@ -73,7 +73,29 @@ int32_t convertFromAidl(SStreamConfigurationMode streamConfigurationMode) { UOutputConfiguration convertFromAidl(const SOutputConfiguration &src) { std::vector<sp<IGraphicBufferProducer>> iGBPs; if (!src.surfaces.empty()) { auto& surfaces = src.surfaces; iGBPs.reserve(surfaces.size()); for (auto& sSurface : surfaces) { sp<IGraphicBufferProducer> igbp = Surface::getIGraphicBufferProducer(sSurface.get()); if (igbp == nullptr) { ALOGE("%s: ANativeWindow (%p) not backed by a Surface.", __FUNCTION__, sSurface.get()); continue; } iGBPs.push_back(igbp); } } else { #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" // HIDL token manager (and consequently 'windowHandles') is deprecated and will be removed // in the future. However, cameraservice must still support old NativeHandle pathway until // all vendors have moved away from using NativeHandles auto &windowHandles = src.windowHandles; #pragma clang diagnostic pop iGBPs.reserve(windowHandles.size()); for (auto &handle : windowHandles) { Loading @@ -84,13 +106,16 @@ UOutputConfiguration convertFromAidl(const SOutputConfiguration &src) { __FUNCTION__, handle.toString().c_str()); continue; } iGBPs.push_back(new H2BGraphicBufferProducer(igbp)); native_handle_delete(nh); } } UOutputConfiguration outputConfiguration( iGBPs, convertFromAidl(src.rotation), src.physicalCameraId, src.windowGroupId, OutputConfiguration::SURFACE_TYPE_UNKNOWN, 0, 0, (windowHandles.size() > 1)); (iGBPs.size() > 1)); return outputConfiguration; } Loading Loading
camera/cameraserver/manifest_android.frameworks.cameraservice.service.xml +1 −1 Original line number Diff line number Diff line Loading @@ -11,7 +11,7 @@ <hal format="aidl"> <name>android.frameworks.cameraservice.service</name> <version>1</version> <version>2</version> <interface> <name>ICameraService</name> <instance>default</instance> Loading
services/camera/libcameraservice/Android.bp +3 −2 Original line number Diff line number Diff line Loading @@ -66,6 +66,7 @@ cc_defaults { "libmedia_codeclist", "libmedia_omx", "libmemunreachable", "libnativewindow", "libprocessgroup", "libprocinfo", "libsensorprivacy", Loading Loading @@ -95,8 +96,8 @@ cc_defaults { "android.frameworks.cameraservice.device@2.0", "android.frameworks.cameraservice.device@2.1", "android.frameworks.cameraservice.common-V1-ndk", "android.frameworks.cameraservice.service-V1-ndk", "android.frameworks.cameraservice.device-V1-ndk", "android.frameworks.cameraservice.service-V2-ndk", "android.frameworks.cameraservice.device-V2-ndk", "android.hardware.camera.common-V1-ndk", "android.hardware.camera.device-V2-ndk", "android.hardware.camera.metadata-V2-ndk", Loading
services/camera/libcameraservice/aidl/AidlUtils.cpp +38 −13 Original line number Diff line number Diff line Loading @@ -73,7 +73,29 @@ int32_t convertFromAidl(SStreamConfigurationMode streamConfigurationMode) { UOutputConfiguration convertFromAidl(const SOutputConfiguration &src) { std::vector<sp<IGraphicBufferProducer>> iGBPs; if (!src.surfaces.empty()) { auto& surfaces = src.surfaces; iGBPs.reserve(surfaces.size()); for (auto& sSurface : surfaces) { sp<IGraphicBufferProducer> igbp = Surface::getIGraphicBufferProducer(sSurface.get()); if (igbp == nullptr) { ALOGE("%s: ANativeWindow (%p) not backed by a Surface.", __FUNCTION__, sSurface.get()); continue; } iGBPs.push_back(igbp); } } else { #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" // HIDL token manager (and consequently 'windowHandles') is deprecated and will be removed // in the future. However, cameraservice must still support old NativeHandle pathway until // all vendors have moved away from using NativeHandles auto &windowHandles = src.windowHandles; #pragma clang diagnostic pop iGBPs.reserve(windowHandles.size()); for (auto &handle : windowHandles) { Loading @@ -84,13 +106,16 @@ UOutputConfiguration convertFromAidl(const SOutputConfiguration &src) { __FUNCTION__, handle.toString().c_str()); continue; } iGBPs.push_back(new H2BGraphicBufferProducer(igbp)); native_handle_delete(nh); } } UOutputConfiguration outputConfiguration( iGBPs, convertFromAidl(src.rotation), src.physicalCameraId, src.windowGroupId, OutputConfiguration::SURFACE_TYPE_UNKNOWN, 0, 0, (windowHandles.size() > 1)); (iGBPs.size() > 1)); return outputConfiguration; } Loading