GNOME Bugzilla – Bug 755159
implement GstStreamFlags bit to mark forced streams, e.g. forced subtitles
Last modified: 2018-11-03 12:29:48 UTC
there was no way how to pass down information about whether a stream is flagged as "forced". as slomo suggested on irc, i've implemented this to be included in the stream-start event, so a GstSteamFlags definition had to be added.
Created attachment 311551 [details] [review] set GST_MATROSKA_TRACK_FORCED for GST_MATROSKA_TRACK_FORCED streams.
Created attachment 311552 [details] [review] add GstStreamFlags bit to mark forced streams.
Review of attachment 311552 [details] [review]: ::: gst/gstevent.h @@ +383,3 @@ * a director's commentary track). + * @GST_STREAM_FLAG_FORCED: Some or all of the data in this stream should be + * presented in any case (e.g. subtitles when somebody speaks Klingon) In any case? Or only if no other streams of the same kind are explicitly selected? Add a Since: 1.8 marker here too
Generally, a forced subs track should be selected by default, but in forced-only display mode, so that only the specific subtitles marked forced get displayed, and preferring the user's language setting when choosing between multiple forced tracks. We don't have API for enabling a subtitle track in forced-subs-only mode, so we'll be needing that too - it's not enough for matroska to just announce that the track contains forced subtitles - we need to tell the subs renderer not to draw the whole shebang. For DVD subtitles, this is done by the VM sending an event downstream to dvdspu, but that's because the DVD VM knows whether to be in forced-only mode or not.
Use case PGS: http://forum.doom9.org/showthread.php?p=1659305#post1659305 To support PGS tracks of type 3. in matroska the track must be marked as forced. Therefore all subtitles should be displayed for tracks marked as forced regardless of whether specific subtitles are flagged forced or non-forced. PGS tracks of type 1. could be handled in matroska by setting the "default" flag of this track so it will be pre-selected. In this case only the subtitles flagged as forced should be displayed. But the user should be able to switch on displaying all subtitles (also non-forced).
Created attachment 311617 [details] [review] add dvdspu forced-mode property (PGS only, needs to be made consistent with vobsub) with this patch, in PGS streams from matroska containers marked as forced, only the subtitle objects that have the force flag will be showed by default. this is just a suggestion, it won't work with vobsub yet and there is no api for playbin or anything yet, so the application will have to get a hold of dvdspu reference and set the forced-mode property to user-override this
-- 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/129.