Although the spec says that the clock-rate should always be 90000, some rtsp
servers send different clock-rates so we must accept then in order to handle
those streams too.
When we can't find any channel or encoding-params on the caps for dynamic
payload types, set the default number of channels to 1, as the spec says we
should.
See #623209
When parsing the number of channels, use the encoding-params property from the
RTP caps because that is where we can find the channels according to the spec.
Fall back to the channels property in the caps when needed.
Fixes#623209
G729 packets may only occur intermittently (e.g. cn packets), and as such
do not allow for perfect-rtptime calculating rtp times based on frame or byte
count. In particular, do not use rtp audio base payloader as base class, but
rather base payloader directly.
Even though we don't use delivery-method in our payloader, older versions of
the theora payloader in gstreamer required it. As such we need to keep this
around in the caps for backwards-compatibility.
This reverts part of 49463a37cbFixes#618940
When we calculate the frame duration, we need to use the amount of
frames in the _previous_ packet, not the current packet. The frame duration is
needed to correctly de-interleave interleaved streams. This fixes the case where
there are a variable number of frames in a packet.
Fixes#620494
It probably will not be in the final RFC as it is not in RFC 5215 for Vorbis.
If there is a configuration specified, assume it is in-line and if nothing is
specified, assume it is in-band.
https://bugzilla.gnome.org/show_bug.cgi?id=618386
Don't blindly add the durations of incomming buffers to the total queued
duration because it might be invalid. Mark the total queued duration invalid
when we receive an invalid incomming timestamp because that's when we lose track
of the total queued duration.
Fixes#618324
Add a new config-interval property to instruct the payloader to insert
configuration headers at periodic intervals in the stream
(when a keyframe is countered).
Add a new config-interval property to instruct the payloader to insert
config (VOSH, VOS, etc) at periodic intervals in the stream
(when a GOP or VOP-I is encountered).
Based on patch by <marc.leeman at gmail.com>
Fixes#607452.
... which evidently makes (most) sense if output buffers are
actually frames.
Partially based on a patch by
Miguel Angel Cabrera <mad_aluche at hotmail.com>
Fixes#609658.
So we stop dropping fragments as soon as there is a picture start (code).
In particular, this prevents dropping the first frame following
initial DISCONT.
... rather than falling back to sending the whole frame in one packet
if number of GOB startcodes < maximum.
One might take this further and still perform Mode B/C payloading,
but at least this should cater for decent fragments in typical cases.
Fixes#599585.
in rtph264depay.c, lines 577-576, NALU-type 24 (Single-Time Aggregation
Packet) is handled in fall-through as NALU-type 26 (unhandled).
This leads high quality h264 streams such as:
rtsp://stream.yle.mobi/yle/areena/MEDIA_E0342657_p3.mp4
to fail with "NAL unit type 24 not supported yet" (but it's actually
supported), and thus to close any stream which contains STAPs.
The proposed one-liner patch fixes the issue.
Fixes#615051.
When no constantDuration has been given in the caps, try to derive one from the
timestamp difference between packets. Also keep doing this for each packet
because some broken streams might simply provide wrong timestamps.
The profile-level-id represents restrictions on what can be sent, it does not
describe the stream. So it should be reflected in the sink caps of the
payloader, not the src caps.
https://bugzilla.gnome.org/show_bug.cgi?id=607353
Use GstRTPBaseAudioPayload as the base class. This saves a lot of code and fixes
a bunch of problems that were already solved in the base class.
Fixes#853367
Add a new spspps-interval property to instruct the payloader to insert
SPS and PPS at periodic intervals in the stream.
Rework the SPS/PPS handling so that bytestream and AVC sample code both use the
same code paths to handle sprop-parameter-sets. This also allows to have the AVC
code to insert SPS/PPS like the bytestream code.
Fixes#604913
celtdepay : added default framesize(480) channels(1) and clockrate(32000)
depay_setcaps : now gets channels and framesize from string with default value
depay_process : now adds timestamp to outbuf
Added frame_size to GstRtpCeltDepay
Changed some GST_DEBUG to GST_DEBUG_OBJECT or GST_LOG_OBJECT
celtpay : getcaps : gets channel and framesize and sets caps
Added frame-size to static caps for audio/x-celt
In case of non-interleaved (= sequentially payloaded) streams,
the AU-Index serves little purpose (that is not already covered by
RTP fields). (Broken) Payloaders might consider this field then
to be disregarded and have non spec compliant values, e.g. each
RTP packet having AU-Index 2 (rather than 0). As such, ensure/force
simple sequential sending of non-interleaved streams.
Whenever we see a gap, we flush the temporary packets (but not the adapter). If we
had some data temporarily stored it will be outputted (the sound will sound a bit
garbled... but that's how it sounds on MacOSX :)
Reverse-engineered by comparing:
* A rtp hinted file provided by DarwinStreamingServer
* The output procued by DSS for that same file
Also used various streaming sources available on the internet to fine-tune
the code.
The header/codec_data extraction methods are from FFMpeg (LGPL).
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
Rewrite the quant table parsing to also handle multiple tables in one JPEG HDQ
segment.
Handle more jpeg types by keeping track of the tables used per component and
putting the used ones in the quant headers.
Don't require width/height on the caps. Use the SOF header to find width/height
and fall back to the caps if there is no SOF. Also use the SOF info to find the
subsampling and quantization tables used. This allows us to set the right type
value in the JPEG rtp header.
Deprecate the quality property, it's unused now and it was used wrongly before.
Always send full quant tables for now until we have some code to detect default
ones.
Fixes#580880
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.