Commit graph

26 commits

Author SHA1 Message Date
Stéphane Cerveau
80f8780e92 rtp: allow per feature registration
Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/876>
2021-03-29 12:45:22 +02:00
Mathieu Duponchelle
20fc6da913 rtpvp8depay: expose request-keyframe property
When set, the depayloader will request new keyframes on packet
loss

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/834>
2021-02-18 01:54:03 +00:00
Stian Selnes
d77fcf251b rtpvp8depay: Send lost events when marker bit is missing
This means the previous frame was incomplete.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/796>
2020-10-30 03:43:19 +01:00
Knut Saastad
fa505867a9 rtpvp9depay: detect incomplete frames and bail out
If a packet with the B bit set arrives but we haven't received
a packet with the marker or E bits set to end the previous frame,
we know the current frame was incomplete.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/795>
2020-10-30 01:31:19 +00:00
Mikhail Fludkov
346b077ae0 rtpvp*depay: possibly forward might-have-been-fec PacketLost events
This is ad adaptation of a Pexip patch for dealing with spurious
GstRTPPacketLost events caused by lost ulpfec packets: as FEC packets
under that scheme are spliced in the same sequence domain as the media
packets, it is not generally possible to determine whether a lost packet
was a FEC packet or a media packet.

When upstreaming pexip's ulpfec patches, we decided to drop all lost
events at the base depayloader level, and where the original patch
from pexip was making use of picture ids and marker bits to determine
whether a packet should be forwarded, this patch makes use of those
to determine whether they should be dropped instead (by removing their
might-have-been-fec field).

Spurious lost events coming out of the depayloader can cause the
decoder to stop decoding until the next keyframe and / or request a new
keyframe, and while this is not desirable it makes sense to forward
that information when we have other means to determine whether a lost
packet was indeed a FEC packet, as is the case with VP8 / VP9 payloads
when they carry a picture id.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/769>
2020-10-29 19:56:07 +01:00
Sebastian Dröge
2a4d0a9b09 rtpvp8depay: Add property for waiting until the next keyframe after packet loss
If VP8 is not encoded with error resilience enabled then any packet loss
causes very bad artefacts when decoding and waiting for the next
keyframe instead improves user experience considerably.
2019-08-12 17:10:20 +00:00
Tim-Philipp Müller
4a28e649c3 rtp: cache meta tag quarks and add more utility functions for metas
Every g_quark_from_static_string() is a hash table lookup serialised
on the global quark lock in GLib. Let's just look up the two quarks
we need once and cache them locally for future use. While we're at it,
add new utility functions for the two most commonly used tags
(audio + video). Make first argument a gpointer so we don't have to
cast and make the code ugly. These are used for logging purposes
only anyway.
2017-05-24 13:32:10 +01:00
Vineeth TM
1071309870 good: use new gst_element_class_add_static_pad_template()
https://bugzilla.gnome.org/show_bug.cgi?id=763076
2016-03-24 14:32:20 +02: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
Stian Selnes
45e05706e2 rtpvp8depay: Check available bytes before copy
Need to check that the number of bytes we want to copy from the adapter
actually is available and handle the error case gracefully. This error
may happen if malformed packets are received and we don't have a
complete frame.

https://bugzilla.gnome.org/show_bug.cgi?id=752663
2015-07-21 13:14:01 +01: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
Stian Selnes
d91ef9dcbf rtpv8depay: ignore reserved bit in payload descriptor
Draft 16 of "RTP Payload Format for VP8" states in section 4.2 that:

R: Bit reserved for future use.  MUST be set to zero and MUST be
   ignored by the receiver.

https://bugzilla.gnome.org/show_bug.cgi?id=751929
2015-07-06 12:03:51 +03:00
Sebastian Dröge
ceaf90f027 vp8depay: Don't lock/map every non-keyframe buffer twice
Just copy the complete header instead of first looking at the first byte
and then at the remaining 10 bytes.
2015-06-30 14:07:28 +02:00
Olivier Crête
1394a66e62 rtpvp8depay: When dropping intra packet, request keyframe
https://bugzilla.gnome.org/show_bug.cgi?id=747208
2015-04-13 18:13:35 -06:00
Olivier Crête
d410acf649 rtpvp8depay: Parse width/height/profile from keyframes
This makes it possible to mux the result into a container
such as matroska.

https://bugzilla.gnome.org/show_bug.cgi?id=747208
2015-04-01 19:31:18 -04:00
Nicolas Dufresne
0f4f948f5f rtpvp8: Use VP8 encoding name
Both Firefox and Chrome uses VP8 as the encoding in their SDP.
Adding this now defacto standard name removes the need for special
case in SDP parsing code.

https://bugzilla.gnome.org/show_bug.cgi?id=737810
2014-11-01 11:26:26 -04:00
Wim Taymans
8a78fa1ff5 vp8depay: fix header size checking
Use a different variable name to make it clear that we are calculating
the header size.
Correctly check that we have enough bytes to read the header bits. We
were checking if there were 5 bytes available in the header while we
only needed 3, causing the packet to be discarded as too small.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=723595
2014-06-19 15:29:46 +02:00
Tim-Philipp Müller
957c8e3e61 rtpvp8depay: mark key frames and delta frames properly
https://bugzilla.gnome.org/show_bug.cgi?id=705550
2013-08-07 11:14:38 +01:00
Wim Taymans
4397c8ffbf rtpdepay: remove payload type restrictions
Remove the pt restrictions for all the depayloaders that have an
encoding-name. We can use this to autoplug decoders.
Remove the encoding-name for all the payloaders with a fixed payload
type.
We now either have an encoding-name or a pt in the sinkpad caps of
a depayloader.

See https://bugzilla.gnome.org/show_bug.cgi?id=639292
2013-01-28 12:41:04 +01:00
Tim-Philipp Müller
5ac789408b rtpvp8: include config.h and minor style fixes 2012-11-01 21:10:21 +00:00
Tim-Philipp Müller
44efab8e3d rtpvp8: use gst_element_class_set_static_metadata()
where possible. Avoids some string copies. Also re-indent
some stuff. Also some indent fixes here and there.
2012-11-01 20:53:48 +00:00
Danilo Cesar Lemes de Paula
3edffb13e3 rtpvp8; fix compatibility with the third draft
https://bugzilla.gnome.org/show_bug.cgi?id=671073
2012-11-01 20:53:48 +00:00
Olivier Crête
c6761daa27 rtpvp8: port to 0.11 2012-11-01 20:53:47 +00:00
Youness Alaoui
1cf155d70d rtpvp8: Update the pay/depay to the ietf-draft-01 spec 2012-11-01 20:53:47 +00:00
Sjoerd Simons
6ed6318076 rtpvp8depay: Accept packets with only one byte of data
When fragmenting partions it can happen that an RTP packet only caries 1
byte of RTP data.
2012-11-01 20:53:47 +00:00
Sjoerd Simons
e9f4e9342f rtpvp8: Add simple payloaders and depayloaders for VP8
Minimal implementation of http://www.webmproject.org/code/specs/rtp/,
version 0.3.2
2012-11-01 20:53:47 +00:00