GNOME Bugzilla – Bug 797265
splitmuxsink: last splitmuxsink-fragment-closed message is sent before file close() is called
Last modified: 2018-11-03 15:33:27 UTC
Strace of a video encoding pipeline using splitmuxsink shows the following sequence for each fragment file besides the last one: openat() --> splitmuxsink-fragment-opened --> close() --> splitmuxsink-fragment-closed For the last fragment the sequence is as follows: openat() --> splitmuxsink-fragment-opened --> splitmuxsink-fragment-closed --> close() This leads to problems in case one registers on the splitmuxsink-fragment messages for file post-processing... Strace output: $ strace -tt -e openat,write,close -fo out_strace.log gst-launch-1.0 -m -v -e v4l2src device=/dev/v4l/by-path/platform-capture-subsystem-video-index4 io-mode=dmabuf ! \ video/x-raw,format=NV12,width=1920,height=1080,framerate=60000/1001 ! \ videorate drop-only=true ! \ video/x-raw,format=NV12,width=1920,height=1080,framerate=30000/1001 ! \ v4l2h264enc ! \ h264parse ! \ splitmuxsink location='Video_%d.mp4' max-size-time=5000000000 Video_0.mp4: 11264 16:00:07.905127 openat(AT_FDCWD, "Video_0.mp4", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 43 Video_0.mp4: 11263 16:00:08.945458 write(1, "splitmuxsink-fragment-opened, lo"..., 97) = 97 Video_0.mp4: 11264 16:00:13.108542 close(43) = 0 Video_1.mp4: 11264 16:00:13.111136 openat(AT_FDCWD, "Video_1.mp4", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 43 Video_0.mp4: 11263 16:00:14.122644 write(1, "splitmuxsink-fragment-closed, lo"..., 106) = 106 Video_1.mp4: 11263 16:00:14.493838 write(1, "splitmuxsink-fragment-opened, lo"..., 106) = 106 Video_1.mp4: 11264 16:00:17.913117 close(43) = 0 Video_2.mp4: 11264 16:00:17.939201 openat(AT_FDCWD, "Video_2.mp4", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 43 Video_1.mp4: 11263 16:00:18.937365 write(1, "splitmuxsink-fragment-closed, lo"..., 106) = 106 Video_2.mp4: 11263 16:00:19.319019 write(1, "splitmuxsink-fragment-opened, lo"..., 106) = 106 Video_2.mp4: 11264 16:00:22.717010 close(43) = 0 Video_3.mp4: 11264 16:00:22.730683 openat(AT_FDCWD, "Video_3.mp4", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 43 Video_2.mp4: 11263 16:00:23.734459 write(1, "splitmuxsink-fragment-closed, lo"..., 107) = 107 Video_3.mp4: 11263 16:00:24.102944 write(1, "splitmuxsink-fragment-opened, lo"..., 107) = 107 Video_3.mp4: 11263 16:00:25.783489 write(1, "splitmuxsink-fragment-closed, lo"..., 107) = 107 11263 16:00:25.855549 write(1, "Setting pipeline to NULL ...\n", 29) = 29 Video_2.mp4: 11263 16:00:25.856492 close(43) = 0 11263 16:00:25.860930 write(1, "Freeing pipeline ...\n", 21) = 21
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/509.