Commit graph

9271 commits

Author SHA1 Message Date
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
Stian Selnes
64f9d08d3d rtph263pay: Fix double free, invalid reads and leak 2016-08-26 11:53:22 -04:00
Stian Selnes
61bc228a71 rtpsession: sanity check RTT before ignoring PLI/FIR 2016-08-25 18:28:44 -04:00
Stian Selnes
85a56f8ee3 rtpsession: handle sdes messages with non-utf8 more gracefully 2016-08-25 18:28:44 -04:00
Stian Selnes
898d240faa rtph263pay: change log level on bitstream parsing messages 2016-08-25 18:28:44 -04:00
Jonas Holmberg
e43dcd9996 rtph265pay: Set RTP marker bit
Set the RTP marker bit on the last RTP packet of an H.265 access unit.

https://bugzilla.gnome.org/show_bug.cgi?id=770394
2016-08-25 17:22:58 +03:00
Xabier Rodriguez Calvar
569820598f videoflip: added GstVideoDirection interface
It implements now this interface with its video-direction
property. Values are changed to GstVideoOrientationMethod but they have
the same value than the originals.

https://bugzilla.gnome.org/show_bug.cgi?id=768687
2016-08-25 10:16:00 +03:00
Havard Graff
1ef896b29d gstrtpsession: refactor duplicate code into a function
Less code, easier to read, more consistent.

https://bugzilla.gnome.org/show_bug.cgi?id=770293
2016-08-23 15:09:03 -04:00
Vincent Penquerc'h
0fb0c0c8e6 rtpbin: fix typo in max-misorder-time property name 2016-08-23 17:19:17 +01:00
Tim-Philipp Müller
78bb4cc7e2 splitmuxsink: fix printf format compiler warning in debug message
On 32-bit x86: gstsplitmuxsink.c:966:31: warning: format ‘%u’ expects
argument of type ‘unsigned int’, but argument 9 has type
‘guint64 {aka long long unsigned int}’
2016-08-22 00:07:51 +01:00
Nirbheek Chauhan
b09f478e80 Add support for Meson as alternative/parallel build system
https://github.com/mesonbuild/meson

With contributions from:

Tim-Philipp Müller <tim@centricular.com>
Jussi Pakkanen <jpakkane@gmail.com> (original port)

Highlights of the features provided are:
* Faster builds on Linux (~40-50% faster)
* The ability to build with MSVC on Windows
* Generate Visual Studio project files
* Generate XCode project files
* Much faster builds on Windows (on-par with Linux)
* Seriously fast configure and building on embedded

... and many more. For more details see:

http://blog.nirbheek.in/2016/05/gstreamer-and-meson-new-hope.html
http://blog.nirbheek.in/2016/07/building-and-developing-gstreamer-using.html

Building with Meson should work on both Linux and Windows, but may
need a few more tweaks on other operating systems.
2016-08-20 11:21:12 +01:00
Jie Jiang
655856deee Fixed splitmuxsink 32-bit overflow bug
Extend the byte tracking counters to 64-bit on
all platforms, instead of using gsize, which overflows
after 4GB.

https://bugzilla.gnome.org/show_bug.cgi?id=770019
2016-08-20 19:53:11 +10:00
Vivia Nikolaidou
64fd099a3a isomp4: Fix coverity warning
If atom_copy_data fails to write anything, return 0

CID #1371458
2016-08-19 17:53:25 +03:00
Tim-Philipp Müller
0f41d0e75d Revert "flacparse: Add maximum bitrate tag"
This reverts commit c703ab69f5.

https://bugzilla.gnome.org/show_bug.cgi?id=769392
2016-08-18 12:02:01 +01:00
Vivia Nikolaidou
b9a8188704 splitmuxsink: Add option to split at exactly max-size-time
Will try to request a keyframe from the encoder to be sent at the target
running time.

https://bugzilla.gnome.org/show_bug.cgi?id=769664
2016-08-17 17:42:55 +10:00
Vivia Nikolaidou
369d37d227 splitmuxsink: Allow time and bytes to reach their respective thresholds
https://bugzilla.gnome.org/show_bug.cgi?id=769664
2016-08-17 17:42:55 +10:00
Sebastian Dröge
0b0a042781 rtspsrc: Allow mimetypes with properties as long as they're application/sdp
Some servers add properties like charset, e.g.
  application/sdp; charset=utf8

Ideally we should also parse the charset and do conversion of all messages,
but that's for a later time.
2016-08-17 09:49:04 +03:00
Vivia Nikolaidou
cdb7649909 qtmux: Added support for writing timecode track
https://bugzilla.gnome.org/show_bug.cgi?id=767950
2016-08-17 09:03:52 +03:00
Thomas Bluemel
578e93cd0b multiudpsink: Initialize bytes_sent field.
This fixes endpoints not receiving any data intermittently.

https://bugzilla.gnome.org/show_bug.cgi?id=769773
2016-08-12 09:21:20 +02:00
Thomas Bluemel
4dff74358e rtpjitterbuffer: Actually calculate the packet rate for max-dropout and max-misorder calculations.
https://bugzilla.gnome.org/show_bug.cgi?id=751311
2016-08-10 19:49:27 +02:00
Thomas Bluemel
e7d4ad7ac7 rtpjitterbuffer: Don't warn for duplicate packets
This is a normal scenario and should not be a warning.  This can
happen frequently when re-transmits of lost packets are enabled.

https://bugzilla.gnome.org/show_bug.cgi?id=762208
2016-08-10 19:39:42 +02:00
Jan Schmidt
75b601bbd4 splitmux: Fix typo converting to running time.
Use the correct collected timestamp.
2016-08-08 13:49:19 +10:00
Jan Schmidt
5a71334fb0 Revert "splitmuxsink: Use GstBin async-handling instead of our own."
This reverts commit fa008f271a.

async-handling in GstBin causes the pipeline to spin at 100%
CPU as the top-level pipeline tries to change that state
to PLAYING constantly. This is a workaround for a core
problem, essentially, but an improvement in this case for now.
2016-08-08 03:07:34 +10:00
Jan Schmidt
89af379ff0 splitmux: Recheck state after unlocking mutex.
After dropping the splitmux lock, re-check the state,
don't just fall through and sleep unconditionally,
as we may have already missed the wakeup.

https://bugzilla.gnome.org/show_bug.cgi?id=769514
2016-08-08 00:56:38 +10:00
Jan Schmidt
69df65fabe splitmuxsrc: Don't stop and error on EOS flow return
Don't immediately halt on EOS flow return from downstream
due to out of segment. Let the demuxer handle it and send
EOS.
2016-08-06 01:41:06 +10:00
Thiago Santos
7f0381fdd9 rtpjitterbuffer: avoid unref of null buffer
The current 'l' pointer will be NULL when the loop
is interrupted with a 'break' statement. Need to have
it advance to the next list item before interrupting.
2016-08-04 00:36:28 -03:00
Carlos Rafael Giani
91e302e00d wavparse: Add tags for container format and bitrate for uncompressed PCM
The PCM bitrate is added to help downstream elements (like uridecodebin)
figure out a proper network buffer size

https://bugzilla.gnome.org/show_bug.cgi?id=769390
2016-08-02 15:22:25 +03:00
Carlos Rafael Giani
c703ab69f5 flacparse: Add maximum bitrate tag
https://bugzilla.gnome.org/show_bug.cgi?id=769392
2016-08-02 14:34:54 +03:00
Sebastian Dröge
45db90fdb0 qtdemux: When receiving a DISCONT buffer that does not point to a sample, remember the offset
And don't just reset everything. This makes sure that we can continue to
handle data in the following scenario:

moov: discont
moof: discont
mdat: continuous

Previously this would fail because the offset would be the accumulated offset
from moov and moof at the mdat position, while the buffer offset might be
something completely different.
2016-07-28 17:58:16 +03:00
Sebastian Dröge
3010d1ec2d rtp: Filter with the filter caps in the payloader's getcaps 2016-07-25 13:35:18 +03:00
Jan Schmidt
8b4ceb2ef3 splitmuxsink: Fix debug statement signedness.
The ts variable is a GstClockTime, don't print it
as a GstClockTimeDiff.
2016-07-25 18:20:03 +10:00
Jan Schmidt
6755691b28 splitmuxsink: Handle negative running time
Use signed clock times for running time everywhere
so that we handle negative running times without
going haywire, similar to what queue and multiqueue
do these days.
2016-07-20 00:39:38 +10:00
Jan Schmidt
e2505dd7df splitmuxsink: Drop lock when sending dummy event
When pushing the dummy event into the multiqueue,
drop the splitmux lock or else we might deadlock.
2016-07-20 00:32:30 +10:00
Jan Schmidt
a1838927f7 rtph264pay: Intersect with filter caps in getcaps function.
Always intersect with the filter caps in the getcaps function
to make sure we return a subset of what was requested.

Other payloaders also have this problem and need fixing
in future commits.
2016-07-20 00:31:59 +10:00
Jonas Holmberg
833c530553 rtph265pay: Accept array_completeness=1
When parsing NAL unit type in codec_data, check the 6bits of
NAL_unit_type only and do not require the array_completeness bit to be
0, since the default and mandatory value of array_completeness is 1 for
hvc1.

https://bugzilla.gnome.org/show_bug.cgi?id=768653
2016-07-11 11:49:41 +03:00
Sebastian Dröge
ccdd76fd18 udpsrc: Use correct in6_pktinfo struct instead of in_pktinfo
Fixes the build on FreeBSD, which does not have the latter.

