Commit graph

27 commits

Author SHA1 Message Date
Hyunjun Ko
201e71c3aa h264parse: insert AU delimiter only in case of byte-stream
Inserts AU delimeter by default if missing au delimeter from upstream.
This should be done only in case of byte-stream format.

Note that:
We have to compensate for the new bytes added for the AU, otherwise
insertion of PPS/SPS will use wrong offsets and overwrite wrong data.

Also mark the AU delimiter blob const, and use frame->out_buffer for
storing the output to keep baseparse assumptions valid.

Original-Patch-By: Michal Lazo <michal.lazo@mdragon.org>
Helped by Sebastian Dröge <sebastian@centricular.com>

https://bugzilla.gnome.org/show_bug.cgi?id=736213
2017-03-07 13:27:33 +02:00
Jan Schmidt
92e7e3a3bf h264parse: When input alignment=AU, always drain each packet.
If the input alignment claims AU alignment, each received
buffer should contain a complete video frame, so never hold over parts
of buffers for later processing. Also reduces latency, as packets
are parsed/converted and output immediately instead of 1 buffer
later.

Fixes a problem where an (arguably disallowed) padding byte on the
end of a buffer is detected as an extra byte in the following
start code, and messes up the timestamping that should apply to
that start code.
2016-06-24 22:55:18 +10:00
Mats Lindestam
0c04e004bb h264parse: change "config-interval" property type from uint to int
So we can use -1 as special value like in rtph264pay.

https://bugzilla.gnome.org/show_bug.cgi?id=766803
2016-06-13 10:08:22 +01:00
Jan Schmidt
08c73f9cc7 h264parse: Add support for passing stereoscopic/multiview info
Pass any multiview info from the container or SEI info downstream
2015-06-12 00:39:15 +10:00
Jan Schmidt
e8908f5aee h264parse: Don't switch to passthrough on set_caps()
Wait until at least one keyframe has been parsed before
deciding to switch to passthrough mode, in case the
stream contains SEI messages that supplement the output
caps - for example by providing stereoscopic information
2015-06-12 00:39:15 +10:00
Josep Torra
d518033e77 h264parse: set the HEADER flag on buffers containing SPS or PPS 2014-11-07 15:51:48 +01:00
Gwenole Beauchesne
7bb6443bfb h264parse: introduce new state tracking variables.
Improve parser state tracking by introducing new flags reflecting
it: "got-sps", "got-pps" and "got-slice". This is an addition for
robustness purposes.

Older have_sps and have_pps variables are kept because they have
a different meaning. i.e. they are used for deciding on when to
submit updated caps or not, and rather mean "have new SPS/PPS to
be submitted?"

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-07-01 16:26:48 +02:00
Sebastian Dröge
10ffa089a0 h264parse: Copy over DISCONT flag from input buffers 2014-03-29 10:33:45 +01:00
Sebastian Dröge
6934c7e2fc h264parse: Post VIDEO_CODEC tag 2013-12-16 10:18:23 +01:00
Sreerenj Balachandran
ab3f7d6096 h264parse: Remove the explicit PAR calculation based on VUI headers
The PAR calculation based on VUI headers is already doing by the
h264 codecparser and we does't need to duplicate those code.

https://bugzilla.gnome.org//show_bug.cgi?id=711009
2013-10-31 23:00:58 +01:00
Mark Nauwelaerts
7df753165f h264parse: separate fields for distinct functional uses of codec_data field
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=692789
2013-02-02 19:29:40 +01:00
Tim-Philipp Müller
9e1b75fda3 Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-04 00:09:59 +00:00
Mark Nauwelaerts
c7216162e4 h264parse: remove _chain hack
As we can now rely upon being passed upstream delineated data in
::handle_frame(), the latter can also parse avc formatted data
without having to intercept baseparse's chain function.

While this evidently requires 2 separate parsing paths, each can
be streamlined accordingly.
2012-02-15 17:15:10 +01:00
Mark Nauwelaerts
1cbd755a2c h264parse: unobfuscate frame parsing code 2012-02-10 14:52:03 +01:00
Mark Nauwelaerts
da89903f81 h264parse: disable optimized packetized processing for reverse playback
... as baseparse then provides whole chunks of data (as it should) at once
to be parsed, and so the assumptions used to optimize are no longer valid.

Fixes #667560.
2012-02-01 13:53:17 +01:00
Mark Nauwelaerts
283f97cb79 h264parse: also mind SEI position for config data insertion
Fixes #668627.
2012-02-01 13:53:15 +01:00
Mark Nauwelaerts
136f42974d h264parse: unbreak optimized packetized NALU collection processing
... in that it was so optimized it did not consider grouping NALU into AU
altogether.

Fixes #668627.
2012-02-01 13:53:13 +01:00
Mark Nauwelaerts
c4abaf1428 h264parse: fix and tweak frame timestamping
... to run with properly init'ed variables, and to only perform interpolation
in safe cases.
2012-01-04 11:16:18 +01:00
Alessandro Decina
570ba0c84a h264parse: avoid pushing SPS/PPS at start only if both are found in stream
Avoid injecting SPS/PPS nals only if both are already present in the stream.
Fixes some AVC clips that happen to have only PPS nals in stream.
2011-12-19 12:36:39 +01:00
Alessandro Decina
a1305b949c h264parse: handle force key unit events
Send SPS/PPS on force key unit events. Useful for example when serving HLS
without transcoding.
2011-12-06 13:16:29 +01:00
Alessandro Decina
4474db4e71 h264parse: let upstream PAR override in-stream PAR 2011-12-01 09:07:18 +01:00
Alessandro Decina
21b063a78c h264parse: rework PAR parsing
And in the process refactor _update_src_caps a bit
2011-12-01 09:06:56 +01:00
Luciana Fujii Pontello
6d85d4882a h264parse: respect pixel-aspect-ratio
Parse pixel-aspect-ratio in vui information.
2011-12-01 08:23:22 +01:00
Thibault Saunier
b968f82b18 h264parse: Port to the new h.264 parsing library 2011-09-02 15:46:02 +02:00
Tim-Philipp Müller
5365dbfdce videoparsers: port to baseparse, which is now in libgstbase in core 2011-04-09 00:24:03 +01:00
David Schleef
fa3ff9e5ed baseparse: Create baseparse library 2011-02-17 13:57:56 -08:00
Mark Nauwelaerts
d0b942980e videoparsers: add h264parse
Functionally equivalent to (legacy)h264parse and re-uses the latter's low
level NAL parsing, but otherwise based on GstBaseParse, and replacing
some property configuration with caps negotiation.
2011-01-28 12:50:25 +01:00