Added logging control (#667)

* * rocDecode: Added logging control
 - Message output from the core components is now controlled by the logging level, which can be set by an environment variable or other methods.

* * rocDecode/Logging control: Fixed a typo.

* * rocDecode/Logging control: Removed reference to the logger class from RocVideoDecoder utility, which results in build error on non-source install environment.

* * rocDecode/Logging control: Improved some wording in the docs.
Este commit está contenido en:
Jeff Jiang
2025-10-31 20:50:33 -04:00
cometido por GitHub
padre a721963b3c
commit 60e6c585ff
Se han modificado 24 ficheros con 307 adiciones y 214 borrados
+4 -4
Ver fichero
@@ -33,7 +33,7 @@ rocDecStatus ROCDECAPI rocDecCreateBitstreamReader(RocdecBitstreamReader *bs_rea
handle = new RocBitstreamReaderHandle(input_file_path);
}
catch (const std::exception& e) {
ERR( STR("Failed to create RocBitstreamReader handle, ") + STR(e.what()))
RocDecLogger::AlwaysLog(STR("Failed to create RocBitstreamReader handle, ") + STR(e.what()));
return ROCDEC_RUNTIME_ERROR;
}
*bs_reader_handle = handle;
@@ -51,7 +51,7 @@ rocDecStatus ROCDECAPI rocDecGetBitstreamCodecType(RocdecBitstreamReader bs_read
}
catch (const std::exception& e) {
roc_bs_reader_handle->CaptureError(e.what());
ERR(e.what())
RocDecLogger::AlwaysLog(e.what());
return ROCDEC_RUNTIME_ERROR;
}
return ret;
@@ -68,7 +68,7 @@ rocDecStatus ROCDECAPI rocDecGetBitstreamBitDepth(RocdecBitstreamReader bs_reade
}
catch (const std::exception& e) {
roc_bs_reader_handle->CaptureError(e.what());
ERR(e.what())
RocDecLogger::AlwaysLog(e.what());
return ROCDEC_RUNTIME_ERROR;
}
return ret;
@@ -85,7 +85,7 @@ rocDecStatus ROCDECAPI rocDecGetBitstreamPicData(RocdecBitstreamReader bs_reader
}
catch (const std::exception& e) {
roc_bs_reader_handle->CaptureError(e.what());
ERR(e.what())
RocDecLogger::AlwaysLog(e.what());
return ROCDEC_RUNTIME_ERROR;
}
return ret;