Commit graph

9026 commits

Author SHA1 Message Date
Vincent Penquerc'h
adeee44b07 flacparse: fix header rewriting being ignored
https://bugzilla.gnome.org/show_bug.cgi?id=727802
2016-11-10 12:51:08 +00:00
Sean DuBois
2f707370d4 flvmux: Add metadatacreator property
Allow users to set metadatacreator value in the meta packet

https://bugzilla.gnome.org/show_bug.cgi?id=774131
2016-11-10 13:11:05 +02:00
Vivia Nikolaidou
bbd4dd2fb1 splitmuxsink: Use first buffer TS as mux start time
Do not use last buffer TS + buffer duration because buffer duration
might be inaccurate, especially for frame rates like 30fps where a
rounding error is observed.

https://bugzilla.gnome.org/show_bug.cgi?id=773785
2016-11-08 21:09:12 +11:00
Havard Graff
1a4393fb4d rtpjitterbuffer: fix timer-reuse bug
When doing rtx, the jitterbuffer will always add an rtx-timer for the next
sequence number.

In the case of the packet corresponding to that sequence number arriving,
that same timer will be reused, and simply moved on to wait for the
following sequence number etc.

Once an rtx-timer expires (after all retries), it will be rescheduled as
a lost-timer instead for the same sequence number.

Now, if this particular sequence-number now arrives (after the timer has
become a lost-timer), the reuse mechanism *should* now set a new
rtx-timer for the next sequence number, but the bug is that it does
not change the timer-type, and hence schedules a lost-timer for that
following sequence number, with the result that you will have a very
early lost-event for a packet that might still arrive, and you will
never be able to send any rtx for this packet.

Found by Erlend Graff - erlend@pexip.com

https://bugzilla.gnome.org/show_bug.cgi?id=773891
2016-11-04 16:56:56 +02:00
Havard Graff
fb9c75db36 rtpjitterbuffer: fix lost-event using dts instead of pts
The lost-event was using a different time-domain (dts) than the outgoing
buffers (pts). Given certain network-conditions these two would become
sufficiently different and the lost-event contained timestamp/duration
that was really wrong. As an example GstAudioDecoder could produce
a stream that jumps back and forth in time after receiving a lost-event.

The previous behavior calculated the pts (based on the rtptime) inside the
rtp_jitter_buffer_insert function, but now this functionality has been
refactored into a new function rtp_jitter_buffer_calculate_pts that is
called much earlier in the _chain function to make pts available to
various calculations that wrongly used dts previously
(like the lost-event).

There are however two calculations where using dts is the right thing to
do: calculating the receive-jitter and the rtx-round-trip-time, where the
arrival time of the buffer from the network is the right metric
(and is what dts in fact is today).

The patch also adds two tests regarding B-frames or the
“rtptime-going-backwards”-scenario, as there were some concerns that this
patch might break this behavior (which the tests shows it does not).
2016-11-04 16:51:20 +02:00
Havard Graff
bea35f97c8 rtpjitterbuffer: fix bug in reschedule_timer
The new timeout is always going to be (timeout + delay), however, the
old behavior compared the current timeout to just (timeout), basically
being (delay) off.

This would happen if rtx-delay == rtx-retry-timeout, with the result that
a second rtx attempt for any buffers would be scheduled immediately instead
of after rtx-delay ms.

Simply calculate (new_timeout = timeout + delay) and then use that instead.

https://bugzilla.gnome.org/show_bug.cgi?id=773905
2016-11-04 16:40:14 +02:00
Sebastian Dröge
aecc31ab7b wavparse: Don't set caps to NULL after setting them on the srcpad
We would like to check later on EOS if we found a known stream type or
not, to possibly post an error message.

https://bugzilla.gnome.org/show_bug.cgi?id=773861
2016-11-03 12:34:51 +02:00
Sebastian Dröge
09c4cc55f2 qtmux: Don't deref NULL pads in debug output
That tends to crash.
2016-11-02 14:33:28 +02:00
Jan Schmidt
324cc4dc4a isomp4: Don't use gst_video_colorimetry_to_string_full()
The API was reverted. Just use the plain
gst_video_colorimetry_to_string() function.
2016-11-02 11:46:07 +11:00
Jan Schmidt
8ff5dd8029 splitmuxsink: Fix GObject warnings on shutdown.
Commit 83e718 added a pad template to splitmux request
pads, which means that GstElement now releases the pads on
dispose, but after having removed all elements in the bin
and unlinked them. Make sure we can handle cleanup in that case
without throwing assertions.

