platform/upstream/gstreamer.git
8 years agoqtdemux: Add/Fix comments on the various structure variables
Edward Hervey [Tue, 10 May 2016 13:10:36 +0000 (15:10 +0200)]
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

8 years agoqtdemux: Remove unused structure
Edward Hervey [Tue, 10 May 2016 13:07:40 +0000 (15:07 +0200)]
qtdemux: Remove unused structure

Let's just remove it, been commented for 7+ years :)

8 years agov4l2videodec: use decoder stop command instead of queueing empty buffers
Philipp Zabel [Wed, 2 Sep 2015 09:48:29 +0000 (11:48 +0200)]
v4l2videodec: use decoder stop command instead of queueing empty buffers

Only if the decoder stop command fails, keep queueing empty buffers to
signal end of stream as before.

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

8 years agov4l2videodec: add gst_v4l2_decoder_cmd helper
Peter Seiderer [Fri, 12 Dec 2014 13:31:36 +0000 (14:31 +0100)]
v4l2videodec: add gst_v4l2_decoder_cmd helper

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

8 years agoqtdemux: Forward segments directly if we are operating in PUSH mode on fragmented...
Sebastian Dröge [Wed, 1 Jun 2016 17:28:39 +0000 (20:28 +0300)]
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

8 years agov4l2transform: Use looser caps for upstream
Nicolas Dufresne [Mon, 6 Jun 2016 21:54:10 +0000 (17:54 -0400)]
v4l2transform: Use looser caps for upstream

When we fixate for upstream, try to not introduce new fields when not
needed. This was imported from videoconvert element.

8 years agogstv4l2transform: format fixation for preferring passthrough
Enrico Jorns [Wed, 28 Jan 2015 11:07:58 +0000 (12:07 +0100)]
gstv4l2transform: format fixation for preferring passthrough

* If outgoing format is unfixated, try to set it to input format.

* Call gst_caps_fixate () at end of fixation routine

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

8 years agov4l2transform: allow to change pixel aspect ratio
Philipp Zabel [Fri, 20 May 2016 10:49:53 +0000 (12:49 +0200)]
v4l2transform: allow to change pixel aspect ratio

Scalers may change width and height independently,
allow to change pixel aspect ratio.

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

8 years agov4l2transform: fix scaling in case of fixed pixel aspect ratio
Philipp Zabel [Fri, 20 May 2016 10:32:25 +0000 (12:32 +0200)]
v4l2transform: fix scaling in case of fixed pixel aspect ratio

To change pixel aspect ratio from DAR to PAR, the necessary scaling factor
is DAR/PAR, not DAR*PAR.
For good measure, add debug output similar to the fixed-width and
fixed-height cases.

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

8 years agov4l2object: fill colorimetry in gst_v4l2_object_acquire_format
Philipp Zabel [Fri, 13 May 2016 14:39:25 +0000 (16:39 +0200)]
v4l2object: fill colorimetry in gst_v4l2_object_acquire_format

Instead of relying on the default colorimetry chosen by
gst_video_info_set_format(), set info.colorimetry from the
values returned by G_FMT. This allows decoders to propagate
their input colorimetry downstream.

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

8 years agov4l2object: refactor gst_v4l2_object_get_colorspace to take a v4l2_format parameter
Philipp Zabel [Wed, 18 May 2016 08:17:12 +0000 (10:17 +0200)]
v4l2object: refactor gst_v4l2_object_get_colorspace to take a v4l2_format parameter

Move the extraction of colorimetry parameters from struct v4l2_format and the
setting of the identity matrix for RGB formats into the function to avoid code
duplication.

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

8 years agov4l2videodec: use visible size, not coded size, for downstream negotiation filter
Philipp Zabel [Fri, 13 May 2016 12:58:41 +0000 (14:58 +0200)]
v4l2videodec: use visible size, not coded size, for downstream negotiation filter

gst_v4l2_probe_caps() returns the coded size, not the visible size. Subtract
the known padding from probed caps with the coded size before using them as
filter for caps negotiation with downstream elements.

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

8 years agov4l2object: use G_SELECTION instead of G_CROP in gst_v4l2_object_acquire_format
Philipp Zabel [Fri, 13 May 2016 12:45:02 +0000 (14:45 +0200)]
v4l2object: use G_SELECTION instead of G_CROP in gst_v4l2_object_acquire_format

