GNOME Bugzilla – Bug 637754
multipartdemux: time stamp output buffer based on first input buffer not last
Last modified: 2013-08-23 15:14:07 UTC
Hello, We have developed an application in which we use the multipartdemux to assemble large video frames (which means many packets) “pushed” to this element via an http source. And the current implementation of multipartdemux will use the reception time stamp of the most recent “packet” recvd as the timestamp when it finally pulls/sends assembled frames downstream. On a congested network with retransmits, these packets-per-frame can be milliseconds apart. For this reason we consider the time stamp of the first buffer in the frame more accurate than the timestamp of the last buffer in the frame. Would it be possible for the multipartdemux element to be augmented to support the ability to use the reception time of the first packet when sending the assembled frame downstream instead of the timestamp of the most recently received packets’ timestamp? And to create another property which would represent using the current implementation or using this new proposed implementation, defaulted to use the current implementation? If this is deemed a good idea we can develop and submit a patch. Thank you very much.
If I understand you correctly, you are saying that in case multipartdemux assembles an output buffer from multiple input buffers, and the input buffers carry timestamps, then it will timestamp the output buffer based on the timestamp of the last input buffer rather than the first one? If that is indeed the case (to be confirmed), I would agree with you that it should be timestamped based on the timestamp of the first contributing input buffer.
Still an issue it seems: $ gst-launch-1.0 filesrc location=/home/tpm/samples/misc/635734-some-frames-have-no-eoi-marker-mjpeg.multipart ! queue ! identity datarate=100000 ! identity silent=false ! multipartdemux ! fakesink silent=false -v 2>/dev/null | grep pts | more IN pts 0:00:00.000000000 IN pts 0:00:00.040960000 IN pts 0:00:00.081920000 IN pts 0:00:00.122880000 IN pts 0:00:00.163840000 IN pts 0:00:00.204800000 OUT pts 0:00:00.000000000 IN pts 0:00:00.245760000 IN pts 0:00:00.286720000 IN pts 0:00:00.327680000 IN pts 0:00:00.368640000 IN pts 0:00:00.409600000 OUT pts 0:00:00.409600000 IN pts 0:00:00.450560000 IN pts 0:00:00.491520000 OUT pts 0:00:00.491520000 IN pts 0:00:00.532480000 IN pts 0:00:00.573440000 IN pts 0:00:00.614400000 IN pts 0:00:00.655360000 IN pts 0:00:00.696320000 OUT pts 0:00:00.696320000
commit 7d78a68c8de0c866b7e196b8f22cc5f3cc14a3a3 Author: Tim-Philipp Müller <tim@centricular.net> Date: Fri Aug 23 15:29:28 2013 +0100 multipartdemux: timestamp output buffers based on first input buffer that provided bytes not last https://bugzilla.gnome.org/show_bug.cgi?id=637754