After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 797265 - splitmuxsink: last splitmuxsink-fragment-closed message is sent before file close() is called
splitmuxsink: last splitmuxsink-fragment-closed message is sent before file c...
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
1.14.2
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-10-09 14:44 UTC by Peter Seiderer
Modified: 2018-11-03 15:33 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Peter Seiderer 2018-10-09 14:44:14 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
Comment 1 GStreamer system administrator 2018-11-03 15:33:27 UTC
-- 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.