NVIDIA DRIVE OS Linux API Reference

5.1.3.0 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
nvmedia_vep.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017-2018, 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_VEP_H
16 #define NVMEDIA_VEP_H
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
22 #include "nvmedia_common.h"
23 #include "nvmedia_video.h"
24 
35 #define NVMEDIA_VEP_VERSION_MAJOR 2
36 
37 #define NVMEDIA_VEP_VERSION_MINOR 2
38 
43 typedef enum {
50 
55 typedef struct {
63 
64 
75  NvMediaVersion *version
76 );
77 
119  NvMediaDevice *device,
121  void *initParams,
122  NvMediaSurfaceType inputFormat,
123  uint8_t maxInputBuffering,
124  uint8_t maxOutputBuffering,
125  NvMediaEncoderInstanceId instanceId
126 );
127 
133 
166  NvMediaVideoEncoder *encoder,
167  NvMediaVideoSurface *frame,
168  NvMediaRect *sourceRect,
169  void *picParams,
170  NvMediaEncoderInstanceId instanceId
171 );
172 
186  NvMediaVideoEncoder *encoder,
187  void *configuration
188 );
189 
212  NvMediaVideoEncoder *encoder,
213  uint32_t *numBytes,
214  void *buffer
215 );
216 
257  NvMediaVideoEncoder *encoder,
258  uint32_t *numBytesAvailable,
259  NvMediaBlockingType blockingType,
260  uint32_t millisecondTimeout
261 );
262 
265 /*
266  * \defgroup history_nvmedia_vep History
267  * Provides change history for the NvMedia Video Encode API.
268  *
269  * \section history_nvmedia_vcp Version History
270  *
271  * <b> Version 1.0 </b> March 21, 2017
272  * - Initial release
273  *
274  * <b> Version 1.1 </b/> April 18, 2017
275  * - Added \ref NvMediaVideoEncodeType
276  * - Added \ref NvMediaVideoEncoderGetVersion
277  * - Added instance ID parameter to \ref NvMediaVideoEncoderCreate()
278  * - Added instance ID parameter to \ref NvMediaVideoEncoderFeedFrame()
279  * - Added instanceId to \ref NvMediaVideoEncoder object
280  * - Changed \ref NvMediaVideoEncoderCreate codec parameter to
281  * \ref NvMediaVideoEncodeType
282  * - Changed to use standard data type
283  *
284  * <b> Version 2.0 </b> May 9, 2017
285  * - Removed optionalDevice param from NvMediaVideoEncoderCreate()
286  *
287  * <b> Version 2.1 </b> Sept 1, 2017
288  * - Added NVMEDIA_VIDEO_ENCODE_CODEC_VP8 in \ref NvMediaVideoEncodeType enum
289  *
290  * <b> Version 2.2 </b> Dec 14, 2018
291  * - Fix MISRA violationis 21.1 and 21.2
292  */
293 
294 #ifdef __cplusplus
295 }; /* extern "C" */
296 #endif
297 
298 #endif /* NVMEDIA_VEP_H */
#define NvMediaSurfaceType
Defines the set of NvMedia surface types.
void NvMediaVideoEncoderDestroy(NvMediaVideoEncoder *encoder)
Destroys an NvMediaEncoder object.
NvMediaEncoderInstanceId
Specifies the encoder instance ID.
NvMediaEncoderInstanceId instanceId
Instance ID.
Definition: nvmedia_vep.h:61
Video encoder object created by NvMediaVideoEncoderCreate.
Definition: nvmedia_vep.h:55
Holds NvMedia Version information.
Definition: nvmedia_core.h:252
NVIDIA Media Interface: Common Types for Video/Image Encode/Decode
NvMediaSurfaceType inputFormat
Input surface format.
Definition: nvmedia_vep.h:59
NvMediaStatus NvMediaVideoEncoderBitsAvailable(NvMediaVideoEncoder *encoder, uint32_t *numBytesAvailable, NvMediaBlockingType blockingType, uint32_t millisecondTimeout)
Returns the encode status and number of bytes available for the next frame (if any).
NvMediaStatus
The set of all possible error codes.
Definition: nvmedia_core.h:199
NvMediaVideoEncodeType
Video encoder codec type.
Definition: nvmedia_vep.h:43
Holds a rectangular region of a surface.
Definition: nvmedia_core.h:146
NvMediaStatus NvMediaVideoEncoderGetBits(NvMediaVideoEncoder *encoder, uint32_t *numBytes, void *buffer)
NvMediaVideoEncoderGetBits returns a frame's worth of bitstream into the provided "buffer"...
NVIDIA Media Interface: Video Surface Processing
void NvMediaDevice
An opaque handle representing a NvMediaDevice object.
Definition: nvmedia_core.h:305
NvMediaVideoEncodeType codec
Codec type.
Definition: nvmedia_vep.h:57
NvMediaBlockingType
Blocking type.
NvMediaStatus NvMediaVideoEncoderGetVersion(NvMediaVersion *version)
Gets the version information for the NvMedia Video Encoder library.
NvMediaStatus NvMediaVideoEncoderSetConfiguration(NvMediaVideoEncoder *encoder, void *configuration)
Sets the encoder configuration.
NvMediaVideoEncoder * NvMediaVideoEncoderCreate(NvMediaDevice *device, NvMediaVideoEncodeType codec, void *initParams, NvMediaSurfaceType inputFormat, uint8_t maxInputBuffering, uint8_t maxOutputBuffering, NvMediaEncoderInstanceId instanceId)
Creates an encoder object capable of turning a stream of surfaces of the "inputFormat" into a bitstre...
A handle representing a video surface object.
Definition: nvmedia_video.h:58
NvMediaStatus NvMediaVideoEncoderFeedFrame(NvMediaVideoEncoder *encoder, NvMediaVideoSurface *frame, NvMediaRect *sourceRect, void *picParams, NvMediaEncoderInstanceId instanceId)
Encodes the specified "frame".