platform/upstream/gst-plugins-good.git
5 years agomeson: Prefer to use join_paths() over '/'
Seungha Yang [Tue, 18 Dec 2018 11:39:40 +0000 (20:39 +0900)]
meson: Prefer to use join_paths() over '/'

... to avoid mixing '/' and '\' in a path string on Windows.

5 years agortpulpfec: stop and start the harness when setting error-after
Jonny Lamb [Mon, 17 Dec 2018 18:04:37 +0000 (18:04 +0000)]
rtpulpfec: stop and start the harness when setting error-after

gstreamer!55 makes some changes to how the `error-after` counter works
which breaks this test. This change makes the test not rely on the
ability to alter `error-after` at runtime and explicitly stops and
starts the harness before pushing data.

An alternative would be to add another argument to
`harness_rtpulpfecdec` to set `error-after` on construction but that's
slightly more long-winded. so I went for this approach instead.

Fixes #532, even though that's already closed.

5 years agotests: remove rtpaux test
Mathieu Duponchelle [Mon, 17 Dec 2018 17:59:34 +0000 (18:59 +0100)]
tests: remove rtpaux test

The initial mission statement for this test was:

* demonstrate usage of the request-aux-* signals in rtpbin
* test the rtx elements

We have examples that serve the first use case, and better
(harnessed) tests for the second use case.

This test is slow and racy, it served its purpose but can now
be removed.

Fixes #533

5 years agosouphttpsrc: check difference in time from the last socket read before changing blocksize
Nicola Murino [Mon, 17 Dec 2018 18:18:43 +0000 (19:18 +0100)]
souphttpsrc: check difference in time from the last socket read before changing blocksize

If the pipeline consumes the data slower than the available network speed,
for example because sync=true, is useless to increase the blocksize and
reading in too big blocksizes can cause the connection to time out

Closes #463

5 years agov4l2: Avoid code duplication
Guillaume Desmottes [Wed, 8 Aug 2018 07:27:09 +0000 (09:27 +0200)]
v4l2: Avoid code duplication

The function gst_v4l2_object_add_interlace_mode() has repeating code so
it's best use a loop instead. That will make it easy and simple to add
additional interlace modes in a following patch.

5 years agov4l2: Make use of gst_video_interlace_mode_to_string()
Zeeshan Ali [Wed, 27 Jun 2018 21:20:33 +0000 (23:20 +0200)]
v4l2: Make use of gst_video_interlace_mode_to_string()

Instead of a custom map to translate the interlace modes to strings, let's
make use of the base API provided.

5 years agoosxcoreaudio: fix typo
Nicola Murino [Mon, 17 Dec 2018 12:45:36 +0000 (13:45 +0100)]
osxcoreaudio: fix typo

kAudioFormatFlagIsSignedInteger is a format flags

Closes #394

5 years agoqtgl: Handle OPENGL header guard changes
Edward Hervey [Mon, 17 Dec 2018 08:33:39 +0000 (09:33 +0100)]
qtgl: Handle OPENGL header guard changes

In 2018 khronos changed the gl header guards. If we don't detect
this properly we would end up with plenty of symbol redifinition
(since we would be importing twice the "same" header).

Instead detect if the "newer" header was already included and if
so define the "old" define to avoid this situation

Fixes #523

5 years agoisomp4: Replace GST_VIDEO_CAPTION_TYPE_CEA608_IN_CEA708_RAW with CEA608_S334_1A
Sebastian Dröge [Mon, 10 Dec 2018 15:34:03 +0000 (17:34 +0200)]
isomp4: Replace GST_VIDEO_CAPTION_TYPE_CEA608_IN_CEA708_RAW with CEA608_S334_1A

For the demuxer we have to select line offset 0 for the time being as
this information is not passed over MOV.

5 years agortpjitterbuffer tests: Validate the number of buffers
Olivier Crête [Fri, 14 Dec 2018 01:45:23 +0000 (20:45 -0500)]
rtpjitterbuffer tests: Validate the number of buffers

5 years agortpjitterbuffer: Run all timers immediately on EOS
Olivier Crête [Fri, 14 Dec 2018 00:17:43 +0000 (19:17 -0500)]
rtpjitterbuffer: Run all timers immediately on EOS

When the EOS event is received, run all timers immediately and avoid
pushing the EOS downstream before this has been run. This ensures that
the lost packet statistics are accurate.

