nvenc: hangs forever if stopped / started
If a pipeline is stopped / started the encoding does not seem to resume. From my own debugging it seems that the buffers are destroyed but never recreated?
On the first run the buffers area created in gst_nv_base_enc_handle_frame
but this doesn't seem to ever get called again after restarting the pipeline (going to NULL and then back to PLAYING)
Curious if anyone can point me in the right direction :)
0:00:10.744025792 127900 0x1170b30 DEBUG nvenc gstnvbaseenc.c:1018:gst_nv_base_enc_free_buffers:<nvh264enc0> Destroying output bitstream buffer 0x7f1218166d90
0:00:10.744468947 127900 0x1170b30 DEBUG nvenc gstnvbaseenc.c:1010:gst_nv_base_enc_free_buffers:<nvh264enc0> Destroying input buffer 0x7f12181290b0
0:00:10.746553038 127900 0x1170b30 DEBUG nvenc gstnvbaseenc.c:1018:gst_nv_base_enc_free_buffers:<nvh264enc0> Destroying output bitstream buffer 0x7f12181682e0
0:00:10.747123195 127900 0x1170b30 DEBUG nvenc gstnvbaseenc.c:1010:gst_nv_base_enc_free_buffers:<nvh264enc0> Destroying input buffer 0x7f121812c320
0:00:10.747788903 127900 0x1170b30 DEBUG nvenc gstnvbaseenc.c:1018:gst_nv_base_enc_free_buffers:<nvh264enc0> Destroying output bitstream buffer 0x7f1218169830
0:00:10.748361665 127900 0x1170b30 DEBUG nvenc gstnvbaseenc.c:1010:gst_nv_base_enc_free_buffers:<nvh264enc0> Destroying input buffer 0x7f121812d6c0
0:00:10.749261139 127900 0x1170b30 DEBUG nvenc gstnvbaseenc.c:1018:gst_nv_base_enc_free_buffers:<nvh264enc0> Destroying output bitstream buffer 0x7f121816ad80
0:00:10.750310017 127900 0x1170b30 INFO nvenc gstnvbaseenc.c:558:gst_nv_base_enc_stop:<nvh264enc0> encoder stopped
0:00:10.751506678 127900 0x1170b30 DEBUG nvenc gstnvbaseenc.c:642:gst_nv_base_enc_close:<nvh264enc0> closing encoder
0:00:10.825728139 127900 0x1170b30 DEBUG nvenc gstnvbaseenc.c:674:gst_nv_base_enc_close:<nvh264enc0> encoder closed
0:00:10.826788941 127900 0x1170b30 DEBUG nvenc gstnvbaseenc.c:398:gst_nv_base_enc_open:<nvh264enc0> opening encoder
0:00:11.101726946 127900 0x1170b30 INFO nvenc gstnvbaseenc.c:422:gst_nv_base_enc_open:<nvh264enc0> created NVENC encoder 0x30eb9f0
0:00:11.101811177 127900 0x1170b30 INFO nvenc gstnvbaseenc.c:302:_get_supported_input_formats:<nvh264enc0> input format: 0x00000001
0:00:11.101818210 127900 0x1170b30 INFO nvenc gstnvbaseenc.c:302:_get_supported_input_formats:<nvh264enc0> input format: 0x00000010
0:00:11.101823129 127900 0x1170b30 INFO nvenc gstnvbaseenc.c:302:_get_supported_input_formats:<nvh264enc0> input format: 0x00000100
0:00:11.101827888 127900 0x1170b30 INFO nvenc gstnvbaseenc.c:302:_get_supported_input_formats:<nvh264enc0> input format: 0x00001000
0:00:11.101873956 127900 0x1170b30 INFO nvenc gstnvbaseenc.c:302:_get_supported_input_formats:<nvh264enc0> input format: 0x01000000
0:00:11.101882693 127900 0x1170b30 INFO nvenc gstnvbaseenc.c:302:_get_supported_input_formats:<nvh264enc0> input format: 0x10000000
0:00:11.101888905 127900 0x1170b30 INFO nvenc gstnvbaseenc.c:302:_get_supported_input_formats:<nvh264enc0> input format: 0x04000000
0:00:11.101894345 127900 0x1170b30 INFO nvenc gstnvbaseenc.c:302:_get_supported_input_formats:<nvh264enc0> input format: 0x02000000
0:00:11.101907470 127900 0x1170b30 INFO nvenc gstnvbaseenc.c:302:_get_supported_input_formats:<nvh264enc0> input format: 0x20000000
0:00:11.102665334 127900 0x1170b30 INFO nvenc gstnvbaseenc.c:487:gst_nv_base_enc_start:<nvh264enc0> starting encoder
0:00:11.102684801 127900 0x1170b30 INFO nvenc gstnvbaseenc.c:899:gst_nv_base_enc_start_bitstream_thread:<nvh264enc0> starting bitstream thread
0:00:11.102851930 127900 0x1170b30 INFO nvenc gstnvbaseenc.c:913:gst_nv_base_enc_start_bitstream_thread:<nvh264enc0> started thread to read bitstream
0:00:11.102970596 127900 0x7f14100194f0 LOG nvenc gstnvbaseenc.c:773:gst_nv_base_enc_bitstream_thread:<nvh264enc0> wait for bitstream buffer..
0:00:11.103066709 127900 0x1170b30 INFO nvenc gstnvbaseenc.c:517:gst_nv_base_enc_start:<nvh264enc0> encoder started