tsdemux: implement proper seeking for h264 streams.
authorMathieu Duponchelle <mathieu.duponchelle@opencreed.com>
Fri, 30 May 2014 14:52:09 +0000 (16:52 +0200)
committerEdward Hervey <bilboed@bilboed.com>
Thu, 12 Jun 2014 12:44:10 +0000 (14:44 +0200)
commit79c13b713eedbe99ac8c1de496c6a137ebef8a3a
tree59a22c02f40691af9d52ddfd5367c11e6ad6bbb0
parent402086a82dbfaa85dfaf72aec24df9cf13db82f8
tsdemux: implement proper seeking for h264 streams.

Co-Authored by: Thibault Saunier <tsaunier@gnome.org>

From a high level perspective, the new process for seeking h264
streams is as follows:

1) Rewind the stream until we find the first I-slice of a frame,
   and mark its offset in the stream.
2) Rewind the stream until we find SPS and PPS informations,
   to make sure the subsequent parser is up to date.
3) Accumulate optionnal SEI NAL units on the way.
4) Push the SPS, PPS and SEI units before the new keyframe.

https://bugzilla.gnome.org/show_bug.cgi?id=675132
gst/mpegtsdemux/Makefile.am
gst/mpegtsdemux/tsdemux.c
gst/mpegtsdemux/tsdemux.h