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

Commit fe723a52 authored by Jiwen 'Steve' Cai's avatar Jiwen 'Steve' Cai Committed by Jiwen Cai
Browse files

Re-organize dvr_tracking headers

1/ dvr_tracking_types.h is public header, include it in dvr_api.h
2/ dvr_tracking.h is private header, only include it in dvr_api.cpp
3/ Forward declare DvrTrackingXXX opaque handles and callback
   signatures in dvr_api.h

Bug: 78169521
Test: Build system
Change-Id: I5583dd7ad6a403fd4f2429770f30c1ba696e8430
parent 77589753
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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.
+11 −1
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@
#include <dvr/dvr_display_types.h>
#include <dvr/dvr_hardware_composer_types.h>
#include <dvr/dvr_pose.h>
#include <dvr/dvr_tracking.h>
#include <dvr/dvr_tracking_types.h>

#ifdef __cplusplus
extern "C" {
@@ -51,6 +51,12 @@ typedef int32_t DvrGlobalBufferKey;
typedef struct DvrSurfaceAttributeValue DvrSurfaceAttributeValue;
typedef struct DvrSurfaceAttribute DvrSurfaceAttribute;

typedef struct DvrReadBuffer DvrReadBuffer;
typedef struct DvrTrackingCamera DvrTrackingCamera;
typedef struct DvrTrackingFeatureExtractor DvrTrackingFeatureExtractor;
typedef struct DvrTrackingSensors DvrTrackingSensors;
typedef struct DvrWriteBufferQueue DvrWriteBufferQueue;

// 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
@@ -379,6 +385,8 @@ typedef int (*DvrTrackingFeatureExtractorCreatePtr)(
    DvrTrackingFeatureExtractor** out_extractor);
typedef void (*DvrTrackingFeatureExtractorDestroyPtr)(
    DvrTrackingFeatureExtractor* extractor);
typedef void (*DvrTrackingFeatureCallback)(void* context,
                                           const DvrTrackingFeatures* event);
typedef int (*DvrTrackingFeatureExtractorStartPtr)(
    DvrTrackingFeatureExtractor* extractor,
    DvrTrackingFeatureCallback callback, void* context);
@@ -388,6 +396,8 @@ typedef int (*DvrTrackingFeatureExtractorProcessBufferPtr)(
    DvrTrackingFeatureExtractor* extractor, DvrReadBuffer* buffer,
    const DvrTrackingBufferMetadata* metadata, bool* out_skipped);

typedef void (*DvrTrackingSensorEventCallback)(void* context,
                                               DvrTrackingSensorEvent* event);
typedef int (*DvrTrackingSensorsCreatePtr)(DvrTrackingSensors** out_sensors,
                                           const char* mode);
typedef void (*DvrTrackingSensorsDestroyPtr)(DvrTrackingSensors* sensors);