https://bugzilla.gnome.org/show_bug.cgi?id=768623
2016-07-10 21:30:58 +03:00
Mats Lindestam
6fe88d8a76 multipartmux: Use PTS and DTS instead of timestamp
And pass-through both of them.

Based on a patch by Göran Jönsson <goranjn@axis.com>

https://bugzilla.gnome.org/show_bug.cgi?id=767900
2016-07-08 16:58:26 +03:00
Edward Hervey
85b0c3a83d qtdemux: Let upstream events go through upstream
There's no real reason to avoid sending QOS/NAVIGATION events upstrea.
Some elements might want to have that information.
2016-07-08 15:00:28 +02:00
Edward Hervey
781d3f0208 avidemux: Let upstream events go through upstream
There's no real reason to avoid sending QOS/NAVIGATION events upstrea.
Some elements might want to have that information.
2016-07-08 15:00:28 +02:00
Sebastian Dröge
f0ba7a5ca4 matroskamux: Remove suspicious checks for pads being active and linked
We should add all pads, no matter if they are linked or active or not at this
point. Skipping some that are not will cause different behaviour than with
other muxers.
2016-07-07 18:26:48 +03:00
Sebastian Dröge
dbb8ec4639 matroskamux: Error out if we start writing data with some pads not having a codec id yet
This can only happen if a) upstream somehow gets around the CAPS event failing
or b) there never being any CAPS event.

The following code assumes that all pads have a codec-id.

https://bugzilla.gnome.org/show_bug.cgi?id=768509
2016-07-07 18:26:48 +03:00
Sebastian Dröge
cc636760b6 matroskamux: Consistently use gst_matroska_mux_set_codec_id() for setting the codec id 2016-07-07 18:26:48 +03:00
Jonas Holmberg
a06152c40a rtph265pay/depay: Sync against RFC 7798
Handle sprop-vps, sprop-sps and sprop-pps in caps instead of
sprop-parameter-sets.

rtph265pay works with byte-stream and hvc1 formats but not hev1 yet. It
handles profile-id, tier-flag and level-id in caps query.

https://bugzilla.gnome.org/show_bug.cgi?id=753760
2016-07-07 14:59:50 +03:00
Jan Alexander Steffens (heftig)
b3cfbe575c flvdemux: Push nominal bitrate tags
Add per-stream tag lists, which are used to send nominal
bitrate tags. When remuxing FLV => FLV, this now passes
through the upstream bitrate.

https://bugzilla.gnome.org/show_bug.cgi?id=768440
2016-07-07 10:21:21 +03:00
Jan Alexander Steffens (heftig)
ee44e60f7b flvdemux: Refactor metadata tag handling
The FLV header cannot be trusted to indicate video or
audio presence, as the comments already mention. Don't
delay pushing tags waiting for streams that might never
appear.

Tags are now pushed immediately after they change:
  - After parsing an onMetaData script object
  - After negotiating caps on a pad

https://bugzilla.gnome.org/show_bug.cgi?id=768440
2016-07-07 10:21:21 +03:00
Luis de Bethencourt
a85dbfc246 qtdemux: fix AAC codec_data values
As seen in the parent switch for object_type_id, the 4 possible values are
0x40, 0x66, 0x67 and 0x68. Fixing the nested switch to match these values.

Looks like it was a typo making them decimal instead of hexadecimal.

CID 1363328
2016-07-06 12:47:18 +01:00
Steven Hoving
ec59291b2e rtspsrc: Fix error messages to first convert to doubles before division 2016-07-06 11:22:53 +03:00
Sebastian Dröge
b9532527ec rtspsrc: Set to PLAYING after a seek again after setting up the segment and everything else
There's a small window for a race condition otherwise.
2016-07-05 21:11:35 +03:00
Sebastian Dröge
fd261e1099 aacparse: Reject raw AAC if no codec_data is found in the caps
If necessary, a demuxer will have to invent something here but this is only a
problem with non-conformant files anyway.
2016-07-04 16:58:38 +02:00
Sebastian Dröge
df454fa28f qtdemux: Invent AAC codec_data if none is present
Without, raw AAC can't be handled and we have some information available in
the decoder that most likely allows us to decode the stream in one way or
another. This is the same code already used by matroskademux for the same
reasons, and ffmpeg/vlc play such files just fine too by guesswork.
2016-07-04 16:55:32 +02:00
Sebastian Dröge
5b24841f66 qtmux: Reject raw AAC caps without codec_data
The resulting file is not going to be playable without guesswork and raw caps
should always have codec_data.
2016-07-04 14:54:13 +02:00
Edward Hervey
e3923df800 qtdemux: Handle upstream GAP in push-mode/time segment
This is to handle cases where upstream handles the fragmented streaming in TIME
segments and sends us data with gaps within fragments. This would happen when dealing
with trick-modes.

When upstream (push-based, TIME SEGMENT) wishes to send discontinuous samples,
it must obey the following rules:
* The buffer containing the [moof] must have a valid GST_BUFFER_OFFSET
* The buffers containing the first sample after a gap:
 * MUST start at the beginning of a sample,
 * MUST have the DISCONT flag set,
 * MUST have a valid GST_BUFFER_OFFSET relative to the beginning of the fragment.

https://bugzilla.gnome.org/show_bug.cgi?id=767354
2016-07-01 14:21:04 +02:00
Brad Lackey
6d3071f200 rtspsrc: Don't disable UDP protocols on redirecting
https://bugzilla.gnome.org/show_bug.cgi?id=768232
2016-07-01 12:21:43 +02:00
Seungha Yang
231018bcfe qtdemux: Push caps only when it was updated
Commit 7873bede31 caused new caps
event per moof without consideration of duplication.

https://bugzilla.gnome.org/show_bug.cgi?id=768268
2016-07-01 11:37:20 +02:00
Jonas Holmberg
850a8bc077 rtph265depay: fix invalid memory access
10 bytes was allocated for stream_format but size of "byte-stream" is
more. Use g_strdup() instead.

https://bugzilla.gnome.org/show_bug.cgi?id=753760
2016-06-30 16:56:24 +01:00
Sebastian Dröge
75963b47f4 udpsrc: Windows has no ipi_spec_dst in struct in_pktinfo 2016-06-28 16:44:50 +03:00
Sebastian Dröge
cdd5fa4d96 udpsrc: #define __APPLE_USE_RFC_3542 to be able to use IPV6_PKTINFO on OSX/iOS 2016-06-28 15:15:14 +03:00
Sebastian Dröge
36a154fa96 udpsrc: Move #includes around to a) work around broken glibc header and b) Windows 2016-06-28 15:08:04 +03:00
Sebastian Dröge
7e47579f17 udpsrc: Fix compilation on Windows and *BSD/OSX 2016-06-28 14:25:03 +03:00
Sebastian Dröge
123d62712c udpsrc: Filter out multicast packets that are not for our multicast address
https://bugzilla.gnome.org/show_bug.cgi?id=767980
2016-06-28 13:40:06 +03:00
Sebastian Dröge
c18b609c06 rtspsrc: When seeking, consider the current element state or pending state instead of the RTSP state
If we consider the RTSP state, what can happen is that it is PLAYING but the
element already asynchronously tried to PAUSE and it just did not happen yet.

We would then override this setting to PAUSED (while the element actually is
in PAUSED) and set the RTSP state to PLAYING again. This would then cause us
to produce packets while the sinks are all PAUSED, piling up thousands of
packets in the rtpjitterbuffer and other elements and finally failing.
2016-06-28 11:01:24 +03:00
Sebastian Dröge
d6f597db20 flvdemux: Add comment about H263/MPEG4P2 being non-standard for FLV
They are however supported by ffmpeg and apparently used out there.

https://bugzilla.gnome.org/show_bug.cgi?id=768006
2016-06-27 09:20:35 +03:00
Vivia Nikolaidou
6ac02f8595 flvdemux: Add support for H263 and MPEG4 part2
https://bugzilla.gnome.org/show_bug.cgi?id=768006
2016-06-24 15:30:03 +03:00
Aaron Boxer
f07c704b49 gstrtpj2kpay: use tile bit and tile number to determine if there are multiple tiles in packet
Now we don't have to rely on a special value for the tile number.

https://bugzilla.gnome.org/show_bug.cgi?id=767817
2016-06-21 13:03:09 +01:00
Tim-Philipp Müller
323244bc04 rtpj2kpay: fix compiler warning on OS/X
gstrtpj2kpay.c:364:21: error: implicit truncation from 'int' to bitfield changes value from -1 to 65535

https://bugzilla.gnome.org/show_bug.cgi?id=767817
2016-06-21 09:34:56 +01:00
Sebastian Dröge
5f2b32e642 rtph264pay: Deprecated sprop-parameter-set property
This is supposed to be either in the codec_data (avc stream format) or inside
the stream, and we extract it from there. It should not be set from a
property as it's stream specific.

https://bugzilla.gnome.org/show_bug.cgi?id=767789
2016-06-21 10:03:04 +03:00
Aleix Conchillo Flaqué
12eb5d6912 rtspsrc: make all srtp encoder properties explicit
The Session Data Protocol doesn't allow specifying a cipher for the
SRTCP, so it will use the SRTP one. In the "srtpenc" element the cipher
"aes-128-icm" is the default for SRTP and SRTCP, but if we want to have
an SRTCP with the "aes-256-icm" cipher then we also need to set the SRTP
cipher to "aes-256-icm", otherwise "aes-128-icm" will be used instead.

