Commit graph

15989 commits

Author SHA1 Message Date
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
Sebastian Dröge
83d5797a58 dv: Use correct pixel-aspect-ratio values
The previous ones resulted in odd display aspect ratios and were different
from the ones used by e.g. ffmpeg. The new ones now result in display aspect
ratios of 4:3 and 16:9.

https://bugzilla.gnome.org/show_bug.cgi?id=765946
2016-05-05 13:37:27 +03:00
George Kiagiadakis
c0dd2029e9 tests: add splitmuxsrc test for new "format-location" signal
https://bugzilla.gnome.org/show_bug.cgi?id=753625
2016-05-05 10:53:23 +01: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
Hyunjun Ko
1face2a662 osxaudio: Support audio device provider on osx
https://bugzilla.gnome.org/show_bug.cgi?id=753265
2016-05-02 09:58:49 +03: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
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