[Bug 797265] New: splitmuxsink: last splitmuxsink-fragment-closed message is sent before file close() is called

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Tue Oct 9 14:44:14 UTC 2018


https://bugzilla.gnome.org/show_bug.cgi?id=797265

            Bug ID: 797265
           Summary: splitmuxsink: last splitmuxsink-fragment-closed
                    message is sent before file close() is called
    Classification: Platform
           Product: GStreamer
           Version: 1.14.2
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gst-plugins-good
          Assignee: gstreamer-bugs at lists.freedesktop.org
          Reporter: ps.report at gmx.net
        QA Contact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---

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

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list