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 795512 - videodecoder: Allow ignoring PTS in the past
videodecoder: Allow ignoring PTS in the past
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
unspecified
Other All
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 738472 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2018-04-24 16:10 UTC by Zeeshan Ali
Modified: 2018-11-03 12:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
video: Allow ignoring PTS in the past (7.96 KB, patch)
2018-04-24 16:10 UTC, Zeeshan Ali
none Details | Review

Description Zeeshan Ali 2018-04-24 16:10:12 UTC
Please see the attached patch for details.
Comment 1 Zeeshan Ali 2018-04-24 16:10:17 UTC
Created attachment 371327 [details] [review]
video: Allow ignoring PTS in the past

Add a new boolean property that tell the video decoder baseclass to simply
ignore PTS set in the past, rather than latching it to the previous PTS.

This is desirable in certain circumstance. One specific case is when the
buffer's PTS is dictated by an external (remote) entity, sending packets
over RTP but sets wrong PTS on certain packets. An RTP jitterbuffer
upstream to the decoder will not help since it will drop such buffers and
that could break the decoder. Instead, the decoder should be told not to
correct the PTS on the buffers in such cases and let the elements
downstream to the decoder decide what to do with the buffer.

Also to keep in mind that the audio decoder baseclass does not attempt to
correct PTS in the past.

This patch also adds a simple testcase for this new property.
Comment 2 Sebastian Dröge (slomo) 2018-04-24 20:57:32 UTC
A property does not seem nice here. Either this is the correct behaviour or not, or we should implement something more clever in the base class to decide when to behave like this and when not.

Nothing would set properties on elements in autoplugged pipelines.
Comment 3 Zeeshan Ali 2018-04-24 22:09:19 UTC
(In reply to Sebastian Dröge (slomo) from comment #2)
> A property does not seem nice here. Either this is the correct behaviour or
> not, or we should implement something more clever in the base class to
> decide when to behave like this and when not.

I would actually suggest just removing this behaviour. It does not seem like base class should be doing this. If there is a way to be clever about this, I'm all ears.

> Nothing would set properties on elements in autoplugged pipelines.

Subclasses could but they really shouldn't need to.
Comment 4 Zeeshan Ali 2018-04-25 20:47:49 UTC
Also what is the usecase for this correction? Should the decoder really be doing this?
Comment 5 Olivier Crête 2018-05-04 09:42:42 UTC
*** Bug 738472 has been marked as a duplicate of this bug. ***
Comment 6 Sebastian Dröge (slomo) 2018-05-04 11:06:16 UTC
(In reply to Zeeshan Ali (Khattak) from comment #4)
> Also what is the usecase for this correction? Should the decoder really be
> doing this?

Probably not. Edward might remember
Comment 7 Zeeshan Ali 2018-05-06 09:46:55 UTC
We had a bit of discussion on this during the hackfest. Edwards was very reluctant to drop the code in question since if a buffer gets to that point, there is something very wrong happening upstream to the decoder and needs to be somehow addressed. Edward suggested maybe the timestamp should in this case be set to CLOCK_TIME_NONE.

While I, Sebastian and Olivier agree that something needs to be done, we don't think it's the decoder's job to be fixing the timestamp and should let upstream and downstream elements handle past timestamps. Especially since decoder in this case is not really fixing anything.

Sebastian didn't like the idea of setting timestamp to _CLOCK_TIME_NONE since it will break other elements downstream.

We will hopefully have another discussion today about this and have a conclusion.
Comment 8 Edward Hervey 2018-05-06 09:53:19 UTC
1) The only thing that should change in gstvideodecoder is to replace the GST_WARNING_OBJECT() by a GST_ELEMENT_WARNING() so the application/user is properly informed

2) Upstream elements should detect completely bogus PTS (like 5 years in the future) and set GST_CLOCK_TIME_NONE instead.
Comment 9 Zeeshan Ali 2018-05-07 15:18:56 UTC
(In reply to Edward Hervey from comment #8)
> 1) The only thing that should change in gstvideodecoder is to replace the
> GST_WARNING_OBJECT() by a GST_ELEMENT_WARNING() so the application/user is
> properly informed

One thing that is still unanswered is why is decoder fixing the PTS? Does it solve any problem? If the rationale is for the problem of insane PTS to be not ignored, than it should send an error instead of emitting a warning perhaps?
Comment 10 GStreamer system administrator 2018-11-03 12:05:33 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-base/issues/440.