Jetson Linux API Reference

32.7.3 Release
EGLStream.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 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 
36 #ifndef _ARGUS_EGL_STREAM_H
37 #define _ARGUS_EGL_STREAM_H
38 
39 namespace Argus
40 {
41 
62 DEFINE_UUID(StreamType, STREAM_TYPE_EGL, 3a659360,5231,11e7,9598,18,00,20,0c,9a,66);
63 
67 DEFINE_NAMED_UUID_CLASS(EGLStreamMode);
68 DEFINE_UUID(EGLStreamMode, EGL_STREAM_MODE_MAILBOX, 33661d40,3ee2,11e6,bdf4,08,00,20,0c,9a,66);
69 DEFINE_UUID(EGLStreamMode, EGL_STREAM_MODE_FIFO, 33661d41,3ee2,11e6,bdf4,08,00,20,0c,9a,66);
70 
78 DEFINE_UUID(InterfaceID, IID_EGL_OUTPUT_STREAM_SETTINGS, 3a659361,5231,11e7,9598,18,00,20,0c,9a,66);
80 {
81 public:
82  static const InterfaceID& id() { return IID_EGL_OUTPUT_STREAM_SETTINGS; }
83 
88  virtual Status setPixelFormat(const PixelFormat& format) = 0;
89  virtual PixelFormat getPixelFormat() const = 0;
90 
95  virtual Status setResolution(const Size2D<uint32_t>& resolution) = 0;
96  virtual Size2D<uint32_t> getResolution() const = 0;
97 
109  virtual Status setExposureCount(uint32_t exposureCount) = 0;
110  virtual uint32_t getExposureCount() const = 0;
111 
116  virtual Status setEGLDisplay(EGLDisplay eglDisplay) = 0;
117  virtual EGLDisplay getEGLDisplay() const = 0;
118 
157  virtual Status setMode(const EGLStreamMode& mode) = 0;
158  virtual EGLStreamMode getMode() const = 0;
159 
165  virtual Status setFifoLength(uint32_t fifoLength) = 0;
166  virtual uint32_t getFifoLength() const = 0;
167 
177  virtual Status setMetadataEnable(bool metadataEnable) = 0;
178  virtual bool getMetadataEnable() const = 0;
179 
187  virtual bool supportsOutputStreamFormat(const SensorMode* sensorMode,
188  const PixelFormat& outputFormat) const = 0;
189 
190 protected:
192 };
193 
201 DEFINE_UUID(InterfaceID, IID_EGL_OUTPUT_STREAM, 3a659362,5231,11e7,9598,18,00,20,0c,9a,66);
203 {
204 public:
205  static const InterfaceID& id() { return IID_EGL_OUTPUT_STREAM; }
206 
214  virtual Status waitUntilConnected(uint64_t timeout = TIMEOUT_INFINITE) const = 0;
215 
219  virtual void disconnect() = 0;
220 
224  virtual PixelFormat getPixelFormat() const = 0;
225 
229  virtual Size2D<uint32_t> getResolution() const = 0;
230 
234  virtual EGLDisplay getEGLDisplay() const = 0;
235 
239  virtual EGLStreamKHR getEGLStream() const = 0;
240 
241 protected:
243 };
244 
245 } // namespace Argus
246 
247 #endif // _ARGUS_EGL_STREAM_H
Argus::IEGLOutputStream::getResolution
virtual Size2D< uint32_t > getResolution() const =0
Returns the image resolution of the stream, in pixels.
Argus::IEGLOutputStreamSettings::setMetadataEnable
virtual Status setMetadataEnable(bool metadataEnable)=0
Enables or disables embedding Argus CaptureMetadata within frames written to the EGLStream.
Argus::IEGLOutputStreamSettings::getFifoLength
virtual uint32_t getFifoLength() const =0
Argus::DEFINE_NAMED_UUID_CLASS
DEFINE_NAMED_UUID_CLASS(BufferType)
Argus::TIMEOUT_INFINITE
const uint64_t TIMEOUT_INFINITE
Constant used for infinite timeouts.
Definition: Types.h:88
Argus::IEGLOutputStream::~IEGLOutputStream
~IEGLOutputStream()
Definition: EGLStream.h:242
Argus::DEFINE_UUID
DEFINE_UUID(ExtensionName, EXT_BAYER_AVERAGE_MAP, 12c3de20, 64c5, 11e6, bdf4, 08, 00, 20, 0c, 9a, 66)
Argus::IEGLOutputStreamSettings::id
static const InterfaceID & id()
Definition: EGLStream.h:82
Argus::IEGLOutputStreamSettings::setEGLDisplay
virtual Status setEGLDisplay(EGLDisplay eglDisplay)=0
Set the EGLDisplay the created stream must belong to.
Argus
Definition: BayerAverageMap.h:39
Argus::IEGLOutputStreamSettings::setFifoLength
virtual Status setFifoLength(uint32_t fifoLength)=0
Sets the FIFO queue length of the stream.
Argus::Size2D< uint32_t >
Argus::IEGLOutputStreamSettings::getMetadataEnable
virtual bool getMetadataEnable() const =0
Argus::IEGLOutputStreamSettings::getPixelFormat
virtual PixelFormat getPixelFormat() const =0
Argus::Interface
The top-level interface class.
Definition: Types.h:327
Argus::IEGLOutputStreamSettings::getMode
virtual EGLStreamMode getMode() const =0
Argus::IEGLOutputStreamSettings
Definition: EGLStream.h:79
Argus::IEGLOutputStreamSettings::setResolution
virtual Status setResolution(const Size2D< uint32_t > &resolution)=0
Set the resolution of the stream.
Argus::IEGLOutputStream::getPixelFormat
virtual PixelFormat getPixelFormat() const =0
Returns the format of the stream.
Argus::InterfaceID
A unique identifier for a libargus Interface.
Definition: Types.h:337
Argus::IEGLOutputStreamSettings::supportsOutputStreamFormat
virtual bool supportsOutputStreamFormat(const SensorMode *sensorMode, const PixelFormat &outputFormat) const =0
Argus::IEGLOutputStreamSettings::getEGLDisplay
virtual EGLDisplay getEGLDisplay() const =0
Argus::IEGLOutputStreamSettings::setExposureCount
virtual Status setExposureCount(uint32_t exposureCount)=0
Set the number of exposures per stream frame.
Argus::IEGLOutputStream::disconnect
virtual void disconnect()=0
Disconnects the stream from the underlying EGLStream.
Argus::IEGLOutputStreamSettings::getResolution
virtual Size2D< uint32_t > getResolution() const =0
Argus::IEGLOutputStreamSettings::getExposureCount
virtual uint32_t getExposureCount() const =0
Argus::IEGLOutputStreamSettings::setPixelFormat
virtual Status setPixelFormat(const PixelFormat &format)=0
Set the format of the stream.
Argus::IEGLOutputStream::id
static const InterfaceID & id()
Definition: EGLStream.h:205
Argus::IEGLOutputStreamSettings::setMode
virtual Status setMode(const EGLStreamMode &mode)=0
Sets the mode of the OutputStream.
Argus::IEGLOutputStream::getEGLDisplay
virtual EGLDisplay getEGLDisplay() const =0
Returns the EGLDisplay the stream's EGLStream belongs to.
Argus::IEGLOutputStream
Definition: EGLStream.h:202
Argus::IEGLOutputStream::getEGLStream
virtual EGLStreamKHR getEGLStream() const =0
Returns the EGLStream backing the stream.
Argus::IEGLOutputStream::waitUntilConnected
virtual Status waitUntilConnected(uint64_t timeout=TIMEOUT_INFINITE) const =0
Waits until both the producer and consumer endpoints of the stream are connected.
Argus::Status
Status
Status values returned by API function calls.
Definition: Types.h:93
Argus::IEGLOutputStreamSettings::~IEGLOutputStreamSettings
~IEGLOutputStreamSettings()
Definition: EGLStream.h:191
Argus::SensorMode
Definition: CameraDevice.h:209