platform/upstream/gstreamer.git
6 years agomeson: use -fno-strict-aliasing where supported
Tim-Philipp Müller [Tue, 30 Jan 2018 20:34:32 +0000 (20:34 +0000)]
meson: use -fno-strict-aliasing where supported

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

6 years agoqtdemux: Remove white space at end of line
Seungha Yang [Mon, 11 Dec 2017 15:14:02 +0000 (00:14 +0900)]
qtdemux: Remove white space at end of line

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

6 years agoqtdemux: Apply qtdemux debug category to gstisoff
Seungha Yang [Mon, 11 Dec 2017 15:11:24 +0000 (00:11 +0900)]
qtdemux: Apply qtdemux debug category to gstisoff

.. instead of the use of default debug category.
And, make new header to declare the debug category

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

6 years agosplitmuxsrc: properly set total duration on outgoing segment
Tim-Philipp Müller [Thu, 25 Jan 2018 00:46:57 +0000 (00:46 +0000)]
splitmuxsrc: properly set total duration on outgoing segment

We would accidentally pass through the duration value from the
demuxer from a single fragment, which causes problems when
feeding the stream from splitmuxsrc to rtsp-server. Streaming
would stop after one fragment due to that.

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

6 years agosplitmuxsrc: don't respond to duration query with CLOCK_TIME_NONE
Tim-Philipp Müller [Thu, 25 Jan 2018 00:42:52 +0000 (00:42 +0000)]
splitmuxsrc: don't respond to duration query with CLOCK_TIME_NONE

total_duration is initialised to CLOCK_TIME_NONE, not 0, so check
for that as well in order not to return an invalid duration to
a duration query. Doesn't fix anything particular observed in
practice, just seemed inconsistent.

6 years agoqtdemux: Add more prose to the comment of gst_qtdemux_find_sample()
Alicia Boya García [Thu, 25 Jan 2018 19:48:42 +0000 (20:48 +0100)]
qtdemux: Add more prose to the comment of gst_qtdemux_find_sample()

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

6 years agovpx: add VP8_DEBUG_TXT_* flags for postprocessing
Oleksij Rempel [Wed, 9 Feb 2011 12:48:00 +0000 (12:48 +0000)]
vpx: add VP8_DEBUG_TXT_* flags for postprocessing

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

6 years agodirectsoundsink: Add missing \ in multi-line #define
Sebastian Dröge [Thu, 25 Jan 2018 19:22:10 +0000 (21:22 +0200)]
directsoundsink: Add missing \ in multi-line #define

6 years agodirectsoundsink: Add support for a DeviceProvider
Sebastian Dröge [Mon, 22 Jan 2018 13:07:38 +0000 (15:07 +0200)]
directsoundsink: Add support for a DeviceProvider

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

6 years agomultifilesrc: fix up uri handler a little
Tim-Philipp Müller [Tue, 23 Jan 2018 18:37:09 +0000 (18:37 +0000)]
multifilesrc: fix up uri handler a little

Fix path escaping when creating URI from location in get_uri().

Return FALSE with an error when URI can't be parsed in set_uri().

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

6 years agomultifilesrc: implement uri handler
Dimitrios Katsaros [Thu, 15 Jun 2017 11:37:28 +0000 (13:37 +0200)]
multifilesrc: implement uri handler

With this patch we can now provide a set of files
created by multifilesink as a source for uri elements.

e.g. gst-launch-1.0 playbin uri=multifile://img%25d.ppm

Note that for the %d pattern you need to replace % with %25.
This is to be compliant with URL naming standards.

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

6 years agoqtmux: Make sure timecode uses the same timescale as video
Vivia Nikolaidou [Fri, 19 Jan 2018 13:05:26 +0000 (15:05 +0200)]
qtmux: Make sure timecode uses the same timescale as video

Don't blindly derive it from the frame rate, but try to get the per-pad
configured timescale first (if it exists)

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

6 years agoqtmux: Allow configuring trak timescale per pad/trak
Sebastian Dröge [Thu, 18 Jan 2018 16:36:27 +0000 (18:36 +0200)]
qtmux: Allow configuring trak timescale per pad/trak

It generally makes not much sense to configure it for all pads/traks at
once as this value is usually different for each of them. As such, add a
new property on the pads in addition to the existing property on the
whole muxer.

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

6 years agoUpdate for renamed aggregator pad API
Tim-Philipp Müller [Tue, 23 Jan 2018 09:46:32 +0000 (09:46 +0000)]
Update for renamed aggregator pad API

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

