Commit graph

9883 commits

Author SHA1 Message Date
Seungha Yang
aa0544ab8f matroska: Port to color_{primaries,transfer,matrix}_to_iso
... and remove duplicated code.
2019-07-15 23:25:53 +09:00
Jan Schmidt
436d33b288 splitmuxsink: add the ability to mux auxilliary video streams
The primary video stream is used to select fragment cut points
at keyframe boundaries. Auxilliary video streams may be
broken up at any packet - so fragments may not start with a keyframe
for those streams.
2019-07-15 11:46:36 +00:00
Jan Schmidt
b5d8484b0b splitmuxsrc: Add video_%d pad template.
splitmuxsrc actually supports multiple video pads. Make that clear,
especially since it was already creating pads named "video_0" etc.
2019-07-15 11:46:36 +00:00
Mathieu Duponchelle
9deb3c27ac qtdemux: fix conditions for end of segment in reverse playback
The time_position field of the stream is offset by the media_start
of its QtDemuxSegment compared to the start of the GstSegment of
the demuxer, take it into account when making comparisons.
2019-07-09 21:21:20 +00:00
Seungha Yang
67b8ce3167 matroskademux: Fix mismatched transfer characteristic
TransferCharacteristics(18) should be ARIB STD-B67 (HLG)
See https://www.webmproject.org/docs/container/#TransferCharacteristics

Also map more color primaries indexes which have been handled by matroska-mux.
2019-07-09 23:11:45 +09:00
Olivier Crête
9d9d543d5c rtpsession: Also send conflict event when sending packet
If the conflict is detected when sending a packet, then also send an
upstream event to tell the source to reconfigure itself.

Also ignore the collision if we see more than one collision from the same
remote source to avoid problems on loops.
2019-07-06 14:23:20 +00:00
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
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
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
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
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