![]() |
NVIDIA DRIVE OS Linux SDK API Reference5.1.6.0 Release |
Provides parsing for decoder frame handling.
Data Structures | |
struct | NvMediaBitStreamPkt |
Holds the bitstream packet input for parsing. More... | |
struct | NvMediaDecRefFrame |
Holds decoded reference frame information. More... | |
struct | NvMediaDecCurrFrame |
Holds decoded current frame information. More... | |
struct | NvMediaDPBInfo |
Holds decoded Picture Buffer information. More... | |
struct | NvMediaParserSeqInfo |
Holds video sequence information. More... | |
struct | NvMediaParserPictureData |
Holds picture information for the current frame decode operation. More... | |
struct | NvMediaParserClientCb |
struct | NvMediaParserParams |
Holds initialization parameters for the decoder class. More... | |
Modules | |
Abstraction of OS-Specific Client Callbacks | |
Macros | |
#define | MAX_SEQ_HDR_LEN |
Defines the maximum size of the sequence header. More... | |
Typedefs | |
typedef void | NvMediaParser |
An opaque handle representing an NvMediaParser object. More... | |
Functions | |
NvMediaParser * | NvMediaParserCreate (const NvMediaParserParams *pParserParams) |
Creates a video decoder parser object. More... | |
void | NvMediaParserDestroy (NvMediaParser *pParser) |
Destroys a video decoder parser object. More... | |
NvMediaStatus | NvMediaParserParse (const NvMediaParser *pParser, const NvMediaBitStreamPkt *pStreamPacket) |
Parses or decodes bitstream data. More... | |
NvMediaStatus | NvMediaParserScan (const NvMediaParser *pParser, const NvMediaBitStreamPkt *pStreamPacket) |
Performs the first pass handling for encrypted content data. More... | |
NvMediaStatus | NvMediaParserSetEncryption (const NvMediaParser *pParser, const NvMediaAESParams *pAesParams) |
Provides the parser object with encryption metadata for the current buffer. More... | |
void | NvMediaParserFlush (const NvMediaParser *pParser) |
Flushes the parser decode session. More... | |
NvMediaStatus | NvMediaParserSetAttribute (NvMediaParser *pParser, NvMediaParserAttr eAttributeType, uint32_t uAttributeSize, void *pAttribute) |
Sets attributes for the decode parser object. More... | |
NvMediaStatus | NvMediaParserGetAttribute (const NvMediaParser *pParser, NvMediaParserAttr eAttributeType, uint32_t uAttributeSize, void *pAttribute) |
Gets attributes for the decode parser object. More... | |
#define MAX_SEQ_HDR_LEN |
Defines the maximum size of the sequence header.
Definition at line 321 of file nvmedia_parser.h.
typedef void NvMediaParser |
An opaque handle representing an NvMediaParser object.
Definition at line 603 of file nvmedia_parser.h.
Defines color_primaries types.
Definition at line 69 of file nvmedia_parser.h.
Defines Color Range types.
Enumerator | |
---|---|
NvMColorRange_Reduced |
color range: limited |
NvMColorRange_Full |
color range: full |
Definition at line 61 of file nvmedia_parser.h.
Defines matrix_coefficients types.
Definition at line 93 of file nvmedia_parser.h.
enum NvMediaParserAttr |
Defines parser attributes, which sets/gets decoder properties to parse as per the client/app requirement.
Definition at line 185 of file nvmedia_parser.h.
Defines the chroma formats of video content.
Definition at line 170 of file nvmedia_parser.h.
Defines the parser decode modes.
Enumerator | |
---|---|
NvMParserDecodeMode_Normal |
normal decode mode |
NvMParserDecodeMode_SyncToKeyFrame |
only decode key frames |
Definition at line 161 of file nvmedia_parser.h.
Defines transfer characteristics types.
Definition at line 119 of file nvmedia_parser.h.
Defines video format types.
Definition at line 41 of file nvmedia_parser.h.
NvMediaParser* NvMediaParserCreate | ( | const NvMediaParserParams * | pParserParams | ) |
Creates a video decoder parser object.
Creates a NvMediaParser object for the specified codec NvMediaVideoCodec. This video parser object is to be destroyed with NvMediaParserDestroy().
[in] | pParserParams | poiter to a NvMediaParserParams structure All the client callbacks are registerd inside this function. These callbacks are used for different steps in decoding process. |
void NvMediaParserDestroy | ( | NvMediaParser * | pParser | ) |
Destroys a video decoder parser object.
[in] | pParser | The decoder parser to be destroyed. |
void NvMediaParserFlush | ( | const NvMediaParser * | pParser | ) |
Flushes the parser decode session.
This function is called to flush the decoding session. This is used before destroying parsing session to release all the buffers. This is also used to handle discontinuity.
[in] | pParser | The decoder parser object that will perform the decode parsing operation. |
NvMediaStatus NvMediaParserGetAttribute | ( | const NvMediaParser * | pParser, |
NvMediaParserAttr | eAttributeType, | ||
uint32_t | uAttributeSize, | ||
void * | pAttribute | ||
) |
Gets attributes for the decode parser object.
This function is called to get attribute set in parser component.
[in] | pParser | The decoder parser object that will perform the decode parsing operation. |
[in] | eAttributeType | attribute type defined in NvMediaParserAttr |
[in] | uAttributeSize | size of the data type |
[in] | pAttribute | is the pointer to attribute. |
NvMediaStatus NvMediaParserParse | ( | const NvMediaParser * | pParser, |
const NvMediaBitStreamPkt * | pStreamPacket | ||
) |
Parses or decodes bitstream data.
This function is called with bitstream packet NvMediaBitStreamPkt to do the decoding of current frame. If total bitstream data is not sufficient for current frame decode then it returns after copying that data in some internal buffer. Once one frame data is accumulated then it calls different callback for different puspose. NvMediaParserClientCb::BeginSequence callback will be called when it detect new sequence data and it will pass sequence information as defined in NvMediaParserSeqInfo. NvMediaParserClientCb::AllocPictureBuffer callback will be called to get frame buffer for current frame. NvMediaParserClientCb::DecodePicture callback will be called when it has complete frame data. It passes NvMediaParserPictureData to its client. NvMediaParserClientCb::DisplayPicture callback will be called when frame is ready for display. This passes the frame buffer and its timestamp. NvMediaParserClientCb::AddRef callback called to increase ref counting of frame buffer. NvMediaParserClientCb::Release callback called to decrease ref counting. NvMediaParserClientCb::GetBackwardUpdates callback called to get probability update for VP9 codec. NvMediaParserClientCb::GetDpbInfoForMetadata callback is called if error status reporting is enabled. This is pass DPB information to client. The function calls the NvMediaParserClientCb::SliceDecode callback to pass slice-level data decoding. This is used for specific hardware/codecs.
[in] | pParser | The decoder parser object that will perform the decode parsing operation. |
[in] | pStreamPacket | A (pointer to a) NvMediaBitStreamPkt structure containing bitstream data. |
NvMediaStatus NvMediaParserScan | ( | const NvMediaParser * | pParser, |
const NvMediaBitStreamPkt * | pStreamPacket | ||
) |
Performs the first pass handling for encrypted content data.
This function is called with a bitstream packet NvMediaBitStreamPkt to do the first pass handling of encrypted frame data. This function is called after NvMediaParserSetEncryption(), which passes the all encryption metadata to the parser. It calls different callbacks for different purposes. The NvMediaParserClientCb::CreateDecrypter callback is called only once for a given session to create an NvMedia video decrypter component. The NvMediaParserClientCb::DecryptHdr callback is called for pass1 handling of encrypted data. After this callback, it calls different callbacks based on hardware/codecs. NvMediaParserClientCb::GetClearHdr callback is called to get the clear header data after the NvMediaParserClientCb::DecryptHdr callback. Here it gets only frame header data to create picture info data and to do buffer management.
[in] | pParser | The decoder parser object that will perform the decode parsing operation. |
[in] | pStreamPacket | A pointer to the bitstream data. |
NvMediaStatus NvMediaParserSetAttribute | ( | NvMediaParser * | pParser, |
NvMediaParserAttr | eAttributeType, | ||
uint32_t | uAttributeSize, | ||
void * | pAttribute | ||
) |
Sets attributes for the decode parser object.
This function is called to set specific attributes.
[in] | pParser | The decoder parser object that will perform the decode parsing operation. |
[in] | eAttributeType | attribute type defined in NvMediaParserAttr |
[in] | uAttributeSize | size of the data type |
[in] | pAttribute | is the pointer to attribute. |
NvMediaStatus NvMediaParserSetEncryption | ( | const NvMediaParser * | pParser, |
const NvMediaAESParams * | pAesParams | ||
) |
Provides the parser object with encryption metadata for the current buffer.
[in] | pParser | The decoder parser object that will perform the decode parsing operation. |
[in] | pAesParams | A (pointer to a) encryption metadata structure as defined in NvMediaAESParams |