6 years agortspsrc: Fix up sendonly/recvonly attribute handling
Sebastian Dröge [Mon, 22 Jan 2018 10:24:18 +0000 (12:24 +0200)]
rtspsrc: Fix up sendonly/recvonly attribute handling

We can't handle recvonly streams, sendonly streams are perfectly fine.

The direction is the one from the point of view of the SDP offerer
(i.e. the RTSP server), and a recvonly stream would be one where the
server expects us to send media.

RFC 3264, section 5.1:
   If the offerer wishes to only send media on a stream to its peer, it
   MUST mark the stream as sendonly with the "a=sendonly" attribute.

This is mixed up in the ONVIF streaming specification examples, but
actual implementations and conformance tools seem to not care at all
about the attributes.

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

6 years agosouphttpsrc: Reset retry_count to 0 when GST_FLOW_FLUSHING
paul.kim [Sat, 11 Nov 2017 04:49:22 +0000 (13:49 +0900)]
souphttpsrc: Reset retry_count to 0 when GST_FLOW_FLUSHING

If a lot of seek method is called very quickly, sometimes data reading
and do_request occurs while seek flush event is occurring and error
occurs because retry_count
reaches to the max. Thus, reset retry_count if flush occurs after
do_request and read_buffer.

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

6 years agotests: aacparser: Test that short raw frames don't get concatenated
Jan Alexander Steffens (heftig) [Thu, 18 Jan 2018 14:09:04 +0000 (15:09 +0100)]
tests: aacparser: Test that short raw frames don't get concatenated

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

6 years agoaacparse: When parsing raw input, accept frames of any size
Jan Alexander Steffens (heftig) [Thu, 18 Jan 2018 13:23:07 +0000 (14:23 +0100)]
aacparse: When parsing raw input, accept frames of any size

Raw AAC streams might have very small frames, e.g. 6 byte frames
when encoding silence. These frames are then smaller than aacparse's
default min_frame_size of 10 bytes (ADTS_MAX_SIZE).

When passthrough is disabled or aacparse has to output ADTS, GstBaseParse
will concatenate these short frames to the following frame before
handling them to aacparse, which processes each input buffer as a single
frame, producing bad output.

To avoid this problem, set the min_frame_size to 1 when receiving a raw
stream.

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

6 years agoshout2send: print actual username in debug log out
Adrián Pardini [Wed, 3 May 2017 00:24:06 +0000 (21:24 -0300)]
shout2send: print actual username in debug log out

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

6 years agortpbin: fix leak of elements requested by signals
Mathieu Duponchelle [Mon, 15 Jan 2018 17:13:37 +0000 (18:13 +0100)]
rtpbin: fix leak of elements requested by signals

When the signal returns a floating reference, as its return type
is transfer full, we need to sink it ourselves before passing
it to gst_bin_add (which is transfer floating).

This allows us to unref it in bin_remove_element later on, and
thus to also release the reference we now own if the signal
returns a non-floating reference as well.

As we now still hold a reference to the element when removing it,
we also need to lock its state and setting it to NULL before
unreffing it

Also update the request_aux_sender test.

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

6 years agov4l2: fix division by 0 for complex video formats
Guillaume Desmottes [Wed, 17 Jan 2018 10:10:37 +0000 (11:10 +0100)]
v4l2: fix division by 0 for complex video formats

So complex video formats have 0 as pstride. Don't try to divide the
stride in such cases.

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

6 years agov4l2: display stride and width values if stride is too small
Guillaume Desmottes [Wed, 17 Jan 2018 10:08:25 +0000 (11:08 +0100)]
v4l2: display stride and width values if stride is too small

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

6 years agomultifilesink: document unit of "max-file-duration" property
Tim-Philipp Müller [Tue, 16 Jan 2018 13:19:29 +0000 (13:19 +0000)]
multifilesink: document unit of "max-file-duration" property

6 years agoudpsrc: fix typo in documentation
Florent Thiéry [Fri, 12 Jan 2018 11:21:37 +0000 (12:21 +0100)]
udpsrc: fix typo in documentation

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

6 years agov4l2videodec: add property set/get PROP_CAPTURE_IO_MODE error handling
Peter Seiderer [Fri, 12 Jan 2018 08:53:37 +0000 (09:53 +0100)]
v4l2videodec: add property set/get PROP_CAPTURE_IO_MODE error handling

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

