Libargus API Libargus Camera API

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
SensorPrivateMetadata.h
Go to the documentation of this file.
1 /*
2 * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * NVIDIA CORPORATION and its licensors retain all intellectual property
5 * and proprietary rights in and to this software, related documentation
6 * and any modifications thereto. Any use, reproduction, disclosure or
7 * distribution of this software and related documentation without an express
8 * license agreement from NVIDIA CORPORATION is strictly prohibited.
9 */
10
11 /**
12 * @file
13 * <b>Libargus Extension: Sensor Private Metadata API</b>
14 *
15 * @b Description: This file defines the SensorPrivateMetadata extension.
16 */
17
18 #ifndef _ARGUS_SENSOR_PRIVATE_METADATA_H
19 #define _ARGUS_SENSOR_PRIVATE_METADATA_H
20
21 namespace Argus
22 {
23 /**
24 * Adds accessors for sensor embedded metadata. This data is metadata that the sensor embeds
25 * inside the frame, the type and formating of which depends on the sensor. It is up to the
26 * user to correctly parse the data based on the specifics of the sensor used.
27 *
28 * - Ext::ISensorPrivateMetadataCaps: Determines whether a device is capable of
29 * private metadata output.
30 * - Ext::ISensorPrivateMetadataRequest: Enables private metadata output from a capture request.
31 * - Ext::ISensorPrivateMetadata: Accesses the sensor private metadata.
32 *
33 * @defgroup ArgusExtSensorPrivateMetadata Ext::SensorPrivateMetadata
34 * @ingroup ArgusExtensions
35 */
36 DEFINE_UUID(ExtensionName, EXT_SENSOR_PRIVATE_METADATA, 7acf4352,3a75,46e7,9af1,8d,71,da,83,15,23);
37
38 namespace Ext
39 {
40
41 /**
42 * @class ISensorPrivateMetadataCaps
43 *
44 * Interface used to query the availability and size in bytes of sensor private metadata.
45 *
46 * @ingroup ArgusCameraDevice ArgusExtSensorPrivateMetadata
47 */
48 DEFINE_UUID(InterfaceID, IID_SENSOR_PRIVATE_METADATA_CAPS, e492d2bf,5285,476e,94c5,ee,64,d5,3d,94,ef);
49 class ISensorPrivateMetadataCaps : public Interface
50 {
51 public:
52 static const InterfaceID& id() { return IID_SENSOR_PRIVATE_METADATA_CAPS; }
53
54 /**
55 * Returns the size in bytes of the private metadata.
56 */
57 virtual size_t getMetadataSize() const = 0;
58
59 protected:
60 ~ISensorPrivateMetadataCaps() {}
61 };
62
63 /**
64 * @class ISensorPrivateMetadataRequest
65 *
66 * Interface used enable the output of sensor private metadata for a request.
67 *
68 * @ingroup ArgusRequest ArgusExtSensorPrivateMetadata
69 */
70 DEFINE_UUID(InterfaceID, IID_SENSOR_PRIVATE_METADATA_REQUEST, 5c868b69,42f5,4ec9,9b93,44,11,c9,6c,02,e3);
71 class ISensorPrivateMetadataRequest : public Interface
72 {
73 public:
74 static const InterfaceID& id() { return IID_SENSOR_PRIVATE_METADATA_REQUEST; }
75
76 /**
77 * Enables the sensor private metadata, will only work if the sensor supports embedded metadata.
78 * @param[in] enable whether to output embedded metadata.
79 */
80 virtual void setMetadataEnable(bool enable) = 0;
81
82 /**
83 * Returns if the metadata is enabled for this request.
84 */
85 virtual bool getMetadataEnable() const = 0;
86
87 protected:
88 ~ISensorPrivateMetadataRequest() {}
89 };
90
91 /**
92 * @class ISensorPrivateMetadata
93 *
94 * Interface used to access sensor private metadata.
95 *
96 * @ingroup ArgusCaptureMetadata ArgusExtSensorPrivateMetadata
97 */
98 DEFINE_UUID(InterfaceID, IID_SENSOR_PRIVATE_METADATA, 68cf6680,70d7,4b52,9a99,33,fb,65,81,a2,61);
99 class ISensorPrivateMetadata : public Interface
100 {
101 public:
102 static const InterfaceID& id() { return IID_SENSOR_PRIVATE_METADATA; }
103
104 /**
105 * Returns the size of the embedded metadata.
106 */
107 virtual size_t getMetadataSize() const = 0;
108
109 /**
110 * Copies back the metadata to the provided memory location.
111 * If the size of @a dst is smaller than the total size of the metadata, only the first
112 * bytes up to size are copied.
113 * @param [in,out] dst The pointer to the location where the data will be copied.
114 * The caller is responsible for allocating and managing the memory.
115 * @param [in] size The size of the destination.
116 */
117 virtual Status getMetadata(void *dst, size_t size) const = 0;
118
119 protected:
120 ~ISensorPrivateMetadata() {}
121 };
122
123 } // namespace Ext
124
125 } // namespace Argus
126
127 #endif // _ARGUS_SENSOR_PRIVATE_METADATA_H