https://bugzilla.gnome.org/show_bug.cgi?id=767799
2016-06-20 09:53:24 +02:00
Sebastian Dröge
5a7217a147 qtmux: The prores variant is stored in the variant field, not format
And the caps in the sink pad template already used variant (only).
2016-06-17 16:08:08 +03:00
Jonas Holmberg
83ec89abdd rtph265pay: Remove sprop-parameter-sets property
There is no valid use case when this property is needed since the values
must be in either codec_data or buffer data.

https://bugzilla.gnome.org/show_bug.cgi?id=753760
2016-06-17 15:25:57 +03:00
Jonas Holmberg
2039e0d881 rtph265pay: Read NALU type the same way everywhere
Cosmetic change to read NALU type in gst_rtp_h265_pay_decode_nal() the
same way as in other places.

https://bugzilla.gnome.org/show_bug.cgi?id=753760
2016-06-17 15:25:57 +03:00
Aurélien Zanelli
f8f8935c77 rtpjitterbuffer: fix RTPJitterBufferMode documentation
Documentation lacks '@' before each enum values and there was an extra
line after symbol section which confuses GTK-Doc parser.

https://bugzilla.gnome.org/show_bug.cgi?id=767788
2016-06-17 15:16:45 +03:00
Miguel París Díaz
83f4c08747 rtpsession: take the lock when changing stats
https://bugzilla.gnome.org/show_bug.cgi?id=766025
2016-06-17 12:52:29 +03:00
Jürgen Slowack
98b62e397b rtph265: fix NAL unit type parsing and SPS/PPS/VPS detection
Fixes sps/pps/vps insertion via the config-interval property.

https://bugzilla.gnome.org//show_bug.cgi?id=767680
2016-06-15 13:10:50 +01:00
Tim-Philipp Müller
51a0dc2df2 flvdemux: fix indentation 2016-06-10 13:51:39 +01:00
Tim-Philipp Müller
c51831a245 flvdemux: fix date parsing when there are trailing spaces
Fixes parsing of "Thu May 11 15:57:46 2006 ".

https://bugzilla.gnome.org/show_bug.cgi?id=767496
2016-06-10 13:51:39 +01:00
Aaron Boxer
b4a4fa19a1 gstrtpj2k: set sampling field required by RFC
This field is now required in the sink caps.

https://bugzilla.gnome.org/show_bug.cgi?id=766236
2016-06-10 13:14:44 +03:00
Seungha Yang
4e23d206b9 flvdemux: Fix unref assertion failure
Fix unref assertion failure

https://bugzilla.gnome.org/show_bug.cgi?id=767424
2016-06-08 22:01:11 -04:00
Olivier Crête
5328378132 rtpjitterbuffer: Work with non-TIME segments
With non-time segments, it now assumes that the arrival time of packets
is not relevant and that only the RTP timestamp matter and it produces
an output segment start at running time 0.

https://bugzilla.gnome.org/show_bug.cgi?id=766438
2016-06-08 14:49:49 -04:00
Edward Hervey
30d2918ab0 qtdemux: Show state name in debugging
Makes it easier to trace what's going on
2016-06-07 18:40:14 +03:00
Edward Hervey
7d309d3f4b qtdemux: Remove useless variable
That variable is only needed for a debug statement, move it there
2016-06-07 18:40:14 +03:00
Edward Hervey
d8f1a6c58e qtdemux: Add/Fix comments on the various structure variables
No variables were added/removed. This was just a good excuse to:
* Comment what most variables are used for (and when)
* Order them in such a way as to show first the common variables used
  in all cases, followed by those only used in push-mode
2016-06-07 18:40:14 +03:00
Edward Hervey
6f1eed7f02 qtdemux: Remove unused structure
Let's just remove it, been commented for 7+ years :)
2016-06-07 18:40:14 +03:00
Sebastian Dröge
24862c2f74 qtdemux: Forward segments directly if we are operating in PUSH mode on fragmented streams
We shouldn't go through segment activation as we will only have a limited
understanding of how the whole stream timeline looks like from the moof. We
only know about the current fragment, while upstream knows about the whole
stream.

This fixes seeking in DASH streams, both for seeks after the current moof and
for seeks into the current moof. The former would fail because the moof ends
and we can't activate any segment, the latter would cause a segment that stops
at the moof end, and no further fragments would be played because we end up
being EOS.

https://bugzilla.gnome.org/show_bug.cgi?id=767071
2016-06-07 16:19:39 +03:00
Michael Olbrich
c5da4dc66a matroskademux: preserve seek flags
Without this some flags get lost in streaming mode.

https://bugzilla.gnome.org/show_bug.cgi?id=767194
2016-06-06 10:50:02 +03:00
Miguel París Díaz
389e0abeb0 rtpsource: complete warn log with SSRC
https://bugzilla.gnome.org/show_bug.cgi?id=767195
2016-06-06 10:47:17 +03:00
Olivier Crête
91a2a790e9 rtpvp9depay: Don't assert on flexible mode packets
Instead just post a warning on the bus for now.
2016-06-02 16:17:19 -04:00
Edward Hervey
1d2db2ba4f deinterlace: Ensure DISCONT flag is properly propagated
The output of deinterlace at startup, or when receiving a new DISCONT
buffer, should have the DISCONT flag set on the first buffer.
2016-06-02 11:35:27 +03:00
Sebastian Dröge
4498e57c10 qtdemux: Use the demuxer segment instead of a new one for MSS streams
Upstream might have told us something about the to be expected segment, so
let's use that information instead of coming up with a [0,-1] segment.

https://bugzilla.gnome.org/show_bug.cgi?id=767071
2016-06-01 09:32:03 +03:00
Sebastian Dröge
84e698c531 qtdemux: Only activate segments and send SEGMENT events if we have streams
But in that case also remove the pending newsegment event, otherwise we would
later send a possibly outdated event.

https://bugzilla.gnome.org/show_bug.cgi?id=767071
2016-06-01 09:32:03 +03:00
Sebastian Dröge
f8eb909d90 qtdemux: In PULL mode, nothing is ever going to send us a SEGMENT event
https://bugzilla.gnome.org/show_bug.cgi?id=767071
2016-06-01 09:32:03 +03:00
Sebastian Dröge
f3e68164e4 qtdemux: Don't override TIME segments from upstream that we just saw
The point of d8fb7a9c96 was to not have any
spurious segments stored for later if we do BYTES->TIME conversion, but
overriding any TIME segments from upstream does not make any sense.

See https://bugzilla.gnome.org/show_bug.cgi?id=763165

https://bugzilla.gnome.org/show_bug.cgi?id=767071
2016-06-01 09:32:03 +03:00
Prashant Gotarne
4bdd192fb3 multifilesrc: set position as offset from start-index
query position in GST_FORMAT_BUFFER returns
offset from start-index rather than index.

https://bugzilla.gnome.org/show_bug.cgi?id=752462
2016-05-27 20:32:08 +01:00
Pierre Lamot
3c50fd7669 rtpj2kpay: Fix buffer memory leak
Input buffer memory was not unmapped

https://bugzilla.gnome.org/show_bug.cgi?id=766870
2016-05-27 12:46:23 +01:00
Tim-Philipp Müller
3d979d4e87 videocrop mark crop properties as mutable in playing state 2016-05-23 19:17:08 +01:00
Sebastian Dröge
7cd9d34c80 qtdemux: Set seek event seqnum on all SEGMENT events
Some were forgotten.

See https://bugzilla.gnome.org/show_bug.cgi?id=765935
2016-05-20 11:15:44 +03:00
Sebastian Dröge
9e5cda59f8 avidemux: Pass through seek event seqnums in all SEGMENT/EOS events and SEGMENT_DONE messages/events
See https://bugzilla.gnome.org/show_bug.cgi?id=765935
2016-05-20 11:12:44 +03:00
Sebastian Dröge
0345ba78f5 matroskademux: Set seek event seqnum in EOS and SEGMENT_DONE messages/events
Also actually store the seqnum in pull mode seeks.

See https://bugzilla.gnome.org/show_bug.cgi?id=765935
2016-05-20 10:57:30 +03:00
Guillaume Desmottes
47a358783e deinterlace: fix caps leak
The caps returned by gst_pad_get_current_caps() was never unreffed when
not early returning.

Fix a leak with the elements/deinterlace test.

https://bugzilla.gnome.org/show_bug.cgi?id=766558
2016-05-20 09:36:09 +03:00
Mikhail Fludkov
ee7e80d615 rtpsession: don't act on suspicious BYE RTCP
Some endpoints (like Tandberg E20) can send BYE packet containing our
internal SSRC. I this case we would detect SSRC collision and get rid
of the source at some point. But because we are still sending packets
with that SSRC the source will be recreated immediately.
This brand new internal source will not have some variables incorrectly
set in its state. For example 'seqnum-base` and `clock-rate` values will be
-1.
The fix is not to act on BYE RTCP if it contains internal or unknown
SSRC.

https://bugzilla.gnome.org/show_bug.cgi?id=762219
2016-05-20 09:28:39 +03:00
Seungha Yang
eb09829a1c matroskademux: don't hold object lock whilst pushing out headers
matroskademux would take the GST_OBJECT_LOCK in
- gst_matroska_demux_push_codec_data_all()
- gst_matroska_demux_query()

Some parse element such as FLAC checks upstream seekability, and
there is some use cases that matroska-demux is linked to a parse element
(e.g.,FLAC format) without intermediate elements (e.g., queue).
In this case, matroska-demux never returns from _push_codec_data_all()
because the parser can return only after it receives the response to
the upstream query, but that's not going to happen because it's
deadlocked.

Elements must not hold the object lock whilst pushing out events
or data.

