NVIDIA DRIVE OS Linux SDK API Reference

5.2.0 Release
For Test and Development only
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,
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,
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 */
NvMediaTime
struct timespec NvMediaTime
Holds the media time in timespec format as defined by the POSIX specification.
Definition: nvmedia_core.h:85
nvmedia_video.h
NVIDIA Media Interface: Video Surface Processing
nvmedia_surface.h
NVIDIA Media Interface: Surface Handling
NvMediaEglStreamGetVersion
NvMediaStatus NvMediaEglStreamGetVersion(NvMediaVersion *version)
Get the version compatibility for the NvMedia EGLStream library.
NvMediaEglStreamProducerSetAttributes
void NvMediaEglStreamProducerSetAttributes(NvMediaEGLStreamProducer *producer, uint32_t attributeMask, NvMediaEglStreamProducerAttributes *attributes)
Changes attributes of an NvMediaEGLStreamProducer.
NvMediaEglStreamProducerGetImage
NvMediaStatus NvMediaEglStreamProducerGetImage(NvMediaEGLStreamProducer *producer, NvMediaImage **image, uint32_t millisecondTimeout)
Retrieves an image that was sent to an EGL stream using the NvMediaEglStreamProducerPostImage functio...
NvMediaEGLStreamProducer::width
EGLint width
Input surface width.
Definition: nvmedia_eglstream.h:57
NvMediaEGLStreamConsumer
A handle representing an EGL stream consumer object.
Definition: nvmedia_eglstream.h:223
NvMediaDevice
struct NvMediaDevice NvMediaDevice
An opaque handle representing an NvMediaDevice object.
Definition: nvmedia_core.h:348
NvMediaEglStreamConsumerReleaseImage
NvMediaStatus NvMediaEglStreamConsumerReleaseImage(NvMediaEGLStreamConsumer *consumer, NvMediaImage *image)
Releases an image that was received by the NvMediaEglStreamConsumerAcquireImage function.
NvMediaEGLStreamProducer::type
NvMediaSurfaceType type
Input surface type.
Definition: nvmedia_eglstream.h:55
NvMediaEglStreamProducerAttributes
Holds the attributes for an EGL stream producer.
Definition: nvmedia_eglstream.h:107
NvMediaVersion
Holds NvMedia version information.
Definition: nvmedia_core.h:237
NvMediaEglStreamConsumerAcquireMetaData
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.
NvMediaEglStreamConsumerAcquireSurface
NvMediaStatus NvMediaEglStreamConsumerAcquireSurface(NvMediaEGLStreamConsumer *consumer, NvMediaVideoSurface **surface, uint32_t millisecondTimeout, NvMediaTime *timeStamp)
Acquires a surface that was sent by an EGL stream producer.
type
int const char int type
Definition: drm-nvdc-docs.h:1479
NvMediaImageRec
Holds a handle representing image objects.
Definition: nvmedia_image.h:71
NvMediaEglStreamProducerPostSurface
NvMediaStatus NvMediaEglStreamProducerPostSurface(NvMediaEGLStreamProducer *producer, NvMediaVideoSurface *surface, NvMediaTime *timeStamp)
Posts a surface to be sent to an EGL stream connection.
NvMediaEGLStreamProducer::height
EGLint height
Input surface height.
Definition: nvmedia_eglstream.h:59
NvMediaEGLStreamConsumer::type
NvMediaSurfaceType type
Input surface type.
Definition: nvmedia_eglstream.h:225
NvMediaEglStreamProducerCreate
NvMediaEGLStreamProducer * NvMediaEglStreamProducerCreate(NvMediaDevice *device, EGLDisplay eglDisplay, EGLStreamKHR eglStream, NvMediaSurfaceType type, EGLint width, EGLint height)
Creates an EGL stream producer object.
NvMediaVideoSurface
A handle representing a video surface object.
Definition: nvmedia_video.h:58
NvMediaEglStreamConsumerReleaseSurface
NvMediaStatus NvMediaEglStreamConsumerReleaseSurface(NvMediaEGLStreamConsumer *consumer, NvMediaVideoSurface *surface)
Releases a surface that was received by the NvMediaEglStreamConsumerAcquireSurface function.
nvmedia_core.h
NVIDIA Media Interface: Core
NvMediaSurfaceType
#define NvMediaSurfaceType
Defines the set of NvMedia surface types.
Definition: nvmedia_surface.h:550
NvMediaEglStreamConsumerCreate
NvMediaEGLStreamConsumer * NvMediaEglStreamConsumerCreate(NvMediaDevice *device, EGLDisplay dpy, EGLStreamKHR stream, NvMediaSurfaceType type)
Creates an EGL stream consumer object.
NvMediaStatus
NvMediaStatus
Defines all possible error codes.
Definition: nvmedia_core.h:180
NvMediaEGLStreamProducer
A handle representing an EGL stream producer object.
Definition: nvmedia_eglstream.h:53
NvMediaEglStreamConsumerDestroy
void NvMediaEglStreamConsumerDestroy(NvMediaEGLStreamConsumer *consumer)
Destroys an EGL stream consumer object.
NvMediaEglStreamConsumerAcquireImage
NvMediaStatus NvMediaEglStreamConsumerAcquireImage(NvMediaEGLStreamConsumer *consumer, NvMediaImage **image, uint32_t millisecondTimeout, NvMediaTime *timeStamp)
Acquire an image that was sent by an EGL stream producer.
NvMediaEglStreamProducerDestroy
void NvMediaEglStreamProducerDestroy(NvMediaEGLStreamProducer *producer)
Destroys an EGL stream producer object.
NvMediaEglStreamProducerGetSurface
NvMediaStatus NvMediaEglStreamProducerGetSurface(NvMediaEGLStreamProducer *producer, NvMediaVideoSurface **surface, uint32_t millisecondTimeout)
Retrieves a surface that was sent to an EGL stream using the NvMediaEglStreamProducerPostSurface func...
NvMediaEglStreamProducerPostMetaData
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.
NvMediaBool
uint32_t NvMediaBool
A boolean value, holding NVMEDIA_TRUE or NVMEDIA_FALSE.
Definition: nvmedia_core.h:80
NvMediaEglStreamProducerPostImage
NvMediaStatus NvMediaEglStreamProducerPostImage(NvMediaEGLStreamProducer *producer, NvMediaImage *image, NvMediaTime *timeStamp)
Posts an image to be sent to an EGL stream connection.
NvMediaEGLStreamProducer
struct NvMediaEGLStreamProducer NvMediaEGLStreamProducer
A handle representing an EGL stream producer object.
nvmedia_image.h
NVIDIA Media Interface: Image Processing
NvMediaEGLStreamConsumer
struct NvMediaEGLStreamConsumer NvMediaEGLStreamConsumer
A handle representing an EGL stream consumer object.
NvMediaEglStreamProducerAttributes::multiSend
NvMediaBool multiSend
Specifies whether multiple producers send the same image.
Definition: nvmedia_eglstream.h:113