Commit graph

18358 commits

Author SHA1 Message Date
Olivier Crête
97f2fb4cc8 rtph26xpay: Wait until there is a VCL or suffix NAL to send
With unit tests.
2019-07-03 19:05:29 +00:00
Olivier Crête
4810c93222 rtph265pay test: Add unit tests for aggregation 2019-07-03 19:05:29 +00:00
Olivier Crête
1b32cb1eae rtph265pay: Implement Aggregation packets
Align with rtph264pay
2019-07-03 19:05:29 +00:00
Olivier Crête
42d775dfbe rtph264pay test: Add unit tests for aggregation 2019-07-03 19:05:29 +00:00
Olivier Crête
5a9b602c9e rtph264pay: Report latency when in maximal aggregation mode 2019-07-03 19:05:29 +00:00
Olivier Crête
cede4f993d rtph264pay: Default to not adding latency when aggregating
Send the bundle as soon as there is one VCL unit in the packet at
the end of an incoming buffer.

The DELTA_UNIT flag is not reliable, so ignore it.
2019-07-03 19:05:29 +00:00
Olivier Crête
0c094612be rtp-payloading test: Fix working to 1.0 buffers instead of groups 2019-07-03 19:05:29 +00:00
Olivier Crête
13d25583db rtph265pay: Replace fragmentation while-loop with for-loop
Align with rtph264pay
2019-07-03 19:05:29 +00:00
Olivier Crête
9be70dc360 rtph265pay: Rename payload_len to max_fragment_size
Align to rtph264pay
2019-07-03 19:05:29 +00:00
Olivier Crête
34c23bdc5d rtph265pay: Clean up _payload_nal
Move determining whether we need to fragment at all into the
fragmenter.

Align with rtph264pay
2019-07-03 19:05:29 +00:00
Olivier Crête
f5765ccf05 rtph265pay: Extract sending fragments into _payload_nal_fragment
Align with rtph264pay
2019-07-03 19:05:29 +00:00
Olivier Crête
378c422e0c rtph265pay: Extract sending a single packet into _payload_nal_single
Align with rtph264pay
2019-07-03 19:05:29 +00:00
Olivier Crête
b841fd4c8a rtph265pay: Define and use FU_A_TYPE_ID
Align with rtph264pay
2019-07-03 19:05:29 +00:00
Olivier Crête
a6d50889af rtph265pay: Use snake_case variables
Align with rtph264pay
2019-07-03 19:05:29 +00:00
Olivier Crête
d4268ab2bf rtph265pay: Clean up whitespace and syntax
Align with rtph264pay
2019-07-03 19:05:29 +00:00
Jan Alexander Steffens (heftig)
b46dab13d2 rtph264pay: Support STAP-A bundling
Add a new property "do-aggregate"* to the H.264 RTP payloader which
enables STAP-A aggregation as per [RFC-6184][1]. With aggregation enabled,
packets are bundled instead of sent immediately, up until the MTU size.
Bundles also end at access unit boundaries or when packets have to be
fragmented.

*: The property-name is kept generic since it might apply more widely,
   e.g. STAP-B or MTAP.
[1]: https://tools.ietf.org/html/rfc6184#section-5.7

Closes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/434
2019-07-03 19:05:29 +00:00
Jan Alexander Steffens (heftig)
66a3db2083 rtph264pay: Fix delta-unit/discont handling when injecting SPS/PPS
Apply the wanted delta-unit and discont to the first packet; following
packets for this frame are always delta units and not discont.
2019-07-03 19:05:29 +00:00
Jan Alexander Steffens (heftig)
2a16160b57 rtph264pay: Replace fragmentation while-loop with for-loop 2019-07-03 19:05:29 +00:00
Jan Alexander Steffens (heftig)
00936a8362 rtph264pay: Calculate the right max_fragments 2019-07-03 19:05:29 +00:00
Jan Alexander Steffens (heftig)
fe99982dec rtph264pay: Rename payload_len to max_fragment_size 2019-07-03 19:05:29 +00:00
Jan Alexander Steffens (heftig)
5051569713 rtph264pay: Clean up _payload_nal_fragment 2019-07-03 19:05:29 +00:00
Jan Alexander Steffens (heftig)
d97c3f045c rtph264pay: Clean up _payload_nal
Move determining whether we need to fragment at all into the fragmenter.
2019-07-03 19:05:29 +00:00
Jan Alexander Steffens (heftig)
166c49b800 rtph264pay: Clean up _payload_nal_single 2019-07-03 19:05:29 +00:00
Jan Alexander Steffens (heftig)
b3291620ca rtph264pay: Extract sending fragments into _payload_nal_fragment 2019-07-03 19:05:29 +00:00
Jan Alexander Steffens (heftig)
e493f0ba09 rtph264pay: Extract sending a single packet into _payload_nal_single 2019-07-03 19:05:29 +00:00
Jan Alexander Steffens (heftig)
40c23c06b1 rtph264pay: Define and use FU_A_TYPE_ID 2019-07-03 19:05:29 +00:00
Jan Alexander Steffens (heftig)
bc0018370b rtph264pay: Use snake_case variables 2019-07-03 19:05:29 +00:00
Jan Alexander Steffens (heftig)
28d6dfa51f rtph264pay: Clean up whitespace and syntax 2019-07-03 19:05:29 +00:00
Olivier Crête
37d22186ff rtpjitterbuffer: Unlock output if the queue is full 2019-07-03 18:03:42 +00:00
Thomas Bluemel
080eba64de rtpjitterbuffer: Ignore unsolicited rtx packets.
If an rtx packet arrives that hasn't been requested (it might
have been requested from prior to a reset), ignore it so that
it doesn't inadvertently trigger a clock skew.
2019-07-03 06:23:07 -06:00
Havard Graff
4d4e8f99b9 rtpjitterbuffer: Add unit test for unsolicited rtx affecting skew 2019-07-03 06:23:07 -06:00
Thomas Bluemel
8d955fc32b rtpjitterbuffer: Only calculate skew or reset if no gap.
In the case of reordered packets, calculating skew would cause
pts values to be off. Only calculate skew when packets come
in as expected. Also, late RTX packets should not trigger
clock skew adjustments.