https://bugzilla.gnome.org/show_bug.cgi?id=766645
2016-05-19 22:01:53 +01:00
Tim-Philipp Müller
0686174f19 udpsrc: fix Since version for new "loop" property 2016-05-18 18:35:27 +01:00
Guillaume Desmottes
a6c4763b42 rtpdec: fix clock leak
gst_system_clock_obtain() returns a new ref.

https://bugzilla.gnome.org/show_bug.cgi?id=766521
2016-05-17 09:59:08 +03:00
Tim-Philipp Müller
21e281feea udpsrc: add doc blurb with since marker for new "loop" property 2016-05-17 05:33:35 +01:00
Dimitrios Katsaros
1f0cfd9ffb avimux: add support for png
https://bugzilla.gnome.org/show_bug.cgi?id=758059
2016-05-16 18:14:21 +01:00
Jan Schmidt
d7eb97393c splitmuxsrc: Connect to demux signals before activating
Fix a race in splitmuxsrc by properly connecting to the
demuxer signals we're interested in *before* setting it running.
2016-05-15 22:09:04 +10:00
Olivier Crête
e21cf3bc1c rtpmp4gpay: Don't produce timestamps based on byte count
The GST_BUFFER_OFFSET of output buffers returned to GstRtpBasePayload
should reflect the number of "samples" in the unit of the RTP clock in this
buffer. If this is not true, then it shouldn't be set.

https://bugzilla.gnome.org/show_bug.cgi?id=761943
2016-05-15 12:28:55 +02:00
Edward Hervey
ac3b1cf2ed matroska-mux: Fix strcmp usage
Just use g_strcmp0 which can handle NULL entries
2016-05-15 12:25:03 +02:00
Seungha Yang
56e273bc21 qtdemux: Parsing elst box based on version
segment_duration and media_time should be parsed based on version
of elst box. Specification defines that an elst box with version 1
has uint64 and int64 values for segment_duration and media_time,
respectively.

https://bugzilla.gnome.org/show_bug.cgi?id=766301
2016-05-15 13:10:03 +03:00
Sebastian Dröge
fe34f46f32 rtpsession: Take the lock already when reading the other stats, not just for the hash table
https://bugzilla.gnome.org/show_bug.cgi?id=766025
2016-05-15 12:31:33 +03:00
Tim-Philipp Müller
3320f4f0de matroska: use math-compat.h for NAN define 2016-05-14 17:04:57 +01:00
Jan Schmidt
fa008f271a splitmuxsink: Use GstBin async-handling instead of our own.
Set the async-handling property on GstBin to let it manage
async-handling instead of the local handling from the previous
commit. Works because of #174a5e in core
2016-05-15 00:03:15 +10:00
Olivier Crête
0ebdb97797 jitterbuffer: Upgrade debug message to error
It causes the entire pipeline to fail, it should be easier to find.
2016-05-14 12:36:08 +02:00
Jan Schmidt
08af8cd5b8 splitmuxsink: Hide internal async state changes.
When switching fragments, hide the async-start/async-done
messages from the parent bin, as otherwise we sometimes (very rarely)
hang in PAUSED instead of returning / continuing to PLAYING
state.
2016-05-14 18:34:57 +10:00
Jan Schmidt
f35f604610 splitmuxsink: Remove stray carriage-return from debug 2016-05-14 18:34:57 +10:00
Sebastian Dröge
bb1ae083c6 rtp: Ship gstrtpj2kcommon.h file to fix distcheck 2016-05-13 16:43:21 +03:00
Jesper Larsen
ce05adfb30 avimux: Do not write index and header if idx is NULL
Fixes criticals with e.g.
videotestsrc num-buffers=1 ! identity drop-probability=1.0 ! avimux ! fakesink

https://bugzilla.gnome.org/show_bug.cgi?id=748700
2016-05-13 09:55:45 +01:00
Aaron Boxer
f89c4f9f4b rtpj2kpay: manage T tile invalidation bit correctly, update tile id in header correctly.
1. according to RFC, T bit is only set when either the RTP packet only contains the J2K main header, or the packet contains tile parts from multiple tiles. This is now being managed correctly in the code. The second scenario cannot happen with our payloader, since tile headers are always placed in their own RTP packet, and so a packet cannot contain tile parts from multiple tiles.
However, I have added code to track if multiple tile parts are included in a single RTP packet, in case in the future we want to put header and data in same packet.

2. Old code would set the tile id to zero for all J2K packets. This is now set correctly to the appropriate tile id.

https://bugzilla.gnome.org/show_bug.cgi?id=745187
2016-05-13 11:01:25 +03:00
Aaron Boxer
84ff5511de rtpj2kpay: manage fragmented headers correctly
J2K main header framentation across multiple RTP packets is now handled correctly

https://bugzilla.gnome.org/show_bug.cgi?id=745187
2016-05-13 11:01:19 +03:00
Aaron Boxer
d2765be120 rtpj2k: move common code to shared header, code clean up
https://bugzilla.gnome.org/show_bug.cgi?id=745187
2016-05-13 11:01:15 +03:00
Aaron Boxer
82c2a5cbf8 rtpj2k: update documentation
https://bugzilla.gnome.org/show_bug.cgi?id=745187
2016-05-13 11:01:09 +03:00
Patricia Muscalu
fe4dc610e6 auparse: Fix sticky event misordering warning
Make sure that src pad has caps before sending segment event.

https://bugzilla.gnome.org/show_bug.cgi?id=766359
2016-05-13 10:21:35 +03:00
Sebastian Dröge
204a86af97 rtpsession: Don't notify about stats property changes while taking the session lock
The signal handlers might want to actually get the value of the stats
property, which would take the session lock again and deadlock.

This was introduced by 2e960e7075.

https://bugzilla.gnome.org/show_bug.cgi?id=766025
2016-05-11 09:28:13 +03:00
Thiago Santos
00f23053b1 qtdemux: improve edts segment handling after seeks in push mode
Properly handle edts segments for push-based operation seeking.
We only support edts that a single segment that has media at the end,
being preceeded by any number of gap segments.

This also allows the qt segment rate to be respected after seeks

https://bugzilla.gnome.org/show_bug.cgi?id=765669
2016-05-09 11:46:46 -03:00
Thiago Santos
6604614dc5 qtdemux: properly activate segment with rate != 1.0
Also use the qt rate to identify the position within a qt segment
to properly translate playback time to qt media time

https://bugzilla.gnome.org/show_bug.cgi?id=765669
2016-05-09 10:49:53 -03:00
Havard Graff
8f7962e1c3 rtpjitterbuffer: Fix stall when receiving already lost packet
When a packet arrives that has already been considered lost as part of a
large gap the "lost timer" for this will be cancelled. If the remaining
packets of this large gap never arrives, there will be missing entries
in the queue and the loop function will keep waiting for these packets
to arrive and never push another packet, effectively stalling the
pipeline.

The proposed fix conciders parts of a large gap definitely lost (since
they are calculated from latency) and ignores the late arrivals.

In practice the issue is rare since large gaps are scheduled immediately,
and for the stall to happen the late arrival needs to be processed
before this times out.

https://bugzilla.gnome.org/show_bug.cgi?id=765933
2016-05-06 14:32:42 +03:00
Miguel París Díaz
2e960e7075 rtpsession: Take session lock when creating stats
The access to the session hash table must happen while the session lock is
taken, otherwise another thread might modify the hash table while we're
creating the stats.

https://bugzilla.gnome.org/show_bug.cgi?id=766025
2016-05-06 09:24:22 +03:00
Thiago Santos
c70ed4c914 qtdemux: update segment when new duration is found
Otherwise the old segment will have a shorter stop time and would
cause the stream to end too early.
2016-05-05 09:30:48 -03:00
Thiago Santos
a5e02e948b qtdemux: dismember activate_segment into 2 parts
One that updates and push a new segment, the other will move the
stream to the new segment starting position
2016-05-05 09:30:48 -03:00
George Kiagiadakis
bd2a1487cc splitmuxsrc: add a format-location signal that allows bypassing the location property
This signal allows a user to directly return a sorted list of
files to be joined, so that they don't have to follow the
filename pattern that the "location" property expects.

https://bugzilla.gnome.org/show_bug.cgi?id=753625
2016-05-05 10:49:07 +01:00
Xavier Claessens
0fc02f35c7 splitmuxsink: Fix deadlock case when source reaches EOS
https://bugzilla.gnome.org/show_bug.cgi?id=765072
2016-05-05 01:22:10 +10:00
Stefan Sauer
36597cf201 wavparse: simplify and correct header scanning
The wav spec tells that 'fmt' (and 'bext' if present) must come before 'data'.
There is no requirement for 'fmt' to be first. We already had a list of chunks
to skip, but it is easier to just skip any chunk while seeking for 'fmt'.

This fixes reading files generated by ProTools.
2016-05-03 23:03:14 -07:00
Mark Nauwelaerts
eb336a804b avimux: set audio header rate according to calculated bps in stop_file
... now that set_fields is no longer called there by
e538608b3f
2016-05-01 15:14:00 +02:00
Sebastian Dröge
e0b26059ae qtdemux: Store the segment sequence number in the EOS events and SEGMENT_DONE events/message
Also instead of storing it per stream, store it globally in the demuxer. It's
the same for each stream anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=765806
2016-04-29 15:13:34 +03:00
Sebastian Dröge
3b7df52c86 udpsrc: Always bind to ANY when address is a multicast address and not only on Windows
For IPv6 addresses, binding to a multicast group does not work on Linux
either. Always bind to ANY and then later join the multicast group.