5 years agortpjitterbuffer test: Stop jitterbuffer before pads to avoid race
Olivier Crête [Fri, 14 Dec 2018 00:16:11 +0000 (19:16 -0500)]
rtpjitterbuffer test: Stop jitterbuffer before pads to avoid race

The teardown of the pads checks the refcount, but there are timers
inside the jitterbuffer that can push things, so if we're not lucky,
things could be pushed while the pads are being shut down. Putting the
jitterbuffer to NULL first avoids this.

5 years agortpjitterbuffer: Stop waiting after EOS
Nicolas Dufresne [Thu, 22 Nov 2018 15:41:29 +0000 (10:41 -0500)]
rtpjitterbuffer: Stop waiting after EOS

After EOS is received, it is pointless to wait for further events,
specially waiting on timers. This patches fixes two cases where we could
wait instead of returning GST_FLOW_EOS and trigger a spin of the loop
function when EOS is queued, regardless if this EOS is the queue head or
not.

5 years agoflacdec: Use new channel count for audio info
Jochen Henneberg [Sat, 27 Oct 2018 11:41:46 +0000 (13:41 +0200)]
flacdec: Use new channel count for audio info

5 years agoflacdec: Caps may have changed on FLAC metadata change
Jochen Henneberg [Sat, 27 Oct 2018 11:36:16 +0000 (13:36 +0200)]
flacdec: Caps may have changed on FLAC metadata change

If the decoder signals metadata change we need to update the output
format and negotiate with downstream elements.

5 years agoflacdec: Reset decoder on set_format()
Jochen Henneberg [Sat, 27 Oct 2018 11:28:56 +0000 (13:28 +0200)]
flacdec: Reset decoder on set_format()

Any call to set_format() could mean that the stream type changed so we
reset the decoder and mark got_headers FALSE.

5 years agoflacparse: On sink caps change restart parser
Jochen Henneberg [Wed, 5 Dec 2018 17:42:55 +0000 (18:42 +0100)]
flacparse: On sink caps change restart parser

Draining the parser is not enough here, on caps change we need to
reset it so it is ready to accept new caps.

5 years agortpgstdepay: Update pad caps if inline caps change
Jochen Henneberg [Tue, 4 Dec 2018 17:50:51 +0000 (18:50 +0100)]
rtpgstdepay: Update pad caps if inline caps change

If the inlined caps change while using the same CV we need to update the
source pad caps.

5 years agoosxvideo: meson: Add dependencies by using appleframeworks
Justin Kim [Fri, 14 Dec 2018 03:21:58 +0000 (12:21 +0900)]
osxvideo: meson: Add dependencies by using appleframeworks

Otherwise, it fails to link.

gst-build#13

5 years agocairooverlay: Optimize premultiplication/unpremultiplication loops
Sebastian Dröge [Fri, 7 Dec 2018 17:09:30 +0000 (19:09 +0200)]
cairooverlay: Optimize premultiplication/unpremultiplication loops

Pull in video frame fields into local variables. Without this the
compiler must assume that they could've changed on every use and read
them from memory again.

This reduces the inner loop from 6 memory reads per pixels to 4, and the
number of writes stays at 3.

5 years agoqtdemux: Put framerate into the closedcaption caps if it can be calculated from the...
Sebastian Dröge [Wed, 5 Dec 2018 17:37:13 +0000 (19:37 +0200)]
qtdemux: Put framerate into the closedcaption caps if it can be calculated from the stream

Using the same calculation used for video streams.

5 years agoqtmux: Set timescale of closedcaption tracks to the one of the main video track
Sebastian Dröge [Wed, 5 Dec 2018 17:31:25 +0000 (19:31 +0200)]
qtmux: Set timescale of closedcaption tracks to the one of the main video track

5 years agoAutomatic update of common submodule
Thibault Saunier [Wed, 5 Dec 2018 20:24:13 +0000 (17:24 -0300)]
Automatic update of common submodule

From ed78bee to 59cb678

5 years agoRemove duplicate declarations
Maciej Wolny [Mon, 19 Nov 2018 18:20:52 +0000 (18:20 +0000)]
Remove duplicate declarations

This causes 'redefinition of typedef ...' errors on GCC 4.5.3

5 years agotests: rtpssrcdemux: fix uninstalled autotools build and distcheck
Tim-Philipp Müller [Fri, 30 Nov 2018 23:56:12 +0000 (23:56 +0000)]
tests: rtpssrcdemux: fix uninstalled autotools build and distcheck

5 years agoqtdemux: set need_segment after a second moov
Alicia Boya García [Fri, 30 Nov 2018 18:29:30 +0000 (19:29 +0100)]
qtdemux: set need_segment after a second moov