Fixes #612
2019-07-03 06:23:07 -06:00
Mart Raudsepp
ade531183f qtdemux: Provide a 30 frames lead-in for MP3
mpegaudioparse suggests MP3 needs 10 or 30 frames of lead-in (depending on
mpegaudioversion, which we don't know here), thus provide at least 30 frames
lead-in for such cases as a followup to commit cbfa4531ee.
2019-07-02 20:50:21 +00:00
Olivier Crête
af618cb081 rtpjitterbuffer: max-dropout-time gets cast to int32
So any value over MAXINT32 gets considered as negative and is silently ignored.
2019-07-02 19:59:49 +00:00
Mathieu Duponchelle
f4f11530c2 qtdemux: do_seek can never be called with a NULL event 2019-07-02 13:39:55 +02:00
Mathieu Duponchelle
83704e32e6 qtdemux: only adjust segment time when adjusting segment start
We ended up setting segment.time to segment.position when doing
reverse playback, which is obviously wrong.
2019-07-02 13:39:55 +02:00
Mathieu Duponchelle
33277da781 rtspsrc: unref the event in element seek handler 2019-07-01 13:54:13 +02:00
Mathieu Duponchelle
bcd367b81d rtspsrc: handle seek event on the element
Without this, the user has to wait for rtspsrc to have sent a PLAY
request and exposed its pads before seeking it.
2019-06-29 00:25:26 +02:00
Nicolas Dufresne
2c3c1072f7 multiudpsink: Add missing socket.h include
Without this include, macro like SO_BINDTODEVICE is not visible and
associated feature gets out-compiled. This also affects the support for
SO_SNDBUF.
2019-06-26 18:03:29 -04:00
Jan Alexander Steffens (heftig)
152b002658
flvmux: Clear new_tags if sending metadata in header
This avoids sending an additional metadata object right after the
headers.
2019-06-24 17:37:51 +02:00
Song Bing
f49d610ebe v4l2videodec: Fix drain() function return type
Return right type for drain() function.
2019-06-24 14:43:21 +00:00
Mart Raudsepp
ab6e49e9cc audioparsers: add back segment clipping to parsers that have lost it
The pre_push_frame default clipping behaviour was introduced in 2010
with commit 30be03004e and modified with commit 4163969a24 in 2011,
when most parsers didn't implement a pre_push_frame yet. Not having it
meant that clipping was done by default. Those that did implement a
pre_push_frame (flacparse and mpegaudioparse) at the time, had the flag
adjusted as part of the 2011 refactor work.

All other parsers got a pre_push_frame vfunc implementation only in
2013, but seem to have forgot to keep the clipping behaviour, as
was done automatically when a pre_push_frame implementation doesn't
exist for the parser. aacparse lost it with commit 91d4abcea in
July 2013; the others in Dec 2013 as part of AUDIO_CODEC tag posting
in commits 6f89b430e, d2ab5199b, 29f2cae12, 753d3c23a and 292780574.
2019-06-24 14:40:58 +03:00
Tim-Philipp Müller
92e4ecef4c v4l2: fix compiler warning due to c99-ism 2019-06-24 09:42:31 +00:00
Jan Alexander Steffens (heftig)
91e858dcbe
test: flvmux: Test changing caps with one sinkpad
These tests segfault without the preceding crash fix.
2019-06-19 14:36:21 +02:00
Jan Alexander Steffens (heftig)
daafce54ac
test: flvmux: Use gst_harness_sink_push_many
And check its return value.
2019-06-19 14:36:21 +02:00
Jan Alexander Steffens (heftig)
9528bfd78f
flvmux: Simplify an if-else chain
Merge the identical branches and turn the condition around to make it
easier to read.
2019-06-19 14:36:21 +02:00
Jan Alexander Steffens (heftig)
9a70ce87db
flvmux: Avoid crash when changing caps without both streams
mux->video_pad and mux->audio_pad can be NULL if the corresponding pad
has not been requested.
2019-06-19 14:36:21 +02:00
Sebastian Dröge
b18ad8b54c rtpgstpay: Send caps anyway if caps are pending in the adapter but are different from the new ones
Otherwise it can happen that we receive a caps event, then another caps
event and only then buffers. We would then send out the first caps event
in the stream but mark buffers with the caps version of the second caps
event.
2019-06-18 08:35:12 +00:00
Sebastian Dröge
44a697deba rtpgstdepay: Only store the current caps and drop old caps immediately
Otherwise it can happen that we already collected 7 caps, miss the 8th
caps packet (packet loss) and then re-use the 1st caps for the following
buffers instead of the 8th caps which will likely cause errors further
downstream unless both caps are accidentally the same.

Keeping old caps around does not seem to have any value other than
potentially causing errors. We would always receive new caps whenever
they change (even if they were previous ones) and it's very unlikely
that they happen to be exactly the same as the previous ones.

Also after having received new caps or a buffer with a next caps
version, no buffers with old caps version will arrive anymore.
2019-06-18 08:35:12 +00:00
Jan Schmidt
53b3f2ddbb rtpjitterbuffer: Clear clock master before unreffing
Make sure to clear any master clock on the media_clock
before unreffing it to release the timer callback that's
updating the clock and keeping it reffed.
2019-06-16 20:36:55 +10:00