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 685279 - DVD still frames need a way to never be dropped by QOS
DVD still frames need a way to never be dropped by QOS
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on: 793008
Blocks:
 
 
Reported: 2012-10-02 12:32 UTC by Jan Schmidt
Modified: 2018-11-03 12:16 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jan Schmidt 2012-10-02 12:32:30 UTC
If playback is running late (because things are slow coming off the disc, or any of the usual CPU-busy reasons) then DVD still frames can get dropped - and the presentation will pause and show whichever was the last frame to make it to the DVD SPU, making menus look weird (button highlights on some random intro frame).

To fix it, I think we need a buffer flag 'GST_BUFFER_FLAG_NOT_DROPPABLE' that can be set on a frame by the MPEG decoder. I think (from memory, may be wrong) it is required that all still frames be an I frame followed by an END packet, so an MPEG decoder could store a ref to the most recent keyframe, and output the frame when seeing an inbound still frame event, setting the NOT_DROPPABLE flag. I think it would have to do this unconditionally though, as downstream elements (might have dropped the frame).

Alternatively, the MPEG decoder could always set the NOT_DROPPABLE frame on outbound keyframes.

Comments?
Comment 1 Tim-Philipp Müller 2013-01-08 20:23:17 UTC
There appears to be a GST_BUFFER_FLAG_DROPPABLE already, which is the opposite of what we want.

Maybe we should make decoders mark all output as DROPPABLE and then make the QoS mechanism never drop stuff that's not marked as such? (Would need more places where that flag would need to be set).

Question is if that change in behaviour of sinks is acceptable, or if we do need to add  NON_DROPPABLE.
Comment 2 Tim-Philipp Müller 2018-01-18 15:21:38 UTC
Let's go for the GST_BUFFER_FLAG_NOT_DROPPABLE approach then?

Could also be a video-specific STILL_FRAME one, but that might be awkward to check for in the basetransform baseclass in core that presumably does the dropping. Could do both and map STILL_FRAME to NON_DROPPABLE of course.
Comment 3 Jan Schmidt 2018-01-19 14:35:37 UTC
There was an event (gst_video_event_new_still_frame/gst_video_event_parse_still_frame) that is sent when it's time start a still-frame sequence (and again when it's finished), but in DVD the frame which we should display is the one preceding the still-frame notification from the DVD VM.

That's what leads to the description in comment-1 - we need the decoder to repeat the most recent frame, but ensure that it is not going to be dropped this time (in case it was dropped the first time it was sent).
Comment 4 Tim-Philipp Müller 2018-01-19 14:59:52 UTC
Right, and we don't want to make all elements in the chain keep state for this either.
Comment 5 Strangiato 2018-01-29 16:44:38 UTC
sorry for my noob question, but will a fix for this bug solve many dvd video lags that currently occurs in totem video player?
Comment 6 Tim-Philipp Müller 2018-01-29 16:57:41 UTC
Strangiato: Depends what exactly you mean, but this bug is more about a corner case where a frame might not be displayed at all because it gets dropped when it shouldn't be dropped. "Lag" sounds like frames are displayed too late, so something else. I would suggest you file a new bug about that.
Comment 7 Tim-Philipp Müller 2018-01-31 13:15:25 UTC
Jan, can we (upstream, decoder) know if we're "in a Menu" or not? If yes, maybe we can just make the decoder flag keyframes as non-droppable while in menus.
Comment 8 Jan Schmidt 2018-01-31 13:27:24 UTC
No, I don't think so. Some sequences (like playing a promo video on the way into the main presentation) might use still frames. They're not a "menu specific" thing - and the concept of being in the 'menu' is tenuous anyway.
Comment 9 GStreamer system administrator 2018-11-03 12:16:12 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/gstreamer/issues/30.