NVIDIA DRIVE 5.0 Linux SDK API Reference

5.0.10.3 Release

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
nvmedia_video.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 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 
16 #ifndef _NVMEDIA_VIDEO_H
17 #define _NVMEDIA_VIDEO_H
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
23 #include "nvmedia_core.h"
24 #include "nvmedia_surface.h"
25 
36 #define NVMEDIA_VIDEO_VERSION_MAJOR 1
37 
38 #define NVMEDIA_VIDEO_VERSION_MINOR 4
39 
58 typedef struct {
62  uint32_t width;
64  uint32_t height;
67  void *tag;
69  uint32_t colorStd;
71 
100 typedef struct {
102  uint32_t lumaWidth;
104  uint32_t lumaHeight;
106  unsigned char *pY;
108  uint32_t pitchY;
110  unsigned char *pU;
112  uint32_t pitchU;
114  unsigned char *pV;
116  uint32_t pitchV;
118  unsigned char *pY2;
120  uint32_t pitchY2;
122  unsigned char *pU2;
124  uint32_t pitchU2;
126  unsigned char *pV2;
128  uint32_t pitchV2;
130  unsigned char *pRGBA;
132  uint32_t pitchRGBA;
134 
147  NvMediaDevice *device,
148  NvMediaSurfaceType type,
149  NvMediaSurfAllocAttr *attrs,
150  uint32_t numAllocAttrs,
151  uint32_t flags
152 );
153 
158 void
160  NvMediaVideoSurface *surface
161 );
162 
176  NvMediaVideoSurface *surface,
177  NvMediaVideoSurfaceMap *surfaceMap
178 );
179 
185 void
187  NvMediaVideoSurface *surface
188 );
189 
212  NvMediaVideoSurface *videoSurface,
213  NvMediaRect *dstRect,
214  void **srcPntrs,
215  uint32_t *srcPitches
216 );
217 
240  NvMediaVideoSurface *videoSurface,
241  NvMediaRect *srcRect,
242  void **dstPntrs,
243  uint32_t *dstPitches
244 );
245 
248 /*
249  * \defgroup history_nvmedia_video History
250  * Provides change history for the NvMedia Video Surface handling
251  *
252  * \section history_nvmedia_video Version History
253  *
254  * <b> Version 1.0 </b> March 21, 2017
255  * - Initial release
256  *
257  * <b> Version 1.1 </b> May 15, 2017
258  * - Added deprecated warning message for \ref NvMediaVideoSurfaceCreateEx,
259  * \ref NvMediaVideoSurfaceSetAttributes
260  *
261  * <b> Version 1.2 </b> May 18, 2017
262  * - Added deprecated warning message for \ref NvMediaVideoSurfaceCreate
263  * - NvMediaVideoSurfaceWaitForCompletion() is deprecated
264  * - All NvMedia data types are moved to standard data types
265  *
266  * <b> Version 1.3 </b> May 18, 2017
267  * - Added colorStd member in \ref NvMediaVideoSurface
268  *
269  * <b> Version 1.4 </b> September 12, 2017
270  * - Removed NVMEDIA_SURFACE_CREATE_ATTRIBUTE_CAPTURE, NVMEDIA_SURFACE_CREATE_ATTRIBUTE_DISPLAY,
271  * NVMEDIA_SURFACE_ATTRIBUTE_INTERLACED
272  * - Deprecated \ref NvMediaVideoSurfaceCreate, \ref NvMediaVideoSurfaceCreateEx,
273  * \ref NvMediaVideoSurfaceSetAttributes
274  *
275  */
276 
280 #ifdef __cplusplus
281 }; /* extern "C" */
282 #endif
283 
284 #endif /* _NVMEDIA_VIDEO_H */
unsigned char * pY
Y surface pointer.
#define NvMediaSurfaceType
Defines the set of NvMedia surface types.
uint32_t height
Surface height.
Definition: nvmedia_video.h:64
uint32_t lumaHeight
Surface height in luma pixels.
uint32_t pitchV2
V2 surface pitch.
NvMediaVideoSurface * NvMediaVideoSurfaceCreateNew(NvMediaDevice *device, NvMediaSurfaceType type, NvMediaSurfAllocAttr *attrs, uint32_t numAllocAttrs, uint32_t flags)
Allocates a video surface object.
unsigned char * pU
U surface pointer.
unsigned char * pV
V surface pointer.
NvMediaStatus NvMediaVideoSurfaceGetBits(NvMediaVideoSurface *videoSurface, NvMediaRect *srcRect, void **dstPntrs, uint32_t *dstPitches)
Reads an NvMedia video surface and writes the content into a client memory buffer.
NVIDIA Media Interface: Surface Handling
A handle representing a video surface map.
unsigned char * pRGBA
RGBA surface pointer.
void NvMediaVideoSurfaceDestroy(NvMediaVideoSurface *surface)
Destroys a video surface object.
uint32_t pitchU2
U2 surface pitch.
uint32_t pitchU
U surface pitch.
uint32_t pitchY2
Y2 surface pitch.
unsigned char * pU2
U2 surface pointer.
NvMediaStatus NvMediaVideoSurfaceLock(NvMediaVideoSurface *surface, NvMediaVideoSurfaceMap *surfaceMap)
Locks a video surface and returns the associated mapped pointers pointing to the Y, U and V surfaces that a software video decoder can fill up.
NVIDIA Media Interface: Core
NvMediaStatus NvMediaVideoSurfacePutBits(NvMediaVideoSurface *videoSurface, NvMediaRect *dstRect, void **srcPntrs, uint32_t *srcPitches)
NvMediaVideoSurfacePutBits reads a client memory buffer and writes the content into an NvMedia video ...
NvMediaStatus
The set of all possible error codes.
Definition: nvmedia_core.h:189
unsigned char * pV2
V2 surface pointer.
int uint32_t uint32_t uint32_t const uint32_t const uint32_t const uint32_t const uint64_t uint32_t uint32_t flags
Holds a rectangular region of a surface.
Definition: nvmedia_core.h:146
uint32_t lumaWidth
Surface width in luma pixels.
void * tag
Surface tag that can be used by the application.
Definition: nvmedia_video.h:67
uint32_t pitchY
Y surface pitch.
Holds NvMedia Surface allocation attributes.
void NvMediaDevice
An opaque handle representing a NvMediaDevice object.
Definition: nvmedia_core.h:295
NvMediaSurfaceType type
Surface type.
Definition: nvmedia_video.h:60
void NvMediaVideoSurfaceUnlock(NvMediaVideoSurface *surface)
Unlocks a video surface.
uint32_t pitchRGBA
RGBA surface pitch.
unsigned char * pY2
Y2 surface pointer.
uint32_t width
Surface width.
Definition: nvmedia_video.h:62
uint32_t pitchV
V surface pitch.
A handle representing a video surface object.
Definition: nvmedia_video.h:58
uint32_t colorStd
Surface color standard type.
Definition: nvmedia_video.h:69