After updating to R28.2 from R28.1, deinitPlane() of NvVideoEncoder does not work.
I’m developping a live streaming system on Jetson TX2s.
(1) Input: USB UVC device with 4k resolution and 30fps
(2) Resizing: from 4k to appropriate value for the bit rate dynamically
- output plane: V4L2_MEMORY_MMAP
- capture plane: V4L2_MEMORY_MMAP
(3) Encoding: H.264 (V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE / V4L2_MPEG_VIDEO_H264_LEVEL_5_1) - output plane: V4L2_MEMORY_DMABUF
- capture plane: V4L2_MEMORY_MMAP
(4) RTP/UDP/IP/Ethernet streaming
(5) Decoding
(6) Resizing
(7) Output: HDMI display with 4k resolution and 30fps
Until the last week, I used L4T R28.1.
In this week, I have updated our Jetson TX2s to the L4T R28.2.
Then it does not work at deinitPlane() of NvVideoEncoder.
When the bit rate is changed and it needs to change the resolution,
it execute these steps.
(a) Stop the input loop of NvVideoConverter: output_plane.qBuffer()
(b) Wait to become empty of output_plane of NvVideoConverter: output_plane.getNumQueuedBuffers() > 0
(c) Send EOS to NvVideoConverter: output_plane.qBuffer()
(d) Wait to become empty of capture plane of NvVideoConverter: capture_plane.waitForDQThread()
(e) Stop the input loop of NvVideoEncoder: output_plane.qBuffer()
(f) Wait to become empty of output_plane of NvVideoEncoder: output_plane.getNumQueuedBuffers() > 0
(g) Send EOS to NvVideoEncoder: output_plane.qBuffer()
(h) Wait to become empty of capture plane of NvVideoEncoder: capture_plane.waitForDQThread()
(i) Clear queue between NvVideoConverter and NvVideoencoder
(j) Free the buffer of NvVideoConverter: capture_plane.deinitPlane()
(k) Free the buffer of NvVideoEncoder: output_plane.deinitPlane() / capture_plane.deinitPlane()
(l) Re-configure NvVideoConverter: setCapturePlaneFormat() / capture_plane.setupPlane()
- with new output resolution (capture plane)
(m) Re-configure NvVideoEncoder: setCapturePlaneFormat() / setOutputPlaneFormat() / setProfile() / setLevel() / …
/ output_plane.setupPlane() / capture_plane.setupPlane() - with new input resolution (output plane)
(n) Restart NvVideoEncoder: setStreamStatus(true)
(o) Restart NvVideoConverter: setStreamStatus(true)
Our system stopped at step (k) with R28.2.
(It waits for 3sec, and TimeOut occurs in the next module.)
Are there any difference between R28.1 and R28.2 about NvVideoEncoder or NvV4l2ElementPlane ?
I cannot find deinitPlane() of NvVideoEncoder in the sample sources.
I cannot find any diffrence in NvV4l2ElementPlane.cpp about deinitPlane().
Or, is there any wrong in our step (a)-(o) ?