I thought I’d bring up some issues and inconsistencies I found in the NvMedia documentation while using it, so they can be fixed and no one has to waste as many hours as I had to.
- Unclear meaning of
NvMediaBitstreamBuffer
members
Current descriptions are very roundabout and unclear when used withNvMediaIEPGetBitsEx()
.
It’s not obvious which parameters the user should provide and which the call itself writes to.
It would be helpful to expand on the descriptions and clarify which are in/out parameters.
From trial-and-error:
NvMediaBitstreamBuffer::bitstream
is an user-provided pointer to an output buffer.NvMediaBitstreamBuffer::bitstreamBytes
is the number of bytes actually written by the call (out parameter).NvMediaBitstreamBuffer::bitstreamSize
is the maximum number of bytes that can be written (aka the size of the user-provided buffer).
NvMediaIEPGetBitsEx()
refers to a parameter namedbuffer
, which doesn’t exist.
[…]
NVMEDIA_STATUS_OK
is returned, thebuffer
is filled […]
-
NvMediaIEPBitsAvailable()
has duplicateNVMEDIA_STATUS_NONE_PENDING
return value explanations -
NvMediaIEPFeedFrame()
can returnNVMEDIA_STATUS_ERROR
IfNVMEDIA_ENCODER_INSTANCE_AUTO
was passed toNvMediaIEPCreate()
andNVMEDIA_ENCODER_INSTANCE_AUTO
is also passed toNvMediaIEPFeedFrame()
.
This behaviour doesn’t seem to be documented. Took me 10h to figure out. -
NvMediaEncodeInitializeParamsH264::enableROIEncode
deprecated?
Per comment atnvmedia_core.h:407
NvMediaROI
has been removed. I can’t find anything else related to ROI either.
Has ROI support for encoding been removed/deprecated? If so, theenableROIEncode
documentation should mention this. -
NvMediaEncoder
H265 support (separate thread)