https://bugzilla.gnome.org/show_bug.cgi?id=773784
2016-11-02 11:02:12 +11:00
Jan Schmidt
afc440e906 splitmuxsrc: Store seek seqnum and send it on EOS / segment events.
GES relies on the EOS event having the seqnum of the seek that
caused it.
2016-11-02 11:02:12 +11:00
Jan Schmidt
f609986c34 splitmuxsrc: Forward a not-linked error on the bus
Handle not-linked as for other fatal errors and post it
onto the bus so the app knows
2016-11-02 11:02:12 +11:00
Sebastian Dröge
68b0441a5e qtdemux: Fix compiler warning
qtdemux.c: In function ‘qtdemux_parse_tree’:
qtdemux.c:10139:16: error: ‘color_table_id’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
             if (color_table_id != 0) {
                ^
qtdemux.c:10121:19: note: ‘color_table_id’ was declared here
           guint16 color_table_id;
                   ^~~~~~~~~~~~~~
2016-11-01 21:00:15 +02:00
Sebastian Dröge
c709abbb99 qtmux: Use a default interleave of 250ms for all codecs
https://bugzilla.gnome.org/show_bug.cgi?id=773217
2016-11-01 20:41:22 +02:00
Sebastian Dröge
4eaf5ea062 qtmux: Use a default interleave when ProRes is used
The ProRes guidelines suggest an interleave of 0.5s is common, but
specifies that for ProRes at most 2MB (for SD) and 4MB (for HD) should
be used per chunk.

It might also make sense to use similar numbers in general.

https://bugzilla.gnome.org/show_bug.cgi?id=773217
2016-11-01 20:41:22 +02:00
Sebastian Dröge
c2225781bb qtmux: Allow configuring the interleave size in bytes/time
Previously we were switching from one chunk to another on every single
buffer. This wastes some space in the headers and, depending on the
software, might depend in more reads (e.g. if the software is reading
multiple samples in one go if they're in the same chunk).

The ProRes guidelines suggest an interleave of 0.5s is common, but
specifies that for ProRes at most 2MB (for SD) and 4MB (for HD) should
be used per chunk. This will be handled in a follow-up commit.

https://bugzilla.gnome.org/show_bug.cgi?id=773217
2016-11-01 20:41:22 +02:00
Sebastian Dröge
cba6cc4fd4 qtmux: Set compressor name, horizontal/vertical resolution and depth for ProRes
This is also required by some software to handle ProRes files.

https://bugzilla.gnome.org/show_bug.cgi?id=769048
2016-11-01 20:41:22 +02:00
Sebastian Dröge
7b565475bf qt: Add support for ProRes 4444 XQ
And also 4444 in the muxer.

https://bugzilla.gnome.org/show_bug.cgi?id=769048
2016-11-01 20:41:22 +02:00
Sebastian Dröge
a2c6921482 qtmux: Write 'clap' atom for ProRes
It's required for ProRes to work with other software.

It is also in the MP4 standard, but inventing values here seems a bit
tricky for the general case and it does not really give any extra
information.

https://bugzilla.gnome.org/show_bug.cgi?id=769048
2016-11-01 20:41:22 +02:00
Sebastian Dröge
ec7f699604 qtdemux: Read colorimetry information from colr atom if available
https://bugzilla.gnome.org/show_bug.cgi?id=772181
2016-11-01 20:41:22 +02:00
Sebastian Dröge
53e436883a qtmux: Always write colr atom with the colorimetry information
https://bugzilla.gnome.org/show_bug.cgi?id=772181
2016-11-01 20:41:22 +02:00
Sebastian Dröge
0584a71123 qtmux: Fix writing of the 'fiel' extension atom
This was also wrong for JPEG2000. Also write it for all MOV files and
JPEG2000, not only for ProRes.

https://bugzilla.gnome.org/show_bug.cgi?id=769048
2016-11-01 20:41:22 +02:00
Sebastian Dröge
b815c41b7e qtmux: Write 4 bytes of zeroes at the end of the sample description extensions
This is working around some broken software.

https://bugzilla.gnome.org/show_bug.cgi?id=769048
2016-11-01 20:41:22 +02:00
Sebastian Dröge
4cff5093ee atoms: 'pasp' atom is also part of MP4, write it always
https://bugzilla.gnome.org/show_bug.cgi?id=769048
2016-11-01 20:41:22 +02:00
Vivia Nikolaidou
fe38414412 qtmux: Write additional atoms for prores video
These required atoms are: colorimetry, field information, spatial/temporal
quality, and vendor.

https://bugzilla.gnome.org/show_bug.cgi?id=769048
2016-11-01 20:41:22 +02:00
Stian Selnes
cbd13883a8 rtph263depay: Don't drop mode b packets with picture start code
Some buggy payloaders, e.g. rtph263pay, may use mode B for packets
that starts with a picture (or GOB) start code although it's not
allowed. Let's be nice and not drop these packets/frames.

https://bugzilla.gnome.org/show_bug.cgi?id=773516
2016-11-01 20:21:40 +02:00
Havard Graff
78ab8cbdcd rtph263ppay: Fix caps leak
Fix leaking caps when downstream has not-fixed caps.

https://bugzilla.gnome.org/show_bug.cgi?id=773515
2016-11-01 20:20:47 +02:00
Stian Selnes
fca2d2f9f0 rtph263pay: Fix indentation
https://bugzilla.gnome.org/show_bug.cgi?id=773514
2016-11-01 20:19:43 +02:00
Stian Selnes
087ae64123 rtph263pay: Use GST_TRACE_OBJECT for logging bitstream parsing
Bump the bitstream parsing to TRACE log level so it doesn't flood the
output when trying to read the more useful DEBUG and LOG messages.

Also use GST_DEBUG_OBJECT instead of GST_DEBUG in various places

https://bugzilla.gnome.org/show_bug.cgi?id=773514
2016-11-01 20:19:15 +02:00
Stian Selnes
bcff182fd9 rtph263pay: Fix leak for B-fragments
Altough commits 6a16be7, 64f9d08 and 0c7e3a8 fixed some issues they
introduced others. This patch fixes the leak of one macroblock for every
B fragment.

Macroblock structures must not be freed immediately after finding the
boundaries as they are stored and used later. However the inital dummy
structure (used for finding the first boundary) must be freed.

CID #1212156

https://bugzilla.gnome.org/show_bug.cgi?id=773512
2016-11-01 20:18:14 +02:00
Alejandro G. Castro
6e7816c589 rtpbin: avoid generating errors when rtcp messages are empty and check the queue is not empty
Add a check to verify all the output buffers were empty for the
session in a timout and log an error.

https://bugzilla.gnome.org/show_bug.cgi?id=773269
2016-11-01 20:17:20 +02:00
Alejandro G. Castro
eeea2a7fe8 rtpbin: pipeline gets an EOS when any rtpsources byes
Instead of sending EOS when a source byes we have to wait for
all the sources to be gone, which means they already sent BYE and
were removed from the session. We now handle the EOS in the rtcp
loop checking the amount of sources in the session.

https://bugzilla.gnome.org/show_bug.cgi?id=773218
2016-11-01 20:16:18 +02:00
Matt Staples
cd71e3a8e8 rtspsrc: Also handle redirect on PLAY
https://bugzilla.gnome.org/show_bug.cgi?id=772610
2016-11-01 20:14:35 +02:00
Petr Kulhavy
5cdf66d5d2 rtspsrc: allow missing control attribute in case of a single stream
Improve RFC2326 - chapter C.3 compatibility:
In case just a single stream is specified in SDP and the control attribute
is missing do not drop the stream but rather assume "a=control:*"

https://bugzilla.gnome.org/show_bug.cgi?id=770568
2016-11-01 20:13:49 +02:00
Sebastian Dröge
e0aec317ff qtmux: Use a better default value for the movie header timescale
Take the maximum video timescale, or if no video track is present the
previous value of 1800.

https://bugzilla.gnome.org/show_bug.cgi?id=769041
2016-11-01 20:11:12 +02:00
Sebastian Dröge
727fa1c7c3 qtmux: Be more clever with the default video track timescale
Use the number of milliframes per second for integral and drop-frame
framerates, as suggested by the QT file format specification and other
places. We already did that for integral framerates before, but not for
drop-frame framerates. This now keeps precision better.

For all other framerates, check if it's close to a well-known framerate
and use that instead.

https://bugzilla.gnome.org/show_bug.cgi?id=769041
2016-11-01 20:11:12 +02:00
Vincent Penquerc'h
5a889647ba qtdemux: extract interlaced information from jpeg video
This information is hidden in a small chunk of data.
Format found at https://developer.apple.com/standards/qtff-2001.pdf,
page 92, "Video Sample Description", under table 3.1.

https://bugzilla.gnome.org/show_bug.cgi?id=767771
2016-11-01 20:10:23 +02:00
Enrique Ocaña González
69fc488392 qtdemux: Use the tfdt decode time on byte streams when it's significantly different than the time in the last sample
We consider there's a sifnificant difference when it's larger than on second
or than half the duration of the last processed fragment in case the latter is
larger.

https://bugzilla.gnome.org/show_bug.cgi?id=754230
2016-11-01 20:07:39 +02:00
Sebastian Dröge
9ba6fb86d8 wavparse: Don't try to add srcpad if we don't know valid caps yet
Otherwise we'll run into an assertion on specially crafted files.

https://bugzilla.gnome.org/show_bug.cgi?id=773643
2016-10-31 11:11:32 +02:00
Branko Subasic
ddba77ea6e matroskamux: allow resolutions above 4096
Modify the caps string to allow width and height greater than 4096.
There is no need to restrict it since the matroska format allows the
width and height values to be up to eight bytes long.

https://bugzilla.gnome.org/show_bug.cgi?id=773582
2016-10-27 14:01:55 +01:00
Scott D Phillips
023744a577 udpsrc: Check for G_PLATFORM_WIN32 for presence of ipi_spec_dest
G_OS_WIN32 is only set when not building with cygwin, but
ipi_spec_dest is missing both with and without cygwin.

https://bugzilla.gnome.org/show_bug.cgi?id=773114
2016-10-27 12:09:00 +01:00
Mark Nauwelaerts
735924236e rtspsrc: reset connection info to non-flushing when closing
This solves a hanging mainloop in following scenario:
* connect to source
* network/server drops
* pipeline set to NULL (and connection to flushing as part)
* pipeline set to PAUSED/PLAYING (connection to non-flushing, but not recorded)
* [connecting still not possible]
* pipeline set to NULL => mainloop hangs (since no actual flushing is done)
2016-10-26 12:30:39 +02:00
Jan Schmidt
5067d7254f splitmuxsink: Only allow one video request pad
The pacing of the overall muxing is controlled
by the video GOPs arriving, so we can only handle
1 video stream, and the request pad is named accordingly.

Ignore a request for a 2nd video pad if there's already
an active one.
2016-10-26 20:17:40 +11:00
Jan Schmidt
917776730d splitmuxsink: Take ownership of floating refs
sink the floating ref when handed a muxer or sink to use so
we clearly take ownership.
2016-10-26 20:17:40 +11:00
Jan Schmidt
a80265d65a splitmuxsink: Set child elements to NULL when removing.
Make sure that elements are in the NULL state when removing.
Fixes critical warnings when errors occur early on in starting up.
2016-10-26 20:17:40 +11:00
Jan Schmidt
83e7182b30 splitmuxsink: Set pad template on request sink pads
Ensure that the ghost pad returned as a request pad
has the template that was requested
2016-10-26 20:17:40 +11:00
Nicolas Dufresne
ad9e9bedfb flvmux: Assume PTS is DTS when PTS is missing
This fixes issue for encoders that only sets the DTS. We assume that
there was no re-ordering when that happens.

https://bugzilla.gnome.org/show_bug.cgi?id=762207
2016-10-24 11:54:30 -04:00
Nirbheek Chauhan
4306cb6f79 meson: Add missing gstaudio dep to monoscope
In file included from ../subprojects/gst-plugins-good/gst/monoscope/gstmonoscope.c:42:0:
../subprojects/gst-plugins-base/gst-libs/gst/audio/audio.h:26:39: fatal error: gst/audio/audio-enumtypes.h: No such file or directory
 #include <gst/audio/audio-enumtypes.h>
                                       ^
compilation terminated.

https://ci.gstreamer.net/job/GStreamer-master-meson/271/console
2016-10-18 12:23:42 +05:30
Nirbheek Chauhan
3c53d0f38c meson: Add missing pbutils dependency to multifile
Found via the Jenkins CI:

FAILED: subprojects/gst-plugins-good/gst/multifile/gstmultifile@sha/gstsplitmuxsink.c.o
[...]
In file included from ../subprojects/gst-plugins-good/gst/multifile/gstsplitmuxsink.h:24:0,
                 from ../subprojects/gst-plugins-good/gst/multifile/gstsplitmuxsink.c:59:
../subprojects/gst-plugins-base/gst-libs/gst/pbutils/pbutils.h:30:43: fatal error: gst/pbutils/pbutils-enumtypes.h: No such file or directory
 #include <gst/pbutils/pbutils-enumtypes.h>
                                           ^
compilation terminated.

https://ci.gstreamer.net/job/GStreamer-master-meson/263/console
2016-10-16 02:18:22 +05:30
Nirbheek Chauhan
6fe40c92bf imagefreeze: Forward latency queries to upstream
Without this, latency queries to imagefreeze will fail.
2016-10-03 15:37:29 +05:30
Jan Schmidt
00d20b044c splitmuxsrc: Handle stop point from segment
If the seek stop point (or start, during reverse play)
was within the segment we just finished, go EOS immediately
instead of proceeding through all other parts and sending
0 length seeks to them.

https://bugzilla.gnome.org/show_bug.cgi?id=772138
2016-10-01 00:12:41 +10:00
Jan Schmidt
1a17ce9705 splitmuxsrc: Drop lock shutting down pads
Avoid a sporadic deadlock on shutdown by dropping
the splitmux lock around pad shutdown

https://bugzilla.gnome.org/show_bug.cgi?id=772138
2016-10-01 00:12:41 +10:00
Jan Schmidt
359f8ff2d7 splitmuxsrc: Fix extra unref handling queries
https://bugzilla.gnome.org/show_bug.cgi?id=772138
2016-10-01 00:12:41 +10:00
Jan Schmidt
f8d7a2a0af splitmuxsrc: Avoid stall when parts get out of sync
When one part moves ahead of the others - due to excessive
downstream queueing, or really small input files - then
we can end up activating parts more than once. That can lead to
effects like shutting down pad tasks prematurely.

https://bugzilla.gnome.org/show_bug.cgi?id=772138
2016-10-01 00:12:41 +10:00
Sebastian Dröge
a993883b74 qtmux: Don't calculate PTS offset and DTS with GST_CLOCK_TIME_NONE
Just error out if there is no valid PTS.

https://bugzilla.gnome.org/show_bug.cgi?id=772143
2016-09-29 17:45:37 +03:00
Sebastian Dröge
52879dacbc qtdemux: Add JPEG2000 ihdr atom to the list of known ones
Otherwise qtdemux is always going to complain about it being unknown.
2016-09-29 17:37:28 +03:00
Sebastian Dröge
7ab3df4542 matroskamux: Always write the default frame duration for VP8/9 too
The WebM spec allows this now, and it allows us to guess a framerate.

See https://bugzilla.gnome.org/show_bug.cgi?id=772141 and
also https://bugzilla.gnome.org/show_bug.cgi?id=654379
2016-09-29 10:19:56 +03:00
Olivier Crête
7025d014bb rtph26[45]depay: Don't handle NALs inside STAP units twice
They've already been handled before pushing them into the adapter.
2016-09-27 15:30:01 -04:00
Tim-Philipp Müller
023998dd76 Revert "multifilesink: streamline the file-switch code a bit"
This reverts commit f1ceaab02f.

This broke atomic file writes in "buffer" mode. It did make
sure that any streamheaders are prepended to each file in
buffer mode as well, but that's not really needed in practice,
whereas atomic file writes are, so let's restore the status
quo ante for now since this was primarily a code cleanup anyway,
and if anyone needs to streamheaders in buffer mode too they
can make a patch to implement that differently. Re-implementing
the atomic writes in the element also seems way too much work.

https://bugzilla.gnome.org/show_bug.cgi?id=766990
2016-09-27 10:23:38 +01:00
Tim-Philipp Müller
6ab88a7f78 Revert "multifilesink: close file on write error with next-file mode is set to buffer"
This reverts commit 84e441d268.

This will no longer be needed once we revert f1ceaab02.
2016-09-27 10:22:57 +01:00
Arun Raghavan
10a16a6321 rtpsbcpay: Fix timestamping
We were just picking the timestamp of the last buffer pushed into our
adapter before we had enough data to push out.

This fixes things to figure out how large each frame is and what
duration it covers, so we can set both the timestamp and duration
correctly.

Also adds some DISCONT handling.
2016-09-25 01:20:14 +05:30
Georg Lippitsch
25526ed7f3 qtmux: Fix fourcc for ProRes Proxy
This is apco, according to
https://wiki.multimedia.cx/index.php?title=Apple_ProRes

https://bugzilla.gnome.org/show_bug.cgi?id=769048
2016-09-21 15:10:46 -04:00
Sebastian Dröge
eaae016884 rtspsrc: Use new bin suppressed flags API for managing the element flags 2016-09-15 18:20:30 +02:00
Tim-Philipp Müller
cae9ec0ad8 ext, gst: fix indentation 2016-09-15 09:53:07 +01:00
Thomas Bluemel
567afdd4d3 rtpjitterbuffer: Fix calculating next_seqnum when dropping old buffers from a full queue.
Fixes calculating the next sequence number when a ITEM_TYPE_LOST with more than one
definitely lost packets is encountered.

https://bugzilla.gnome.org/show_bug.cgi?id=769757
2016-09-14 19:47:28 -04:00
Havard Graff
f440b074b1 rtpjitterbuffer: improved rtx-rtt averaging
The basic idea is this:
1. For *larger* rtx-rtt, weigh a new measurement as before
2. For *smaller* rtx-rtt, be a bit more conservative and weigh a bit less
3. For very large measurements, consider them "outliers"
   and count them a lot less

The idea being that reducing the rtx-rtt is much more harmful then
increasing it, since we don't want to be underestimating the rtt of the
network, and when using this number to estimate the latency you need for
you jitterbuffer, you would rather want it to be a bit larger then a bit
smaller, potentially losing rtx-packets. The "outlier-detector" is there
to prevent a single skewed measurement to affect the outcome too much.
On wireless networks, these are surprisingly common.

https://bugzilla.gnome.org/show_bug.cgi?id=769768
2016-09-14 19:37:50 -04:00
Stian Selnes
f8238f0a9f rtpjitterbuffer: Detect whether to assume equidistant spacing when loss
Assuming equidistant packet spacing when that's not true leads to more
loss than necessary in the case of reordering and jitter. Typically this
is true for video where one frame often consists of multiple packets
with the same rtp timestamp. In this case it's better to assume that the
missing packets have the same timestamp as the last received packet, so
that the scheduled lost timer does not time out too early causing the
packets to be considered lost even though they may arrive in time.

https://bugzilla.gnome.org/show_bug.cgi?id=769768
2016-09-14 19:37:50 -04:00
Stian Selnes
2eb7383816 rtpjitterbuffer: Don't request rtx if 'now' is past retry period
There is no need to schedule another EXPECTED timer if we're already
past the retry period. Under normal operation this won't happen, but if
there are more timers than the jitterbuffer is able to process in
real-time, scheduling more timers will just make the situation worse.
Instead, consider this packet as lost and move on. This scenario can
occur with high loss rate, low rtt and high configured latency.

https://bugzilla.gnome.org/show_bug.cgi?id=769768
2016-09-14 19:37:50 -04:00
Stian Selnes
ab49dfd0b2 rtpjitterbuffer: Fix lost duration when gap after lost timer
This patch fixes an issue with the estimated gap duration when there is
a gap immediately after a lost timer has been processed. Previously
there was a discrepancy beteen the gap in seqnum and gap in dts which
would cause wrong calculated duration. The issue would only be seen with
retranmission enabled since when it's disabled lost timers are only
created when a packet is received and the actual gap length and last dts
is known.

https://bugzilla.gnome.org/show_bug.cgi?id=769768
2016-09-14 19:37:50 -04:00
Havard Graff
dd020f5cc8 rtpjitterbuffer: Expose rtx-deadline as a property
The default -1 gives the old behavior.

https://bugzilla.gnome.org/show_bug.cgi?id=769768
2016-09-14 19:37:50 -04:00
Havard Graff
8087a8a31c rtpjitterbuffer: Improved expected-timer handling when gap > 0
https://bugzilla.gnome.org/show_bug.cgi?id=769768
2016-09-14 19:37:50 -04:00
Stian Selnes
38a7545003 rtpjitterbuffer: Major improvements for RTX stats
Stats should also be collected for unsuccessful packets.

rtx-rtt is very important for determining the necessary configured
latency on the jitterbuffer. It's especially important to be able to
increase the latency when retransmitted packets arrive too late and are
considered lost. This patch includes these late packets in the
calculation of the various rtx stats, making them more correct and
useful.

Also in the case where the original packet arrives after a NACK is sent,
the received RTX packet should update the stats since it provides useful
information about RTT.

The RTT is only updated if and only if all requested retranmissions are
received. That way the RTT is guaranteed to make sense. If not we don't
know which request the packet is a response to and the RTT may be bogus.
A consequence of this patch is that RTT is not updated for a request
when one of the RTX packets for that seqnum is lost, but that since
measured RTT will be more accurate.

The implementation store the RTX information from the timed out timers
and use this when the retransmitted packet arrives. For performance
these timers are stored separately from the "normal" timers in order to
not impact performance (see attached performance test).

https://bugzilla.gnome.org/show_bug.cgi?id=769768
2016-09-14 19:37:50 -04:00
Havard Graff
1b868cc9b1 rtpjitterbuffer: Add and expose more stats and increase testing of it
Add num-pushed and num-lost.
Expose num-late, num-duplicates and avg-jitter.

https://bugzilla.gnome.org/show_bug.cgi?id=769768
2016-09-14 19:37:50 -04:00
Stian Selnes
531199d5c4 rtxreceive: Set buffer flag for retransmitted packets
https://bugzilla.gnome.org/show_bug.cgi?id=769768
2016-09-14 19:37:50 -04:00
Havard Graff
1436fc01e9 rtpjitterbuffer: Option to disable rtx-delay-reorder
When disabled we can save some iterations over timers.

There is probably an argument for rtx-delay-reorder to exist, but
for normal operations, handling jitter (reordering) is something a
jitterbuffer should do, and this variable feels like functionality that
is not "in-sync" with what the jitterbuffer is trying to achieve.

Example: You have 50ms jitter on your network, and are receiving
audio packets with 10ms durations. An audio packet should not be
considered late until its rtx-timeout has expired (and hence a rtx-event
is sent), but with rtx-delay-reorder, events will be sent pretty much
all the time due to the jitter on the network.

Point being: The jitterbuffer should adapt its size to the measured network
jitter, and then rtx-delay-reorder needs to adapt as well, or simply
get out of the way and let the other (better) rtx-mechanisms do their job.

Also change find_timer to only use seqnum as an argument, since there
will only ever be one timer per seqnum at any given time. In the
one case where the type matters, the caller simply checks the type.

https://bugzilla.gnome.org/show_bug.cgi?id=769768
2016-09-14 19:37:50 -04:00
Olivier Crête
0c7e3a860c rtph263pay: Fix double free from coverity
CID #1372887
2016-09-14 11:18:44 -04:00
Olivier Crête
b369e386ad rtph263pay: Indent as per gst-indent 2016-09-14 11:18:44 -04:00
Wonchul Lee
aca4203c20 autodetect: Use gst_bin_set_suppressed_flags() API
https://bugzilla.gnome.org/show_bug.cgi?id=771395
2016-09-14 11:24:08 +02:00
Sebastian Dröge
dba90631bc deinterlace: Fix field ordering for reverse playback
And actually calculate the field duration instead of a frame duration so
that we can properly timestamp output frames in fields=all mode.

This is probably still broken for reverse playback in telecine mode.
2016-09-12 20:09:23 +02:00
Thomas Klausner
22d6c7f106 udpsrc: Fix compilation on NetBSD
https://bugzilla.gnome.org/show_bug.cgi?id=771278
2016-09-12 15:09:26 +02:00
Xabier Rodriguez Calvar
415ae458d2 qtdemux: offset is irrelevant when no crypto info
Cause later it will try to use the crypto info array to get an index and
attach on of the positions as buffer's crypto info.

https://bugzilla.gnome.org/show_bug.cgi?id=770951
2016-09-10 11:29:55 +03:00
Xabier Rodriguez Calvar
92075e0256 qtdemux: Fix crash with no cenc aux offset
https://bugzilla.gnome.org/show_bug.cgi?id=770951
2016-09-07 09:58:22 +03:00
Vincent Penquerc'h
c974df1c06 aacparse: parse a bit more of the humongous LOAS data
https://bugzilla.gnome.org/show_bug.cgi?id=769278
2016-09-06 15:09:21 +01:00
Vincent Penquerc'h
e66ee5491c aacparse: make it clear when a potential LOAS frame is not one
https://bugzilla.gnome.org/show_bug.cgi?id=769278
2016-09-06 15:09:21 +01:00
Vincent Penquerc'h
b0f20bacfd aacparse: add a few comments to anchor parsing to the spec
https://bugzilla.gnome.org/show_bug.cgi?id=769278
2016-09-06 15:09:21 +01:00
Vincent Penquerc'h
559546dd3a aacparse: improve channel/rate handling
Keep track of the last parsed channels/rate fields so they can be
used even if the element was not yet configured.

https://bugzilla.gnome.org/show_bug.cgi?id=769278
2016-09-06 15:09:21 +01:00
Vincent Penquerc'h
740749ac55 aacparse: fix varlength number reading as per spec
https://bugzilla.gnome.org/show_bug.cgi?id=769278
2016-09-06 15:09:21 +01:00
Vincent Penquerc'h
991e46ce42 aacparse: strip uneeded static arrays slack
https://bugzilla.gnome.org/show_bug.cgi?id=769278
2016-09-06 15:09:21 +01:00
Olivier Crête
092465e94d rtpmp4adepay: Only declare a stream to be framed once a marker bit has been seen
This may cause a few packets to be processed by the parser, but it's
better than never pushing out buffers from a slightly broken stream
where no marker bits are set.
2016-09-06 15:09:21 +01:00
Mathieu Duponchelle
26928b3df0 qtmux: Implement the preset interface.
+ And provide a "youtube" preset, which based on
https://support.google.com/youtube/answer/1722171 sets
faststart to True.

https://bugzilla.gnome.org/show_bug.cgi?id=751559
2016-09-01 13:16:49 +03:00
Thibault Saunier
150edef830 Use the new API to post flow ERROR messages on the bus
https://bugzilla.gnome.org/show_bug.cgi?id=770158
2016-08-26 19:23:26 -03:00
Olivier Crête
4fceb5050f Revert "rtpmux: fix PROP_TIMESTAMP_OFFSET range problems"
This broke API, so we need a better solution!

This reverts commit c7579d31a6.
2016-08-26 12:06:51 -04:00
Stian Selnes
8bf77e34f2 rtpvp9depay: Support flexible mode 2016-08-26 11:57:15 -04:00
Stian Selnes
5f3b570d53 rtph263pdepay: Don't try to push empty frame
If the result of depayloading is an empty frame, just drop it. This is
likely the result of a buggy payloader.
2016-08-26 11:57:15 -04:00
Havard Graff
c7579d31a6 rtpmux: fix PROP_TIMESTAMP_OFFSET range problems
It could not set the offset for the full guint32 range.
2016-08-26 11:57:14 -04:00
Havard Graff
7ad7266163 rtpbin: introduce max-streams property
To be able to cap the number of allowed streams for one session.

This is useful for preventing DoS attacks, where a sender can change
SSRC for every buffer, effectively bringing rtpbin to a halt.

https://bugzilla.gnome.org/show_bug.cgi?id=770292
2016-08-26 11:57:06 -04:00
Havard Graff
b33470f80c rtpsource: reordered packets are very normal, and should not be a warning 2016-08-26 11:53:22 -04:00
Havard Graff
babc591707 rtpsession: degrade g_warning to GST_ERROR
So we don't blow up while investigating
2016-08-26 11:53:22 -04:00
Stian Selnes
11b7575cff rtph263pdepay: Fix picture header for non-writable payload
Under certain conditions gst_rtp_buffer_get_payload() returns a copy of
the payload. In this case the payload modifications will not affect the
rtp buffer. So instead of modifying the payload buffer directly we
should modify the buffer that actually gets pushed on the adapter.
2016-08-26 11:53:22 -04:00
Stian Selnes
793327cce2 rtph261depay: Fix check of valid payload length
Packets with no H.261 payload should be dropped to avoid invalid
write/reads.
2016-08-26 11:53:22 -04:00