The gst_v4l2_object_acquire_format() function is used by v4l2videodec to obtain
the currently set capture format. Since G_FMT returns the coded size, the
visible size needs to be obtained from the compose rectangle in order to
negotiate it with downstream elements. The G_CROP call hasn't worked on mem2mem
capture queues for a long time. Instead use the G_SELECTION call to obtain the
compose rectangle and only fall back to G_CROP for ancient kernels.

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

8 years agov4l2sink: Use V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY if driver advertises it.
Andreas Naumann [Wed, 27 Jan 2016 08:57:38 +0000 (09:57 +0100)]
v4l2sink: Use V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY if driver advertises it.

On modern kernels, the G/S_FMT ioctls will always fail using
V4L2_BUF_TYPE_VIDEO_OVERLAY with VFL_DIR_TX (e.g. real overlay out drivers)
since this is not the intented use (rather rx, according to v4l2 API doc).
Probably this is why the Video Output Overlay interface was created, so if
the driver advertises it we might as well use.
For old kernels (pre 2012) the old way might still work so keeping this for
compatibility.

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

8 years agov4l2object: Use non-deprecated V4L2 type for RGB15
Kieran Bingham [Mon, 6 Jun 2016 17:52:01 +0000 (18:52 +0100)]
v4l2object: Use non-deprecated V4L2 type for RGB15

Support for the updated V4L2_PIX_FMT_XRGB555 was added in commit
2538fee2fd8fdb74b05f0a511281bc4707e7cc44 however, when setting the format
for use in v4l2 ioctls, the old deprecated format is still used. Convert
this to the new accepted format type, as the preferred format.

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

8 years agomatroskademux: preserve seek flags
Michael Olbrich [Wed, 4 May 2016 12:50:32 +0000 (14:50 +0200)]
matroskademux: preserve seek flags

Without this some flags get lost in streaming mode.

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

8 years agoRevert "WIP revert soup"
Sebastian Dröge [Mon, 6 Jun 2016 07:47:52 +0000 (10:47 +0300)]
Revert "WIP revert soup"

This reverts commit fdac3a7a231f3848665636cf8122f96103b46e3b.

Was not supposed to be pushed but a local workaround for
https://bugzilla.gnome.org/show_bug.cgi?id=693911#c13

8 years agortpsource: complete warn log with SSRC
Miguel París Díaz [Fri, 3 Jun 2016 11:09:35 +0000 (13:09 +0200)]
rtpsource: complete warn log with SSRC

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

8 years agoWIP revert soup
Sebastian Dröge [Tue, 31 May 2016 12:29:13 +0000 (15:29 +0300)]
WIP revert soup

8 years agodvdemux: Unref seek event in any case
Sebastian Dröge [Fri, 3 Jun 2016 10:18:31 +0000 (13:18 +0300)]
dvdemux: Unref seek event in any case

It would be leaked if no seek handler was currently set.

8 years agodvdemux: Properly set event/message sequence numbers based on the previous seek
Sebastian Dröge [Fri, 3 Jun 2016 07:49:17 +0000 (10:49 +0300)]
dvdemux: Properly set event/message sequence numbers based on the previous seek

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

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

8 years agodvdemux: Remember if upstream had a time segment and if not properly create time...
Sebastian Dröge [Fri, 3 Jun 2016 07:36:32 +0000 (10:36 +0300)]
dvdemux: Remember if upstream had a time segment and if not properly create time segments

Previously the segment.time was wrong, and the position was not updated
correctly, resulting in seeks in PUSH mode with upstream providing a BYTES
segment to not work at all.

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

8 years agodvdemux: Implement SEEKING query so we can actually seek if upstream can't seek in...
Sebastian Dröge [Fri, 3 Jun 2016 06:54:53 +0000 (09:54 +0300)]
dvdemux: Implement SEEKING query so we can actually seek if upstream can't seek in TIME

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

8 years agodvdemux: Recalculate the frame offsets at the beginning of each BYTE segment and...
Sebastian Dröge [Thu, 2 Jun 2016 11:19:15 +0000 (14:19 +0300)]
dvdemux: Recalculate the frame offsets at the beginning of each BYTE segment and whenever upstream gives us a timestamp

This fixes seeking in DV streams where upstream operates in PUSH mode with a
TIME segment (e.g. avidemux). Without this, we would generate wrong durations
and timestamps after a seek.

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

8 years agodvdemux: Pass-through buffer DISCONT flags
Sebastian Dröge [Thu, 2 Jun 2016 10:53:44 +0000 (13:53 +0300)]
dvdemux: Pass-through buffer DISCONT flags

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

