Commit graph

83 commits

Author SHA1 Message Date
Tim-Philipp Müller
3aa0dd8629 rtph264depay: fix unnecessary sub-buffer creation
We create a sub-buffer just to copy over its metas and then
throw it away immediately, just use the original input buffer
directly.
2016-01-08 16:40:32 +00:00
Sebastian Dröge
b1089fb520 rtp: Copy metadata in the (de)payloader, but only the relevant ones
The payloader didn't copy anything so far, the depayloader copied every
possible meta. Let's make it consistent and just copy all metas without
tags or with only the video tag.

https://bugzilla.gnome.org/show_bug.cgi?id=751774
2015-08-11 12:47:23 +02:00
Hyunjun Ko
9c5c16eb57 rtph264depay: checking if depay has sps/pps nals before insertion
https://bugzilla.gnome.org/show_bug.cgi?id=753430
2015-08-10 10:49:02 +02:00
Sebastian Dröge
9ae316974d rtph264depay: Put the profile and level into the caps 2015-08-04 12:45:06 +03:00
Sebastian Dröge
8dda570e47 rtph264depay: Only update the srcpad caps if something else than the codec_data changed
h264parse does the same, let's keep the behaviour consistent. As we now
include the codec_data inside the stream too here, this causes less caps
renegotiation.
2015-08-04 12:45:06 +03:00
Sebastian Dröge
e0c124f76d rtph264depay: PPS replaces and old PPS if it has the same id, independent of SPS id
The spec says:

When a picture parameter set NAL unit with a particular value of
pic_parameter_set_id is received, its content replaces the content of the
previous picture parameter set NAL unit, in decoding order, with the same
value of pic_parameter_set_id (when a previous picture parameter set NAL unit
with the same value of pic_parameter_set_id was present in the bitstream).
2015-08-04 12:45:06 +03:00
Sebastian Dröge
ef7863355c rtph264depay: Insert SPS/PPS NALs into the stream
h264parse does the same and this fixes decoding of some streams with 32 SPS
(or 256 PPS). It is allowed to have SPS ID 0 to 31 (or PPS ID 0 to 255), but
the field in the codec_data for the number of SPS or PPS is only 5 (or 8) bit.
As such, 32 SPS (or 256 PPS) are interpreted as 0 everywhere.

This looks like a mistake in the part of the spec about the codec_data.
2015-08-03 18:24:18 +03:00
Tim-Philipp Müller
6717c86061 rtp: depayloaders: implement process_rtp_packet() vfunc
For more optimised RTP packet handling: means we don't
need to map the input buffer again but can just re-use
the mapping the base class has already done.

https://bugzilla.gnome.org/show_bug.cgi?id=750235
2015-07-12 14:28:29 +01:00
Sebastian Dröge
dc059efa60 rtp: Use GST_BUFFER_PTS() instead of GST_BUFFER_TIMESTAMP()
The mix between all these in the RTP code is confusing, let's try to be
consistent.
2015-06-10 14:34:47 +02:00
Luis de Bethencourt
823194284c rtph264depay: remove unused value
CID #1226474
2015-03-09 16:22:33 +00:00
Thiago Santos
a6d73797d0 rtph264depay: prevent trying to get 0 bytes from adapter
This causes an assertion and would lead to getting a NULL instead
of a buffer. Without proper checking this would easily lead to
a segfault

https://bugzilla.gnome.org/show_bug.cgi?id=737199
2015-02-04 21:37:50 -03:00
Wim Taymans
a5a7649831 h264depay: make sure we call handle_nal for each NAL
Call handle_nal for each NAL in the STAP-A RTP packet. This makes
sure we correctly extract the SPS and PPS.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=730999
2014-05-30 16:51:37 +02:00
Josep Torra
eaee14aff4 rtph264depay: only guess AU boundaries when aren't indicated by marker
The marker bit isn't mandatory and we had in place code to guess AU
boundaries by detecting a new picture start. This guessing code
didn't work with interlaced content that has proper marker bits
to indicate the AU boundaries. It was leaking the first field buffer
and producing a corrupted output.

