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.
After clearing the adapter due to a DISCONT, as might happen when some packet(s)
have been lost, the depayloader was pushing data into the adapter (which had no
header due to the clear), creating a headerless frame out of it, and sending it
downstream. The downstream decoder would then usually ignore it; unless there
were lots of DISCONTs from the jitterbuffer in which case the decoder would reach
its max_errors limit and throw an element error. Now we just discard that data.
It is probaby not worth trying to salvage this data because non-progressive
jpeg does not degrade gracefully and makes the video unwatchable even with
low packet loss such as 3-5%.
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
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
The previous implementation had the formatting of SDP attributes happen
in each RTP payloader, now instead the constituent values are propagated
as caps fields. This allows for applications to do SDP offer/answer
based on caps negotiation.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=700748
The previous implementation had the formatting of SDP attributes happen
in each RTP payloader, now instead the constituent values are propagated
as caps fields. This allows for applications to do SDP offer/answer
based on caps negotiation.
Keep parsing a-framerate, x-framerate and x-dimensions in rtpjpegdepay
to be backwards compatible with previous payloaders.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=700748
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
atof() converts strings according to the current locale, but the
framerate string will likely always use a dot as floating point
separator, so use g_ascii_strtod() instead (but also canonicalise
the string before, so we can handle both formats as input).
Put a DISCONT event on the next output buffer when the input buffer had a
DISCONT.
Make sure we clear our adapter and reset our state before going to PAUSED.
Free the qtables.
Fixes#626869
Use some of the SDP attributes when they are present to specify the output
dimension and framerate. This allows us to receive jpeg frames larger than
2040 width/height.
Fixes#564437
Use the width and the height from the payload headers and set them on the
output caps for added awesomeness.
Fix quant parsing, we need to check the type in the lower 6 bits.
Add first bits of caching quantization tables.
Original commit message from CVS:
* gst/rtp/gstrtpjpegdepay.c: (gst_rtp_jpeg_depay_process):
Add an EOI marker at the end of the jpeg frame when it's missing.
Fixes#563056.