https://bugzilla.gnome.org/show_bug.cgi?id=764679
2016-04-29 11:48:23 +03:00
Sebastian Dröge
f8b87c8a05 qtmux: Allow MPEG-1 Layer 1 and 2 in addition to 3 in MP4
Via the MPEG-4 Part 3 spec we can support the other layers too.
Also correct the samples per frame calculation for MP3 if it's MPEG-2 or
MPEG-2.5.

https://bugzilla.gnome.org/show_bug.cgi?id=765725
2016-04-28 16:26:40 +03:00
Sebastian Dröge
7c728db1f3 rtspsrc: Update caps for TCP whenever they change
We only changed them for UDP so far, which caused the wrong seqnum-base and
other information to be passed to rtpjitterbuffer/etc when seeking. This
usually wasn't that much of a problem as the code there is robust enough, but
every now and then it causes us to drop up to 32756 packets before we
continue doing anything meaningful.

https://bugzilla.gnome.org/show_bug.cgi?id=765689
2016-04-27 20:52:32 +03:00
Sebastian Dröge
608b4ee53c rtpjitterbuffer: Ensure to not take caps with the wrong pt for getting the clock-rate
Especially the caps on the pad might be out of date, and the new caps would be
provided for the current pt via the request-pt-map signal.

https://bugzilla.gnome.org/show_bug.cgi?id=765689
2016-04-27 20:52:27 +03:00
Sebastian Dröge
d24e68719b rtspsrc: Don't propagate spurious state change returns from internal elements further
We handle them inside rtspsrc and override them in all other cases anyway, so
do the same for "internal" state changes like PAUSED->PAUSED and
PLAYING->PLAYING.

This keeps unexpected NO_PREROLL to confuse state changes in GstBin.

See also https://bugzilla.gnome.org/show_bug.cgi?id=760532

https://bugzilla.gnome.org/show_bug.cgi?id=765689
2016-04-27 20:52:15 +03:00
Sebastian Dröge
e538608b3f avimux: Don't override maximum audio chunk size with the scale again just before writing it
set_fields() should only be called in the beginning, otherwise we will never
remember the maximum audio chunk size and write a wrong block align... which
then causes wrong timestamps and other problems.
2016-04-27 14:09:03 +03:00
Sebastian Dröge
34dc1298e9 avimux: Actually store the largest audio chunk size for the VBR case of MP2/MP3
3ea338ce27 changed avimux to do that, but it
never actually kept track of the max audio chunk for MP3 and MP2. These are
knowing the hdr.scale only after parsing the frames instead of at setcaps
time.
2016-04-27 13:54:31 +03:00
Mats Lindestam
63c284c24e multiudpsink: Allow setting "socket-v6" without setting "socket" too
https://bugzilla.gnome.org/show_bug.cgi?id=764897
2016-04-26 11:05:22 +03:00
Tim-Philipp Müller
4ba6214d3a deinterlace: fix description of linear interlacing method 2016-04-22 15:48:08 +01:00
Thibault Saunier
dd9bfd03ec flv: Handle the case where we do not get any CollectData in handle_buffer
https://bugzilla.gnome.org/show_bug.cgi?id=765320
2016-04-22 08:39:02 -03:00
Seungha Yang
cde45a41a5 qtdemux: Do not use unreliable framerate
timescale/1 is unreliable value for framerate. Due to downstream
element usually use framerate generated by qtdemux, let it be omitted
until the framerate can be reliably calculated.

https://bugzilla.gnome.org/show_bug.cgi?id=764733
2016-04-21 12:53:48 +03:00
Sebastian Dröge
707c69cb72 Revert "qtdemux: expose streams with first moof for fragmented format"
This reverts commit d8bb6687ea.

https://bugzilla.gnome.org/show_bug.cgi?id=764733
2016-04-21 12:53:33 +03:00
Alex Ashley
0c4cc14533 qtdemux: support seeking of CENC encrypted streams
When playing a stream that has been protected by DASH CENC, playback
will fail if a seek is performed. Qtdemux produces the error "stream
is protected using cenc, but no cenc protection system information
has been found" and playback stops.

The problem is that gst_qtdemux_reset() gets called as part of the
FLUSH during a seek. This function frees the protection_system_ids
array. When gst_qtdemux_configure_protected_caps() is called after the
seek has completed, the protection_system_ids array is empty and
qtdemux is unable to create the correct output caps for the protected
stream.

This commit changes it to only free the protection_system_ids on
hard resets.

https://bugzilla.gnome.org/show_bug.cgi?id=761787
2016-04-20 12:19:51 -03:00
Tim-Philipp Müller
76506190e9 udpsrc: add "retrieve-sender-address" property
This allows disabling of sender address retrieval, which might
be useful in certain scenarios, like when the socket is connected,
or the sender address is not of interest (e.g. when receiving an
MPEG-TS stream). Disabling sender address retrieval in those
cases can have minor performance advantages.

https://bugzilla.gnome.org/show_bug.cgi?id=563323
2016-04-18 14:33:10 +01:00
Xavier Claessens
7886e8d8a0 spitmuxsink: Avoid creating small file at EOS
When EOS is reached, the current file get closed and the last
GOP in the mq was written in a new file.

https://bugzilla.gnome.org/show_bug.cgi?id=765072
2016-04-16 22:14:37 +10:00
Sebastian Dröge
2dee0e385f scaletempo: S16 uses S32 temporary buffers, float/double their own type
Make sure to allocate not only a S16 buffer for S16 but a twice as big one to
hold S32.

https://bugzilla.gnome.org/show_bug.cgi?id=765116
2016-04-15 20:06:42 +03:00
Aleix Conchillo Flaqué
c36930535d rtspsrc: add srtp rollover counters from mikey crypto sessions
The server can send multiple crypto sessions, one for each SSRC with its
own rollover counter. We parse this information and pass it to the SRTP
decoder via the "request-key" signal.

https://bugzilla.gnome.org/show_bug.cgi?id=730540
2016-04-15 18:12:06 +02:00
Jan Schmidt
a660ac7e88 rtpjitterbuffer: Fix debug output when resyncing
Don't output the pointer value of the time() function as a timestamp
by using the correct variable.

Fixes build on Raspberry Pi 3.
2016-04-15 14:35:07 +00:00
Damian Ziobro
ae4484c2ba splitmuxsink: Add max_files_number property
https://bugzilla.gnome.org/show_bug.cgi?id=744612
2016-04-14 04:18:11 +10:00
Reynaldo H. Verdejo Pinochet
6b209acf28 videomixer: drop reference to videomixer 2
Fix a small grammar mistake on "overlayed" while at it.
2016-04-13 10:57:03 -07:00
Paolo Pettinato
40fbffc208 rtpmux: Forward sticky events on buffer lists too, not only on buffers
https://bugzilla.gnome.org/show_bug.cgi?id=764933
2016-04-12 15:22:14 +03:00
Sebastian Dröge
1f21747cc5 deinterlace: Drain the field history if the caps are changing
Otherwise we will use fields from the old caps with everything set up for the
new caps, causing crashes and worse.

Also don't do anything if the same caps are set twice.
2016-04-12 15:01:28 +03:00
Sebastian Dröge
0c84b1b104 deinterlace: Instead of confusing crashes later, just error out immediately if mapping a video frame fails
This probably still crashes but at least we get some hint about what goes
wrong instead of random behaviour later.
2016-04-12 15:00:31 +03:00
Luis de Bethencourt
1bb9d9c682 qtdemux: check stream is available in PIFF parser
qtdemux->streams is an array, it will never evaluate to true when comparing
to NULL. Instead we want to check the number of streams to make sure the
stream is available.

https://bugzilla.gnome.org/show_bug.cgi?id=753614
CID 1358389
2016-04-12 11:39:48 +01:00
Luis de Bethencourt
574bf8e02f Revert "qtdemux: redundant check in PIFF parser"
This reverts commit 41e10524f3.
2016-04-12 11:37:36 +01:00
Luis de Bethencourt
41e10524f3 qtdemux: redundant check in PIFF parser
qtdemux->streams is an array of size GST_QTDEMUX_MAX_STREAMS, it will never
evaluate to true when comparing to NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=753614
CID 1358389
2016-04-12 11:08:37 +01:00
Sebastian Dröge
4a0de53cc1 rtpjitterbuffer: Fix rtp_jitter_buffer_get_ts_diff() fill level calculation
The head of the queue is the oldest packet (as in lowest seqnum), the tail is
the newest packet. To calculate the fill level, we should calculate tail-head
while considering wraparounds. Not the other way around.

Other code is already doing this in the correct order.

https://bugzilla.gnome.org/show_bug.cgi?id=764889
2016-04-12 10:17:57 +03:00
Sebastian Dröge
95dc198563 rtpmanager: It's GST_LIBS, not GST_LIBS_LIBS 2016-04-11 10:44:56 +03:00
Seungha Yang
faa664b8ea qtdemux: Fix parsing segment duration of empty edit list box
For empty edit list, segment-duration in edit list box should not be
used for segment event.

https://bugzilla.gnome.org/show_bug.cgi?id=764870
2016-04-11 10:28:07 +03:00
Nicola Murino
cbdbfc8902 matroskamux: make timecodescale configurable
In some use cases the default timecodescale will produce blocks with the same timestamp

https://bugzilla.gnome.org/show_bug.cgi?id=764769
2016-04-11 10:17:25 +03:00
Edward Hervey
5fa1c2ba59 jiterbuffer: Move assertion to the right location
We shouldn't have "late" lost timers at that point
2016-04-07 13:01:52 +02:00
Edward Hervey
b82da62922 jitterbuffer: Speed up lost timeout handling
When downstream blocks, "lost" timers are created to notify the
outgoing thread that packets are lost.