stream.segment should be updated with the values of the current edit
list, also when a new `moov` is received. Unfortunately this was not
being the case because of an early return.

As a consequence of this bugs, no end of movie clipping was being
performed on the new moov and no segment event was being emitted.

When performing stream switching (e.g. in MSE) the new moov may have a
different edit list. This is often the case when switching between
baseline H.264 (which lacks B-frames) and more demanding profiles. For
this reason it's important to emit a new segment in order to be able
to get matching stream times.

5 years agoqtdemux: Initialize QtDemuxStream.segment in its constructor
Alicia Boya García [Thu, 29 Nov 2018 21:42:34 +0000 (22:42 +0100)]
qtdemux: Initialize QtDemuxStream.segment in its constructor

This patch moves the initialization of QtDemuxStream.segment from
gst_qtdemux_add_stream() to _create_stream(). This ensures the segment
is always initialized when the stream is created.

Otherwise the segment format is left as GST_FORMAT_UNDEFINED in the case
were a track is reparsed and qtdemux_reuse_and_configure_stream() is
called instead of gst_qtdemux_add_stream(). (See
qtdemux_expose_streams() in the non streams-aware case.)

5 years agortpsession: properly handle rtcp_feedback_retention_window
Miguel Paris [Thu, 29 Nov 2018 12:48:33 +0000 (13:48 +0100)]
rtpsession: properly handle rtcp_feedback_retention_window

- Consider GST_CLOCK_TIME_NONE as not to be used.
- Complete "rtcp-feedback-retention-window" property getter/setter
  implementation.

5 years agortpsource: properly prune RTCP packets out of feedback_retention_window
Miguel Paris [Thu, 29 Nov 2018 12:02:53 +0000 (13:02 +0100)]
rtpsource: properly prune RTCP packets out of feedback_retention_window

Closes #522

5 years agortpsource: properly compare buffer PTSs
Miguel Paris [Thu, 29 Nov 2018 12:01:44 +0000 (13:01 +0100)]
rtpsource: properly compare buffer PTSs

5 years agortpsource: retain_rtcp_packet: warning if invalid running_time
Miguel Paris [Thu, 29 Nov 2018 11:58:18 +0000 (12:58 +0100)]
rtpsource: retain_rtcp_packet: warning if invalid running_time

5 years agortpsession: properly set the running_time for rtcp packet info
Miguel Paris [Thu, 29 Nov 2018 11:55:38 +0000 (12:55 +0100)]
rtpsession: properly set the running_time for rtcp packet info

5 years agortpssrcdemux: Rename confusingly name lock macros
Nicolas Dufresne [Thu, 29 Nov 2018 19:54:06 +0000 (14:54 -0500)]
rtpssrcdemux: Rename confusingly name lock macros

This is an extra internal recurisve lock use to avoid having to take
both sink pad streams lock all the time. This patch renamed it
INTERLNAL_STREAM_LOCK/UNLOCK() to avoid confusion with possible upstream
GST_PAD API.

5 years agortpssrcdemux: Hold on internal stream lock while pushing sticky
Nicolas Dufresne [Wed, 28 Nov 2018 22:14:11 +0000 (17:14 -0500)]
rtpssrcdemux: Hold on internal stream lock while pushing sticky

This reverts "6f3734c305 rtpssrcdemux: Only forward stick events while
holding the sinkpad stream lock" and actually hold on the internal
stream lock. This prevents in some needed case having a second
streaming thread poping in and messing up event ordering.

5 years agotest: rtpssrcdemux: Test event forwarding
Nicolas Dufresne [Tue, 27 Nov 2018 22:10:57 +0000 (17:10 -0500)]
test: rtpssrcdemux: Test event forwarding

This the first unit test of this element. It adds a test that verify
that events are forwarded correctly.

5 years agomatroskademux: fix handling of MS ACM audio
Matej Knopp [Wed, 4 Nov 2015 11:52:17 +0000 (12:52 +0100)]
matroskademux: fix handling of MS ACM audio

Pass riff codec-data as strf, not strd, which is where
gst_riff_create_audio_caps() expects the WAVEFORMATEXTENSIBLE
data.

https://bugzilla.gnome.org/show_bug.cgi?id=757583
Fixes #234

5 years agoRun gst-indent through the files
Jordan Petridis [Wed, 28 Nov 2018 03:52:16 +0000 (05:52 +0200)]
Run gst-indent through the files

This is required before we enabled an indent test in the CI.