fixes: https://bugzilla.gnome.org/show_bug.cgi?id=728041
2014-04-12 04:42:36 +02:00
Wim Taymans
db90f6e68d h264depay: init debug category early
Init the debug variable when we register the element because it is also used by
the payloader element when it calls the add_sps_pps method.
2013-08-16 17:12:19 +02:00
Olivier Crête
742b90747d rtph264depay: Make the SPS/PPS deduplication function generic
Make it not touch any internals of the depayloader

https://bugzilla.gnome.org/show_bug.cgi?id=705553
2013-08-13 10:38:23 -04:00
Wim Taymans
1516c14881 Revert "rtph264pay/depay: Add frame dimensions a payloaded caps"
This reverts commit 3dca756a5d.

The H264 RTP spec has no attributes for width and height.
2013-05-31 15:11:12 +02:00
Wim Taymans
b79d217396 Revert "rtph264pay/depay: Add optional framerate caps for use in SDP"
This reverts commit d8825e2a5c.

There is no framerate attribute in the h264 RTP spec.
2013-05-31 15:09:51 +02:00
Sebastian Rasmussen
d8825e2a5c rtph264pay/depay: Add optional framerate caps for use in SDP
This allows for applications to format SDP attributes and still do SDP
offer/answer based on caps negotiation.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=700749
2013-05-23 21:04:17 +02:00
Sebastian Rasmussen
3dca756a5d rtph264pay/depay: Add frame dimensions a payloaded caps
This allows for applications to format SDP attributes and still do SDP
offer/answer based on caps negotiation.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=700749
2013-05-23 21:04:11 +02:00
Marc Leeman
bab2f3c92b rtp: remove payload requirements from selected depayloaders
encoding name is required in the caps and is a better fit for autoplugging than
the pt value. Hardware manufacturers have a bad habit of skimming through RFCs
and in this case; use unassigned numbers for encoders instead of dynamic
numbers.

In essence, this patch will add support for a lot of Bosch hardware encoders
without breaking autoplugging.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=639292
2013-01-28 12:23:41 +01:00
Tim-Philipp Müller
230cf41cc9 Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-04 00:07:18 +00:00
Wim Taymans
0ed9e07c5d h264depay: small cleanups 2012-07-25 12:49:07 +02:00
Tim-Philipp Müller
cd1da84bcc rtph264depay: remove deprecated "byte-stream" and "access-unit" properties
These will be picked automatically based on downstream caps now, so
if you want the depayloader to output a specific format, make sure
the element downstream advertises that preference or use a capsfilter
after the depayloader to force it.
2012-07-06 14:46:22 +01:00
Thiago Santos
78ec03e32f Some printf variable format fixes
The osx compiler complains about those
2012-06-05 17:53:57 -03:00
Tim-Philipp Müller
e09ae5736d Use new gst_element_class_set_static_metadata() 2012-04-10 00:51:41 +01:00
Wim Taymans
69002aa24f update for buffer changes 2012-03-28 12:53:05 +02:00
Olivier Crête
06f1c1817e rtph264depay: Make output in AVC stream format work even without complete sprop-parameter-set
This allows outputting streams in AVC format even if the SPS/PPS are sent inside
the RTP stream.

https://bugzilla.gnome.org/show_bug.cgi?id=654850

Ported from master
2012-03-22 16:18:37 -04:00
Wim Taymans
745210e792 h264depay: unmap on empty packet 2012-03-13 19:26:23 +01:00
Wim Taymans
e4fed38f49 rtp: fix unmap calls 2012-03-13 17:27:32 +01:00
Wim Taymans
225e98d623 Merge branch 'master' into 0.11
Conflicts:
	ext/flac/gstflacenc.c
	ext/jack/gstjackaudioclient.c
	ext/jack/gstjackaudiosink.c
	ext/jack/gstjackaudiosrc.c
	ext/pulse/plugin.c
	ext/shout2/gstshout2.c
	gst/matroska/matroska-mux.c
	gst/rtp/gstrtph264pay.c
2012-02-10 16:23:14 +01:00
Tim-Philipp Müller
6872b40873 rtph264depay: add stream-format and alignment fields to src template caps
Because we can. And so we get a warning if we try to output avc with
nal alignment or somesuch.