The problem is that for high packet-rate streams, we might end up with
a big list of lost timeouts (had a use-case with ~1000...).

The problem isn't so much the amount of lost timeouts to handle, but
rather the way they were handled. All timers would first be iterated,
then the one selected would be handled ... to re-iterate the list again.

All of this is being done while the jbuf lock is taken, which in some use-cases
would return in holding that lock for 10s... blocking any buffers from
being accepted in input... which would then arrive late ... which would
create plenty of lost timers ... which would cause the same issue.

In order to avoid that situation, handle the lost timers immediately when
iterating the list of pending timers. This modifies the complexity from
a quadratic to a linear complexity.

https://bugzilla.gnome.org/show_bug.cgi?id=762988
2016-04-07 10:14:24 +02:00
Edward Hervey
d656fe8d54 jitterbuffer: Don't create lost events if we don't need them
When "do-lost" is set to FALSE we don't use/send the lost events.
In that case, don't create them to start with :)

https://bugzilla.gnome.org/show_bug.cgi?id=762988
2016-04-07 10:13:56 +02:00
Edward Hervey
cf866a8469 jitterbuffer: Add tracing of lock usage
Helps with debugging lock usage

https://bugzilla.gnome.org/show_bug.cgi?id=762988
2016-04-07 10:06:18 +02:00
Nirbheek Chauhan
e20a687737 rtpjpegdepay: Don't send invalid frames downstream after packet loss or a DISCONT
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%.
2016-04-04 17:40:11 +01:00
Sebastian Dröge
df247f091c rtpjitterbuffer: Add RFC7273 media clock handling
https://bugzilla.gnome.org/show_bug.cgi?id=762259
2016-04-03 11:24:34 +03:00
Philippe Normand
fd7964e746 qtdemux: PIFF box detection and parsing support
The PIFF data is stored in a custom UUID box which is parsed and the
crypto_info of the element is updated accordingly. This allows
downstream decryptors to process and decrypt the protected content.

https://bugzilla.gnome.org/show_bug.cgi?id=753614
2016-04-02 18:01:10 +01:00
Luis de Bethencourt
4b7e377d25 rtpvorbisdepay: remove dead code
payload_buffer hasn't been assigned a value before the jumps to
switch_failed or packet_short. So the value must be NULL. No need
to unmap and unref.

CID #1316476
2016-04-01 12:15:58 +01:00
Luis de Bethencourt
6a16be75bf rtph263pay: fix leak
Free memory of current macroblock once it isn't needed so it isn't leaked
by the call of the gst_rtp_h263_pay_B_mbfinder function.
if (!(mac = gst_rtp_h263_pay_B_mbfinder (context, gob, mac, mb))) {

CID 1212156
2016-03-31 15:25:17 +01:00
Jan Schmidt
41d2b6f19e splitmux: Handle a hang draining out at EOS
Make sure that all data is drained out when the reference pad
goes EOS. Fixes a problem where data that arrives on other
pads after the reference pad finishes can stall forever and
never pass EOS.

https://bugzilla.gnome.org/show_bug.cgi?id=763711
2016-04-01 00:48:05 +11:00
Xavier Claessens
fb835c100a splitmuxsink: Fix occasional deadlock when ending file with subtitle
Deadlock occurs when splitting files if one stream received no buffer during
the first GOP of the next file. That can happen in that scenario for example:
 1) The first GOP of video is collected, it has a duration of 10s.
    max_in_running_time is set to 10s.
 2) Other streams catchup and we receive the first subtitle buffer at ts=0 and
    has a duration of 1min.
 3) We receive the 2nd subtitle buffer with a ts=1min. in_running_time is set to
    1min. That buffer is blocked in handle_mq_input() because
    max_in_running_time is still 10s.
 4) Since all in_running_time are now > 10s, max_out_running_time is now set to
    10s. That first GOP gets recorded into the file. The muxer pop buffers out
    of the mq, when it tries to pop a 2nd subtitle buffer it blocks because the
    GstDataQueue is empty.
 5) A 2nd GOP of video is collected and has a duration of 10s as well.
    max_in_running_time is now 20s. Since subtitle's in_running_time is already
    1min, that GOP is already complete.
 6) But let's say we overran the max file size, we thus set state to
    SPLITMUX_STATE_ENDING_FILE now. As soon as a buffer with ts > 10s (end of
    previous GOP) arrives in handle_mq_output(), EOS event is sent downstream
    instead. But since the subtitle queue is empty, that's never going to
    happen. Pipeline is now deadlocked.

To fix this situation we have to:
 - Send a dummy event through the queue to wakeup output thread.
 - Update out_running_time to at least max_out_running_time so it sends EOS.
 - Respect time order, so we set out_running_tim=max_in_running_time because
   that's bigger than previous buffer and smaller than next.

https://bugzilla.gnome.org/show_bug.cgi?id=763711
2016-04-01 00:48:05 +11:00
Stian Selnes
4c0e509328 rtpsession: Add new signal 'on-app-rtcp'
Similar to the 'on-feedback-rtcp' signal, but emitted for RTCP APP
packets.

https://bugzilla.gnome.org/show_bug.cgi?id=762217
2016-03-30 15:42:01 +03:00
Minjae Kim
eb13a1d607 rtpmanager: Set to initial value for 'ntpns' in get_current_times()
Initialize "ntpns" variable to -1 as the OE compiler for some reason doesn't
realize that the variable is set in all code paths.

https://bugzilla.gnome.org/show_bug.cgi?id=764119
2016-03-29 10:21:07 +03:00
Sebastian Dröge
3549aa7924 rtpjpegpay: Allow different quantization tables for components 2 and 3
RFC 2435 mentions in section 4.1 that U/V use table number 1, but this seems
just like an example. Some encoders are not following that and there seems to
be no reason to reject their streams.

https://bugzilla.gnome.org/show_bug.cgi?id=761345
2016-03-25 12:52:56 +02:00
Thiago Santos
d738fa0787 splitmuxsink: only try to create internal sink if it doesn't exist
This allows splitmuxsink to be reused after being put to NULL.

Test included

https://bugzilla.gnome.org/show_bug.cgi?id=762893
2016-03-24 20:10:25 -03:00
Sebastian Dröge
239cf06d81 deinterleave: Return the current caps on the srcpads on caps queries
It's not like we could accept any other caps here. The caps are decided by the
upstream caps event.

Also keep the filter order intact when filtering the results against the
filter caps.

https://bugzilla.gnome.org/show_bug.cgi?id=763326
2016-03-24 14:47:40 +02:00
Jimmy Ohn
206e24855a qtdemux: Fix qtdemux memory leak in src_convert function
If we don't find the index of the sample correctly in src_convert function,
we have to unref about the qtdemux before returning value.
So, I have modify it about instead pass qtdemux as a parameter into
src_convert function.

https://bugzilla.gnome.org/show_bug.cgi?id=763973
2016-03-24 14:36:26 +02:00
Jimmy Ohn
c633f2aab7 qtdemux: Add check condition for fail case in get_duration function
Currently, get_duration function always return the TRUE even though
it can't be set duration correctly. So, we need to add the else condition
about the fail case. Also, we already set the GST_CLOCK_TIME_NONE
in this function. So I have modify it which is related code in some
function.

https://bugzilla.gnome.org/show_bug.cgi?id=763968
2016-03-24 14:35:47 +02:00
Jimmy Ohn
0ef9e6d139 qtdemux: Modify data type of duration in handle_src_query function
Data type of duration need to modify from guint64 to GstClockTime
for consistency in handle_src_query function.

https://bugzilla.gnome.org/show_bug.cgi?id=763965
2016-03-24 14:34:55 +02:00
Vivia Nikolaidou
dc2aafb3d4 deinterlace: Added "auto" fields mode
The "auto" fields mode will detect the upstream and downstream framerates and
will decide to deinterlace all or only top fields.

https://bugzilla.gnome.org/show_bug.cgi?id=763869
2016-03-24 14:34:11 +02:00
Havard Graff
bcbb8fc1da flvdemux: don't emit pad-added until caps are ready
In other words, gst_pad_get_current_caps should never return NULL
in a pad-added callback from the demuxer.

Added tests for the two special cases with AAC and H.264 where this
would happen every time.

https://bugzilla.gnome.org/show_bug.cgi?id=763780
2016-03-24 14:33:33 +02: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
Jihae Yi
da5c8a954c rtspsrc: avoid potentially overflowing expression
https://bugzilla.gnome.org/show_bug.cgi?id=757569
2016-03-24 14:28:50 +02:00
Jimmy Ohn
84f436f122 qtdemux: Add the function to get channels and sample rate for AAC
Add aac_get_channels and sample_rate function to get these value for
AAC.

https://bugzilla.gnome.org/show_bug.cgi?id=749110
2016-03-24 14:28:09 +02:00
Sebastian Dröge
605175b8c4 deinterleave: Use GstIterator for iterating all pads instead of manually iterating them while holding the object lock all the time
Doing queries while holding the object lock is a bit dangerous, and in this
case causes deadlocks.

https://bugzilla.gnome.org/show_bug.cgi?id=763326
2016-03-17 21:12:29 +02:00
Vivia Nikolaidou
5d8e7598ac deinterlace: Fix typo to not change the input caps but our filtered caps
Changing the input caps and not using them anymore afterwards is useless, and
it breaks negotiation in pipelines like:

gst-launch-1.0 videotestsrc ! "video/x-raw,framerate=25/1,interlace-mode=interleaved" !
  deinterlace fields=all ! "video/x-raw,framerate=50/1,interlace-mode=progressive" !
  fakesink