8 years agortpvp9depay: Don't assert on flexible mode packets
Olivier Crête [Thu, 2 Jun 2016 20:16:45 +0000 (16:16 -0400)]
rtpvp9depay: Don't assert on flexible mode packets

Instead just post a warning on the bus for now.

8 years agotests: rtpbin: fix caps leak
Guillaume Desmottes [Thu, 2 Jun 2016 13:03:17 +0000 (15:03 +0200)]
tests: rtpbin: fix caps leak

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

8 years agotests: amrparse: clean up test
Guillaume Desmottes [Thu, 2 Jun 2016 13:00:01 +0000 (15:00 +0200)]
tests: amrparse: clean up test

- use GST_CHECK_MAIN() to reduce boilerplate
- unref the input caps using a teardown function to prevent leaks

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

8 years agodeinterlace: Ensure DISCONT flag is properly propagated
Edward Hervey [Fri, 20 May 2016 13:22:35 +0000 (15:22 +0200)]
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.

8 years agov4l2src: check for valid size on raw video buffers
Josep Torra [Tue, 31 May 2016 19:34:04 +0000 (21:34 +0200)]
v4l2src: check for valid size on raw video buffers

Discard buffers that doesn't contain enough data when dealing
with raw video inputs.

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

8 years agoqtdemux: Use the demuxer segment instead of a new one for MSS streams
Sebastian Dröge [Tue, 31 May 2016 14:10:36 +0000 (17:10 +0300)]
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

8 years agoqtdemux: Only activate segments and send SEGMENT events if we have streams
Sebastian Dröge [Tue, 31 May 2016 14:04:32 +0000 (17:04 +0300)]
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

8 years agoqtdemux: In PULL mode, nothing is ever going to send us a SEGMENT event
Sebastian Dröge [Tue, 31 May 2016 13:53:50 +0000 (16:53 +0300)]
qtdemux: In PULL mode, nothing is ever going to send us a SEGMENT event

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

8 years agoqtdemux: Don't override TIME segments from upstream that we just saw
Sebastian Dröge [Tue, 31 May 2016 13:38:34 +0000 (16:38 +0300)]
qtdemux: Don't override TIME segments from upstream that we just saw

The point of d8fb7a9c96b108814beeaa0e63f818d4648c7fe9 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

8 years agomultifilesrc: set position as offset from start-index
Prashant Gotarne [Thu, 16 Jul 2015 04:18:46 +0000 (09:48 +0530)]
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

8 years agotests: add unit test for JPEG-2000 rtp payloader leak
Tim-Philipp Müller [Fri, 27 May 2016 11:49:32 +0000 (12:49 +0100)]
tests: add unit test for JPEG-2000 rtp payloader leak

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

8 years agortpj2kpay: Fix buffer memory leak
Pierre Lamot [Wed, 25 May 2016 15:11:13 +0000 (17:11 +0200)]
rtpj2kpay: Fix buffer memory leak

Input buffer memory was not unmapped

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

8 years agov4l2object: fix caps leak
Guillaume Desmottes [Wed, 18 May 2016 09:12:15 +0000 (12:12 +0300)]
v4l2object: fix caps leak

gst_v4l2_object_probe_caps() was taking an extra ref on the returned
caps for no reason.

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

8 years agovideocrop mark crop properties as mutable in playing state
Tim-Philipp Müller [Sun, 22 May 2016 19:14:18 +0000 (20:14 +0100)]
videocrop mark crop properties as mutable in playing state

8 years agosouphttpsrc: fix buffer leak when flushing
Guillaume Desmottes [Fri, 20 May 2016 13:47:35 +0000 (16:47 +0300)]
souphttpsrc: fix buffer leak when flushing

When early returning in gst_soup_http_src_read_buffer() because the
element is FLUSHING, we need to unmap and unref the buffer which was just created.

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

8 years agoqtdemux: Set seek event seqnum on all SEGMENT events
Sebastian Dröge [Fri, 20 May 2016 08:15:44 +0000 (11:15 +0300)]
qtdemux: Set seek event seqnum on all SEGMENT events

Some were forgotten.

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

8 years agoavidemux: Pass through seek event seqnums in all SEGMENT/EOS events and SEGMENT_DONE...
Sebastian Dröge [Fri, 20 May 2016 08:12:44 +0000 (11:12 +0300)]
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

