gstreamer/gst/mpegtsdemux
Edward Hervey 56ae254dd3 mpegtbase: Improve last PCR detection
When dealing with random-access content (such as files), we initially
search for the last PCR in order to figure out duration and to handle
other position estimation such as those used in seeking.

Previously, the code looking for that last PCR would search in the last
640kB of the file going forward, and stop at the first PCR encountered.
The problem with that was two-fold:
* It wouldn't really be the last PCR (it would be the first one within
  those last 640kB. In case of VBR files, this would put off duration
  and seek code slightly.
* It would fail on files with bitrates higher than 52Mbit/s (not common)

Instead this patch modifies that code by:
* Scanning over the last 2048kB (allows to cope with streams up to 160Mbit/s)
* Starts by the end of the file, going over chunks of 300 MPEG-TS packets
* Doesn't stop at the first PCR detected in a chunk, but instead records all
  of them, and only stop searching if there was "at least" one PCR within
  that chunk

This should improve duration reporting and seeking operations on VBR files

https://bugzilla.gnome.org/show_bug.cgi?id=708532
2014-12-01 15:04:25 +01:00
..
gstmpegdefs.h tsdemux: Fix scaling macros 2014-04-18 16:20:31 +02:00
gstmpegdesc.h tsdemux: Add HEVC / h265 support 2014-01-06 13:54:40 +01:00
gsttsdemux.c mpegtsdemux: Update plugin license field 2014-02-06 14:28:54 +01:00
Makefile.am tsdemux: implement proper seeking for h264 streams. 2014-06-12 14:44:10 +02:00
mpegtsbase.c mpegtbase: Improve last PCR detection 2014-12-01 15:04:25 +01:00
mpegtsbase.h tsparse: Implement timestamp/retimestamping of output buffers 2014-10-29 23:02:50 +11:00
mpegtspacketizer.c mpegtspacketizer: Fix format string compiler warning 2014-11-24 13:34:21 +01:00
mpegtspacketizer.h tsparse: Handle backward and discont timestamps better. 2014-10-29 23:02:50 +11:00
mpegtsparse.c tsparse: Handle backward and discont timestamps better. 2014-10-29 23:02:50 +11:00
mpegtsparse.h tsparse: Implement timestamp/retimestamping of output buffers 2014-10-29 23:02:50 +11:00
pesparse.c tsdemux: Fix flags comparison operator precedence 2014-01-28 13:56:44 +01:00
pesparse.h tsdemux: fix overflow of packet_length field of PESHeader 2014-09-12 11:27:52 +02:00
TODO tsdemux: Update TODO 2012-03-05 10:17:56 +01:00
tsdemux.c tsdemux: Only activate warning for real streams 2014-12-01 13:31:21 +01:00
tsdemux.h tsdemux: implement proper seeking for h264 streams. 2014-06-12 14:44:10 +02:00