nvenc: Give more details about errors
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1472>
This commit is contained in:
parent
b7ded51382
commit
3549d59725
@ -1847,7 +1847,8 @@ gst_nv_base_enc_set_format (GstVideoEncoder * enc, GstVideoCodecState * state)
|
|||||||
|
|
||||||
if (nv_ret != NV_ENC_SUCCESS) {
|
if (nv_ret != NV_ENC_SUCCESS) {
|
||||||
GST_ELEMENT_ERROR (nvenc, LIBRARY, SETTINGS, (NULL),
|
GST_ELEMENT_ERROR (nvenc, LIBRARY, SETTINGS, (NULL),
|
||||||
("Failed to %sinit encoder: %d", reconfigure ? "re" : "", nv_ret));
|
("Failed to %sinit encoder: %d- %s", reconfigure ? "re" : "", nv_ret,
|
||||||
|
NvEncGetLastErrorString (nvenc->encoder)));
|
||||||
NvEncDestroyEncoder (nvenc->encoder);
|
NvEncDestroyEncoder (nvenc->encoder);
|
||||||
nvenc->encoder = NULL;
|
nvenc->encoder = NULL;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -79,6 +79,13 @@ NvEncDestroyEncoder (void *encoder)
|
|||||||
return nvenc_api.nvEncDestroyEncoder (encoder);
|
return nvenc_api.nvEncDestroyEncoder (encoder);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char *NVENCAPI
|
||||||
|
NvEncGetLastErrorString (void *encoder)
|
||||||
|
{
|
||||||
|
g_assert (nvenc_api.nvEncGetLastErrorString != NULL);
|
||||||
|
return nvenc_api.nvEncGetLastErrorString (encoder);
|
||||||
|
}
|
||||||
|
|
||||||
NVENCSTATUS NVENCAPI
|
NVENCSTATUS NVENCAPI
|
||||||
NvEncGetEncodeGUIDs (void *encoder, GUID * array, uint32_t array_size,
|
NvEncGetEncodeGUIDs (void *encoder, GUID * array, uint32_t array_size,
|
||||||
uint32_t * count)
|
uint32_t * count)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user