8 years agomatroskademux: Set seek event seqnum in EOS and SEGMENT_DONE messages/events
Sebastian Dröge [Fri, 20 May 2016 07:56:52 +0000 (10:56 +0300)]
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

8 years agodeinterlace: fix caps leak
Guillaume Desmottes [Tue, 17 May 2016 10:40:38 +0000 (13:40 +0300)]
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

8 years agortpsession: don't act on suspicious BYE RTCP
Mikhail Fludkov [Mon, 25 Jan 2016 15:25:51 +0000 (16:25 +0100)]
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

8 years agortpsession: Add test for locking of the stats signal
Mikhail Fludkov [Sun, 15 Nov 2015 13:54:28 +0000 (14:54 +0100)]
rtpsession: Add test for locking of the stats signal

Keeping the lock while emitting the stats signal introduces potential
deadlock in those situations when the signal callback wants the access
to rtpsession's properties which also requre the lock.

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

8 years agomatroskademux: don't hold object lock whilst pushing out headers
Seungha Yang [Thu, 19 May 2016 06:36:57 +0000 (15:36 +0900)]
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

8 years agosouphttpclientsink: Set sent_buffers and streamheader_buffers to NULL after freeing
Sebastian Dröge [Thu, 19 May 2016 09:43:01 +0000 (12:43 +0300)]
souphttpclientsink: Set sent_buffers and streamheader_buffers to NULL after freeing

Otherwise we might use an already freed list later and crash or worse.

8 years agoudpsrc: fix Since version for new "loop" property
Tim-Philipp Müller [Wed, 18 May 2016 17:32:57 +0000 (18:32 +0100)]
udpsrc: fix Since version for new "loop" property

8 years agortpdec: fix clock leak
Guillaume Desmottes [Mon, 16 May 2016 14:18:37 +0000 (16:18 +0200)]
rtpdec: fix clock leak

gst_system_clock_obtain() returns a new ref.

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

8 years agoudpsrc: add doc blurb with since marker for new "loop" property
Tim-Philipp Müller [Tue, 17 May 2016 04:33:35 +0000 (05:33 +0100)]
udpsrc: add doc blurb with since marker for new "loop" property

8 years agoavimux: add support for png
Dimitrios Katsaros [Fri, 13 Nov 2015 14:52:35 +0000 (15:52 +0100)]
avimux: add support for png

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

8 years agosplitmuxsrc: Connect to demux signals before activating
Jan Schmidt [Sun, 15 May 2016 12:07:14 +0000 (22:07 +1000)]
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.

8 years agodocs: Update for git master
Sebastian Dröge [Sun, 15 May 2016 10:31:37 +0000 (13:31 +0300)]
docs: Update for git master

8 years agortpmp4gpay: Don't produce timestamps based on byte count
Olivier Crête [Sun, 15 May 2016 10:16:23 +0000 (12:16 +0200)]
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

8 years agomatroska-mux: Fix strcmp usage
Edward Hervey [Sun, 15 May 2016 10:24:03 +0000 (12:24 +0200)]
matroska-mux: Fix strcmp usage

Just use g_strcmp0 which can handle NULL entries

8 years agosouphttpsrc: Use audio/x-unaligned-raw instead of audio/x-raw for L16 data
Carlos Rafael Giani [Fri, 4 Mar 2016 09:14:00 +0000 (10:14 +0100)]
souphttpsrc: Use audio/x-unaligned-raw instead of audio/x-raw for L16 data

Directly setting audio/x-raw caps leads to problems when the delivered
data blocks do not align properly at sample boundaries (for example, a
data block with 391 bytes). So, instead, set audio/x-unaligned-raw to
let a parser be autoplugged.

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

8 years agoqtdemux: Parsing elst box based on version
Seungha Yang [Thu, 12 May 2016 02:52:09 +0000 (11:52 +0900)]
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

8 years agosouphttpsrc: check if request was cancelled when sending message
Thiago Santos [Sat, 14 May 2016 15:57:41 +0000 (12:57 -0300)]
souphttpsrc: check if request was cancelled when sending message

It might be that the request was aborted by the application and
we can return immediatelly

8 years agosouphttpsrc: proxy resolver is on by default
Thiago Santos [Sat, 14 May 2016 15:43:54 +0000 (12:43 -0300)]
souphttpsrc: proxy resolver is on by default

Remove from the session creation parameters

8 years agosoup: update build to warn about newer deprecated functions
Thiago Santos [Sat, 14 May 2016 15:15:48 +0000 (12:15 -0300)]
soup: update build to warn about newer deprecated functions