6 years agov4l2videodec: fold property set/get PROP_OUTPUT_IO_MODE case into default
Peter Seiderer [Fri, 12 Jan 2018 08:46:30 +0000 (09:46 +0100)]
v4l2videodec: fold property set/get PROP_OUTPUT_IO_MODE case into default

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

6 years agov4l2videoenc: add property set/get PROP_CAPTURE_IO_MODE error handling
Peter Seiderer [Fri, 12 Jan 2018 08:49:14 +0000 (09:49 +0100)]
v4l2videoenc: add property set/get PROP_CAPTURE_IO_MODE error handling

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

6 years agov4l2videoenc: fold property set/get PROP_OUTPUT_IO_MODE case into default
Peter Seiderer [Fri, 12 Jan 2018 08:44:03 +0000 (09:44 +0100)]
v4l2videoenc: fold property set/get PROP_OUTPUT_IO_MODE case into default

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

6 years agov4l2videoenc: fix capture-io-mode property get
Peter Seiderer [Thu, 11 Jan 2018 09:44:18 +0000 (10:44 +0100)]
v4l2videoenc: fix capture-io-mode property get

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

6 years agov4l2src: Maintain downstream caps order
Nicolas Dufresne [Thu, 11 Jan 2018 22:47:39 +0000 (17:47 -0500)]
v4l2src: Maintain downstream caps order

The g_list_insert_sorted() will behave like prepend when the compare
function returns 0. In our case, we want to maintain the order hence
append. This fixes this issue and improve the sorting algorithm to make
a 10x10 prefered over 10x200 with a preference of 10x8 (and similar
cases which was badly handled). This fixes generally fixes issue were a
sub-optimal format / size is picked.

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

6 years agov4l2videoenc: Also re-enabled paused task
Nicolas Dufresne [Fri, 22 Dec 2017 04:02:30 +0000 (23:02 -0500)]
v4l2videoenc: Also re-enabled paused task

When we only run _finish(), the task is never stopped externally,
instead it's only paused from the inside. We still want to restart
it in this case.

6 years agoflacdec: flush flac decoder on lost sync.
Mathieu Duponchelle [Mon, 8 Jan 2018 14:23:24 +0000 (15:23 +0100)]
flacdec: flush flac decoder on lost sync.

This to allow the decoder to start searching for a new
frame again.

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

6 years agov4l2videoenc: Call stop on object before renegotiation
Nicolas Dufresne [Fri, 22 Dec 2017 03:56:51 +0000 (22:56 -0500)]
v4l2videoenc: Call stop on object before renegotiation

Otherwise renegotiation fails as we are still streaming.

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

6 years agov4l2videoenc: Remove dead code
Nicolas Dufresne [Fri, 22 Dec 2017 03:55:49 +0000 (22:55 -0500)]
v4l2videoenc: Remove dead code

gst_v4l2_object_stop() will free and nullify the pool, so the
following if will never be true.

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

6 years agov4l2videoenc: Delay capture pool activation
Nicolas Dufresne [Fri, 22 Dec 2017 03:29:06 +0000 (22:29 -0500)]
v4l2videoenc: Delay capture pool activation

This is support CODA driver which prevents setting the output format if
the capture is streaming.

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

6 years agov4l2videodec: Add dynamic resolution change support
Nicolas Dufresne [Wed, 13 Dec 2017 20:23:46 +0000 (20:23 +0000)]
v4l2videodec: Add dynamic resolution change support

This implements a "big hammer" reallocation method. We effectively
drain and stop both side of the decoder and restart. This though is
the most generic method. This change should enable on most drivers
adaptive streaming.

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

6 years agomeson: zlib is not actually a hard requirement
Tim-Philipp Müller [Sat, 30 Dec 2017 01:52:13 +0000 (01:52 +0000)]
meson: zlib is not actually a hard requirement

6 years agojpeg: Fixup frames without an EOI marker
Ezequiel Garcia [Thu, 28 Sep 2017 21:00:38 +0000 (18:00 -0300)]
jpeg: Fixup frames without an EOI marker

Some cameras fail to send an end-of-image marker (EOI)
and can't be properly decoded by either JPEG or libjpeg.

This commit parses the frame, making sure it has an EOI.
If there isn't one, the EOI gets added to the buffer.

A similar fixup is done in the rtpjpegdepay element,
and it makes sense to do it in jpegdec as well.

Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
https://bugzilla.gnome.org/show_bug.cgi?id=791988

6 years agomeson: skip translations if gettext is not available
Tim-Philipp Müller [Tue, 26 Dec 2017 12:50:24 +0000 (13:50 +0100)]
meson: skip translations if gettext is not available

