Add support for rocDecReconfigureDecoder API (#116)

* Add support for rocDecReconfigureDecoder API

* adrress reviewer's comemnts

* Add doxygen comment for ReconfigureDecoder function
Этот коммит содержится в:
Aryan Salmanpour
2023-12-05 11:16:32 -05:00
коммит произвёл GitHub
родитель 69a2afd341
Коммит 875994bb4f
6 изменённых файлов: 166 добавлений и 23 удалений
+9 -5
Просмотреть файл
@@ -77,11 +77,15 @@ rocDecStatus RocDecoder::GetDecodeStatus(int pic_idx, RocdecDecodeStatus* decode
}
rocDecStatus RocDecoder::ReconfigureDecoder(RocdecReconfigureDecoderInfo *reconfig_params) {
// todo:: return appropriate decStatus
// this will be called when the current configuration is changed during decoding
// release the current va-api decoder instance and create a new one with the new parameters (or reinit if available)
// return status
return ROCDEC_NOT_IMPLEMENTED;
if (reconfig_params == nullptr) {
return ROCDEC_INVALID_PARAMETER;
}
rocDecStatus rocdec_status = va_video_decoder_.ReconfigureDecoder(reconfig_params);
if (rocdec_status != ROCDEC_SUCCESS) {
ERR("ERROR: Reconfiguration of the decoder failed with rocDecStatus# " + TOSTR(rocdec_status));
return rocdec_status;
}
return rocdec_status;
}
rocDecStatus RocDecoder::MapVideoFrame(int pic_idx, void *dev_mem_ptr[3], uint32_t horizontal_pitch[3], RocdecProcParams *vid_postproc_params) {