https://bugzilla.gnome.org/show_bug.cgi?id=606662
2012-02-10 14:08:55 +00:00
Pascal Buhler
c16fed2ad9 rtph264depay: Exclude NALu size from payload length on truncated packets.
https://bugzilla.gnome.org/show_bug.cgi?id=667846
2012-01-30 15:49:07 +00:00
Wim Taymans
583d39dd8d update for new memory API 2012-01-25 12:30:28 +01:00
Vincent Penquerc'h
c0e101e93f various: fix pad template leaks
https://bugzilla.gnome.org/show_bug.cgi?id=662664
2011-11-28 13:30:27 +00:00
Wim Taymans
249d0083cc update for base class rename 2011-11-11 12:25:01 +01:00
Wim Taymans
9c14280b1d make some more things compile again 2011-10-27 19:00:52 +02:00
Wim Taymans
87fbd1e784 Merge branch 'master' into 0.11
Conflicts:
	common
	ext/pulse/pulsesink.c
	ext/soup/gstsouphttpclientsink.c
	gst/audioparsers/gstaacparse.c
	gst/audioparsers/gstac3parse.c
	gst/rtp/gstrtph264depay.c
	gst/rtpmanager/gstrtpjitterbuffer.c
	gst/rtpmanager/rtpjitterbuffer.c
	gst/rtsp/gstrtspsrc.c
	sys/ximage/gstximagesrc.c
2011-09-28 12:44:59 +02:00
Mark Nauwelaerts
fd757890eb rtph264depay: improve downstream flow return feedback to upstream
... although basertpdepay does not really make it easy/possible to do so
all the way.
2011-09-20 14:14:39 +02:00
Wim Taymans
ee2aa25e04 port to new API 2011-08-03 18:37:27 +02:00
Wim Taymans
4121021bb2 Merge branch 'master' into 0.11
Conflicts:
	ext/pulse/pulsesink.c
	ext/pulse/pulsesrc.c
	gst/audioparsers/gstac3parse.c
	gst/rtp/gstrtph264depay.c
	gst/rtp/gstrtph264pay.c
	gst/rtpmanager/gstrtpssrcdemux.c
2011-08-03 18:25:30 +02:00
Sjoerd Simons
4c73439ee3 rtph264depay: Cope with FU-A E bit not being set
Some h264 payloaders are unfortunately buggy and don't correctly set the
E bit in FU-A NAL when they have ended. Work around this by assuming
such a fragmentation unit has ended when there was no packet loss and a
new NAL is started
2011-07-27 18:18:13 +01:00
Olivier Crête
2591a882ae rtph264depay: Complete merged AU on marker bit
The marker bit on a RTP packet means the AU has been completed, so push it out
immediately to reduce the latency.

https://bugzilla.gnome.org/show_bug.cgi?id=654850
2011-07-21 17:11:08 +02:00
Mark Nauwelaerts
471904032d rtph264depay: reset upon FLUSH_STOP
... which is particularly needed when merging NAL units, where not resetting
would lead to output of an older (pre-flush) AU (with unintended timestamp).
2011-07-18 14:32:26 +02:00
Wim Taymans
9a54175e9f rtp: port to 0.11 2011-06-13 16:33:46 +02:00
Tim-Philipp Müller
693b3b7e0b h264depay: don't leak codec data buffer in byte-stream=true mode
https://bugzilla.gnome.org/show_bug.cgi?id=640063
2011-01-20 14:10:55 +00:00
Wim Taymans
f4155f3cf3 rtp: add RTP hint to the klass 2010-12-21 17:23:03 +01:00
Wim Taymans
f357e09ac1 rtp: fix rank of payloaders and depayloaders
Set the payloaders and depayloaders to a reasonable rank.
2010-12-21 17:22:58 +01:00
Mark Nauwelaerts
4c368242c0 rtph264depay: determine output h264 layout using caps negotiation
... thereby (partially) deprecating properties currently controlling whether
or not byte-stream output or NAL/AU alignment (though properties still determine
fallback if nothing specified in caps).

Fixes #606662.
2010-12-17 15:38:27 +01:00
Thijs Vermeir
e7b1655069 rtph264depay: fix segfault on empty payload
https://bugzilla.gnome.org/show_bug.cgi?id=635843
2010-11-26 23:33:40 +00:00
Wim Taymans
706731b331 rtph264depay: only set delta unit on all-non-key units
Only set the delta flag when all of the units in the packet are delta units.
Based on patch from Olivier Crête <olivier.crete@collabora.co.uk>

Fixes #632945
2010-11-01 15:09:05 +01:00