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
Этот коммит содержится в:
Rajy Rawther
2023-09-27 12:14:28 -07:00
коммит произвёл GitHub
родитель c89ba67f92
Коммит 0a991c1776
11 изменённых файлов: 316 добавлений и 44 удалений
+2 -6
Просмотреть файл
@@ -32,15 +32,11 @@ rocDecStatus ROCDECAPI
rocDecCreateVideoParser(RocdecVideoParser *pHandle, RocdecParserParams *pParams) {
RocdecVideoParser handle = nullptr;
try {
handle = new RocParserHandle();
handle = new RocParserHandle(pParams);
}
catch(const std::exception& e) {
ERR( STR("Failed to init the rocDecode handle, ") + STR(e.what()))
}
//set params for the handle
auto parser_handle = static_cast<RocParserHandle *> (handle);
if (!parser_handle->set_parser_params(pParams))
return ROCDEC_INVALID_PARAMETER;
*pHandle = handle;
return rocDecStatus::ROCDEC_SUCCESS;
}
@@ -60,7 +56,7 @@ rocDecParseVideoData(RocdecVideoParser handle, RocdecSourceDataPacket *pPacket)
auto parser_hdl = static_cast<RocParserHandle *> (handle);
rocDecStatus ret;
try {
ret = parser_hdl->roc_parser->ParseVideoData(pPacket);
ret = parser_hdl->ParseVideoData(pPacket);
}
catch(const std::exception& e) {
parser_hdl->capture_error(e.what());