https://gitlab.freedesktop.org/gstreamer/gstreamer-project/issues/33

5 years agoaspectcropration: Fix potential unref of NULL pointer
Thibault Saunier [Mon, 26 Nov 2018 11:10:24 +0000 (08:10 -0300)]
aspectcropration: Fix potential unref of NULL pointer

5 years agoaspectcropratio: Set caps from the streaming thread on property changes
Thibault Saunier [Sun, 25 Nov 2018 14:31:11 +0000 (11:31 -0300)]
aspectcropratio: Set caps from the streaming thread on property changes

Otherwise it might lead to deadlocks

See https://gitlab.gnome.org/GNOME/pitivi/issues/2259

Closes #518

5 years agortpssrcdemux: Forward serialized events to all pads
Nicolas Dufresne [Fri, 23 Nov 2018 19:01:35 +0000 (14:01 -0500)]
rtpssrcdemux: Forward serialized events to all pads

While forwarding serialized event, we use gst_pad_forward() function.
In the forward callback (GstPadForwardFunction) we always return
TRUE. Returning true there will stop the dispatching procedure. As a
side effect, only one events is receiving the events. This breaks
when sending EOS from the applicaiton, it also breaks the latency
tracer.

5 years agomeson: Specify encoding to UTF-8 when building with MSVC
Seungha Yang [Sat, 24 Nov 2018 10:13:28 +0000 (19:13 +0900)]
meson: Specify encoding to UTF-8 when building with MSVC

Use build arguments consistent with core and -base. This can also
remove noisy "C4819" warning of non-us locale MSVC.

5 years agoCheck for zlib header
Xavier Claessens [Wed, 21 Nov 2018 20:11:00 +0000 (15:11 -0500)]
Check for zlib header

5 years agov4l2: Properly fix Android build
Nicolas Dufresne [Wed, 21 Nov 2018 23:53:39 +0000 (18:53 -0500)]
v4l2: Properly fix Android build

The previous patch did not even compile on any possible platform or C
standard. That commit also didn't have a proper commit message.

Android ships Linux with a different signature for ioctl. They first
released an ioctl with int as request type, and later "fixed" it by
adding an override with unsign, which is still not matching Linux and
BSD implementation which uses unsigned long int.

5 years agoFix ioctl() signature on Android
Xavier Claessens [Wed, 21 Nov 2018 21:11:02 +0000 (16:11 -0500)]
Fix ioctl() signature on Android

5 years agoFix zlib detection when there is no pkg-config file
Xavier Claessens [Tue, 9 Oct 2018 20:43:08 +0000 (16:43 -0400)]
Fix zlib detection when there is no pkg-config file

5 years agopulse: Expose the correct max rate that we support
Arun Raghavan [Mon, 19 Nov 2018 14:35:39 +0000 (20:05 +0530)]
pulse: Expose the correct max rate that we support

PulseAudio defines PA_RATE_MAX as the maximum sampling rate that it
supports. We were previously exposing a maximum rate of INT_MAX, which
is incorrect, but worked because nothing was really using a rate greater
than 384000 kHz.

While playing DSD data, we hit a case where there might be very high
sample rates (>1MHz), and pulsesink fails during stream creation with
such streams because it erroneously advertises that it supports such
rates.

Since PA_RATE_MAX is #define'd to (8*48000U), we can't just use it in
the caps string. Instead, we fix up the rate to what we actually support
whenever we use our macro caps.

5 years agomatroskademux: Defer seeks received before GST_MATROSKA_READ_STATE_DATA
Alicia Boya García [Wed, 14 Nov 2018 07:57:55 +0000 (08:57 +0100)]
matroskademux: Defer seeks received before GST_MATROSKA_READ_STATE_DATA

This patch enables matroskademux to receive seeks before it reaches
GST_MATROSKA_READ_STATE_DATA.

Closes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/514

This also enables receiving seeks in the element READY state.

When such a seek is received, it is stored to be later handled when
GST_MATROSKA_READ_STATE_DATA is reached.

5 years agortpsession: Implement reset
Linus Svensson [Tue, 16 Oct 2018 10:38:46 +0000 (12:38 +0200)]
rtpsession: Implement reset

Reset RTPSession when rtpsession changes state from PAUSED to READY.
Without this change, a stored last_rtptime in RTPSource could interfere
with RTP timestamp generation in RTCP Sender Report.

Fixes #510

5 years agortpsession: test: Plug memory leak
Linus Svensson [Tue, 6 Nov 2018 14:05:54 +0000 (15:05 +0100)]
rtpsession: test: Plug memory leak

