A previous patch to add streams early to fix playback of
low bitrate streams causes frequent deadlock of a nature
I'm at loss how to fix.
I'm not certain whether it's a bug in decodebin2, or in
that mpegtsdemux patch.
Since it causes a major regression, let it be disabled for now.
This code is to sync to a live source when there is a delay
between start and when we receive the first buffer, so it does
not make sense in a non live case.
This fixes playback of streams where the input timestamps are
based off some arbitrary offset.
https://bugzilla.gnome.org/show_bug.cgi?id=663756
Some streams declare PIDs but will not send data for them.
Ensure we time out on those, and both send new segments to
keep their time synchronized with the rest, and do not wait
forever before deciding to signal no-more-pads.
https://bugzilla.gnome.org/show_bug.cgi?id=659924
We track streams for which a data callback is set (and for which
pads will be added only when data is received), and signal
no-more-pads when the last pad is added.
https://bugzilla.gnome.org/show_bug.cgi?id=659924
There was a second threshold, which apparently needs to be smaller
than the first, though I'm not certain of it as I don't understand
yet this nest of wtf that is the mpeg demuxer timing logic.
Fixes video freezing on one (corrupted) MPEG sample. It would
previously never think it was out of the discontinuity, and would
push buffers with no timestamp.
Now this took me more than a day's poking at the thing, for just
one constant change, and I'm scared to have to touch this again :S
https://bugzilla.gnome.org/show_bug.cgi?id=655804
In a test stream, I get one buffer with a PTS of about 15 seconds
in the future compared to the previous one, and next buffers with
timestamps continuing where the original ones left off.
This caused the sink to wait 15 seconds to display the frame while
more frames queued up, and then dump all the subsequent frames as
they "arrived too late".
Maybe that threshold should be made configurable, but for now,
make it more smaller to catch more of these.
https://bugzilla.gnome.org/show_bug.cgi?id=655804
Non AV streams keep using the larger threshold (10 minutes), as
subtitles may arrive only every so often.
<tpm> leio, what's the mpegts demux hack about?
<leio> my libdvbsub code can't handle cut packets
<leio> so the hack instructs the demuxer to gather full packets before pushing down, but it applies that to more PES packet types than just dvbsub, but I'm not sure if that's a bad thing
<leio> either way, needs a cleaner solution, either in demuxer, or I need to handle cut packets
<tpm> ok, but really it should be fixed in the overlay, right?
<tpm> or a parser be inserted
<leio> the problem is that I don't know from the first packet beforehand if it is a cut one or no
<leio> not
<leio> err, first buffer
<leio> just when I receive the next one I see if it has a valid timestamp on it or not
<leio> so I can't very well queue it up in the chain either, I might be blocking the very last subtitle for no reason or something
<tpm> but you could just drop/ignore packets until you find one, right?
<leio> find what?
<tpm> a complete packet?
<leio> the problem isn't that they aren't complete
<leio> the problem is that they are cut across multiple GstBuffers by the demuxer without the hack
<tpm> sure, I understand that
<tpm> but you can't easily determine if a GstBuffer contains he start fragment of a packet or not?
<leio> I guess I could parse the packet and see if its length is enough, just like the libdvbsub code eventually does too
<leio> I can, it has a timestamp if it's the first chunk
<leio> I just never know if I need to wait for more, without some parsing
<tpm> ah ok
<leio> while the demuxer could just give me an uncut one in the first place
<leio> like it always does for program streams
<leio> that gather_pes is always set in gstmpegdemux, but not in gstmpegtsdemux
gst_mpeg_descriptor_find() expects the description field to be non-NULL.
This fixes a couple of calls where the value being passed is not
verified to be non-NULL first.
https://bugzilla.gnome.org/show_bug.cgi?id=620456
When the stream type is set to private data, gst-mpegtsdemux is trying to find
audio descriptors in PMT and look for AC3 (tag 0x6a) but doesn't look for EAC3
(tag 0x7a). Handle this case too.
Fixes bug #605904.
When sending new-segment to a stream, ensure that there is either a valid
PCR, or else wait until there's a PTS on the stream (dropping packets if
needed) in order to avoid generating an invlaid new-segments event.
https://bugzilla.gnome.org/show_bug.cgi?id=595161
This fixes naive seeking a tiny bit (by basically hinting at _data_cb
that it shouldn't expect the incoming buffers to be the ones just after
the previous ones).
Without this, seeking by more than 10mins forward would just end up in an
endless loop.
This attribute can't be used for function declarations because
it needs the function body. Instead of a forward declaration of
functions, move the function itself above it's first use.
Fixes bug #594489 and compilation with gcc 4.3 and earlier.