Parser API reference

Parser API reference#

2026-09-23

1 min read time

Applies to Linux

The rocDecode parser API is exposed in rocparser.h.

rocDecStatus ROCDECAPI rocDecCreateVideoParser (RocdecVideoParser *parser_handle, RocdecParserParams *params)

Create video parser object and initialize.

rocDecStatus ROCDECAPI rocDecParseVideoData (RocdecVideoParser parser_handle, RocdecSourceDataPacket *packet)

Parse the video data from source data packet in pPacket.

Extracts parameter sets like SPS, PPS, bitstream etc. from pPacket and calls back pfn_decode_picture with RocdecPicParams data for kicking of HW decoding calls back pfn_sequence_callback with RocdecVideoFormat data for initial sequence header or when the decoder encounters a video format change calls back pfn_display_picture with RocdecParserDispInfo data to display a video frame

rocDecStatus ROCDECAPI rocDecDestroyVideoParser (RocdecVideoParser parser_handle)

Destroy the video parser object.