Try prioritizing downstream's caps over upstream's if possible so the
parser can configured in "passthrough" if possible and save it from
doing useless conversions.
https://bugzilla.gnome.org/show_bug.cgi?id=790628
Since insertion of aud landed, we need to change some testcases
accroding to the change.
Note that counting frames are changed in parser.c,
due to generated frames, AUD.
https://bugzilla.gnome.org/show_bug.cgi?id=736213
Check that conversion to byte-stream/au formats work and that we
can effectively drop broken/invalid NAL units from the resulting
access unit buffer.
https://bugzilla.gnome.org/show_bug.cgi?id=732203
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
If an SEI NAL unit with a buffering_period() message is inserted
between an SPS and PPS NAL unit, check that the output buffer still
contain it. i.e. make sure that this SEI message is not dropped.
https://bugzilla.gnome.org/show_bug.cgi?id=732156
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Commit 6af387cd5a made h264parse
strip a leading 0x00 byte from some output scenarios. This broke
tests as bs_to_nal test expects one more byte on the output.
Fix this by comparing the output with the expected stripped version,
too.
When outputting in AVC3 stream format, the codec_data should not
contain any SPS or PPS, because they are embedded inside the stream.
In case of avc->bytestream h264parse will push the SPS and PPS from
codec_data downstream at the start of the stream, at intervals
controlled by "config-interval" and when there is a codec_data change.
In the case of avc3->bytstream h264parse detects that there is
already SPS/PPS in the stream and sets h264parse->push_codec to FALSE.
Therefore avc3->bytstream was already supported, except for the stream
type.
In the case of bystream->avc h264parse will generate codec_data caps
from the parsed SPS/PPS in the stream. However it does not remove these
SPS/PPS from the stream. bytestream->avc3 is the same as bytestream->avc
except that the codec_data must not have any SPS/PPS in it.
|--------------+-------------+-------------------|
|stream-format | SPS in-band | SPS in codec_data |
|--------------+-------------+-------------------|
| avc | maybe | always |
|--------------+-------------+-------------------|
| avc3 | always | never |
|--------------+-------------+-------------------|
Amendment 2 of ISO/IEC 14496-15 (AVC file format) is defining a new
structure for fragmented MP4 called "avc3". The principal difference
between AVC1 and AVC3 is the location of the codec initialisation
data (e.g. SPS, PPS). In AVC1 this data is placed in the initial MOOV box
(moov.trak.mdia.minf.stbl.stsd.avc1) but in AVC3 this data goes in the
first sample of every fragment.
https://bugzilla.gnome.org/show_bug.cgi?id=702004