parser high level class implementation (#10)

* rocDecode api defintions added for decoder and parser

* addressed review comments and changed struct names to CamelCase

* minot reformatting

* parser high level class implementation

[ROCm/rocdecode commit: 0a991c1776]
This commit is contained in:
Rajy Rawther
2023-09-27 12:14:28 -07:00
committed by GitHub
parent 9a354e5d6a
commit dcc6ee9f2a
11 changed files with 316 additions and 44 deletions
+2 -1
View File
@@ -62,7 +62,8 @@ typedef enum rocDecStatus_enum{
ROCDEC_OUTOF_MEMORY = -4,
ROCDEC_INVALID_PARAMETER = -5,
ROCDEC_NOT_IMPLEMENTED = -6,
ROCDEC_NOT_SUPPORTED = -7,
ROCDEC_NOT_INITIALIZED = -7,
ROCDEC_NOT_SUPPORTED = -8,
ROCDEC_SUCCESS = 0,
}rocDecStatus;
+10 -3
View File
@@ -216,7 +216,7 @@ typedef struct _RocdecSeiMessageInfo {
typedef int (ROCDECAPI *PFNVIDSEQUENCECALLBACK)(void *, RocdecVideoFormat *);
typedef int (ROCDECAPI *PFNVIDDECODECALLBACK)(void *, RocdecPicParams *);
typedef int (ROCDECAPI *PFNVIDDISPLAYCALLBACK)(void *, RocdecParserDispInfo *);
typedef int (ROCDECAPI *PFNVIDOPPOINTCALLBACK)(void *, RocdecOperatingPointInfo*); // reserved for future (AV1 specific)
//typedef int (ROCDECAPI *PFNVIDOPPOINTCALLBACK)(void *, RocdecOperatingPointInfo*); // reserved for future (AV1 specific)
typedef int (ROCDECAPI *PFNVIDSEIMSGCALLBACK) (void *, RocdecSeiMessageInfo *);
/**
@@ -239,8 +239,8 @@ typedef struct _RocdecParserParams {
PFNVIDSEQUENCECALLBACK pfnSequenceCallback; /**< IN: Called before decoding frames and/or whenever there is a fmt change */
PFNVIDDECODECALLBACK pfnDecodePicture; /**< IN: Called when a picture is ready to be decoded (decode order) */
PFNVIDDISPLAYCALLBACK pfnDisplayPicture; /**< IN: Called whenever a picture is ready to be displayed (display order) */
PFNVIDOPPOINTCALLBACK pfnGetOperatingPoint; /**< IN: Called from AV1 sequence header to get operating point of a AV1
scalable bitstream */
//PFNVIDOPPOINTCALLBACK pfnGetOperatingPoint; /**< IN: Called from AV1 sequence header to get operating point of a AV1
// scalable bitstream */
PFNVIDSEIMSGCALLBACK pfnGetSEIMsg; /**< IN: Called when all SEI messages are parsed for particular frame */
void *pvReserved2[5]; /**< Reserved for future use - set to NULL */
RocdecVideoFormatEx *pExtVideoInfo; /**< IN: [Optional] sequence header data from system layer */
@@ -265,6 +265,13 @@ extern rocDecStatus ROCDECAPI rocDecCreateVideoParser(RocdecVideoParser *pHandle
/************************************************************************************************/
extern rocDecStatus ROCDECAPI rocDecParseVideoData(RocdecVideoParser handle, RocdecSourceDataPacket *pPacket);
/************************************************************************************************/
//! \ingroup FUNCTS
//! \fn rocDecStatus ROCDECAPI rocDecDestroyVideoParser(RocdecVideoParser handle)
//! Destroy the video parser object
/************************************************************************************************/
extern rocDecStatus ROCDECAPI rocDecDestroyVideoParser(RocdecVideoParser handle);
#if defined(__cplusplus)
}
#endif /* __cplusplus */