6 years agodocs: add rtpL8pay/depay to docs
Tim-Philipp Müller [Sun, 24 Dec 2017 12:14:06 +0000 (13:14 +0100)]
docs: add rtpL8pay/depay to docs

6 years agodocs: update for recent changes
Tim-Philipp Müller [Sun, 24 Dec 2017 12:11:00 +0000 (13:11 +0100)]
docs: update for recent changes

6 years agortp: add L8 audio support
Tim Allen [Fri, 15 May 2015 16:00:26 +0000 (17:00 +0100)]
rtp: add L8 audio support

6 years agoudpsrc: fix typo in multicast join error message
Mark Nauwelaerts [Sat, 23 Dec 2017 11:45:17 +0000 (12:45 +0100)]
udpsrc: fix typo in multicast join error message

6 years agortspsrc: also proxy multicast-iface property to RTCP udpsrc
Mark Nauwelaerts [Sat, 23 Dec 2017 11:44:31 +0000 (12:44 +0100)]
rtspsrc: also proxy multicast-iface property to RTCP udpsrc

6 years agomultiudpsink: don't try to set IPV6_TCLASS on IPV4 sockets
Sebastian Rasmussen [Sun, 1 Nov 2015 23:41:28 +0000 (00:41 +0100)]
multiudpsink: don't try to set IPV6_TCLASS on IPV4 sockets

Avoids ERROR log message.

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

6 years agotests: udpsink: add check that sets QoS on IPv4/6 sockets
Sebastian Rasmussen [Sun, 1 Nov 2015 23:41:28 +0000 (00:41 +0100)]
tests: udpsink: add check that sets QoS on IPv4/6 sockets

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

6 years agov4l2deviceprovider: Don't do slow probes
Nicolas Dufresne [Fri, 22 Dec 2017 15:21:28 +0000 (10:21 -0500)]
v4l2deviceprovider: Don't do slow probes

