Add new API rocDecParserMarkFrameForReuse() for Parser (#430)
* added new API to release video frame for decoder and parser
* removed ReleseFrame() from low level parser classes
* Removed rocDecReleaseFrame() from decoder and added in parser
* address review comments
* revert un-necessary files
* minor fix
* remove unused function
* minor formatting fix
[ROCm/rocdecode commit: 29bfe5e3bd]
Αυτή η υποβολή περιλαμβάνεται σε:
@@ -81,6 +81,30 @@ rocDecParseVideoData(RocdecVideoParser parser_handle, RocdecSourceDataPacket *pa
|
||||
return ret;
|
||||
}
|
||||
|
||||
/************************************************************************************************/
|
||||
//! \ingroup group_rocparser
|
||||
//! \fn rocDecStatus ROCDECAPI rocDecParserMarkFrameForReuse(RocdecVideoParser parser_handle, int pic_idx)
|
||||
//! Release frame with index pic_idx from parser's buffer pool and mark it for reuse
|
||||
/************************************************************************************************/
|
||||
rocDecStatus ROCDECAPI
|
||||
rocDecParserMarkFrameForReuse(RocdecVideoParser parser_handle, int pic_idx) {
|
||||
if (parser_handle == nullptr || pic_idx < 0) {
|
||||
return ROCDEC_INVALID_PARAMETER;
|
||||
}
|
||||
auto roc_parser_handle = static_cast<RocParserHandle *>(parser_handle);
|
||||
rocDecStatus ret;
|
||||
try {
|
||||
ret = roc_parser_handle->MarkFrameForReuse(pic_idx);
|
||||
}
|
||||
catch(const std::exception& e) {
|
||||
roc_parser_handle->CaptureError(e.what());
|
||||
ERR(e.what())
|
||||
return ROCDEC_RUNTIME_ERROR;
|
||||
}
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
||||
/************************************************************************************************/
|
||||
//! \ingroup FUNCTS
|
||||
//! \fn rocDecStatus ROCDECAPI rocDecDestroyVideoParser(RocdecVideoParser parser_handle)
|
||||
|
||||
Αναφορά σε νέο ζήτημα
Block a user