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

Commit d7973ba3 authored by Dan Albert's avatar Dan Albert
Browse files

Migrate libcamera2ndk to ndk_library.

Test: make checkbuild tests
Bug: http://b/30465923
Change-Id: Iab800fd20beeef64250abc7d1c966d12fa8bfbb5
parent 8a288e1f
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
ndk_headers {
    name: "libcamera2ndk_headers",
    from: "include/camera/ndk/",
    to: "camera",
    srcs: ["include/camera/ndk/**/*.h"],
}

subdirs = [
    "camera/ndk",
    "media/libmedia",
    "media/libstagefright/foundation",
]

camera/ndk/Android.bp

0 → 100644
+23 −0
Original line number Diff line number Diff line
// Copyright (C) 2016 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Headers module is in frameworks/av/Android.bp because modules are not allowed
// to refer to headers in parent directories and the headers live in
// frameworks/av/include.

ndk_library {
    name: "libcamera2ndk.ndk",
    symbol_file: "libcamera2ndk.map.txt",
    first_version: "24",
}
+46 −0
Original line number Diff line number Diff line
LIBCAMERA2NDK {
  global:
    ACameraCaptureSession_abortCaptures;
    ACameraCaptureSession_capture;
    ACameraCaptureSession_close;
    ACameraCaptureSession_getDevice;
    ACameraCaptureSession_setRepeatingRequest;
    ACameraCaptureSession_stopRepeating;
    ACameraDevice_close;
    ACameraDevice_createCaptureRequest;
    ACameraDevice_createCaptureSession;
    ACameraDevice_getId;
    ACameraManager_create;
    ACameraManager_delete;
    ACameraManager_deleteCameraIdList;
    ACameraManager_getCameraCharacteristics;
    ACameraManager_getCameraIdList;
    ACameraManager_openCamera;
    ACameraManager_registerAvailabilityCallback;
    ACameraManager_unregisterAvailabilityCallback;
    ACameraMetadata_copy;
    ACameraMetadata_free;
    ACameraMetadata_getAllTags;
    ACameraMetadata_getConstEntry;
    ACameraOutputTarget_create;
    ACameraOutputTarget_free;
    ACaptureRequest_addTarget;
    ACaptureRequest_free;
    ACaptureRequest_getAllTags;
    ACaptureRequest_getConstEntry;
    ACaptureRequest_removeTarget;
    ACaptureRequest_setEntry_double;
    ACaptureRequest_setEntry_float;
    ACaptureRequest_setEntry_i32;
    ACaptureRequest_setEntry_i64;
    ACaptureRequest_setEntry_rational;
    ACaptureRequest_setEntry_u8;
    ACaptureSessionOutputContainer_add;
    ACaptureSessionOutputContainer_create;
    ACaptureSessionOutputContainer_free;
    ACaptureSessionOutputContainer_remove;
    ACaptureSessionOutput_create;
    ACaptureSessionOutput_free;
  local:
    *;
};
+8 −7
Original line number Diff line number Diff line
@@ -32,6 +32,8 @@
 * Do not reference types that are not part of the NDK.
 * Do not #include files that aren't part of the NDK.
 */
#include <sys/cdefs.h>

#include <android/native_window.h>
#include "NdkCameraError.h"
#include "NdkCameraMetadata.h"
@@ -39,9 +41,9 @@
#ifndef _NDK_CAMERA_CAPTURE_SESSION_H
#define _NDK_CAMERA_CAPTURE_SESSION_H

#ifdef __cplusplus
extern "C" {
#endif
__BEGIN_DECLS

#if __ANDROID_API__ >= 24

/**
 * ACameraCaptureSession is an opaque type that manages frame captures of a camera device.
@@ -587,11 +589,10 @@ camera_status_t ACameraCaptureSession_stopRepeating(ACameraCaptureSession* sessi
 */
camera_status_t ACameraCaptureSession_abortCaptures(ACameraCaptureSession* session);

#endif /* __ANDROID_API__ >= 24 */

#ifdef __cplusplus
} // extern "C"
#endif
__END_DECLS

#endif // _NDK_CAMERA_CAPTURE_SESSION_H
#endif /* _NDK_CAMERA_CAPTURE_SESSION_H */

/** @} */
+8 −7
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@
 * Do not reference types that are not part of the NDK.
 * Do not #include files that aren't part of the NDK.
 */
#include <sys/cdefs.h>

#include <android/native_window.h>
#include "NdkCameraError.h"
@@ -41,9 +42,9 @@
#ifndef _NDK_CAMERA_DEVICE_H
#define _NDK_CAMERA_DEVICE_H

#ifdef __cplusplus
extern "C" {
#endif
__BEGIN_DECLS

#if __ANDROID_API__ >= 24

/**
 * ACameraDevice is opaque type that provides access to a camera device.
@@ -658,11 +659,11 @@ camera_status_t ACameraDevice_createCaptureSession(
        const ACameraCaptureSession_stateCallbacks* callbacks,
        /*out*/ACameraCaptureSession** session);

#ifdef __cplusplus
} // extern "C"
#endif
#endif /* __ANDROID_API__ >= 24 */

__END_DECLS

#endif // _NDK_CAMERA_DEVICE_H
#endif /* _NDK_CAMERA_DEVICE_H */

/** @} */
Loading