This is problematic in the current design at it seriously slow down
startup of applications. As of now, no known application uses the
colorimetry and the interlace-modes for anything (the two fields that
won't be probed). So let's disable it, in the long term we'll try and
find a way to interact with the provider so applicaiton could opt-in
these slow probing methods for more advance configuration.

6 years agov4l2object: Don't redefine mmap64
Nicolas Dufresne [Fri, 22 Dec 2017 15:15:48 +0000 (10:15 -0500)]
v4l2object: Don't redefine mmap64

On Linux, there exist a case where mmap64 is already a define to mmap,
so avoid the redefine warning here.

6 years agov4l2object: Don't use mmap64 if off_t is 64-bit
Ting-Wei Lan [Tue, 19 Dec 2017 09:37:58 +0000 (17:37 +0800)]
v4l2object: Don't use mmap64 if off_t is 64-bit

The difference between mmap and mmap64 is the type of 'offset' argument.
mmap64 always uses a 64-bit interger as offset, while mmap uses off_t,
whose size can vary on different operating systems or architectures.

However, not all operating systems support mmap64. Fortunately, although
FreeBSD only has mmap, its off_t is always 64-bit regardless of
architectures, so we can simply use mmap when sizeof(off_t) == 8.

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

6 years agoRevert "v4l2object: Use mmap64 to match libv4l2 signature"
Nicolas Dufresne [Fri, 22 Dec 2017 14:17:04 +0000 (09:17 -0500)]
Revert "v4l2object: Use mmap64 to match libv4l2 signature"

This reverts commit b61bba48488c0a627d90f04cc9917d8c4f3f0d9b.

6 years agov4l2object: Check for mmap64 before using it
Ting-Wei Lan [Tue, 19 Dec 2017 09:37:58 +0000 (17:37 +0800)]
v4l2object: Check for mmap64 before using it

mmap64 is not available on FreeBSD.

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

6 years agoflv: flvmux ported to the GstAggregator
Vincent Penquerc'h [Wed, 20 Dec 2017 20:23:26 +0000 (15:23 -0500)]
flv: flvmux ported to the GstAggregator

This makes it possible to create a flv file from a live source and not stop
when there are packet drops.

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

6 years agomultiudpsink: Call gst_base_sink_wait_preroll on unlock
Olivier Crête [Tue, 19 Dec 2017 21:47:52 +0000 (16:47 -0500)]
multiudpsink: Call gst_base_sink_wait_preroll on unlock

This means that packets will not be lost on fast pause/playing cycles.

Also refactor the code a little to simplify it.

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

6 years agomultiudpsink: Remove unused variable
Olivier Crête [Tue, 19 Dec 2017 20:46:52 +0000 (15:46 -0500)]
multiudpsink: Remove unused variable

6 years agortspsrc: Fix two leaks
Edward Hervey [Tue, 19 Dec 2017 10:57:52 +0000 (11:57 +0100)]
rtspsrc: Fix two leaks

* gst_event_new_stream_start() does not take ownership of the stream_id

* the pipeline_request_id string that is created was not being freed

6 years agovideocrop: Add GstVideoCropMeta support
Nicolas Dufresne [Fri, 8 Dec 2017 03:08:42 +0000 (22:08 -0500)]
videocrop: Add GstVideoCropMeta support

If downstream supports this meta, it will add or update it from
the GstBuffer in-place rather then copying.

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

6 years agoAdd AV1 to matroska plugin
Sean DuBois [Wed, 13 Dec 2017 09:22:17 +0000 (09:22 +0000)]
Add AV1 to matroska plugin

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

6 years agomatroska: fix memory leaks due to toc related updates
fengalin [Fri, 15 Dec 2017 13:48:09 +0000 (14:48 +0100)]
matroska: fix memory leaks due to toc related updates

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

6 years agomatroskamux: Fix various memory leaks in the unit test
Sebastian Dröge [Fri, 15 Dec 2017 09:40:13 +0000 (11:40 +0200)]
matroskamux: Fix various memory leaks in the unit test

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

6 years agomatroska-mux: migrate test to gst_harness
fengalin [Thu, 14 Dec 2017 18:05:36 +0000 (19:05 +0100)]
matroska-mux: migrate test to gst_harness

... following the guide lines from Håvard Graff (see https://gstconf.ubicast.tv/videos/moar-better-tests/).

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

6 years agomatroska: re-activate and update TOC support
fengalin [Fri, 1 Dec 2017 17:17:06 +0000 (18:17 +0100)]
matroska: re-activate and update TOC support

TOC support in mastroskamux has been deactivated for a couple of years. This commit updates it to recent GstToc evolutions and introduces toc unit tests for both matroska-mux and matroska-demux.

There are two UIDs for Chapters in Matroska's specifications:
- The ChapterUID is a mandatory unsigned integer which internally refers to a given chapter. Except for title & language which use dedicated fields, this UID can also be used to add tags to the Chapter. The tags come in a separate section of the container.
- The ChapterStringUID is an optional UTF-8 string which also uniquely refers to a chapter but from an external perspective. It can act as a "WebVTT cue identifier" which "can be used to reference a specific cue, for example from script or CSS".

During muxing, the ChapterUID is generated and checked for unicity, while the ChapterStringUID receives the user defined UID. In order to be able to refer to chapters from the tags section, we maintain an internal Toc tree with the generated ChapterUID.

When demuxing, the ChapterStringUIDs (if available) are assigned to the GstTocEntries UIDs and an internal toc mimicking the toc is used to keep track of the ChapterUIDs and match the tags with the appropriate GstTocEntries.

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

6 years agov4l2src: Fix compiler error in example caused by re-declaring `index`
Sebastian Dröge [Thu, 14 Dec 2017 16:28:00 +0000 (18:28 +0200)]
v4l2src: Fix compiler error in example caused by re-declaring `index`

 ../tests/examples/v4l2/v4l2src-renegotiate.c:57:13: error: ‘index’ redeclared as different kind of symbol
 static gint index = 0;
             ^

6 years agoAutomatic update of common submodule
Matthew Waters [Thu, 14 Dec 2017 03:49:01 +0000 (14:49 +1100)]
Automatic update of common submodule

From e8c7a71 to 3fa2c9e

6 years agov4l2object: Use a debug object for tracing
Nicolas Dufresne [Wed, 13 Dec 2017 19:39:47 +0000 (14:39 -0500)]
v4l2object: Use a debug object for tracing

This way we can pass the pad name instead of the element for tracing
which helps identifying which v4l2object is used withing M2M element
like decoder, encoder and transform. For the reference, pads are name
<parent-name>:<pad-name>.

6 years agoqtdemux: Push a GAP event if there's a second *or more*
Edward Hervey [Wed, 13 Dec 2017 11:06:21 +0000 (12:06 +0100)]
qtdemux: Push a GAP event if there's a second *or more*

And not "more than a second"

6 years agoqtdemux: Don't push GAP event if first buffer is within 1s
Edward Hervey [Wed, 13 Dec 2017 10:35:37 +0000 (11:35 +0100)]
qtdemux: Don't push GAP event if first buffer is within 1s

If we saw empty segments, we previously unconditionally pushed a
GAP event downstream regardless of the duration of that empty
segment.

In order to avoid issues with initial negotiation of downstream elements
(which would negotiate to something before receiving any data due to
that initial GAP event), check if there's at least a second of difference
(like we do for other GAP-related checks in qtdemux) before
deciding to push a GAP event downstream.

6 years agoqtdemux: Don't set pared=True on underspecified audio/mpeg
Edward Hervey [Wed, 13 Dec 2017 09:21:17 +0000 (10:21 +0100)]
qtdemux: Don't set pared=True on underspecified audio/mpeg

This *really* needs to go through a parser to figure out what the
exact content type is.

6 years agoequalizer: Fix -Wincompatible-pointer-types warning
Michael Catanzaro [Mon, 11 Dec 2017 21:27:08 +0000 (15:27 -0600)]
equalizer: Fix -Wincompatible-pointer-types warning

This is caused by the new type propagation for g_object_ref.

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

6 years agotests: ignore rtph264 test binary
Tim-Philipp Müller [Sat, 9 Dec 2017 16:15:24 +0000 (16:15 +0000)]
tests: ignore rtph264 test binary

6 years agotests: udpsrc: verify the correct amount of bytes is sent to the socket
George Kiagiadakis [Fri, 25 Aug 2017 12:19:37 +0000 (15:19 +0300)]
tests: udpsrc: verify the correct amount of bytes is sent to the socket

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

6 years agotests: udpsrc: ensure test won't timeout if the buffers are already received
George Kiagiadakis [Fri, 25 Aug 2017 11:59:06 +0000 (14:59 +0300)]
tests: udpsrc: ensure test won't timeout if the buffers are already received

Sometimes all the buffers are received before the time we lock the
check_mutex, in which case g_cond_wait will wait forever for another
one. Just check if this is the case before waiting.

https://bugzilla.gnome.org/attachment.cgi?id=358397

6 years agotests: udpsrc: fix test_udpsrc to actually run and fix locking
George Kiagiadakis [Fri, 25 Aug 2017 11:45:52 +0000 (14:45 +0300)]
tests: udpsrc: fix test_udpsrc to actually run and fix locking

Previously this would silently be skipped because 1600 != 1400
and there is no assertion on this call.

Also unlock check_mutex after use.

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

6 years agosplitmuxsink: added a "split now" action signal
John Nikolaides [Thu, 21 Sep 2017 15:23:54 +0000 (18:23 +0300)]
splitmuxsink: added a "split now" action signal

Now, the video file can be split at an arbitrary time chosen by the user.

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

6 years agomultiudpsink: fix bind address leak
Alvaro Margulis [Fri, 8 Dec 2017 00:31:32 +0000 (00:31 +0000)]
multiudpsink: fix bind address leak

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

6 years agoRevert "flacparse: fix header rewriting being ignored"
Tim-Philipp Müller [Thu, 7 Dec 2017 11:15:19 +0000 (11:15 +0000)]
Revert "flacparse: fix header rewriting being ignored"

This caused broken metadata and also looks a bit dodgy.
Revert until we can figure out a solution that works for
all cases and doesn't break anything.

This reverts commit adeee44b07a173b9ab4253216caba8f66dd43abb.

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

6 years agov4l2videodec: Handle drivers that only round up height
Philipp Zabel [Tue, 5 Dec 2017 14:14:04 +0000 (15:14 +0100)]
v4l2videodec: Handle drivers that only round up height

Commit 1f31715c9861 ("v4l2videodec: use visible size, not coded size,
for downstream negotiation filter") added support for removing the
padding obtained as the difference between width/height from G_FMT and
visible width/height from G_SELECTION from the probed caps obtained
via TRY_FMT.
This patch fixes the padding removal for drivers that only round up
height, but not width, to the padded frame size. This might happen
because horizontal padding can be handled by line stride (bytesperline),
but there is no such thing as plane stride in the V4L2 API for
single-buffer planar formats.

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

6 years agortspsrc: Add a signal to allow outgoing messages to be modified or dropped
Matt Staples [Wed, 1 Nov 2017 14:21:37 +0000 (08:21 -0600)]
rtspsrc: Add a signal to allow outgoing messages to be modified or dropped

This feature allows applications to implement extensions to the RTSP
protocol, such as those defined in the ONVIF Streaming Specification.

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

6 years agortpsession: Handle zero length feedback packets
Haakon Sporsheim [Fri, 25 Aug 2017 09:57:26 +0000 (11:57 +0200)]
rtpsession: Handle zero length feedback packets

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

6 years agoqtdemux: fix debug log for 'hvcC' codec_data
Florian Zwoch [Mon, 10 Jul 2017 13:19:34 +0000 (15:19 +0200)]
qtdemux: fix debug log for 'hvcC' codec_data

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

6 years agotests: rtpsession: refactor tests to use GstHarness
Havard Graff [Fri, 1 Dec 2017 12:04:41 +0000 (13:04 +0100)]
tests: rtpsession: refactor tests to use GstHarness

This patch simplifies the tests (44% less code) and
makes them much more readable.

The provided SessionHarness also makes it much easier
to write new tests for rtpsession.

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

6 years agoflacparse: Request at least the full header size when parsing headers
Sebastian Dröge [Fri, 24 Nov 2017 08:36:01 +0000 (10:36 +0200)]
flacparse: Request at least the full header size when parsing headers

Otherwise baseparse will incrementally send us bigger buffers until the
full header size is reached, which is not only pointless but also means
that baseparse will reallocate and copy into a bigger buffer for every
input buffers. In pull mode that's done in 64kb increments, in push mode
usually in much smaller increments, causing a lot of overhead for
example when parsing high-quality coverart.

6 years agov4l2object: Fix dmabuf support detection
Florent Thiéry [Wed, 29 Nov 2017 10:29:31 +0000 (11:29 +0100)]
v4l2object: Fix dmabuf support detection

This resulted in improper selection of dmabuf on unsupported drivers.
The checked ioctl errno was not correct.

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

6 years agoAutomatic update of common submodule
Matthew Waters [Mon, 27 Nov 2017 09:10:51 +0000 (20:10 +1100)]
Automatic update of common submodule

From 3f4aa96 to e8c7a71

6 years agoautotools: stop controlling symbol visibility with -export-symbols-regex
Tim-Philipp Müller [Sun, 26 Nov 2017 15:13:15 +0000 (15:13 +0000)]
autotools: stop controlling symbol visibility with -export-symbols-regex

Instead, use -fvisibility=hidden and explicit exports via GST_EXPORT.
This should result in consistent behaviour for the autotools and
Meson builds.

6 years agortspsrc: Do more checks for seekability
Edward Hervey [Fri, 24 Nov 2017 14:37:44 +0000 (15:37 +0100)]
rtspsrc: Do more checks for seekability

When receiving a seek event, check whether we can actually seek based
on the information the server provided.

Also add more documentation on what the seekable field means

6 years agoqtmux: Always update reserved-duration-remaining
Jan Schmidt [Fri, 24 Nov 2017 13:53:42 +0000 (00:53 +1100)]
qtmux: Always update reserved-duration-remaining

If a reserved-max-duration is set, we should always track
and update the reserved-duration-remaining estimate, even
if we're not sending periodic moov updates downstream for
full robust muxing.

6 years agosplitmuxsink: Use muxer reserved space properties if present.
Jan Schmidt [Tue, 7 Apr 2015 13:53:19 +0000 (23:53 +1000)]
splitmuxsink: Use muxer reserved space properties if present.

If the use-robust-muxing property is set, check if the
assigned muxer has reserved-max-duration and
reserved-duration-remaining properties, and if so set
the configured maximum duration to the reserved-max-duration
property, and monitor the remaining space to start
a new file if the reserved header space is about to run out -
even though it never ought to.

6 years agosplitmux: Fix file switch-on-caps-change.
Jan Schmidt [Fri, 24 Nov 2017 05:56:03 +0000 (16:56 +1100)]
splitmux: Fix file switch-on-caps-change.

Switching to a new fragment because the input caps have
changed didn't properly end the previous file. Use the normal
EOS sequence to ensure that happens. Add a test that it works.

6 years agojpegenc: Update output caps on input caps change
Jan Schmidt [Fri, 24 Nov 2017 05:53:40 +0000 (16:53 +1100)]
jpegenc: Update output caps on input caps change

If the input changes width/height that should be reflected
in the output caps, so make sure they get updated

6 years agortph265depay: don't insert SPS/PPS inline for hvc1 output
Tim-Philipp Müller [Tue, 5 Sep 2017 14:55:03 +0000 (15:55 +0100)]
rtph265depay: don't insert SPS/PPS inline for hvc1 output

Only for byte-stream or hev1. For hvc1 the SPS/PPS are in the
caps as codec_data field and in this case they shouldn't be in
the stream data as well. The output caps should be updated with
the new codec_data if needed, for hvc1.

6 years agortph265depay: store negotiated output format as enum
Tim-Philipp Müller [Tue, 5 Sep 2017 14:47:42 +0000 (15:47 +0100)]
rtph265depay: store negotiated output format as enum

We keep the boolean byte_stream around since it's nicer for
readability and most of the code just cares about byte_stream
or not. This is useful for future-proofing the code for when
we add support for hev1 output as well.

6 years agortph265depay: add support for hvc1 as output format
Tim-Philipp Müller [Tue, 29 Aug 2017 16:05:51 +0000 (17:05 +0100)]
rtph265depay: add support for hvc1 as output format

6 years agortph265pay: don't add trailing zeros to VPS/PPS/SPS
Tim-Philipp Müller [Tue, 8 Aug 2017 17:58:11 +0000 (18:58 +0100)]
rtph265pay: don't add trailing zeros to VPS/PPS/SPS

This would happen if input is byte-stream with four-byte
sync markers instead of three-byte ones. The code that
scans for sync markers will place the start of the NALU
on the third-last byte of the NALU sync marker, which
means that any additional zeros may be counted as belonging
to the previous NALU instead of being part of the next sync
marker. Fix that so we don't send VPS/SPS/PPS with trailing
zeros in this case.

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

6 years agortph265depay: assemble AUs into downstream-allocated memory
Tim-Philipp Müller [Fri, 16 Jun 2017 11:41:49 +0000 (12:41 +0100)]
rtph265depay: assemble AUs into downstream-allocated memory

When merging NALs into AUs, use downstream-provided allocator
to allocate memory and copy NALs directly into that memory when
assembling them.

6 years agortph265depay: try to negotiate an allocator with downstream
Tim-Philipp Müller [Fri, 16 Jun 2017 11:30:13 +0000 (12:30 +0100)]
rtph265depay: try to negotiate an allocator with downstream

6 years agortph265depay: simplify buffer accumulation control flow
Tim-Philipp Müller [Fri, 16 Jun 2017 11:13:32 +0000 (12:13 +0100)]
rtph265depay: simplify buffer accumulation control flow

There is no difference between pushing out a buffer directly
with gst_rtp_base_depayload_push() and returning it from the
process function. The base class will just call _depayload_push()
on the returned buffer as well.

So instead of marshalling buffers through three layers and back,
just push them from one place in handle_nal() and always return
NULL from the process vfunc. This simplifies the code a little.

Also rename _push_fragmentation_unit() to _finish_fragmentation_unit()
for clarity. Push sounds like it means being pushed out, whereas
it might just be pushed into an adapter.

This change has the side-effect that multiple NALs in a single STAP
(such as SPS/PPS) may no longer be pushed out as a single buffer if
we output NALs in byte-stream format (i.e. not aggregate AUs), but
that shouldn't really make any difference to anyone.

6 years agortph265depay: fix crash with empty sprops-parameters
Tim-Philipp Müller [Fri, 16 Jun 2017 10:18:16 +0000 (11:18 +0100)]
rtph265depay: fix crash with empty sprops-parameters

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

6 years agortph265depay: minor clean-up
Tim-Philipp Müller [Fri, 16 Jun 2017 11:20:34 +0000 (12:20 +0100)]
rtph265depay: minor clean-up

Declutter caps update code a bit.

6 years agotests: rtp-payloading: add unit test for rtph264pay codec_data
Tim-Philipp Müller [Tue, 8 Aug 2017 12:10:15 +0000 (13:10 +0100)]
tests: rtp-payloading: add unit test for rtph264pay codec_data

Make sure no trailing zero bytes sneak into our SPS or PPS.

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

6 years agortph264pay: don't add trailing zeros to PPS/SPS
Philip Craig [Sat, 5 Jul 2014 06:21:48 +0000 (06:21 +0000)]
rtph264pay: don't add trailing zeros to PPS/SPS

This would happen if input is byte-stream with four-byte
sync markers instead of three-byte ones. The code that
scans for sync markers will place the start of the NALU
on the third-last byte of the NALU sync marker, which
means that any additional zeros may be counted as belonging
to the previous NALU instead of being part of the next sync
marker. Fix that so we don't send SPS/PPS with trailing
zeros in this case.

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