Commit graph

1231 commits

Author SHA1 Message Date
Olivier Crête
061afa33ee rtph265pay: Also immediately send packet if it is a suffix NAL
Immediately send packet if it contains any suffix NAL, this is required
in case they come after the VCL nal to not have to wait until the next frame.
2019-07-03 19:05:29 +00:00
Olivier Crête
43e83695fd rtph265pay: Don't drop second byte of NAL header
At least keep 2 bytes per NAL even if the second one is 0, the
second byte of the NAL header could very well be 0.
2019-07-03 19:05:29 +00:00
Olivier Crête
6fed30c48e rtph26xpay: Avoid print when there is no bundle at end of packet 2019-07-03 19:05:29 +00:00
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
1b32cb1eae rtph265pay: Implement Aggregation packets
Align with rtph264pay
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
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
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
Mathieu Duponchelle
f554369ed5 doc: remove xml from comments 2019-05-29 22:20:40 +02:00
Tim-Philipp Müller
b47f3c9c50 rtpmp4gdepay: don't spam debug log for broken ADTS-in-RTP AAC
Print warning only once.
2019-05-28 19:28:05 +00:00
Thibault Saunier
af01988534 doc: Port documentation to hotdoc 2019-05-13 11:34:56 -04:00
Thibault Saunier
0a6a62aa76 docs: Port all docstring to gtk-doc markdown 2019-05-13 10:24:40 -04:00
Sebastian Dröge
c4608b410c rtprawdepay: Don't get rid of the buffer pool on FLUSH_STOP
We expect there to be a pool as long as the caps are known and
FLUSH_STOP is not resetting the caps. Getting rid of the pool would
cause assertions.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/584
2019-05-01 10:00:51 +03:00
Tim-Philipp Müller
c6c3bed095 rtpulpfecdec,enc: unbreak plugin gtk-doc build in autotools
Fix doc chunks to not use that syntax for links that have the
url as description, it will be put verbatim into the xml/*.xml
file and then the expat parser will throw a syntax error like:

  File "../../common/mangle-db.py", line 71, in <module>
    main()
  File "../../common/mangle-db.py", line 69, in main
    patch (details.replace("-details", ""), os.path.basename(details))
  File "../../common/mangle-db.py", line 20, in patch
    doc = xml.dom.minidom.parse(related)
  File "/usr/lib/python2.7/xml/dom/minidom.py", line 1918, in parse
    return expatbuilder.parse(file)
  File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 924, in parse
    result = builder.parseFile(fp)
  File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 207, in parseFile
    parser.Parse(buffer, 0)
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 84, column 7
2019-04-09 23:58:30 +01:00
Antonio Ospite
61c1385c42 rtpvrawpay: preserve GST_BUFFER_FLAG_DISCONT on the first outputted buffer
If the incoming frame buffer has GST_BUFFER_FLAG_DISCONT set this should
be preserved and set for the first output buffer too, like other
payloaders do.

Spotted with gst-validate-1.0 when adding integration tests for
rtpsession, a minimal test to reproduce the issue is:

$ gst-validate-1.0 videotestsrc num-buffers=1 ! rtpvrawpay ! identity ! fakesink
Starting pipeline
Pipeline started
   warning : Buffer didn't have expected DISCONT flag333 speed: 1.000000 />
             Detected on <identity0:sink>
             Detected on <identity0:src>
             Detected on <fakesink0:sink>
             Description : Buffers after SEGMENT and FLUSH must have a DISCONT flag

Issues found: 1

=======> Test PASSED (Return value: 0)
2019-04-09 09:32:43 +00:00
Olivier Crête
92138dc3d6 rtpulpfec*: Replace github URIs with gitlab.fdo ones 2019-04-09 08:17:28 +00:00
Olivier Crête
1bd81d3d33 rtpred*: Add example pipelines 2019-04-09 08:17:28 +00:00
Olivier Crête
11f3018170 rtpulpfec*: Improve documentation 2019-04-09 08:17:28 +00:00
Olivier Crête
070eacdd4f rtpstorage + rtpulpfecdec: Get the storage using a query as fallback
This allows it to be used using gst-launch for easier testing.
2019-04-09 08:17:28 +00:00
Mathieu Duponchelle
74e3eb1f1d rtpgstpay: Set DELTA_UNIT flag when appropriate
When used in combination with a rtponviftimestamp element
downstream, forwarding this flag ensures it gets correctly
serialized in the ONVIF header extension.
2019-04-04 19:08:23 +02:00
Antonio Ospite
d6939c4031 docs: fix typo s/incomming/incoming/ 2019-04-03 16:38:56 +02:00
Antonio Ospite
f7c8317668 rtp: fix indentation after G_DEFINE_TYPE
A missing colon after G_DEFINE_TYPE declaration was confusing gst-indent
and causing problem in the pre-commit hook.

Add the missing colon and fix the following function declaration to
follow the normal GStreamer style.
2019-04-03 16:37:34 +02:00
Olivier Crête
915a9c99bb rtpstorage: Limit the queue size
Limit to the queue size in case there is no arrival time or in case there is
a huge flood of packets.
2019-03-29 22:51:54 +00:00
Olivier Crête
8bf074f21e rtpreddec: Add some more debug prints 2019-03-27 18:54:27 -04:00
Olivier Crête
c840328664 rtpstorage: Issue warning if request by size if 0
If the size is 0, then nothing will ever be in the storage, if a request is
received, it generally implies a misconfigured pipeline.
2019-03-26 19:41:06 -04:00
Olivier Crête
7a317ff732 rtpstorage: Add more debug messages 2019-03-26 19:41:06 -04:00
Olivier Crête
785219a317 rtpstorage: Make debug category available to sub objects 2019-03-26 19:41:06 -04:00
Olivier Crête
9b0a373eac rtpstorage: Add debug funcptr to chain function 2019-03-26 18:08:57 -04:00