NVIDIA DRIVE OS Linux API Reference

5.1.0.2 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
nvmedia_eglstream.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2013-2017, NVIDIA CORPORATION. All rights reserved. All
3  * information contained herein is proprietary and confidential to NVIDIA
4  * Corporation. Any use, reproduction, or disclosure without the written
5  * permission of NVIDIA Corporation is prohibited.
6  */
7 
15 #ifndef _NVMEDIA_EGLSTREAM_H
16 #define _NVMEDIA_EGLSTREAM_H
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
22 #include "nvmedia_core.h"
23 #include "nvmedia_surface.h"
24 #include "nvmedia_video.h"
25 #include "nvmedia_image.h"
26 #include <EGL/egl.h>
27 #include <EGL/eglext.h>
28 
40 #define NVMEDIA_EGLSTREAM_VERSION_MAJOR 1
41 
42 #define NVMEDIA_EGLSTREAM_VERSION_MINOR 3
43 
48 #define NVMEDIA_EGL_STREAM_TIMEOUT_INFINITE 0xFFFFFFFF
49 
53 typedef struct NvMediaEGLStreamProducer {
57  EGLint width;
59  EGLint height;
61 
73  NvMediaVersion *version
74 );
75 
96  NvMediaDevice *device,
97  EGLDisplay eglDisplay,
98  EGLStreamKHR eglStream,
99  NvMediaSurfaceType type,
100  EGLint width,
101  EGLint height
102 );
103 
107 typedef struct {
115 
120 #define NVMEDIA_EGL_STREAM_PRODUCER_ATTRIBUTE_MULTISEND (1 << 0)
121 
144 void
146  NvMediaEGLStreamProducer *producer,
147  uint32_t attributeMask,
149 );
154 void
156  NvMediaEGLStreamProducer *producer
157 );
158 
173  NvMediaEGLStreamProducer *producer,
174  NvMediaVideoSurface *surface,
175  NvMediaTime *timeStamp
176 );
177 
215  NvMediaEGLStreamProducer *producer,
216  NvMediaVideoSurface **surface,
217  uint32_t millisecondTimeout
218 );
219 
223 typedef struct NvMediaEGLStreamConsumer {
227 
247  NvMediaDevice *device,
248  EGLDisplay dpy,
249  EGLStreamKHR stream,
250  NvMediaSurfaceType type
251 );
252 
258 void
260  NvMediaEGLStreamConsumer *consumer
261 );
262 
280  NvMediaEGLStreamConsumer *consumer,
281  NvMediaVideoSurface **surface,
282  uint32_t millisecondTimeout,
283  NvMediaTime *timeStamp
284 );
285 
300  NvMediaEGLStreamConsumer *consumer,
301  NvMediaVideoSurface* surface
302 );
303 
305 #define NvMediaVideoSurfaceStreamProducerCreate NvMediaEglStreamProducerCreate
306 
307 #define NvMediaVideoSurfaceStreamProducerDestroy NvMediaEglStreamProducerDestroy
308 
309 #define NvMediaPostSurface NvMediaEglStreamProducerPostSurface
310 
311 #define NvMediaGetSurface NvMediaEglStreamProducerGetSurface
312 
313 #define NvMediaEglConsumerCreate NvMediaEglStreamConsumerCreate
314 
315 #define NvMediaEglConsumerDestroy NvMediaEglStreamConsumerDestroy
316 
317 #define NvMediaEglConsumerSurfaceAcquire NvMediaEglStreamConsumerAcquireSurface
318 
319 #define NvMediaEglConsumerSurfaceRelease NvMediaEglStreamConsumerReleaseSurface
320 
341  NvMediaEGLStreamProducer *producer,
342  NvMediaImage *image,
343  NvMediaTime *timeStamp
344 );
345 
384  NvMediaEGLStreamProducer *producer,
385  NvMediaImage **image,
386  uint32_t millisecondTimeout
387 );
388 
407  NvMediaEGLStreamConsumer *consumer,
408  NvMediaImage **image,
409  uint32_t millisecondTimeout,
410  NvMediaTime *timeStamp
411 );
412 
428  NvMediaEGLStreamConsumer *consumer,
429  NvMediaImage* image
430 );
431 
449  NvMediaEGLStreamProducer *producer,
450  uint32_t blockIdx,
451  const void *dataBuf,
452  uint32_t offset,
453  uint32_t size
454 );
455 
474  NvMediaEGLStreamConsumer *consumer,
475  uint32_t blockIdx,
476  void *dataBuf,
477  uint32_t offset,
478  uint32_t size
479 );
480 
481 /*
482  * \defgroup history_nvmedia_eglstream History
483  * Provides change history for the NvMedia EglStream API.
484  *
485  * \section history_nvmedia_eglstream Version History
486  *
487  * <b> Version 1.0 </b> October 1, 2015
488  * - Initial release
489  *
490  * <b> Version 1.1 </b> May 11, 2016
491  * - Added \ref NvMediaEglStreamCheckVersion API
492  *
493  * <b> Version 1.2 </b> May 12, 2017
494  * - Added \ref NvMediaEglStreamGetVersion API to get the version of NvMedia EglStream library
495  * - NvMediaEglStreamCheckVersion is deprecated. Use NvMediaEglStreamGetVersion() instead
496  * - All NvMedia data types are moved to standard data types
497  */
498 
501 #ifdef __cplusplus
502 }; /* extern "C" */
503 #endif
504 
505 #endif /* _NVMEDIA_EGLSTREAM_H */
void NvMediaEglStreamProducerSetAttributes(NvMediaEGLStreamProducer *producer, uint32_t attributeMask, NvMediaEglStreamProducerAttributes *attributes)
Changes attributes of an NvMediaEGLStreamProducer.
A handle representing image objects.
Definition: nvmedia_image.h:75
#define NvMediaSurfaceType
Defines the set of NvMedia surface types.
int uint32_t width
NvMediaSurfaceType type
Input surface type.
uint32_t NvMediaBool
A boolean value, holding NVMEDIA_TRUE or NVMEDIA_FALSE.
Definition: nvmedia_core.h:79
NvMediaStatus NvMediaEglStreamGetVersion(NvMediaVersion *version)
Get the version compatibility for the NvMedia EGLStream library.
NVIDIA Media Interface: Surface Handling
A handle representing an EGL stream consumer object.
NVIDIA Media Interface: Image Processing
NvMediaStatus NvMediaEglStreamProducerGetImage(NvMediaEGLStreamProducer *producer, NvMediaImage **image, uint32_t millisecondTimeout)
Retrieves an image that was sent to an EGL stream using the NvMediaEglStreamProducerPostImage functio...
NvMediaStatus NvMediaEglStreamConsumerReleaseImage(NvMediaEGLStreamConsumer *consumer, NvMediaImage *image)
Releases an image that was received by the NvMediaEglStreamConsumerAcquireImage function.
struct timespec NvMediaTime
Holds the media time (timespec as defined by the POSIX specification).
Definition: nvmedia_core.h:84
Holds the attributes for an EGL stream producer.
Holds NvMedia Version information.
Definition: nvmedia_core.h:252
NvMediaStatus NvMediaEglStreamConsumerAcquireMetaData(NvMediaEGLStreamConsumer *consumer, uint32_t blockIdx, void *dataBuf, uint32_t offset, uint32_t size)
Acquires specified metadata block that was sent by an EGL stream producer.
NvMediaStatus NvMediaEglStreamConsumerAcquireSurface(NvMediaEGLStreamConsumer *consumer, NvMediaVideoSurface **surface, uint32_t millisecondTimeout, NvMediaTime *timeStamp)
Acquires a surface that was sent by an EGL stream producer.
NvMediaStatus NvMediaEglStreamProducerPostSurface(NvMediaEGLStreamProducer *producer, NvMediaVideoSurface *surface, NvMediaTime *timeStamp)
Posts a surface to be sent to an EGL stream connection.
NVIDIA Media Interface: Core
NvMediaStatus
The set of all possible error codes.
Definition: nvmedia_core.h:199
NvMediaEGLStreamProducer * NvMediaEglStreamProducerCreate(NvMediaDevice *device, EGLDisplay eglDisplay, EGLStreamKHR eglStream, NvMediaSurfaceType type, EGLint width, EGLint height)
Creates an EGL stream producer object.
NvMediaSurfaceType type
Input surface type.
struct NvMediaEGLStreamProducer NvMediaEGLStreamProducer
A handle representing an EGL stream producer object.
int uint32_t uint32_t height
EGLint height
Input surface height.
NvMediaEGLStreamConsumer * NvMediaEglStreamConsumerCreate(NvMediaDevice *device, EGLDisplay dpy, EGLStreamKHR stream, NvMediaSurfaceType type)
Creates an EGL stream consumer object.
NvMediaStatus NvMediaEglStreamConsumerReleaseSurface(NvMediaEGLStreamConsumer *consumer, NvMediaVideoSurface *surface)
Releases a surface that was received by the NvMediaEglStreamConsumerAcquireSurface function...
EGLint width
Input surface width.
A handle representing an EGL stream producer object.
NVIDIA Media Interface: Video Surface Processing
void NvMediaDevice
An opaque handle representing a NvMediaDevice object.
Definition: nvmedia_core.h:305
NvMediaStatus NvMediaEglStreamConsumerAcquireImage(NvMediaEGLStreamConsumer *consumer, NvMediaImage **image, uint32_t millisecondTimeout, NvMediaTime *timeStamp)
Acquire an image that was sent by an EGL stream producer.
void NvMediaEglStreamConsumerDestroy(NvMediaEGLStreamConsumer *consumer)
Destroys an EGL stream consumer object.
NvMediaStatus NvMediaEglStreamProducerGetSurface(NvMediaEGLStreamProducer *producer, NvMediaVideoSurface **surface, uint32_t millisecondTimeout)
Retrieves a surface that was sent to an EGL stream using the NvMediaEglStreamProducerPostSurface func...
struct NvMediaEGLStreamConsumer NvMediaEGLStreamConsumer
A handle representing an EGL stream consumer object.
void NvMediaEglStreamProducerDestroy(NvMediaEGLStreamProducer *producer)
Destroys an EGL stream producer object.
NvMediaBool multiSend
Specifies whether multiple producers send the same image.
NvMediaStatus NvMediaEglStreamProducerPostMetaData(NvMediaEGLStreamProducer *producer, uint32_t blockIdx, const void *dataBuf, uint32_t offset, uint32_t size)
Posts a block of metadata to be sent to an EGL stream connection.
NvMediaStatus NvMediaEglStreamProducerPostImage(NvMediaEGLStreamProducer *producer, NvMediaImage *image, NvMediaTime *timeStamp)
Posts an image to be sent to an EGL stream connection.
A handle representing a video surface object.
Definition: nvmedia_video.h:58