NVIDIA DRIVE OS Linux SDK API Reference

5.1.6.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.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 6
41 
45 typedef enum {
52 
56 typedef struct {
64  struct NvMediaIEPPriv_ *encPriv;
65 } NvMediaIEP;
66 
78  NvMediaVersion *version
79 );
80 
127 NvMediaIEP *
129  const NvMediaDevice *device,
130  NvMediaIEPType encodeType,
131  void *initParams,
132  NvMediaSurfaceType inputFormat,
133  uint8_t maxInputBuffering,
134  uint8_t maxOutputBuffering,
135  NvMediaEncoderInstanceId instanceId
136 );
137 
142 void NvMediaIEPDestroy(const NvMediaIEP *encoder);
143 
180  const NvMediaIEP *encoder,
181  NvMediaImage *frame,
182  const NvMediaRect *sourceRect,
183  void *picParams,
184  NvMediaEncoderInstanceId instanceId
185 );
186 
203  const NvMediaIEP *encoder,
204  void *configuration
205 );
206 
235  const NvMediaIEP *encoder,
236  uint32_t *numBytes,
237  uint32_t numBitstreamBuffers,
238  NvMediaBitstreamBuffer *bitstreams,
239  void *extradata
240 );
241 
283  const NvMediaIEP *encoder,
284  uint32_t *numBytesAvailable,
285  NvMediaBlockingType blockingType,
286  uint32_t millisecondTimeout
287 );
288 
289 
310  const NvMediaIEP *encoder,
311  NvMediaEncAttrType attrType,
312  uint32_t attrSize,
313  void *AttributeData
314 );
315 
316 /*
317  * \defgroup history_nvmedia_iep History
318  * Provides change history for the NvMedia IEP API.
319  *
320  * \section history_nvmedia_iep Version History
321  *
322  * <b> Version 1.0 </b> March 14, 2016
323  * - Initial release
324  *
325  * <b> Version 1.1 </b> May 11, 2016
326  * - Added \ref NvMediaICPCheckVersion API
327  *
328  * <b> Version 1.2 </b> May 5, 2017
329  * - Added \ref NvMediaIEPGetBitsEx and \ref NvMediaIEPSetInputExtraData API
330  * - Added \ref NvMediaIEPGetAttribute
331  *
332  * <b> Version 2.0 </b> May 9, 2017
333  * - Added instance ID parameter to NvMediaIEPCreate() and NvMediaIEPFeedFrame()
334  * - optionalDevice parameter is removed from NvMediaIEPCreate()
335  * - NvMediaIEPGetVersion() is added to get the version of NvMedia Image Encoder library
336  * - NvMediaIEPGetBits() is deprecated. Use NvMediaIEPGetBitsEx() instead.
337  * - All NvMedia data types are moved to standard data types
338  *
339  * <b> Version 2.1 </b> June 30, 2017
340  * - Removed \ref NvMediaIEPSetInputExtraData API
341  *
342  * <b> Version 2.2 </b> Sept 1, 2017
343  * - Added NVMEDIA_IMAGE_ENCODE_VP8 in \ref NvMediaIEPType enum
344  *
345  * <b> Version 2.3 </b> Dec 14, 2018
346  * - Fix MISRA violations 21.1 and 21.2
347  *
348  * <b> Version 2.4 </b> January 15, 2019
349  * - Fix MISRA violations 8.13
350  *
351  * <b> Version 2.5 </b> Feb 7, 2019
352  * - Added opaque handle for encoder
353  * internal usage into Image encoder object
354  * - Fix MISRA violations 11.3
355  * - Fix MISRA violations 8.13
356  *
357  * <b> Version 2.6 </b> Feb 28, 2019
358  * - Added required header includes nvmedia_core.h and nvmedia_surface.h
359  */
360 
363 #ifdef __cplusplus
364 }; /* extern "C" */
365 #endif
366 
367 #endif /* NVMEDIA_IEP_H */
Holds a handle representing image objects.
Definition: nvmedia_image.h:69
#define NvMediaSurfaceType
Defines the set of NvMedia surface types.
NvMediaStatus NvMediaIEPFeedFrame(const NvMediaIEP *encoder, NvMediaImage *frame, const NvMediaRect *sourceRect, void *picParams, NvMediaEncoderInstanceId instanceId)
Encodes the specified frame.
Holds an application data buffer containing compressed video data.
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
NvMediaEncoderInstanceId
Specifies the encoder instance ID.
NvMediaStatus NvMediaIEPGetVersion(NvMediaVersion *version)
Checks the version compatibility for the NvMedia IEP library.
NVIDIA Media Interface: Surface Handling
NVIDIA Media Interface: Image Processing
Holds NvMedia version information.
Definition: nvmedia_core.h:226
struct NvMediaDevice NvMediaDevice
An opaque handle representing an NvMediaDevice object.
Definition: nvmedia_core.h:337
NVIDIA Media Interface: Common Types for Video/Image Encode/Decode
NvMediaSurfaceType inputFormat
Input Image surface type.
Definition: nvmedia_iep.h:60
NVIDIA Media Interface: Core
NvMediaStatus
Defines all possible error codes.
Definition: nvmedia_core.h:169
NvMediaIEP * NvMediaIEPCreate(const NvMediaDevice *device, NvMediaIEPType encodeType, 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...
Holds a rectangular region of a surface.
Definition: nvmedia_core.h:133
NvMediaIEPType encodeType
Codec type.
Definition: nvmedia_iep.h:58
NvMediaEncoderInstanceId instanceId
Instance ID.
Definition: nvmedia_iep.h:62
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.
struct NvMediaIEPPriv_ * encPriv
An Opaque pointer for internal use.
Definition: nvmedia_iep.h:64
NvMediaStatus NvMediaIEPGetBitsEx(const NvMediaIEP *encoder, uint32_t *numBytes, uint32_t numBitstreamBuffers, NvMediaBitstreamBuffer *bitstreams, void *extradata)
Returns the bitstream for a slice or frame.
NvMediaBlockingType
Blocking type.
void NvMediaIEPDestroy(const NvMediaIEP *encoder)
Destroys an NvMedia image encoder.
NvMediaStatus NvMediaIEPSetConfiguration(const NvMediaIEP *encoder, void *configuration)
Sets the encoder configuration.
Holds the image encoder object created by NvMediaIEPCreate.
Definition: nvmedia_iep.h:56