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
* Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
3
*
4
* Redistribution and use in source and binary forms, with or without
5
* modification, are permitted provided that the following conditions
6
* are met:
7
* * Redistributions of source code must retain the above copyright
8
* notice, this list of conditions and the following disclaimer.
9
* * Redistributions in binary form must reproduce the above copyright
10
* notice, this list of conditions and the following disclaimer in the
11
* documentation and/or other materials provided with the distribution.
12
* * Neither the name of NVIDIA CORPORATION nor the names of its
13
* contributors may be used to endorse or promote products derived
14
* from this software without specific prior written permission.
15
*
16
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
17
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
20
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
21
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
22
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
23
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
24
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
*/
28
29
/**
30
* @file
31
* <b>Libargus API: Request API</b>
32
*
33
* @b Description: Defines the Request object and core IRequest interface.
34
*/
35
36
#ifndef _ARGUS_REQUEST_H
37
#define _ARGUS_REQUEST_H
38
39
namespace
Argus
40
{
41
42
/**
43
* Container for all settings used by a single capture request.
44
*
45
* @defgroup ArgusRequest Request
46
* @ingroup ArgusObjects
47
*/
48
class
Request
:
public
InterfaceProvider
,
public
Destructable
49
{
50
protected
:
51
~Request
() {}
52
};
53
54
/**
55
* @class IRequest
56
*
57
* Interface to the core Request settings.
58
*
59
* @ingroup ArgusRequest
60
*
61
* @defgroup ArgusAutoControlSettings AutoControlSettings
62
* Child auto control settings, returned by IRequest::getAutoControlSettings
63
* @ingroup ArgusRequest
64
*
65
* @defgroup ArgusStreamSettings StreamSettings
66
* Child per-stream settings, returned by IRequest::getStreamSettings
67
* @ingroup ArgusRequest
68
*
69
* @defgroup ArgusSourceSettings SourceSettings
70
* Child source settings, returned by IRequest::getSourceSettings
71
* @ingroup ArgusRequest
72
*/
73
DEFINE_UUID
(InterfaceID, IID_REQUEST, eb9b3750,fc8d,455f,8e0f,91,b3,3b,d9,4e,c5);
74
class
IRequest
:
public
Interface
75
{
76
public
:
77
static
const
InterfaceID
&
id
() {
return
IID_REQUEST; }
78
79
/**
80
* Enables the specified output stream.
81
* Captures made with this Request will produce output on that stream.
82
*/
83
virtual
Status
enableOutputStream
(
OutputStream
* stream) = 0;
84
85
/**
86
* Disables the specified output stream.
87
*/
88
virtual
Status
disableOutputStream
(
OutputStream
* stream) = 0;
89
90
/**
91
* Disables all output streams.
92
*/
93
virtual
Status
clearOutputStreams
() = 0;
94
95
/**
96
* Returns all enabled output streams.
97
* @param[out] streams A vector that will be populated with the enabled streams.
98
*
99
* @returns success/status of the call.
100
*/
101
virtual
Status
getOutputStreams
(std::vector<OutputStream*>* streams)
const
= 0;
102
103
/**
104
* Returns the Stream settings for a particular stream in the request.
105
* The returned object will have the same lifespan as this object,
106
* and expose the IStreamSettings interface.
107
* @param[in] stream The stream for which the settings are requested.
108
*/
109
virtual
InterfaceProvider
*
getStreamSettings
(
const
OutputStream
* stream) = 0;
110
111
/**
112
* Returns the capture control settings for a given AC.
113
* The returned object will have the same lifespan as this object,
114
* and expose the IAutoControlSettings interface.
115
* @param[in] acId The id of the AC component for which the settings are requested.
116
* <b>(Currently unused)</b>
117
*/
118
virtual
InterfaceProvider
*
getAutoControlSettings
(
const
AutoControlId
acId = 0) = 0;
119
120
/**
121
* Returns the source settings for the request.
122
* The returned object will have the same lifespan as this object,
123
* and expose the ISourceSettings interface.
124
*/
125
virtual
InterfaceProvider
*
getSourceSettings
() = 0;
126
127
/**
128
* Sets the client data for the request. This value is passed through to and queryable
129
* from the CaptureMetadata generated for any captures completed using this Request.
130
* Default value is 0.
131
* @param[in] data The client data.
132
*/
133
virtual
Status
setClientData
(uint32_t data) = 0;
134
135
/**
136
* Gets the client data for the request.
137
*/
138
virtual
uint32_t
getClientData
()
const
= 0;
139
140
protected
:
141
~IRequest
() {}
142
};
143
144
}
// namespace Argus
145
146
#endif // _ARGUS_REQUEST_H
Generated on Mon Aug 7 2017 10:33:31 for Libargus API by
1.8.1