2016-03-17 21:11:36 +02:00
Nirbheek Chauhan
78847d03cf rtpmanager: Some comment and documentation clarifications/fixes 2016-03-15 09:32:47 +00:00
Sebastian Dröge
66e9e4c202 Revert "flacparse: push tags in pre_push_frame"
This reverts commit 4065fcb80a.

flacparse should not push tags by itself, the base class is going to do that
while properly merging in upstream tags. It just didn't because of a bug in
the base class, which was hidden by this commit.

https://bugzilla.gnome.org/show_bug.cgi?id=763553
2016-03-13 10:33:13 +02:00
Nirbheek Chauhan
bbde949e8e win32: Don't use __attribute__ on MSVC
Use MSVC-equivalents for alignment and packing compiler directives when building
on MSVC
2016-03-10 10:01:19 +00:00
Nirbheek Chauhan
63803bfac0 win32: Don't try to include xmath.h on newer Visual Studio 2016-03-10 10:01:19 +00:00
Nirbheek Chauhan
5d93844676 gst Factor out endian-order RGB formats
MSVC seems to ignore preprocessor conditionals inside static pad
template macros.
2016-03-10 10:00:58 +00:00
Thiago Santos
d8fb7a9c96 qtdemux: reset pending segment if we are already pushing one
When upstream is running in bytes in push-mode, qtdemux will
convert seeks from time to bytes and send it upstream. Upstream
element will perform a byte seek and send a byte segment to qtdemux
that will convert it to time and push it downstream.

There is, however, the pending_segment variable that stores a new
segment event to be pushed before the next data. When handling seeks
as mentioned above this variable was being ignored and, if it contained
some segment event, it would override the one resulting from the seek.
This would restore a previous segment and would cause the seek segment
to be discarded downstream.

This patch fixes this issue by unrefing any pending segment as the
seek from upstream should contain the latest one that should be
used, as requested by the application.

https://bugzilla.gnome.org/show_bug.cgi?id=763165
2016-03-07 15:26:13 -03:00
Thiago Santos
b46af7fda7 qtdemux: run gst-indent
Otherwise commits will fail with our indent check hook
2016-03-07 15:26:13 -03:00
Sebastian Dröge
49be64e571 udpsrc: Fix multicast group joining with provided sockets on Windows
On Windows the socket will be bound to ANY instead of the multicast group,
as binding to a multicast group does not work. Which would mean that we
override src->addr to become ANY and won't automatically join a multicast
group anymore on Windows.

On Linux we would automatically join a multicast group, keep it consistent.

https://bugzilla.gnome.org/show_bug.cgi?id=763093
2016-03-04 15:31:51 +02:00
Sebastian Dröge
b6e10be278 Revert "rtpjitterbuffer: don't forget to unlock mutex in error code path in two cases"
This reverts commit a7fb7b5359.

The mutex is taken by the caller, we should keep it locked when returning so
the caller can unlock it again.
2016-03-02 13:13:24 +02:00
Luis de Bethencourt
4065fcb80a flacparse: push tags in pre_push_frame
Push a tag event before pre-roll if we have tags.

https://bugzilla.gnome.org/show_bug.cgi?id=762660
2016-03-01 19:23:02 +00:00
Tim-Philipp Müller
a7fb7b5359 rtpjitterbuffer: don't forget to unlock mutex in error code path in two cases 2016-03-01 14:14:36 +00:00
Luis de Bethencourt
5dcf1a4f69 matroska-demux: remove impossible condition
It is impossible for a guint to have a negative value, no need to check for
this. Introduced in commit 6861d11c49

CID 1354509
2016-02-29 10:11:38 +00:00
Petr Viktorin
d089cd5a12 alpha: Fix sample pipeline
Use the zorder pad property to make sure the semitransparent
video is on top of the background.

https://bugzilla.gnome.org/show_bug.cgi?id=762809
2016-02-28 11:52:14 -05:00
Tim-Philipp Müller
a4d64b5caa rgvolume: make tag list writable before modifying it
Making the event itself writable is not enough, it won't make
the actual taglist in the event writable as well. Instead, just
make a copy of the taglist and then create a new tag event from
that if required, replacing the old one. Before we would
inadvertently modify taglists upstream elements might still
be holding on to. Add unit test for this as well.

https://bugzilla.gnome.org/show_bug.cgi?id=762793
2016-02-28 14:44:39 +00:00
Sebastian Dröge
bf5a72a6dd rtspsrc: Properly error out if binding the UDP sockets fails
udpsrc is not returning us a socket in that case.
2016-02-28 13:01:34 +02:00
Sebastian Dröge
03d2ae154e goom: Use goom_set_resolution() instead of recreating the goom instance when the resolution changes
https://bugzilla.gnome.org/show_bug.cgi?id=762765
2016-02-27 20:33:32 +02:00
Sebastian Dröge
bd0d2a3d7d Revert "goom: Initialize the goom struct only once we know width/height and recreate it if those change"
This reverts commit cc6e102643.
2016-02-27 20:32:45 +02:00
Sebastian Dröge
cc6e102643 goom: Initialize the goom struct only once we know width/height and recreate it if those change
Fixes crash when the width and/or height is changing.

https://bugzilla.gnome.org/show_bug.cgi?id=762765
2016-02-27 20:31:15 +02:00
Tim-Philipp Müller
fb0bc126c9 rtp: opus: move Opus RTP payloader/depayloader from -bad to -good
https://bugzilla.gnome.org/show_bug.cgi?id=756282
2016-02-25 22:45:16 +00:00
Tim-Philipp Müller
3b970e9b5e Merge branch 'plugin-move-rtp-opus'
Move Opus RTP depayloader/payloader from -bad to -good.

https://bugzilla.gnome.org/show_bug.cgi?id=756282
2016-02-25 22:45:15 +00:00
Philippe Normand
9c47c0da59 qtdemux: cenc aux info parsing from mdat support in PULL mode
This is already supported for PUSH mode but was failing in PULL mode.
The aux info is sometimes stored in the mdat before the first sample,
so the loop task needs to pull data stored at that location and
perform the aux info cenc parsing.

https://bugzilla.gnome.org/show_bug.cgi?id=761700

https://bugzilla.gnome.org/show_bug.cgi?id=762516
2016-02-25 12:46:27 +02:00
Philippe Normand
67f3fc1748 qtdemux: prevent buffer flow if any stream failed to be exposed
In some cases the stream configuration can fail, for instance if the
stream is protected and no decryptor was found. For those situations
the demuxer shouldn't emit any data on the corresponding source pad of
the stream and bail out.

https://bugzilla.gnome.org/show_bug.cgi?id=762516
2016-02-25 12:46:27 +02:00
Philippe Normand
fb5d50cd07 qtdemux: don't push encrypted buffer without cenc metadata
When the cenc metadata is stored outside of the moof box and the
stream is exposed it is possible that the cenc metadata hasn't been
processed yet while the first buffer is being pushed. When this
happens the buffer can't possibly be decrypted downstream so don't
push it.

https://bugzilla.gnome.org/show_bug.cgi?id=762516
2016-02-25 12:46:27 +02:00
Philippe Normand
459ef195bb qtdemux: read saio aux_info_type as a FOURCC
https://bugzilla.gnome.org/show_bug.cgi?id=756897
2016-02-24 10:54:23 +02:00
Sebastian Dröge
49f4631909 gst: Handle gst_pad_get_current_caps() returning NULL gracefully 2016-02-23 18:27:47 +02:00
Dave Craig
9b2e1f9f36 rtph265depay: Don't assume that get_current_caps() returns non-NULL caps after has_current_caps()
Remove calls to gst_pad_has_current_caps() which then go on to call
gst_pad_get_current_caps() as the caps can go to NULL in between. Instead just
use gst_pad_get_current_caps() and check for NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=759539
2016-02-23 18:12:54 +02:00
Dave Craig
211c8492b3 gst: Don't assume that get_current_caps() returns non-NULL caps after has_current_caps()
Remove calls to gst_pad_has_current_caps() which then go on to call
gst_pad_get_current_caps() as the caps can go to NULL in between. Instead just
use gst_pad_get_current_caps() and check for NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=759539
2016-02-23 18:11:42 +02:00
Dave Craig
6cdbf40622 aacparse: Handle gst_pad_get_current_caps() returning NULL gracefully
This can happen when the pipeline is currently shutting down.

https://bugzilla.gnome.org/show_bug.cgi?id=759539
2016-02-23 18:11:42 +02:00
Linus Svensson
a5691af319 matroska-demux: Don't handle seek until ready
https://bugzilla.gnome.org/show_bug.cgi?id=762542
2016-02-23 17:54:43 +02:00
Linus Svensson
1a3986d016 matroska-demux: Unref seek event
https://bugzilla.gnome.org/show_bug.cgi?id=762542
2016-02-23 17:54:43 +02:00
Aurélien Zanelli
84e441d268 multifilesink: close file on write error with next-file mode is set to buffer
If we have an error during fwrite call, file stays open and thus next
incoming buffer will trigger an assert when trying to opening a new
file.
This happens if we do not restart element, file is closed at stop, and
if application handles the returned GST_FLOW_ERROR to keep bin alive.

https://bugzilla.gnome.org/show_bug.cgi?id=762434
2016-02-23 11:34:31 +02:00
Matej Knopp
8657987f8f matroskamux: don't output empty tags/tag elements
Such files will not play on Android, because of bug in libwebm matroska parsing, which is still present in 6.0.1