5 years agortpfunnel: Stop using G_DECLARE_FINAL_TYPE
Mathieu Duponchelle [Mon, 12 Nov 2018 23:37:11 +0000 (00:37 +0100)]
rtpfunnel: Stop using G_DECLARE_FINAL_TYPE

Fixes #516

5 years agoAdd Gitlab CI configuration
Jordan Petridis [Mon, 12 Nov 2018 11:42:29 +0000 (13:42 +0200)]
Add Gitlab CI configuration

This commit adds a .gitlab-ci.yml file, which uses a feature
to fetch the config from a centralized repository. The intent is
to have all the gstreamer modules use the same configuration.

The configuration is currently hosted at the gst-ci repository
under the gitlab/ci_template.yml path.

Part of https://gitlab.freedesktop.org/gstreamer/gstreamer-project/issues/29

5 years agov4l2object: Read driver selected interlace mode
Nicolas Dufresne [Fri, 19 Oct 2018 02:23:31 +0000 (22:23 -0400)]
v4l2object: Read driver selected interlace mode

If there was no interlace-mode field in the caps. Read back the value
selected by the driver. This way, if the driver does not support
progressive, then it will automatically negotiate the returned mode
unless this mode is not supported by GStreamer.

This method was already used for colorimetry. Just like colorimetry, the
interlace mode is not longer probed by v4l2src dues to performance
issues.

Fixes #511

5 years agomatroska: implement preliminary support for the bitrate query
Matthew Waters [Thu, 17 May 2018 11:58:25 +0000 (21:58 +1000)]
matroska: implement preliminary support for the bitrate query

Return the size / total duration as a ballpark estimate.

https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/60

5 years agoisomp4: add preliminary support for the bitrate query
Matthew Waters [Thu, 17 May 2018 11:53:56 +0000 (21:53 +1000)]
isomp4: add preliminary support for the bitrate query

Return the upstream size over the duration as a first estimate.

https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/60

5 years agortpbin: Sink jitterbuffer/storage before passing as parameters to signals
Sebastian Dröge [Tue, 6 Nov 2018 21:02:21 +0000 (23:02 +0200)]
rtpbin: Sink jitterbuffer/storage before passing as parameters to signals

Otherwise signal handlers from bindings will take ownership of them as
they are still floating, and we won't own a reference inside rtpbin
anymore.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/515

5 years agoflvmux: Test that timestamps are always increasing
Havard Graff [Sat, 27 Oct 2018 17:00:52 +0000 (18:00 +0100)]
flvmux: Test that timestamps are always increasing

Decreasing timestamps break rtmpsink.

With contributions from Olivier Crête.

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

5 years agoflvmux: Force timestamps to always be increasing
Olivier Crête [Sat, 27 Oct 2018 18:27:12 +0000 (19:27 +0100)]
flvmux: Force timestamps to always be increasing

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

5 years agoUpdate common submodule location
Matthew Waters [Mon, 5 Nov 2018 05:36:26 +0000 (05:36 +0000)]
Update common submodule location

Remove the git directory

5 years agoClone the code from gitlab
Haihao Xiang [Mon, 5 Nov 2018 04:16:46 +0000 (12:16 +0800)]
Clone the code from gitlab

This fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/513

5 years agoqtdemux: Ignore corrupted CTTS box
Seungha Yang [Thu, 1 Nov 2018 11:37:12 +0000 (20:37 +0900)]
qtdemux: Ignore corrupted CTTS box

If ctts (CompositionOffsetBox) has larger sample_offset
(offset between PTS and DTS) than (2 * duration) of the stream,
assume the ctts box to be corrupted and ignore the box.

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

5 years agoscaletempo: Implement SEGMENT query
Sebastian Dröge [Tue, 23 Oct 2018 08:45:36 +0000 (09:45 +0100)]
scaletempo: Implement SEGMENT query

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

5 years agowavparse: Implement SEGMENT query
Sebastian Dröge [Tue, 23 Oct 2018 08:42:21 +0000 (09:42 +0100)]
wavparse: Implement SEGMENT query

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

5 years agodtmfsrc: Declare output as interleaved
Olivier Crête [Sun, 28 Oct 2018 17:12:59 +0000 (17:12 +0000)]
dtmfsrc: Declare output as interleaved

This element doesn't support planar audio yet.

5 years agomeson: Add some missing test dependencies
Nirbheek Chauhan [Sun, 28 Oct 2018 14:09:21 +0000 (14:09 +0000)]
meson: Add some missing test dependencies

