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
include
Argus
Request.h
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: Copyright (c) 2016-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3
* SPDX-License-Identifier: LicenseRef-NvidiaProprietary
4
*
5
* Redistribution and use in source and binary forms, with or without
6
* modification, are permitted provided that the following conditions
7
* are met:
8
* * Redistributions of source code must retain the above copyright
9
* notice, this list of conditions and the following disclaimer.
10
* * Redistributions in binary form must reproduce the above copyright
11
* notice, this list of conditions and the following disclaimer in the
12
* documentation and/or other materials provided with the distribution.
13
* * Neither the name of NVIDIA CORPORATION nor the names of its
14
* contributors may be used to endorse or promote products derived
15
* from this software without specific prior written permission.
16
*
17
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
18
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
21
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
22
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
23
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
24
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
25
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
*/
29
30
/**
31
* @file
32
* <b>Libargus API: Request API</b>
33
*
34
* @b Description: Defines the Request object and core IRequest interface.
35
*/
36
37
#ifndef _ARGUS_REQUEST_H
38
#define _ARGUS_REQUEST_H
39
40
namespace
Argus
41
{
42
43
/**
44
* Container for all settings used by a single capture request.
45
*
46
* @defgroup ArgusRequest Request
47
* @ingroup ArgusObjects
48
*/
49
class
Request
:
public
InterfaceProvider
,
public
Destructable
50
{
51
protected
:
52
~Request
() {}
53
};
54
55
/**
56
* @class IRequest
57
*
58
* Interface to the core Request settings.
59
*
60
* @ingroup ArgusRequest
61
*
62
* @defgroup ArgusAutoControlSettings AutoControlSettings
63
* Child auto control settings, returned by IRequest::getAutoControlSettings
64
* @ingroup ArgusRequest
65
*
66
* @defgroup ArgusStreamSettings StreamSettings
67
* Child per-stream settings, returned by IRequest::getStreamSettings
68
* @ingroup ArgusRequest
69
*
70
* @defgroup ArgusSourceSettings SourceSettings
71
* Child source settings, returned by IRequest::getSourceSettings
72
* @ingroup ArgusRequest
73
*/
74
DEFINE_UUID
(InterfaceID, IID_REQUEST, eb9b3750,fc8d,455f,8e0f,91,b3,3b,d9,4e,c5);
75
class
IRequest
:
public
Interface
76
{
77
public
:
78
static
const
InterfaceID
&
id
() {
return
IID_REQUEST; }
79
80
/**
81
* Enables the specified output stream.
82
* Captures made with this Request will produce output on that stream.
83
*/
84
virtual
Status
enableOutputStream
(
OutputStream
* stream) = 0;
85
86
/**
87
* Disables the specified output stream.
88
*/
89
virtual
Status
disableOutputStream
(
OutputStream
* stream) = 0;
90
91
/**
92
* Disables all output streams.
93
*/
94
virtual
Status
clearOutputStreams
() = 0;
95
96
/**
97
* Enables the specified input stream and stream settings.
98
* Captures made with this Request will produce input on that stream.
99
*/
100
virtual
Status
enableInputStream
(
InputStream
*stream,
InputStreamSettings
*streamSettings) = 0;
101
102
/**
103
* Disables the specified input stream with the stream settings provided.
104
*/
105
virtual
Status
disableInputStream
(
InputStream
*stream,
InputStreamSettings
*streamSettings) = 0;
106
107
/**
108
* Disables all input streams.
109
*/
110
virtual
Status
clearInputStreams
() = 0;
111
112
/**
113
* Returns all enabled output streams.
114
* @param[out] streams A vector that will be populated with the enabled streams.
115
*
116
* @returns success/status of the call.
117
*/
118
virtual
Status
getOutputStreams
(std::vector<OutputStream*>* streams)
const
= 0;
119
120
/**
121
* Returns all enabled input streams.
122
* @param[out] streams A vector that will be populated with the enabled input streams.
123
*
124
* @returns success/status of the call.
125
*/
126
virtual
Status
getInputStreams
(std::vector<InputStream*>* streams)
const
= 0;
127
128
129
/**
130
* Returns the Stream settings for a particular stream in the request.
131
* The returned object will have the same lifespan as this object,
132
* and expose the IStreamSettings interface.
133
* @param[in] stream The stream for which the settings are requested.
134
*/
135
virtual
InterfaceProvider
*
getStreamSettings
(
const
OutputStream
* stream) = 0;
136
137
/**
138
* Returns the capture control settings for a given AC.
139
* The returned object will have the same lifespan as this object,
140
* and expose the IAutoControlSettings interface.
141
* @param[in] acId The id of the AC component for which the settings are requested.
142
* <b>(Currently unused)</b>
143
*/
144
virtual
InterfaceProvider
*
getAutoControlSettings
(
const
AutoControlId
acId = 0) = 0;
145
146
/**
147
* Returns the source settings for the request.
148
* The returned object will have the same lifespan as this object,
149
* and expose the ISourceSettings interface.
150
*/
151
virtual
InterfaceProvider
*
getSourceSettings
() = 0;
152
153
/**
154
* Sets the client data for the request. This value is passed through to and queryable
155
* from the CaptureMetadata generated for any captures completed using this Request.
156
* Default value is 0.
157
* @param[in] data The client data.
158
*/
159
virtual
Status
setClientData
(uint32_t data) = 0;
160
161
/**
162
* Gets the client data for the request.
163
*/
164
virtual
uint32_t
getClientData
()
const
= 0;
165
166
/**
167
* Set this if need 2 simultaneous outputs i.e. YUV and RGBA
168
*/
169
virtual
Status
setPixelFormatType
(
const
PixelFormatType& pixelFormatType) = 0;
170
171
/**
172
* Check if 2 simultaneous outputs are needed
173
*/
174
virtual
PixelFormatType
getPixelFormatType
()
const
= 0;
175
176
/**
177
* Set the output port for RGBA output
178
*/
179
virtual
Status
setCVOutput
(
const
CVOutput& cvOutput) = 0;
180
181
/**
182
* Get output port for RGBA output
183
*/
184
virtual
CVOutput
getCVOutput
()
const
= 0;
185
186
/**
187
* Set this to false if o/p buffer is Bayer and ISP stage needs to be skipped
188
*/
189
virtual
Status
setEnableIspStage
(
bool
enableIspStage) = 0;
190
191
/**
192
* Check if ISP stage is enabled/disabled.
193
*/
194
virtual
bool
getEnableIspStage
()
const
= 0;
195
196
/**
197
* Set the flag to enable reprocessing mode for this request.
198
*/
199
virtual
Status
setReprocessingEnable
(
bool
enable) = 0;
200
201
/**
202
* Set the flag to enable msb padding.
203
*/
204
virtual
Status
setMsbPadding
(
bool
enableMsbPadding) = 0;
205
206
/**
207
* Check if msb padding is enabled/disabled.
208
*/
209
virtual
bool
getMsbPadding
()
const
= 0;
210
211
protected
:
212
~IRequest
() {}
213
};
214
215
}
// namespace Argus
216
217
#endif // _ARGUS_REQUEST_H
Generated on Thu Jan 16 2025 21:27:55 for Libargus API by
1.8.1