Loading libs/vr/libdvr/Android.bp +2 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ cc_library_headers { } cflags = [ "-DDVR_TRACKING_IMPLEMENTED=0", "-DLOG_TAG=\"libdvr\"", "-DTRACE=0", "-Wall", Loading @@ -36,6 +37,7 @@ srcs = [ "dvr_performance.cpp", "dvr_pose.cpp", "dvr_surface.cpp", "dvr_tracking.cpp", "dvr_vsync.cpp", ] Loading libs/vr/libdvr/dvr_api.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -12,6 +12,7 @@ #include <dvr/dvr_display_manager.h> #include <dvr/dvr_performance.h> #include <dvr/dvr_surface.h> #include <dvr/dvr_tracking.h> #include <dvr/dvr_vsync.h> // Headers not yet moved into libdvr. Loading libs/vr/libdvr/dvr_tracking.cpp 0 → 100644 +30 −0 Original line number Diff line number Diff line #include "include/dvr/dvr_tracking.h" #include <utils/Errors.h> #include <utils/Log.h> #if !DVR_TRACKING_IMPLEMENTED extern "C" { // This file provides the stub implementation of dvrTrackingXXX APIs. On // platforms that implement these APIs, set -DDVR_TRACKING_IMPLEMENTED=1 in the // build file. int dvrTrackingCameraCreate(DvrTrackingCamera**) { ALOGE("dvrTrackingCameraCreate is not implemented."); return -ENOSYS; } int dvrTrackingCameraStart(DvrTrackingCamera*, DvrWriteBufferQueue*) { ALOGE("dvrTrackingCameraCreate is not implemented."); return -ENOSYS; } int dvrTrackingCameraStop(DvrTrackingCamera*) { ALOGE("dvrTrackingCameraCreate is not implemented."); return -ENOSYS; } } // extern "C" #endif // DVR_TRACKING_IMPLEMENTED libs/vr/libdvr/include/dvr/dvr_api.h +8 −0 Original line number Diff line number Diff line Loading @@ -50,6 +50,8 @@ typedef int32_t DvrGlobalBufferKey; typedef struct DvrSurfaceAttributeValue DvrSurfaceAttributeValue; typedef struct DvrSurfaceAttribute DvrSurfaceAttribute; typedef struct DvrTrackingCamera DvrTrackingCamera; // Note: To avoid breaking others during active development, only modify this // struct by appending elements to the end. // If you do feel we should to re-arrange or remove elements, please make a Loading Loading @@ -367,6 +369,12 @@ typedef DvrHwcRecti (*DvrHwcFrameGetLayerDamagedRegionPtr)(DvrHwcFrame* frame, typedef int (*DvrPerformanceSetSchedulerPolicyPtr)( pid_t task_id, const char* scheduler_policy); // dvr_tracking.h typedef int (*DvrTrackingCameraCreatePtr)(DvrTrackingCamera** out_camera); typedef int (*DvrTrackingCameraStartPtr)(DvrTrackingCamera* camera, DvrWriteBufferQueue* write_queue); typedef int (*DvrTrackingCameraStopPtr)(DvrTrackingCamera* camera); // The buffer metadata that an Android Surface (a.k.a. ANativeWindow) // will populate. A DvrWriteBufferQueue must be created with this metadata iff // ANativeWindow access is needed. Please do not remove, modify, or reorder Loading libs/vr/libdvr/include/dvr/dvr_api_entries.h +5 −0 Original line number Diff line number Diff line Loading @@ -181,3 +181,8 @@ DVR_V1_API_ENTRY(ReadBufferQueueReleaseBuffer); DVR_V1_API_ENTRY(PoseClientGetDataReader); DVR_V1_API_ENTRY(PoseClientDataCapture); DVR_V1_API_ENTRY(PoseClientDataReaderDestroy); // Tracking DVR_V1_API_ENTRY(TrackingCameraCreate); DVR_V1_API_ENTRY(TrackingCameraStart); DVR_V1_API_ENTRY(TrackingCameraStop); Loading
libs/vr/libdvr/Android.bp +2 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ cc_library_headers { } cflags = [ "-DDVR_TRACKING_IMPLEMENTED=0", "-DLOG_TAG=\"libdvr\"", "-DTRACE=0", "-Wall", Loading @@ -36,6 +37,7 @@ srcs = [ "dvr_performance.cpp", "dvr_pose.cpp", "dvr_surface.cpp", "dvr_tracking.cpp", "dvr_vsync.cpp", ] Loading
libs/vr/libdvr/dvr_api.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -12,6 +12,7 @@ #include <dvr/dvr_display_manager.h> #include <dvr/dvr_performance.h> #include <dvr/dvr_surface.h> #include <dvr/dvr_tracking.h> #include <dvr/dvr_vsync.h> // Headers not yet moved into libdvr. Loading
libs/vr/libdvr/dvr_tracking.cpp 0 → 100644 +30 −0 Original line number Diff line number Diff line #include "include/dvr/dvr_tracking.h" #include <utils/Errors.h> #include <utils/Log.h> #if !DVR_TRACKING_IMPLEMENTED extern "C" { // This file provides the stub implementation of dvrTrackingXXX APIs. On // platforms that implement these APIs, set -DDVR_TRACKING_IMPLEMENTED=1 in the // build file. int dvrTrackingCameraCreate(DvrTrackingCamera**) { ALOGE("dvrTrackingCameraCreate is not implemented."); return -ENOSYS; } int dvrTrackingCameraStart(DvrTrackingCamera*, DvrWriteBufferQueue*) { ALOGE("dvrTrackingCameraCreate is not implemented."); return -ENOSYS; } int dvrTrackingCameraStop(DvrTrackingCamera*) { ALOGE("dvrTrackingCameraCreate is not implemented."); return -ENOSYS; } } // extern "C" #endif // DVR_TRACKING_IMPLEMENTED
libs/vr/libdvr/include/dvr/dvr_api.h +8 −0 Original line number Diff line number Diff line Loading @@ -50,6 +50,8 @@ typedef int32_t DvrGlobalBufferKey; typedef struct DvrSurfaceAttributeValue DvrSurfaceAttributeValue; typedef struct DvrSurfaceAttribute DvrSurfaceAttribute; typedef struct DvrTrackingCamera DvrTrackingCamera; // Note: To avoid breaking others during active development, only modify this // struct by appending elements to the end. // If you do feel we should to re-arrange or remove elements, please make a Loading Loading @@ -367,6 +369,12 @@ typedef DvrHwcRecti (*DvrHwcFrameGetLayerDamagedRegionPtr)(DvrHwcFrame* frame, typedef int (*DvrPerformanceSetSchedulerPolicyPtr)( pid_t task_id, const char* scheduler_policy); // dvr_tracking.h typedef int (*DvrTrackingCameraCreatePtr)(DvrTrackingCamera** out_camera); typedef int (*DvrTrackingCameraStartPtr)(DvrTrackingCamera* camera, DvrWriteBufferQueue* write_queue); typedef int (*DvrTrackingCameraStopPtr)(DvrTrackingCamera* camera); // The buffer metadata that an Android Surface (a.k.a. ANativeWindow) // will populate. A DvrWriteBufferQueue must be created with this metadata iff // ANativeWindow access is needed. Please do not remove, modify, or reorder Loading
libs/vr/libdvr/include/dvr/dvr_api_entries.h +5 −0 Original line number Diff line number Diff line Loading @@ -181,3 +181,8 @@ DVR_V1_API_ENTRY(ReadBufferQueueReleaseBuffer); DVR_V1_API_ENTRY(PoseClientGetDataReader); DVR_V1_API_ENTRY(PoseClientDataCapture); DVR_V1_API_ENTRY(PoseClientDataReaderDestroy); // Tracking DVR_V1_API_ENTRY(TrackingCameraCreate); DVR_V1_API_ENTRY(TrackingCameraStart); DVR_V1_API_ENTRY(TrackingCameraStop);