When switching to a new seamless segment, use the new
gst_base_src_new_seamless_segment() function, because elements can't
send themselves seek events from the streaming thread.
All the input pads for the resin stream selectors have the same source,
and receive/send the same segment info, so there's no need to send a
segment when switching and activating a different pad. Removing it makes
on-the-fly audio track switching work properly.
After switching audio track, mark the next buffer discont.
Avoid a potential deadlock that happens when a call to
gst_clock_id_wait_async() immediately calls the callback.
Improve previous chapter seeking slightly by avoiding 'segment
start != -1' assertions when there is no previous chapter and
the seek therefore fails.
When the layout of the audio streams changes, re-send the current
audio stream selection event, in order to trigger switching to the
new stream properly.
https://bugzilla.gnome.org/show_bug.cgi?id=575568
Enable creation of the demuxer pads for all audio streams, even types we
don't yet support. This means that unsupported types (LPCM, DTS) are output,
but not linked to anything yet. If only unsupported streams are available,
the user hears silence instead of having the pipeline not pre-roll correctly.
This is a prerequisite for hooking up the automatic decoder switching.
When updating a pad, send the update to half a second behind the SCR,
which avoids ever updating the start time for a pad to beyond the end of
the cell. Also, remember the last actual new-segment start time for each
pad, and use it when closing the segment.
When the current button number is higher than the number of available
buttons, switch to the highest numbered button rather than the lowest.
Also, don't throw errors when we fail to retrieve some button info
from libdvdnav, just reset the highlight.
Send the commands-changed navigation message when the set of available
DVD menu button actions changes, and handle the commands navigation
query so that (e.g.) Totem can know about the available navigation
commands.
Protect pad exposure with a preroll lock to avoid situations
where no-more-pads is fired more than once, or fired just before
the last pad is actually added.
Send segment updates to the audio and subpicture pads more frequently,
but less often to the video pad, where timestamps appear less often.
This helps with gap filling on some DVDs.
When creating a filler audio buffer in rsnaudiomunge, generate
a bit more, as audio sinks don't seem to preroll otherwise. This
needs a better algorithm in general, to intelligently fill the
gap, rather than hard-coding a value.
Make timed still frames work better by extending the current segment
when needed, and restarting the still sequence with the correct
remaining duration when the wait it interrupted by activation of a
highlight NAV packet.