https://bugzilla.gnome.org/show_bug.cgi?id=762349
2016-02-23 11:00:05 +02:00
Vincent Penquerc'h
6861d11c49 matroska-demux: make up an OpusHead block if possible when missing
https://bugzilla.gnome.org/show_bug.cgi?id=761489
2016-02-23 10:47:43 +02:00
Vincent Penquerc'h
565607107f matroska-mux: make up an OpusHead block if possible when missing
This block is needed in the Matroska file, but data coming from
RTP may not have one.

https://bugzilla.gnome.org/show_bug.cgi?id=761489
2016-02-23 10:47:43 +02:00
Mark Nauwelaerts
afad769c78 matroskademux: make stream-id more readable and order-friendly
... as streams are so ordered by id by e.g. decodebin
(and as typically already honoured by other demuxers).
2016-02-22 16:06:11 +01:00
Mark Nauwelaerts
7456ee1e1b matroska: remove confusing duplicate track uid field 2016-02-22 16:05:41 +01:00
Luis de Bethencourt
93cd4be8d5 rtpvp9pay: add missing break
VP9_PAY_PICTURE_ID_7BITS and VP9_PAY_PICTURE_ID_15BITS are mutually
exclusive options of the picture-id-mode. We can break after the
first case.

1 or 2 bytes need to be added to the header length depending on the
PictureID size.
https://tools.ietf.org/html/draft-uberti-payload-vp9-00#section-4.2

CID 1353479
2016-02-22 14:06:02 +00:00
Vineeth TM
7150b89c59 avidemux: Fix buffer memory leak
buffer being mapped is not being unmapped in some cases

https://bugzilla.gnome.org/show_bug.cgi?id=762420
2016-02-22 10:14:44 +02:00
Stian Selnes
5a2cc41398 rtpmanager: Don't warn for duplicate/reordered packets
This is a normal scenario and should not be a warning.

https://bugzilla.gnome.org/show_bug.cgi?id=762208
2016-02-21 22:37:57 +00:00
Tim-Philipp Müller
13a9a7543d win32: remove outdated build cruft
This hasn't been touched for generations, doesn't work,
and is just causing confusion. We also don't want to
maintain these files manually.
2016-02-21 09:47:43 +00:00
Matej Knopp
f96c9eb6bc qtdemux: workaround for files with wrong color_table_id value
Instead of erroring out, just use the default color table.

https://bugzilla.gnome.org/show_bug.cgi?id=761637
2016-02-19 16:00:59 +00:00
Tim-Philipp Müller
df341f41dc flvmux, rtpvp9depay: fix indentation 2016-02-19 15:04:15 +00:00
Havard Graff
7787f439fc flvmux: plug leak(s) in error-scenario
https://bugzilla.gnome.org/show_bug.cgi?id=762210
2016-02-19 14:59:09 +00:00
Havard Graff
1e09e5bfe9 flvdemux: fix eos event leak
https://bugzilla.gnome.org/show_bug.cgi?id=762209
2016-02-19 14:54:04 +00:00
Philippe Normand
52b16768a2 qtdemux: plug leaks in cenc aux info parsing 2016-02-19 10:30:46 +02:00
Sebastian Dröge
a7c3f353bd matroskademux: Unmap wavpack header buffer after creating it
Otherwise it will be mapped writable all the time and we can't read from it
anywhere.

https://bugzilla.gnome.org/show_bug.cgi?id=762239
2016-02-18 11:10:14 +02:00
Tim-Philipp Müller
d6685b247a rtp: sprinkle some G_GNUC_INTERNAL for internal utils functions 2016-02-17 15:07:37 +00:00
Alex Ashley
97f6f7c713 qtdemux: only transform protected caps once
Commit 7873bede31
(https://bugzilla.gnome.org/show_bug.cgi?id=760774) changed the
behaviour of qtdemux to call gst_qtdemux_configure_stream() for
every new moof.

When playing a protected stream, gst_qtdemux_configure_stream()
calls gst_qtdemux_configure_protected_caps(). The
gst_qtdemux_configure_protected_caps() function takes the original
media format, puts this in a field called "original-media-type"
and then changes the caps to "application/x-cenc".

The gst_qtdemux_configure_protected_caps() did not handle the case
of being called multiple times, causing it to incorrectly set the
caps. The second call was causing the caps to be set to:

    application/x-cenc, original-media-type"application/x-cenc"

This commit makes gst_qtdemux_configure_protected_caps() check that
the caps have already been transformed, so that it only gets
changed once.

    https://bugzilla.gnome.org/show_bug.cgi?id=761769
2016-02-17 17:04:25 +02:00
Sebastian Dröge
01342378b5 opus: Add proper support for multichannel audio
https://bugzilla.gnome.org/show_bug.cgi?id=757152
2016-02-17 14:58:01 +00:00
Sebastian Dröge
0472d9f8b2 opus: 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 audio tag.

https://bugzilla.gnome.org/show_bug.cgi?id=751774
2016-02-17 14:58:01 +00:00
Sebastian Dröge
ff51629c9a opusdepay: Set multistream=FALSE on the Opus caps
The RTP Opus mapping only allows mono/stereo, and not multistream Opus
streams.
2016-02-17 14:58:01 +00:00
Olivier Crête
89b172b3ed rtpopuspay: Forward stereo preferences from caps upstream
https://bugzilla.gnome.org/show_bug.cgi?id=746617
2016-02-17 14:58:01 +00:00
Olivier Crête
4df223f325 rtpopuspay: Set the number of channels to 2 as per RFC draft
https://bugzilla.gnome.org/show_bug.cgi?id=746617
2016-02-17 14:58:01 +00:00
Sebastian Dröge
bbb1143ca3 opus: Handle sprop-stereo and sprop-maxcapturerate RTP caps fields
https://bugzilla.gnome.org/show_bug.cgi?id=746617
2016-02-17 14:58:01 +00:00
Vincent Penquerc'h
4b5ad70924 rtpopuspay: default encoding name to OPUS
https://bugzilla.gnome.org/show_bug.cgi?id=737810
2016-02-17 14:58:01 +00:00
Vincent Penquerc'h
755289ed0c rtpopuspay: make caps writable before truncating them
https://bugzilla.gnome.org/show_bug.cgi?id=737810
2016-02-17 14:58:01 +00:00
Vincent Penquerc'h
e427369840 rtpopuspay: negotiate the encoding name
Chrome uses a different encoding name that gstreamer.

https://bugzilla.gnome.org/show_bug.cgi?id=737810
2016-02-17 14:58:01 +00:00
Nicolas Dufresne
9e4511edf4 rtpopus: Use OPUS encoding name
Both Firefox and Chrome uses OPUS as the encoding in their SDP.
Adding this now defacto standard name remove the need for special
case in SDP parsing code.

https://bugzilla.gnome.org/show_bug.cgi?id=737810
2016-02-17 14:58:01 +00:00
Wim Taymans
b310393916 opuspay: fix timestamps
Copy timestamps to payloaded buffer.
Avoid input buffer memory leak.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=692929
2016-02-17 14:58:00 +00:00
Tim-Philipp Müller
117e30c47e Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2016-02-17 14:58:00 +00:00
Wim Taymans
5d893c7ea2 opuspay: remove pointless caps serialization
Remove the caps serialization in the rtp caps. the spec nor the receiver
does anything with it.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=686547
2016-02-17 14:58:00 +00:00
Tim-Philipp Müller
17742d2347 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.
2016-02-17 14:58:00 +00:00
Olivier Crête
18638c9c4e rtpopuspay: Allocate the rtp buffer correctly
Use the right functions to allocate the rtp buffer
2016-02-17 14:58:00 +00:00
Mark Nauwelaerts
ad261f64c3 replace gst_element_class_set_details_simple with gst_element_class_set_metadata 2016-02-17 14:58:00 +00:00
Mark Nauwelaerts
d196562755 opus: port to updated 0.11 2016-02-17 14:58:00 +00:00
Edward Hervey
77ea437507 Merge remote-tracking branch 'origin/master' into 0.11-premerge
Conflicts:
	docs/libs/Makefile.am
	ext/kate/gstkatetiger.c
	ext/opus/gstopusdec.c
	ext/xvid/gstxvidenc.c
	gst-libs/gst/basecamerabinsrc/Makefile.am
	gst-libs/gst/basecamerabinsrc/gstbasecamerasrc.c
	gst-libs/gst/basecamerabinsrc/gstbasecamerasrc.h
	gst-libs/gst/video/gstbasevideocodec.c
	gst-libs/gst/video/gstbasevideocodec.h
	gst-libs/gst/video/gstbasevideodecoder.c
	gst-libs/gst/video/gstbasevideoencoder.c
	gst/asfmux/gstasfmux.c
	gst/audiovisualizers/gstwavescope.c
	gst/camerabin2/gstcamerabin2.c
	gst/debugutils/gstcompare.c
	gst/frei0r/gstfrei0rmixer.c
	gst/mpegpsmux/mpegpsmux.c
	gst/mpegtsmux/mpegtsmux.c
	gst/mxf/mxfmux.c
	gst/videomeasure/gstvideomeasure_ssim.c
	gst/videoparsers/gsth264parse.c
	gst/videoparsers/gstmpeg4videoparse.c
2016-02-17 14:58:00 +00:00
Vincent Penquerc'h
8df374108a opusenc: add upstream negotiation for multistream ability
This will help elements that cannot deal with multistream,
such as the RTP payloader.

The caps now do not include a "streams" field anymore, but
a "multistream" boolean, since we have no real use for knowing
the exact amount of streams.

https://bugzilla.gnome.org/show_bug.cgi?id=665078
2016-02-17 14:58:00 +00:00