Without these dependencies, the enumtype may not be generated when the
test is built, which will cause a compile failure.

5 years agomeson: Cleanup old FIXMEs that relied on meson changes
Nirbheek Chauhan [Sun, 28 Oct 2018 14:07:54 +0000 (14:07 +0000)]
meson: Cleanup old FIXMEs that relied on meson changes

5 years agortpsession: Allow changing the SDES at runtime
Olivier Crête [Tue, 16 Oct 2018 21:28:00 +0000 (17:28 -0400)]
rtpsession: Allow changing the SDES at runtime

Make it possible to modify the SDES in a packet at runtime.

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

5 years agoqtmux: round to nearest when computing mehd and tkhd duration
Alicia Boya García [Thu, 1 Mar 2018 16:25:07 +0000 (17:25 +0100)]
qtmux: round to nearest when computing mehd and tkhd duration

This fixes a bug where in some files mehd.fragment_duration is one unit
less than the actual duration of the fragmented movie, as explained below:

mehd.fragment_duration is computed by scaling the end timestamp of
the last frame of the movie in (in nanoseconds) by the movie timescale.

In some situations, the end timestamp is innacurate due to lossy conversion to
fixed point required by GstBuffer upstream.

Take for instance a movie with 3 frames at exactly 3 fps.

$ gst-launch-1.0 -v videotestsrc num-buffers=3 \
  ! video/x-raw, framerate="(fraction)3/1" \
  ! x264enc \
  ! fakesink silent=false

dts: 999:59:59.333333334,  pts: 1000:00:00.000000000, duration: 0:00:00.333333333
dts: 999:59:59.666666667,  pts: 1000:00:00.666666666, duration: 0:00:00.333333334
dts: 1000:00:00.000000000, pts: 1000:00:00.333333333, duration: 0:00:00.333333333

The end timestamp is calculated by qtmux in this way:

end timestamp = last frame DTS + last frame DUR - first frame DTS =
  = 1000:00:00.000000000 + 0:00:00.333333333 - 999:59:59.333333334 =
  = 0:00:00.999999999

qtmux needs to round this timestamp to the declared movie timescale, which can
ameliorate this distortion, but it's important that round-neareast is used;
otherwise it would backfire badly.

Take for example a movie with a timescale of 30 units/s.

0.999999999 s * 30 units/s = 29.999999970 units

A round-floor (as it was done before this patch) would set fragment_duration to
29 units, amplifying the original distorsion from 1 nanosecond up to 33
milliseconds less than the correct value. The greatest distortion would occur
in the case where timescale = framerate, where an entire frame duration would
be subtracted.

Also, rounding is added to tkhd duration computation too, which
potentially has the same problem.

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

5 years agoudpsrc: print information about bind_error socket error
Marc Leeman [Wed, 16 May 2018 12:15:13 +0000 (14:15 +0200)]
udpsrc: print information about bind_error socket error

In some cases, a bind error occurs during operation. Printing
the information about the problem is critical for finding the
conflict

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

5 years agomatroska-demux: Fix caps memleak
Johan Bjäreholt [Wed, 17 Oct 2018 10:58:08 +0000 (12:58 +0200)]
matroska-demux: Fix caps memleak

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

5 years agov4l2bufferpool: fix typo resurect to resurrect
Wonchul Lee [Thu, 11 Oct 2018 00:24:53 +0000 (09:24 +0900)]
v4l2bufferpool: fix typo resurect to resurrect

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

5 years agov4l2videoenc: Add HEVC support
Amit Pandya [Thu, 18 Oct 2018 06:59:00 +0000 (12:29 +0530)]
v4l2videoenc: Add HEVC support

Add HEVC encoder support.

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

5 years agovl42allocator: Don't dup exported dmabufs
Nicolas Dufresne [Fri, 19 Oct 2018 21:37:28 +0000 (17:37 -0400)]
vl42allocator: Don't dup exported dmabufs

We can now use the new GstFAllocator to ask the allocator not to close
the wrapped FD. This way the dup is no longer needed.

5 years agov4l2allocator: Don't dup imported DMABuf FD
Nicolas Dufresne [Fri, 19 Oct 2018 21:14:15 +0000 (17:14 -0400)]
v4l2allocator: Don't dup imported DMABuf FD

There is no specific needs to duplicate the FD. Unlike the exportation,
we don't depend on code that will call close. This will make debugging
easyer since the traced FD will match the exporter.

