Skip to content

nvdec: Make parameters more configurable

nvdec: Simplify stop using g_clear_object()
nvdec: Make ulNumDecodeSurfaces configurable
    
Depending on the stream that needs to be decoded, it makes sense to put
different values here. The documentation isn't quite clear on what the
property actually does, but a post on the NVIDIA devtalk forum ([1])
cites the following:

> (...) found that correctness/quality of decoded frames greatly depends
> on the value of `CUVIDDECODECREATEINFO::ulNumDecodeSurfaces` member
> when calling `cuvidCreateDecoder`

Another post sites that:

> I believe ulNumDecodeSurfaces is the size (in frames) of the decoded
> picture buffer (DPB) that the decoder uses to store previously decoded
> pictures as reference for future pictures.

In any case, it's probably nice for users to be able to play with this
value as they see fit.

[1]: https://devtalk.nvidia.com/default/topic/1030310/video-codec-and-optical-flow-sdk/how-to-calculate-appropriate-value-for-cuda-cuvids-cuviddecodecreateinfo-ulnumdecodesurfaces-used-in-cuvidcreatedecoder-/
nvdec: Make cuvidCreateVideoParser configurable

Depending on the use case of the `nvdec` element, it makes sense to put
different parameters than the default ones for
`cuvidCreateVideoParser()`. Make this possible by adding the necessary
GObject properties.

Merge request reports

Loading