Commit graph

15927 commits

Author SHA1 Message Date
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
Song Bing
11899106d0 ximageutil: shouldn't implement transform if don't support it
shouldn't implement transform if don't support it. Or gst_buffer_copy_into()
will print ERROR log.

https://bugzilla.gnome.org/show_bug.cgi?id=765583
2016-04-29 10:08:45 +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
Mario Sanchez Prada
8740313504 vpxenc: Properly handle frames with too low duration
When a frame's duration is too low, calling gst_util_uint64_scale()
to scale its value can result into it being truncated to zero, which
will cause the vpx encoder to return an VPX_CODEC_INVALID_PARAM error
when trying to encode.

To prevent this from happening, we simply ignore the duration when
encoding if it becomes zero after scaling, logging a warning message.

https://bugzilla.gnome.org/show_bug.cgi?id=765391
2016-04-23 13:56:56 +01: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
Dimitrios Katsaros
df9eed0ab5 v4l2: Change warning handling to break infinite message loop
v4l2src can cause an "infinite message loop" when a base control exposed as a
property is not provided by the device. In these cases, if in the warning message
handling for the bus, the GST_DEBUG_BIN_TO_DOT_FILE* category of functions are used,
the src lookup causes a new warning to be posted on the bus, causing a loop.

This patch changes the warning for these controls so they are not posted on the bus.

https://bugzilla.gnome.org/show_bug.cgi?id=758703
2016-04-16 16:36:25 -04: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
Jan Schmidt
46a3c9ac8b Revert "pulsesink: uncork if needed upon commit"
This reverts commit 0dd46accf6.

With some audiosinks, starting the ringbuffer on the first commit
causes audio glitches at startup by starting to output segments
from the ringbuffer before it has been filled / fully prerolled. This
doesn't usually happen with pulsesink because we map the pulseaudio
ringbuffer directly, but we should keep things consistent with
other sinks with regards to startup latency, plus it gives more
headway to avoid glitching, should the initial 2nd segment take
more than 10ms to generate.

https://bugzilla.gnome.org/show_bug.cgi?id=657076
2016-04-16 02:21:14 +10: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
Sebastian Dröge
bc2d4c4c31 souphttpclientsink: If no proxy is set by properties, use the default libsoup proxy resolver
That is, use whatever system settings there might exist. This is the same
behaviour we use in the HTTP source.
2016-04-15 11:36:36 +03:00
Julien Isorce
eab6b1326c Automatic update of common submodule
From 6f2d209 to ac2f647
2016-04-14 10:01:28 +01: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
Sebastian Dröge
4103f3d7f3 ximage: Initialize all fields in the meta explicitly
The meta is not allocated with all fields initialized to zeroes.

https://bugzilla.gnome.org/show_bug.cgi?id=764902
2016-04-13 09:57:16 +03: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
Wim Taymans
c9c051d53d v4l2: avoid leaking GValues
unset the GValue if we don't use it any more to avoid leaks.
2016-04-12 11:56:08 +02: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
a5369c6be3 v4l2: Don't leak v4l2 objects and props on probe errors 2016-04-04 20:31:43 +01:00
Tim-Philipp Müller
03e2655f70 tests: add unit test for jpeg depayloader packet loss handling
Make sure it always outputs something that looks like a valid
JPEG frame, ie. starts with an SOI marker and ends with an EOI
marker.
2016-04-04 17:42:03 +01: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