5 years agomatroska-ids: Fix uninitialized memory in contexts
Johan Bjäreholt [Tue, 23 Oct 2018 11:04:34 +0000 (13:04 +0200)]
matroska-ids: Fix uninitialized memory in contexts

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

5 years agoqtmux: Add property for providing a threshold after which we create an edit list...
Sebastian Dröge [Fri, 19 Oct 2018 14:02:11 +0000 (17:02 +0300)]
qtmux: Add property for providing a threshold after which we create an edit list for gaps at the start

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

5 years agoqtmux: Correctly set tkhd width/height to the display size
Sebastian Dröge [Mon, 22 Oct 2018 11:21:54 +0000 (12:21 +0100)]
qtmux: Correctly set tkhd width/height to the display size

It was previously set to the display aspect ratio, e.g. 4x3, 16x9, etc.
but should be set to the display size.

This is a regression from e655d47dfce1652630fe8ff5fb6be56370087004
(1.5.1) and was correct before that.

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

5 years agotests: flvmux: Fix pushing invalid audio caps in tests
Yeongjin Jeong [Sun, 21 Oct 2018 02:15:15 +0000 (11:15 +0900)]
tests: flvmux: Fix pushing invalid audio caps in tests

Previous commit created caps with incorrect aac codec data
that did not match the audio channel.

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

5 years agoqtdemux: Fix build with GLib versions < 2.54
Seungha Yang [Fri, 19 Oct 2018 15:10:04 +0000 (00:10 +0900)]
qtdemux: Fix build with GLib versions < 2.54

g_ptr_array_find_with_equal_func was introduced in glib 2.54
which is a higher version than our minimum required one.

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

5 years agortpsession: fix up GHashTable-behavior dependent tests
Havard Graff [Wed, 17 Oct 2018 11:52:20 +0000 (13:52 +0200)]
rtpsession: fix up GHashTable-behavior dependent tests

GHashTable iteration order changed in recent GLib,
and tests were relying on that.

https://mail.gnome.org/archives/desktop-devel-list/2018-October/msg00016.html

5 years agoqtdemux: Don't switch active streams and old streams ...
Seungha Yang [Sun, 7 Oct 2018 11:07:39 +0000 (20:07 +0900)]
qtdemux: Don't switch active streams and old streams ...

... before the old streams is not exposed yet for MSS stream.

In case of DASH, newly configured streams will be exposed
whenever demux got moov without delay.
Meanwhile, since there is no moov box in MSS stream,
the caps will act like moov. Then, there is delay for exposing new pads
until demux got the first moof.

So, following scenario is possible only for MSS but not for DASH,
STREAM-START -> CAPS -> (configure stream but NOT EXPOSED YET)
-> STREAM-START-> CAPS (configure stream again).

In above scenario, we can reuse old stream without any stream reconfigure.

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

5 years agoqtdemux: Use GPtrArray to store QtDemuxStream structure
Seungha Yang [Sun, 7 Oct 2018 07:43:34 +0000 (16:43 +0900)]
qtdemux: Use GPtrArray to store QtDemuxStream structure

GPtrArray has less overhead than linked list and the length also
can be auto updated by using it.

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

5 years agoqtdemux: Make QtDemuxStream refcounted structure
Seungha Yang [Sun, 7 Oct 2018 07:50:45 +0000 (16:50 +0900)]
qtdemux: Make QtDemuxStream refcounted structure

This a prework for porting GPtrArray.
Refcounting will help the use of g_ptr_array_new_with_free_func()
with QtDemuxStream structure

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

5 years agoqtdemux: Make function foreach method friendly
Seungha Yang [Sat, 6 Oct 2018 11:19:40 +0000 (20:19 +0900)]
qtdemux: Make function foreach method friendly

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

5 years agoqtdemux: Only set width/height in caps if they're non-0
Olivier Crête [Thu, 26 Jul 2018 19:25:06 +0000 (15:25 -0400)]
qtdemux: Only set width/height in caps if they're non-0

If they are not valid, then let a downstream parser complete them.

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

5 years agoavidemux: fix misleading debug line
Wim Taymans [Thu, 16 Aug 2018 10:07:30 +0000 (12:07 +0200)]
avidemux: fix misleading debug line

5 years agoqtdemux: Avoid warning when reporting about decryptors
Philippe Normand [Fri, 22 Jun 2018 15:00:11 +0000 (16:00 +0100)]
qtdemux: Avoid warning when reporting about decryptors

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