We already depend on 2.48

8 years agosouphttpsrc: reduce reading latency by using non-blocking read
Thiago Santos [Sat, 14 May 2016 14:09:33 +0000 (11:09 -0300)]
souphttpsrc: reduce reading latency by using non-blocking read

Non-blocking read will return the amount of data available without
blocking to wait for the full requested size.

The downside is that now it souphttpsrc needs to have a waiting
mechanism in case there is no data available yet to avoid busy
looping arond the inputstream.

8 years agortpsession: Take the lock already when reading the other stats, not just for the...
Sebastian Dröge [Sun, 15 May 2016 09:30:50 +0000 (12:30 +0300)]
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

8 years agomatroska: use math-compat.h for NAN define
Tim-Philipp Müller [Sat, 14 May 2016 16:04:57 +0000 (17:04 +0100)]
matroska: use math-compat.h for NAN define

8 years agosplitmuxsink: Use GstBin async-handling instead of our own.
Jan Schmidt [Sat, 14 May 2016 13:39:22 +0000 (23:39 +1000)]
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

8 years agosouphttpsrc: refactor to use Soup's sync API
Thiago Santos [Fri, 13 May 2016 13:17:33 +0000 (10:17 -0300)]
souphttpsrc: refactor to use Soup's sync API

Replace the async API with the sync API to remove all the extra mainloop
and context handling. Currently it blocks reading until 'blocksize'
bytes are available but that can be improved by using:

https://developer.gnome.org/gio/unstable/GPollableInputStream.html#g-pollable-input-stream-read-nonblocking

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

8 years agotests: souphttpsrc: replace deprecated API
Thiago Santos [Sat, 14 May 2016 07:50:36 +0000 (04:50 -0300)]
tests: souphttpsrc: replace deprecated API

Avoid using soup_server_run_async and old get_port() APIs,
replace with me soup_server_listen and get the port through the
URIs list returned from the server.

8 years agojitterbuffer: Upgrade debug message to error
Olivier Crête [Sat, 14 May 2016 10:34:10 +0000 (12:34 +0200)]
jitterbuffer: Upgrade debug message to error

It causes the entire pipeline to fail, it should be easier to find.

8 years agosplitmuxsink: Hide internal async state changes.
Jan Schmidt [Sat, 14 May 2016 08:32:52 +0000 (18:32 +1000)]
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.

8 years agosplitmuxsink: Remove stray carriage-return from debug
Jan Schmidt [Fri, 13 May 2016 11:20:28 +0000 (21:20 +1000)]
splitmuxsink: Remove stray carriage-return from debug

8 years agortp: Ship gstrtpj2kcommon.h file to fix distcheck
Sebastian Dröge [Fri, 13 May 2016 13:43:21 +0000 (16:43 +0300)]
rtp: Ship gstrtpj2kcommon.h file to fix distcheck

8 years agoavimux: Do not write index and header if idx is NULL
Jesper Larsen [Thu, 30 Apr 2015 12:43:04 +0000 (14:43 +0200)]
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

8 years agortpj2kpay: manage T tile invalidation bit correctly, update tile id in header correctly.
Aaron Boxer [Thu, 12 May 2016 12:43:39 +0000 (08:43 -0400)]
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

8 years agortpj2kpay: manage fragmented headers correctly
Aaron Boxer [Thu, 12 May 2016 12:41:51 +0000 (08:41 -0400)]
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

8 years agortpj2k: move common code to shared header, code clean up
Aaron Boxer [Wed, 11 May 2016 19:04:26 +0000 (15:04 -0400)]
rtpj2k: move common code to shared header, code clean up

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

8 years agortpj2k: update documentation
Aaron Boxer [Wed, 11 May 2016 19:01:32 +0000 (15:01 -0400)]
rtpj2k: update documentation

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

8 years agoauparse: Fix sticky event misordering warning
Patricia Muscalu [Thu, 12 May 2016 12:43:43 +0000 (14:43 +0200)]
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

8 years agortpsession: Don't notify about stats property changes while taking the session lock
Sebastian Dröge [Wed, 11 May 2016 06:28:13 +0000 (09:28 +0300)]
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 2e960e70750a0cb7e1117d0c09d08597866a29ee.

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

8 years agoqtdemux: improve edts segment handling after seeks in push mode
Thiago Santos [Tue, 3 May 2016 16:59:54 +0000 (13:59 -0300)]
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

