NVIDIA DRIVE OS Linux SDK API Reference

5.1.12.0 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
nvmedia_iep.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014-2019, 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_IEP_H
16 #define NVMEDIA_IEP_H
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
22 #include "nvmedia_common_encode.h"
23 #include "nvmedia_core.h"
24 #include "nvmedia_image.h"
25 #include "nvmedia_surface.h"
26 
38 #define NVMEDIA_IEP_VERSION_MAJOR 2
39 
40 #define NVMEDIA_IEP_VERSION_MINOR 10
41 
45 typedef enum {
52 
56 typedef struct NvMediaIEPRec {
64  struct NvMediaIEPPriv_ *encPriv;
65 } NvMediaIEP;
66 
78  NvMediaVersion *version
79 );
80 
120 NvMediaIEP *
122  const NvMediaDevice *device,
123  NvMediaIEPType encodeType,
124  const void *initParams,
125  NvMediaSurfaceType inputFormat,
126  uint8_t maxInputBuffering,
127  uint8_t maxOutputBuffering,
128  NvMediaEncoderInstanceId instanceId
129 );
130 
135 void NvMediaIEPDestroy(const NvMediaIEP *encoder);
136 
168  const NvMediaIEP *encoder,
169  NvMediaImage *frame,
170  const NvMediaRect *sourceRect,
171  const void *picParams,
172  NvMediaEncoderInstanceId instanceId
173 );
174 
191  const NvMediaIEP *encoder,
192  const void *configuration
193 );
194 
223  const NvMediaIEP *encoder,
224  uint32_t *numBytes,
225  uint32_t numBitstreamBuffers,
226  NvMediaBitstreamBuffer *bitstreams,
227  void *extradata
228 );
229 
266  const NvMediaIEP *encoder,
267  uint32_t *numBytesAvailable,
268  NvMediaBlockingType blockingType,
269  uint32_t millisecondTimeout
270 );
271 
272 
293  const NvMediaIEP *encoder,
294  NvMediaEncAttrType attrType,
295  uint32_t attrSize,
296  void *AttributeData
297 );
298 
331  const NvMediaIEP *encoder,
332  const NvMediaImage *image,
333  NvMediaAccessMode accessMode
334 );
335 
362  const NvMediaIEP *encoder,
363  const NvMediaImage *image
364 );
365 
366 /*
367  * \defgroup history_nvmedia_iep History
368  * Provides change history for the NvMedia IEP API.
369  *
370  * \section history_nvmedia_iep Version History
371  *
372  * <b> Version 1.0 </b> March 14, 2016
373  * - Initial release
374  *
375  * <b> Version 1.1 </b> May 11, 2016
376  * - Added \ref NvMediaICPCheckVersion API
377  *
378  * <b> Version 1.2 </b> May 5, 2017
379  * - Added \ref NvMediaIEPGetBitsEx and \ref NvMediaIEPSetInputExtraData API
380  * - Added \ref NvMediaIEPGetAttribute
381  *
382  * <b> Version 2.0 </b> May 9, 2017
383  * - Added instance ID parameter to NvMediaIEPCreate() and NvMediaIEPFeedFrame()
384  * - optionalDevice parameter is removed from NvMediaIEPCreate()
385  * - NvMediaIEPGetVersion() is added to get the version of NvMedia Image Encoder library
386  * - NvMediaIEPGetBits() is deprecated. Use NvMediaIEPGetBitsEx() instead.
387  * - All NvMedia data types are moved to standard data types
388  *
389  * <b> Version 2.1 </b> June 30, 2017
390  * - Removed \ref NvMediaIEPSetInputExtraData API
391  *
392  * <b> Version 2.2 </b> Sept 1, 2017
393  * - Added NVMEDIA_IMAGE_ENCODE_VP8 in \ref NvMediaIEPType enum
394  *
395  * <b> Version 2.3 </b> Dec 14, 2018
396  * - Fix MISRA violations 21.1 and 21.2
397  *
398  * <b> Version 2.4 </b> January 15, 2019
399  * - Fix MISRA violations 8.13
400  *
401  * <b> Version 2.5 </b> Feb 7, 2019
402  * - Added opaque handle for encoder
403  * internal usage into Image encoder object
404  * - Fix MISRA violations 11.3
405  * - Fix MISRA violations 8.13
406  *
407  * <b> Version 2.6 </b> Feb 28, 2019
408  * - Added required header includes nvmedia_core.h and nvmedia_surface.h
409  *
410  * <b> Version 2.7 </b> July 10, 2019
411  * - Header include nvmedia_common.h is replaced with nvmedia_common_encode.h
412  *
413  * <b> Version 2.8 </b> July 13, 2019
414  * - Corrected parameter description for \ref NvMediaIEPCreate and
415  * \ref NvMediaIEPFeedFrame.
416  *
417  * <b> Version 2.9 </b> July 15, 2019
418  * - Fix MISRA violations 8.13
419  *
420  * <b> Version 2.9 </b> Jul 16, 2019
421  * - Added \ref NvMediaIEPImageRegister API
422  * - Added \ref NvMediaIEPImageUnRegister API
423  */
424 
427 #ifdef __cplusplus
428 }; /* extern "C" */
429 #endif
430 
431 #endif /* NVMEDIA_IEP_H */
NvMediaStatus NvMediaIEPSetConfiguration(const NvMediaIEP *encoder, const void *configuration)
Sets the encoder configuration.
Holds a handle representing image objects.
Definition: nvmedia_image.h:69
#define NvMediaSurfaceType
Defines the set of NvMedia surface types.
Holds an application data buffer containing compressed video data.
struct NvMediaIEPPriv_ * encPriv
An Opaque pointer for internal use.
Definition: nvmedia_iep.h:64
NvMediaStatus NvMediaIEPBitsAvailable(const NvMediaIEP *encoder, uint32_t *numBytesAvailable, NvMediaBlockingType blockingType, uint32_t millisecondTimeout)
Returns the encode status and number of bytes available for the next frame (if any).
NvMediaIEPType
Image encode type.
Definition: nvmedia_iep.h:45
NvMediaStatus NvMediaIEPGetVersion(NvMediaVersion *version)
Checks the version compatibility for the NvMedia IEP library.
NVIDIA Media Interface: Surface Handling
NVIDIA Media Interface: Image Processing
NvMediaIEPType encodeType
Codec type.
Definition: nvmedia_iep.h:58
NvMediaAccessMode
Definition: nvmedia_core.h:288
Holds NvMedia version information.
Definition: nvmedia_core.h:226
struct NvMediaDevice NvMediaDevice
An opaque handle representing an NvMediaDevice object.
Definition: nvmedia_core.h:337
NvMediaSurfaceType inputFormat
Input Image surface type.
Definition: nvmedia_iep.h:60
NvMediaEncoderInstanceId
Specifies the encoder instance ID.
NVIDIA Media Interface: Core
NvMediaStatus
Defines all possible error codes.
Definition: nvmedia_core.h:169
NvMediaStatus NvMediaIEPImageRegister(const NvMediaIEP *encoder, const NvMediaImage *image, NvMediaAccessMode accessMode)
Registers NvMediaImage for use with a NvMediaIEP handle.
struct NvMediaIEPRec NvMediaIEP
Holds the image encoder object created by NvMediaIEPCreate.
NvMediaStatus NvMediaIEPImageUnRegister(const NvMediaIEP *encoder, const NvMediaImage *image)
This API is not functional.
Holds a rectangular region of a surface.
Definition: nvmedia_core.h:133
NvMediaEncAttrType
Specifies the Video encoder get attribute type.
NvMediaStatus NvMediaIEPGetAttribute(const NvMediaIEP *encoder, NvMediaEncAttrType attrType, uint32_t attrSize, void *AttributeData)
Gets the encoder attribute for the current encoding session.
Holds the image encoder object created by NvMediaIEPCreate.
Definition: nvmedia_iep.h:56
NvMediaEncoderInstanceId instanceId
Instance ID.
Definition: nvmedia_iep.h:62
NvMediaStatus NvMediaIEPGetBitsEx(const NvMediaIEP *encoder, uint32_t *numBytes, uint32_t numBitstreamBuffers, NvMediaBitstreamBuffer *bitstreams, void *extradata)
Returns the bitstream for a slice or frame.
NVIDIA Media Interface: Common Types for Video/Image Encode
NvMediaBlockingType
Blocking type.
void NvMediaIEPDestroy(const NvMediaIEP *encoder)
Destroys an NvMedia image encoder.
NvMediaIEP * NvMediaIEPCreate(const NvMediaDevice *device, NvMediaIEPType encodeType, const 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...
NvMediaStatus NvMediaIEPFeedFrame(const NvMediaIEP *encoder, NvMediaImage *frame, const NvMediaRect *sourceRect, const void *picParams, NvMediaEncoderInstanceId instanceId)
Encodes the specified frame.