5 years agomeson: Replace empty configuration_data() with copy keyword
Tim-Philipp Müller [Wed, 17 Oct 2018 13:15:33 +0000 (14:15 +0100)]
meson: Replace empty configuration_data() with copy keyword

Use 'copy' keyword to avoid meson warning message.
Note that 'copy' keyword in configure_file() is available
since meson 0.47.0

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

5 years agosplitmuxsink: Do not hardcode frames_of_daily_jam
Vivia Nikolaidou [Tue, 16 Oct 2018 12:42:12 +0000 (15:42 +0300)]
splitmuxsink: Do not hardcode frames_of_daily_jam

Apart from the obvious drawbacks of hardcoding, the drawback here was
that, if we subtracted 2 frames (instead of 2.6) from the target running
time, we'd request the next keyframe a bit too far into the future,
which would make our files split at the wrong position.

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

5 years agoqtmux: Allow up to 1% of frame rate for lateness
Vivia Nikolaidou [Tue, 2 Oct 2018 16:32:47 +0000 (19:32 +0300)]
qtmux: Allow up to 1% of frame rate for lateness

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

5 years agortpfunnel: fix shutdown
Mathieu Duponchelle [Tue, 18 Sep 2018 11:15:06 +0000 (13:15 +0200)]
rtpfunnel: fix shutdown

By disposing of the ssrc_to_pad map in finalize instead of
dispose.

5 years agoInitial commit of GstRtpFunnel
Havard Graff [Wed, 18 Oct 2017 09:14:36 +0000 (11:14 +0200)]
Initial commit of GstRtpFunnel

For funneling together rtp-streams into a single session.
Use-cases include multiplexing and bundle.

5 years agotests: flvdemux: Add new test for channel detect using aac codec-data
Yeongjin Jeong [Fri, 12 Oct 2018 13:33:15 +0000 (22:33 +0900)]
tests: flvdemux: Add new test for channel detect using aac codec-data

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

5 years agoflvdemux: Use aac codec-data to adjust channels if needed
Yeongjin Jeong [Thu, 11 Oct 2018 07:36:17 +0000 (16:36 +0900)]
flvdemux: Use aac codec-data to adjust channels if needed

Flv does not support various channels in AAC stream format, for example
flvdemux detect an audio channels of 2(stereo) when the AAC really is 1(mono).

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

5 years agotests: flvmux: Add new test for caps change after starting to write headers
Yeongjin Jeong [Thu, 11 Oct 2018 05:31:20 +0000 (14:31 +0900)]
tests: flvmux: Add new test for caps change after starting to write headers

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

5 years agoflvmux: Don't refuse caps changes after starting to write headers in streamable mode.
Yeongjin Jeong [Fri, 5 Oct 2018 08:16:26 +0000 (17:16 +0900)]
flvmux: Don't refuse caps changes after starting to write headers in streamable mode.

Flv does support changing the stream type and stream properties
after the headers were started to be written, and for example H264
codec_data changes can be supported.

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

5 years agosplitmuxsink: Fix if condition in drop-frame timecode wrap-around
Vivia Nikolaidou [Thu, 11 Oct 2018 10:55:01 +0000 (13:55 +0300)]
splitmuxsink: Fix if condition in drop-frame timecode wrap-around

Was previously: if ( x | y && a == b). Changed it into if ((x & y) && (a
== b)).

5 years agosplitmuxsink: Subtract daily jam offset when day wraps around
Vivia Nikolaidou [Tue, 9 Oct 2018 13:39:11 +0000 (16:39 +0300)]
splitmuxsink: Subtract daily jam offset when day wraps around

For drop-frame framerates, when the expected next max timecode wraps
around at the end of the day, we have to subtract the offset of the
daily jam, otherwise we end up with a duration that's a few frames too
long.

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

5 years agortpmux: respect downstream "timestamp-offset" in caps.
Havard Graff [Mon, 25 Sep 2017 12:30:13 +0000 (14:30 +0200)]
rtpmux: respect downstream "timestamp-offset" in caps.

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

5 years agortpmux: cleanup ssrc-handling code a bit
Havard Graff [Tue, 7 Jun 2016 12:38:19 +0000 (14:38 +0200)]
rtpmux: cleanup ssrc-handling code a bit

And add some better logging.

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

5 years agortpmux: protect against NULL caps
Havard Graff [Wed, 4 May 2016 09:48:04 +0000 (11:48 +0200)]
rtpmux: protect against NULL caps

Due to state-changes deactivating the pad from another thread,
this can happen.

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