8 years agoqtdemux: properly activate segment with rate != 1.0
Thiago Santos [Tue, 3 May 2016 13:41:06 +0000 (10:41 -0300)]
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

8 years agortpjitterbuffer: Fix stall when receiving already lost packet
Havard Graff [Tue, 3 May 2016 09:45:01 +0000 (11:45 +0200)]
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

8 years agortpsession: Take session lock when creating stats
Miguel París Díaz [Thu, 5 May 2016 12:18:21 +0000 (14:18 +0200)]
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

8 years agoqtdemux: update segment when new duration is found
Thiago Santos [Wed, 4 May 2016 00:17:01 +0000 (21:17 -0300)]
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.

8 years agoqtdemux: dismember activate_segment into 2 parts
Thiago Santos [Wed, 4 May 2016 14:37:29 +0000 (11:37 -0300)]
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

8 years agodv: Use correct pixel-aspect-ratio values
Sebastian Dröge [Wed, 4 May 2016 06:30:27 +0000 (09:30 +0300)]
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

8 years agotests: add splitmuxsrc test for new "format-location" signal
George Kiagiadakis [Mon, 9 Nov 2015 16:55:09 +0000 (17:55 +0100)]
tests: add splitmuxsrc test for new "format-location" signal

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

8 years agosplitmuxsrc: add a format-location signal that allows bypassing the location property
George Kiagiadakis [Mon, 9 Nov 2015 16:51:12 +0000 (17:51 +0100)]
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

8 years agosplitmuxsink: Fix deadlock case when source reaches EOS
Xavier Claessens [Wed, 4 May 2016 15:15:20 +0000 (11:15 -0400)]
splitmuxsink: Fix deadlock case when source reaches EOS

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

8 years agowavparse: simplify and correct header scanning
Stefan Sauer [Wed, 4 May 2016 05:59:27 +0000 (22:59 -0700)]
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.

8 years agoosxaudio: Support audio device provider on osx
Hyunjun Ko [Sat, 30 Apr 2016 13:15:13 +0000 (22:15 +0900)]
osxaudio: Support audio device provider on osx

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

8 years agoavimux: set audio header rate according to calculated bps in stop_file
Mark Nauwelaerts [Sun, 1 May 2016 13:09:27 +0000 (15:09 +0200)]
avimux: set audio header rate according to calculated bps in stop_file

... now that set_fields is no longer called there by
e538608b3f90539003de21c1db238f3c9b946e30

8 years agoqtdemux: Store the segment sequence number in the EOS events and SEGMENT_DONE events...
Sebastian Dröge [Fri, 29 Apr 2016 12:04:11 +0000 (15:04 +0300)]
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

8 years agoudpsrc: Always bind to ANY when address is a multicast address and not only on Windows
Sebastian Dröge [Mon, 11 Apr 2016 07:54:38 +0000 (10:54 +0300)]
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

8 years agoximageutil: shouldn't implement transform if don't support it
Song Bing [Tue, 26 Apr 2016 09:01:49 +0000 (17:01 +0800)]
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

8 years agoqtmux: Allow MPEG-1 Layer 1 and 2 in addition to 3 in MP4
Sebastian Dröge [Thu, 28 Apr 2016 13:24:52 +0000 (16:24 +0300)]
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

8 years agortspsrc: Update caps for TCP whenever they change
Sebastian Dröge [Wed, 27 Apr 2016 17:46:34 +0000 (20:46 +0300)]
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

8 years agortpjitterbuffer: Ensure to not take caps with the wrong pt for getting the clock...
Sebastian Dröge [Wed, 27 Apr 2016 17:33:38 +0000 (20:33 +0300)]
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

8 years agortspsrc: Don't propagate spurious state change returns from internal elements further
Sebastian Dröge [Wed, 27 Apr 2016 15:27:17 +0000 (18:27 +0300)]
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

8 years agoavimux: Don't override maximum audio chunk size with the scale again just before...
Sebastian Dröge [Wed, 27 Apr 2016 11:09:03 +0000 (14:09 +0300)]
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.

8 years agoavimux: Actually store the largest audio chunk size for the VBR case of MP2/MP3
Sebastian Dröge [Wed, 27 Apr 2016 10:53:00 +0000 (13:53 +0300)]
avimux: Actually store the largest audio chunk size for the VBR case of MP2/MP3

3ea338ce271e1f6a96d2ed49d4472b091f6f8b7e 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.