Hi! I use two gstreamer pipeline for cutting some part of video file:
filesrc location=*.mkv ! matroskademux name=demuxer demuxer.video_0 ! nvv4l2decoder ! appsink name=sink emit-signals=true
appsrc name=src format=GST_FORMAT_TIME block=FALSE is-live=TRUE ! videoconvert ! nvvidconv ! "video/x-raw(memory:NVMM), format=(string)NV12" ! nvv4l2h265enc maxperf-enable=1 control-rate=0 bitrate=8000000 ! video/x-h265, stream-format=byte-stream ! h265parse ! mp4mux ! filesink location=out.mp4 sync=false
After starting first pipeline I will seek to needed timepoint, pull needed capacity of samples from appsink and push it to appsrc of second pipeline. After that I close input pipeline and set new eos for second pipeline and close it too
gst_element_set_state(input_pipeline_, GST_STATE_NULL);
gst_app_src_end_of_stream(GST_APP_SRC(src));
if (GstMessage *msg = gst_bus_timed_pop_filtered(output_bus_, GST_CLOCK_TIME_NONE,
GstMessageType(GST_MESSAGE_EOS | GST_MESSAGE_ERROR))) {
handleGstMessage(msg);
}
gst_element_set_state(output_pipeline_, GST_STATE_NULL);
Looks like all works fine, but if I set GST_DEBUG=1 then I see the errors after closing second pipeline:
0:00:02.247638405 [335m 9880[00m 0x7ec0002b20 [31;01mERROR [00m [00m v4l2allocator gstv4l2allocator.c:1373:gst_v4l2_allocator_qbuf:<nvv4l2decoder0:pool:src:allocator>[00m failed queueing buffer 7: Bad file descriptor
0:00:02.247771721 [335m 9880[00m 0x7ec0002b20 [31;01mERROR [00m [00m v4l2bufferpool gstv4l2bufferpool.c:1396:gst_v4l2_buffer_pool_qbuf:<nvv4l2decoder0:pool:src>[00m could not queue a buffer 7
0:00:02.253656369 [335m 9880[00m 0x7ec0002b20 [31;01mERROR [00m [00m v4l2allocator gstv4l2allocator.c:1373:gst_v4l2_allocator_qbuf:<nvv4l2decoder0:pool:src:allocator>[00m failed queueing buffer 8: Bad file descriptor
0:00:02.253873016 [335m 9880[00m 0x7ec0002b20 [31;01mERROR [00m [00m v4l2bufferpool gstv4l2bufferpool.c:1396:gst_v4l2_buffer_pool_qbuf:<nvv4l2decoder0:pool:src>[00m could not queue a buffer 8
What it means? And why it happens?