platform/upstream/gstreamer.git
4 years agov4l2codec: Pass system frame number as timestamp and use it to retrieve back frames...
Sebastian Dröge [Mon, 19 Oct 2020 14:56:04 +0000 (17:56 +0300)]
v4l2codec: Pass system frame number as timestamp and use it to retrieve back frames reliably

System frame numbers are supposed to be unique and correct drivers are
passing through timestamps without modification from the output/sink to the
capture/src side.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/778>

4 years agortpbin: Add clear-ssrc action
Nicolas Dufresne [Thu, 24 Sep 2020 17:13:00 +0000 (13:13 -0400)]
rtpbin: Add clear-ssrc action

This action signal will delegate to clear-ssrc onto the rtpssrcdemux element
associated with the session. This allow rtpbin users to clear pads and
elements for a specific ssrc that is known to no longer be in use. This
happens when a pad is reused in rtpsrc or ristsrc.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/736>

4 years agortpvp8pay: payload temporally scaled bitstreams.
John-Mark Bell [Fri, 8 Sep 2017 19:02:13 +0000 (20:02 +0100)]
rtpvp8pay: payload temporally scaled bitstreams.

Co-Authored-By: Vincent Sanders <vince@pexip.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/728>

4 years agortpvp8pay: Add picture-id-offset property
Stian Selnes [Fri, 17 Nov 2017 14:11:41 +0000 (15:11 +0100)]
rtpvp8pay: Add picture-id-offset property

Add property to set the initial value for picture-id. RFC7741 says
that picture-id MAY be initialized to a random value, thus it's also
valid to simply set it to a fixed initial value. A fixed value is very
useful for testing.

Default behavior is not changed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/728>

4 years agortpvp8pay: move duplicate code to separate functions
Mikhail Fludkov [Thu, 16 Mar 2017 14:23:28 +0000 (15:23 +0100)]
rtpvp8pay: move duplicate code to separate functions

Two new functions to modify picture id:
gst_rtp_vp8_pay_picture_id_reset - picks random picture id of
appropriate bitsize
gst_rtp_vp8_pay_picture_id_increment - increments picture id taking
care of wrapping

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/728>

4 years agovp8enc: expect bps for temporal-scalability-target-bitrate.
John-Mark Bell [Fri, 8 Sep 2017 07:13:05 +0000 (08:13 +0100)]
vp8enc: expect bps for temporal-scalability-target-bitrate.

Consistency with target-bitrate is less surprising and with
modern libvpx additional configuration is required to make
temporal scaling work.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/728>

4 years agovp8enc: finish support for temporally scaled encoding
John-Mark Bell [Fri, 8 Sep 2017 07:19:20 +0000 (08:19 +0100)]
vp8enc: finish support for temporally scaled encoding

  - introduce two new properties:

    * temporal-scalability-layer-flags:

      Provide fine-grained control of layer encoding to the
      outside world. The flags sequence should be a multiple of
      the periodicity and is indexed by a running count of encoded
      frames modulo the sequence length.

    * temporal-scalability-layer-sync-flags:

      Specify the pattern of inter-layer synchronisation (i.e.
      which of the frames generated by the layer encoding
      specification represent an inter-layer synchronisation).
      There must be one entry per entry in
      temporal-scalability-layer-flags.

  - apply temporal scalability settings and expose as buffer
    metadata.

    This allows the codec to allocate a given frame to the correct
    internal bitrate allocator. Additionally, all the
    non-bitstream metadata needed to payload a temporally scaled
    stream is now attached to each output buffer as a
    GstVideoVP8Meta.

  - add unit test for temporally scaled encoding.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/728>

4 years agomeson: update glib minimum version to 2.56
Stéphane Cerveau [Thu, 15 Oct 2020 16:21:54 +0000 (18:21 +0200)]
meson: update glib minimum version to 2.56

In order to support the symbol g_enum_to_string in various
project using GStreamer ( gst-validate etc.), the glib minimum
version should be 2.56.0.

Remove compat code as glib requirement
is now > 2.56

Version used by Ubuntu 18.04 LTS

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/774>

4 years agortpst2022-1-fecenc: fix input seqnum check
Mathieu Duponchelle [Wed, 14 Oct 2020 12:30:34 +0000 (14:30 +0200)]
rtpst2022-1-fecenc: fix input seqnum check

We need to cast the incremented last seqnum to guint16 for
consistent checks on wraparound

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/770>

4 years agoflvmux: Correct time types
Jan Alexander Steffens (heftig) [Sat, 12 Sep 2020 07:02:30 +0000 (09:02 +0200)]
flvmux: Correct time types

- last_dts is in milliseconds, not nanoseconds as expected for
  GstClockTime. Make it a generic guint64.
- Use GstClockTime for the fields that actually contain nanoseconds.
  None of them should become negative.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/766>

4 years agortpst2022-1-fecenc: Don't unconditionally use GLib 2.60 APIs
Sebastian Dröge [Fri, 9 Oct 2020 06:31:27 +0000 (09:31 +0300)]
rtpst2022-1-fecenc: Don't unconditionally use GLib 2.60 APIs

g_queue_clear_full() in this case.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/768>

4 years agortpulpfec: fix potential alignment issue in xor function
Mathieu Duponchelle [Thu, 8 Oct 2020 16:54:55 +0000 (18:54 +0200)]
rtpulpfec: fix potential alignment issue in xor function

https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/753#note_646453
for context

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/753>

4 years agortpmanager: implement SMPTE 2022-1 FEC encoder
Mathieu Duponchelle [Tue, 6 Oct 2020 01:03:13 +0000 (03:03 +0200)]
rtpmanager: implement SMPTE 2022-1 FEC encoder

+ improve integration of FEC encoders in rtpbin

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/753>

4 years agortpmanager: implement SMPTE 2022-1 FEC decoder
Mathieu Duponchelle [Tue, 6 Oct 2020 01:13:30 +0000 (03:13 +0200)]
rtpmanager: implement SMPTE 2022-1 FEC decoder

+ improve integration of FEC decoders in rtpbin

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/753>

4 years agortpfunnel: Also forward custom sticky event
Olivier Crête [Wed, 8 Jul 2020 21:28:31 +0000 (17:28 -0400)]
rtpfunnel: Also forward custom sticky event

This is useful to track metadata about each group of packets

Also include a unit test

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/666>

4 years agoisomp4: Rename GstQTMux to GstBaseQTMux to avoid breaking API
Thibault Saunier [Tue, 29 Sep 2020 12:44:54 +0000 (09:44 -0300)]
isomp4: Rename GstQTMux to GstBaseQTMux to avoid breaking API

Since 52b63de19ada283c1180c8fc00cacb1465fdf10f the qtmux GType was
renamed GstQTMuxElement which breaks presets, revert that change.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/755>

4 years agortp: Fix allocations to support source-info property
Sebastian Dröge [Mon, 28 Sep 2020 15:25:21 +0000 (18:25 +0300)]
rtp: Fix allocations to support source-info property

Use gst_rtp_base_payload_allocate_output_buffer() instead of
gst_rtp_buffer_new_allocate() in order to allocate RTP buffer with
correct number of CSRCs according to the meta.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/612>

4 years agortpvp8pay: Fix allocation to support source-info property
Stian Selnes [Fri, 23 Oct 2015 09:08:56 +0000 (11:08 +0200)]
rtpvp8pay: Fix allocation to support source-info property

Use gst_rtp_base_payload_allocate_output_buffer() in order to allocate
RTP buffer with correct number of CSRCs according to the meta.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/612>

4 years agoqtmux: output the correct limits in error messages
Matthew Waters [Mon, 28 Sep 2020 05:36:00 +0000 (15:36 +1000)]
qtmux: output the correct limits in error messages

Having the current bytes being less than the limit was confusing!

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/732>

4 years agoqtmux: properly support initial caps nego failure
Matthew Waters [Fri, 31 Jul 2020 06:47:37 +0000 (16:47 +1000)]
qtmux: properly support initial caps nego failure

Scenario:
- gap event causes h264parse to push made up caps that may fail checks
  inside qtmux (e.g missing codec_data).
- the caps event has already been marked as received and is sticky on
  the sink pad
- gst_qt_mux_pad_can_renegotiate() will retrieve the failed caps event
  using gst_pad_get_current_caps() and reject the correct updated caps
  with codec_data.
- Failure!

Keep track of the configured caps ourselves instead of relying on the
sticky event on the pad.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/732>

4 years agoqtmux: support non-seekable downstream mode
Matthew Waters [Wed, 22 Jul 2020 05:34:44 +0000 (15:34 +1000)]
qtmux: support non-seekable downstream mode

Write an mdat per buffer in that case.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/732>

4 years agortpbin: Remove the rtpjitterbuffer with the stream
Nicolas Dufresne [Wed, 23 Sep 2020 19:25:36 +0000 (15:25 -0400)]
rtpbin: Remove the rtpjitterbuffer with the stream

Since !348, the jitterbuffer was only removed with the session. This restores
the original behaviour and removes the jitterbuffer when the stream is
removed. This avoid accumulating jitterbuffer objects into the bin when a
session is reused.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/735>

4 years agortpbin: Cleanup dead code
Nicolas Dufresne [Wed, 23 Sep 2020 17:26:51 +0000 (13:26 -0400)]
rtpbin: Cleanup dead code

The rtpjitterbuffer is now part of the session elements, we no longer need
to do the ref_sink dance when signalling it. It is already owned by the bin
when signalled. Also, the code that handles generic session elements already
handle the ref_sink() calls since:

03dc22951bacb6fdc3868c8f801e6a52c33a745f

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/735>

4 years agortph26*depay: drop FU's without a corresponding start bit
Matthew Waters [Fri, 18 Sep 2020 06:09:20 +0000 (16:09 +1000)]
rtph26*depay: drop FU's without a corresponding start bit

If we have not received a FU with a start bit set, any subsequent FU
data is not useful at all and would result in an invalid stream.

This case is constructed from multiple requirements in
RFC 3984 Section 5.8 and RFC 7798 Section 4.4.3.  Following are excerpts
from RFC 3984 but RFC 7798 contains similar language.

The FU in a single FU case is forbidden:

   A fragmented NAL unit MUST NOT be transmitted in one FU; i.e., the
   Start bit and End bit MUST NOT both be set to one in the same FU
   header.

and dropping is possible:

   If a fragmentation unit is lost, the receiver SHOULD discard all
   following fragmentation units in transmission order corresponding to
   the same fragmented NAL unit.

The jump in seqnum case is supported by this from the specification
instead of implementing the forbidden_zero_bit mangling:

   If a fragmentation unit is lost, the receiver SHOULD discard all
   following fragmentation units in transmission order corresponding to
   the same fragmented NAL unit.

   A receiver in an endpoint or in a MANE MAY aggregate the first n-1
   fragments of a NAL unit to an (incomplete) NAL unit, even if fragment
   n of that NAL unit is not received.  In this case, the
   forbidden_zero_bit of the NAL unit MUST be set to one to indicate a
   syntax violation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/730>

4 years agoimagefreeze: Response caps query from srcpad
Seungha Yang [Sun, 20 Sep 2020 12:06:19 +0000 (21:06 +0900)]
imagefreeze: Response caps query from srcpad

... and chain up to default query handler for unhandled query types.
Unhandled query shouldn't be returned with FALSE if there's no special needs.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/731>

4 years agoqtmux: make documentation happy
Matthew Waters [Wed, 16 Sep 2020 02:15:09 +0000 (12:15 +1000)]
qtmux: make documentation happy

introduce a base qtmux class that we can install documentation snippets
on instead of duplicating across alll the isomp4 elements

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/643>

4 years agoisomp4/mux: add a fragment mode for initial moov with data
Matthew Waters [Thu, 28 May 2020 09:40:24 +0000 (19:40 +1000)]
isomp4/mux: add a fragment mode for initial moov with data

Used by some proprietary software for their fragmented files.

Adds some support for multi-stream fragmented files

Flow is as follows.
1. The first 'fragment' is written as a self-contained fragmented
   mdat+moov complete with an edit list and durations, tags, etc.
2. Subsequent fragments are written with a mdat+moof and each stream is
   interleaved as data arrives (currently ignoring the interleave-*
   properties).  data-offsets in both the traf and the trun ensure
   data is read from the correct place on demuxing.  Data/chunk offsets
   are also kept for writing out the final moov.
3. On finalisation, the initial moov is invalidated to a hoov and the
   size of the first mdat is extended to cover the entire file contents.
   Then a moov is written as regularly would in moov-at-end mode (the
   default).

This results in a file that is playable throughout while leaving a
finalised file on completion for players that do not understand
fragmented mp4.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/643>

4 years agoqtdemux: increase some logging on streams and sample parsing
Matthew Waters [Thu, 25 Jun 2020 06:37:56 +0000 (16:37 +1000)]
qtdemux: increase some logging on streams and sample parsing

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/643>

4 years agoqtdemux: bail out when encountering an atom with a size of 0
Matthew Waters [Thu, 25 Jun 2020 06:35:45 +0000 (16:35 +1000)]
qtdemux: bail out when encountering an atom with a size of 0

A size 0 atom means the atom extends to the end of the file.  No further
valid atoms will ever follow.  Avoids a subsequent scan for an atom from
one byte earlier after encountering a size 0 atom.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/643>

4 years agoqtdemux: fix subsequent moof parsing after moov with valid samples
Matthew Waters [Thu, 25 Jun 2020 06:33:04 +0000 (16:33 +1000)]
qtdemux: fix subsequent moof parsing after moov with valid samples

reset the moof_offset back to its original value like is done in the
error case just before.

Fixes subsequent parsing of a moof following a moov that contains valid
samples in a non-streaming fragmented mp4.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/643>

4 years agoqtdemux: extend edit list when fragmented
Matthew Waters [Thu, 25 Jun 2020 06:30:28 +0000 (16:30 +1000)]
qtdemux: extend edit list when fragmented

When we are fragmented, the edit list may only refer to the portion of
the media that is in the moov.  Extend the edit list stop time when we
if there is only one qt segment and we are reading a fragmented file.

Fixes playback of some fragmented mp4 files generated by proprietary
programs.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/643>

4 years agomeson: Allow overriding qt5 feature
Nicolas Dufresne [Tue, 15 Sep 2020 18:22:13 +0000 (14:22 -0400)]
meson: Allow overriding qt5 feature

This will allow controlling that feature from gst-build

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/729>

4 years agosplitmuxsrc: Implement segment query
Olivier Crête [Wed, 18 Nov 2015 00:14:01 +0000 (19:14 -0500)]
splitmuxsrc: Implement segment query

Fixes #239

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/713>

4 years agortpmp4gdepay: Allow lower-case "aac-hbr" instead of correct "AAC-hbr"
Sebastian Dröge [Mon, 14 Sep 2020 07:15:35 +0000 (10:15 +0300)]
rtpmp4gdepay: Allow lower-case "aac-hbr" instead of correct "AAC-hbr"

Various live555 based products are using the wrong "mode" string or
seem to assume case-insensitive matching, which is wrong.

Examples for this are the Yuan SC6C0N1 mini and the Kiloview E2.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/727>

4 years agoqtdemux: Add support for AAX encrypted audio streams
Stefan Brüns [Sat, 2 May 2020 00:21:00 +0000 (02:21 +0200)]
qtdemux: Add support for AAX encrypted audio streams

This is modelled after the DASH Common Encryption scheme, but is somewhat
simpler as more parts are fixed, i.e. just one encryption scheme.

The output caps are fixed to 'application/x-aavd'. All information
required for decryption are part of the 'adrm' atom, which is passed
on as a property. The property is attached to the buffer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/577>

4 years agoqtdemux: Add 'aavd' and related fourcc codes for AAX encrypted audio
Stefan Brüns [Sat, 2 May 2020 00:20:44 +0000 (02:20 +0200)]
qtdemux: Add 'aavd' and related fourcc codes for AAX encrypted audio

The 'aavd' box is contained in the 'stsd' sample description. The 'aavd'
box follows the layout of an 'mp4a' entry, i.e. it contains a single
standard 'esds' extension box, and the two proprietary 'adrm' and 'aabd'
extension boxes.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/577>

4 years agovpxdec: request a sync point on decoder errors
Haakon Sporsheim [Mon, 23 Jun 2014 06:46:37 +0000 (08:46 +0200)]
vpxdec: request a sync point on decoder errors

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/725>

4 years agortp/vrawpay: use alloc_output_buffer from base class
Camilo Celis Guzman [Sun, 13 Sep 2020 16:31:57 +0000 (18:31 +0200)]
rtp/vrawpay: use alloc_output_buffer from base class

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/726>

4 years agortspsrc: Fix push-backchannel-buffer parameter mismatch
Ricky Tang [Mon, 7 Sep 2020 15:20:58 +0000 (23:20 +0800)]
rtspsrc: Fix push-backchannel-buffer parameter mismatch

When using python, signal parameter must match with function.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/724>

4 years agojpegdec: check buffer size before dereferencing. Fixes #541
Jérôme Laheurte [Thu, 10 Sep 2020 09:24:32 +0000 (11:24 +0200)]
jpegdec: check buffer size before dereferencing. Fixes #541

Some cameras (Panacast) have buggy drivers/firmware which send
invalid JPEG frames, containing no data, which makes jpegdec
crash because it assumes the frame is at least 2 bytes long.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/723>

4 years agoflvmux: Improve logging of gst_flv_mux_buffer_to_tag_internal
Jan Alexander Steffens (heftig) [Thu, 10 Sep 2020 09:11:00 +0000 (11:11 +0200)]
flvmux: Improve logging of gst_flv_mux_buffer_to_tag_internal

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/722>

4 years agoflvmux: Move stream skipping to GstAggregatorPadClass.skip_buffer
Jan Alexander Steffens (heftig) [Wed, 9 Sep 2020 13:12:53 +0000 (15:12 +0200)]
flvmux: Move stream skipping to GstAggregatorPadClass.skip_buffer

Besides looking like the correct place to put this, it allows us to drop
the entire aggregator queue. The old implementation only dropped at most
one buffer for each call of aggregate.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/722>

4 years agov4l2object: plug memory-leak
Havard Graff [Tue, 8 Sep 2020 15:35:50 +0000 (17:35 +0200)]
v4l2object: plug memory-leak

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/718>

4 years agovp9enc: expose row-mt property
Mathieu Duponchelle [Fri, 28 Aug 2020 16:09:15 +0000 (18:09 +0200)]
vp9enc: expose row-mt property

With recent libvpx versions, multithreading can be enabled on
a per-tile basis, instead of on a per tile-column basis.

In combination with the new tile-rows property, this allows the
encoder to make much better use of the available CPU power.

Bump minimum libvpx version to 1.7.0

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/707>

4 years agovpxenc: change default for deadline to good quality
Mathieu Duponchelle [Fri, 28 Aug 2020 15:45:48 +0000 (17:45 +0200)]
vpxenc: change default for deadline to good quality

Having the deadline set to best quality causes the encoder
to be absurdly slow, most real-life users will want the good
quality tradeoff instead.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/707>

4 years agovp9enc: expose tile-columns and tile-rows properties
Mathieu Duponchelle [Fri, 28 Aug 2020 15:39:47 +0000 (17:39 +0200)]
vp9enc: expose tile-columns and tile-rows properties

Based on patch by Stian Selnes <stian@pexip.com>.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/707>

4 years agovpxenc: add configure_encoder virtual method
Mathieu Duponchelle [Fri, 28 Aug 2020 15:35:26 +0000 (17:35 +0200)]
vpxenc: add configure_encoder virtual method

For subclasses to expose format-specific properties

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/707>

4 years agosplitmuxsink: fix sink pad release while PLAYING
Mathieu Duponchelle [Tue, 8 Sep 2020 18:57:33 +0000 (20:57 +0200)]
splitmuxsink: fix sink pad release while PLAYING

- Release the split mux lock while removing the probes

- Flush the sinkpad to unblock other pads

- Turn check_completed_gop into a do while statement, when
  waking up we want to recheck whether the current GOP is
  ready for sending

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/719>

4 years agovp8enc: improve unit tests
John-Mark Bell [Tue, 31 Oct 2017 09:40:33 +0000 (09:40 +0000)]
vp8enc: improve unit tests

  - make test_encode_simple cope with libvpx built with
    CONFIG_REALTIME_ONLY. Sadly, there's no way to detect this at
    runtime beyond trying to set lag-in-frames to >0, pushing a
    buffer and catching the GST_FLOW_NOT_NEGOTIATED return.

  - fix bitrot in test_encode_simple_when_bitrate_set_to_zero.

  - port test_encode_simple to GstHarness and introduce a separate
    test for the lag-in-frames property.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/708>

4 years agodocs: Update plugin cache
Jakub Adam [Fri, 21 Aug 2020 14:03:09 +0000 (16:03 +0200)]
docs: Update plugin cache

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/705>

4 years agovpx: Support GST_VIDEO_FORMAT_I422_10LE
Jakub Adam [Tue, 24 Mar 2020 18:35:07 +0000 (19:35 +0100)]
vpx: Support GST_VIDEO_FORMAT_I422_10LE

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/705>

4 years agovpx: Support GST_VIDEO_FORMAT_I420_10LE
Jakub Adam [Tue, 24 Mar 2020 16:16:59 +0000 (17:16 +0100)]
vpx: Support GST_VIDEO_FORMAT_I420_10LE

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/705>

4 years agovp9enc: support GST_VIDEO_FORMAT_Y444
Jakub Adam [Mon, 23 Mar 2020 20:44:30 +0000 (21:44 +0100)]
vp9enc: support GST_VIDEO_FORMAT_Y444

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/705>

4 years agoci: include template from gst-ci master branch again
Tim-Philipp Müller [Tue, 8 Sep 2020 16:30:35 +0000 (17:30 +0100)]
ci: include template from gst-ci master branch again

4 years agoBack to development
Tim-Philipp Müller [Tue, 8 Sep 2020 15:58:37 +0000 (16:58 +0100)]
Back to development

4 years agoRelease 1.18.0
Tim-Philipp Müller [Mon, 7 Sep 2020 23:05:14 +0000 (00:05 +0100)]
Release 1.18.0

4 years agomeson: dist pot file in tarballs
Tim-Philipp Müller [Mon, 7 Sep 2020 21:39:02 +0000 (22:39 +0100)]
meson: dist pot file in tarballs

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/716>

4 years agogst: Update for gst_video_transfer_function_*() function renaming
Sebastian Dröge [Mon, 7 Sep 2020 09:13:18 +0000 (12:13 +0300)]
gst: Update for gst_video_transfer_function_*() function renaming

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/715>

4 years agoflvmux: Avoid crash when best pad gets flushed
Jan Alexander Steffens (heftig) [Mon, 31 Aug 2020 13:01:32 +0000 (15:01 +0200)]
flvmux: Avoid crash when best pad gets flushed

The 'best' pad might receive a flush event between us picking it and us
popping the buffer. In this case, the buffer will be missing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/711>

4 years agoflvmux: Correct breaks in gst_flv_mux_find_best_pad
Jan Alexander Steffens (heftig) [Mon, 31 Aug 2020 11:43:42 +0000 (13:43 +0200)]
flvmux: Correct breaks in gst_flv_mux_find_best_pad

The code seems to use `continue` and `break` as if both refer to the
surrounding `while` loop. But because `break` breaks out of the
`switch`, they actually have the same effect.

This may have caused the loop not to terminate when it should. E.g. when
`skip_backwards_streams` drops a buffer we should abort the aggregation
and wait for all pads to be filled again. Instead, we might have just
selected a subsequent pad as our new "best".

Replace `break` with `done = TRUE; break`, and `continue` with `break`.
Then simplify the code a bit.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/710>

4 years agogstqmlgl: build on Windows with qmake without pkgconfig; update instructions on build...
Dmitriy Purgin [Wed, 13 May 2020 09:31:38 +0000 (11:31 +0200)]
gstqmlgl: build on Windows with qmake without pkgconfig; update instructions on building for Windows

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/591>

4 years agomeson: fix build failure if orc is enabled but none of its users are
Philipp Zabel [Fri, 21 Aug 2020 10:12:48 +0000 (12:12 +0200)]
meson: fix build failure if orc is enabled but none of its users are

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/704>

4 years agortpL16depay: unref buffer on error
Zeid Bekli [Thu, 20 Aug 2020 12:26:04 +0000 (14:26 +0200)]
rtpL16depay: unref buffer on error

gst_rtp_L16_depay_process to unref buffer on wrong payload size or
reorder failure.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/702>

4 years agoRelease 1.17.90
Tim-Philipp Müller [Thu, 20 Aug 2020 15:11:58 +0000 (16:11 +0100)]
Release 1.17.90

4 years agortputils: Don't call NULL GstMeta transform function
Sebastian Dröge [Tue, 18 Aug 2020 07:27:52 +0000 (10:27 +0300)]
rtputils: Don't call NULL GstMeta transform function

It's optional and if it does not exist then no transformation is
possible.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/701>

4 years agortp: Do not register rtpreddec and rtpredenc twice
Julian Bouzas [Thu, 13 Aug 2020 19:27:25 +0000 (15:27 -0400)]
rtp: Do not register rtpreddec and rtpredenc twice

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/699>

4 years agortpmanager: Improve readability of "stats" docs by making the fields an actual list
Sebastian Dröge [Wed, 12 Aug 2020 09:21:43 +0000 (12:21 +0300)]
rtpmanager: Improve readability of "stats" docs by making the fields an actual list

Otherwise they end up all in the same line one after another.

Also add docs for the "avg-jitter" stats field of the jitterbuffer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/698>

4 years agov4l2h264codec: Map newly defined profile/levels
Nicolas Dufresne [Tue, 11 Aug 2020 21:24:11 +0000 (17:24 -0400)]
v4l2h264codec: Map newly defined profile/levels

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/697>

4 years agov4l2: Sync headers with kernel 5.9
Nicolas Dufresne [Tue, 11 Aug 2020 21:18:42 +0000 (17:18 -0400)]
v4l2: Sync headers with kernel 5.9

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/697>

4 years agov4l2: use GstV4l2Error in gst_v4l2_open()
Víctor Manuel Jáquez Leal [Thu, 6 Aug 2020 11:15:10 +0000 (13:15 +0200)]
v4l2: use GstV4l2Error in gst_v4l2_open()

gst_v4l2_open() is called by gst_v4l2_device_provider_probe_device(),
where the GstV4l2Object is created without an associated GstElement.

If gst_v4l2_open() fails, it raises a bus message, but without an
element, a precondition check fails on
gst_element_message_full_with_details() generating a crash if running
with fatal-warnings debug mode.

GstV4l2Error is a helper to raise error bus messages when it is
appropiated. This patch changes the direct bus messages to this
helper, and the elements will actually send the error message.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/694>

4 years agoflvmux: Return NEED_DATA when we drop a buffer
Vivia Nikolaidou [Mon, 10 Aug 2020 17:20:53 +0000 (20:20 +0300)]
flvmux: Return NEED_DATA when we drop a buffer

When we are dropping a buffer in find_best_pad (e.g. waiting for a
keyframe, or skipping backwards timestamp), return
GST_AGGREGATOR_FLOW_NEED_DATA to make sure we have enough data at the
next run. Otherwise, a stream that accidentally fell behind (e.g.
relinking race, or just waiting for a keyframe) will never get the
opportunity to catch up to the other one, because the other one will
always keep advancing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/696>

4 years agoflvmux: Return NEED_DATA when no best pad is found
Vivia Nikolaidou [Mon, 10 Aug 2020 17:20:04 +0000 (20:20 +0300)]
flvmux: Return NEED_DATA when no best pad is found

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/696>

4 years agoflvmux: Fix possible crash on GST_ITERATOR_RESYNC
Vivia Nikolaidou [Mon, 10 Aug 2020 17:17:38 +0000 (20:17 +0300)]
flvmux: Fix possible crash on GST_ITERATOR_RESYNC

Wrong pointer type

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/696>

4 years agoqmlgloverlay: fix multiple elements with Qt 5.15
Matthew Waters [Mon, 10 Aug 2020 05:49:55 +0000 (15:49 +1000)]
qmlgloverlay: fix multiple elements with Qt 5.15

With Qt 5.15 multiple qmlgloverlay elements would produce:

ASSERT: "!m_gl->property(QSG_RENDERCONTEXT_PROPERTY).isValid()" in file /path/to/qt5/qtdeclarative/src/quick/scenegraph/qsgdefaultrendercontext.cpp, line 121

Workaround by setting the (seeminigly unused) property before
initialization.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/695>

4 years agortph26[45]pay: Change default aggregate-mode to "none" for backwards compatibility
Sebastian Dröge [Wed, 5 Aug 2020 07:41:33 +0000 (10:41 +0300)]
rtph26[45]pay: Change default aggregate-mode to "none" for backwards compatibility

We didn't aggregate at all in previous versions and there are apparently
various RTP implementations that don't handle aggregation well at all.

As part of this also document that for RTSP it is recommended to keep it
set to "none" while for WebRTC it should be set to "zero-latency".

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/692>

4 years agobuild: update for gl pkg-config file split
Matthew Waters [Fri, 24 Jul 2020 06:58:34 +0000 (16:58 +1000)]
build: update for gl pkg-config file split

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/680>

4 years agosplitmuxsink: Make sure flushing doesn't block
Jan Alexander Steffens (heftig) [Fri, 31 Jul 2020 11:50:13 +0000 (13:50 +0200)]
splitmuxsink: Make sure flushing doesn't block

* Trying to disconnect a stream from a running splitmuxsink by flushing
  it results in the FLUSH_START blocking in the stream queue's
  gst_pad_pause_task because the flush did not unblock
  complete_or_wait_on_out, so add a check for ctx->flushing there.

* Add a GST_SPLITMUX_BROADCAST_INPUT so check_completed_gop notices
  flushing changed and the incoming push is unblocked.

* Pass the FLUSH_STOP along to the muxer without waiting.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/687>

4 years agoimagefreeze: Wait until we have a clock
Vivia Nikolaidou [Tue, 4 Aug 2020 12:49:43 +0000 (15:49 +0300)]
imagefreeze: Wait until we have a clock

Otherwise it can happen that it tries to get the clock in PAUSED state
in live mode, which does not exist.

Thanks to Sebastian Dröge for helping debugging.

Fixes #775

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/691>

4 years agoqtdemux: extract bit depth from codec data for ALAC
Tim-Philipp Müller [Fri, 31 Jul 2020 10:05:02 +0000 (11:05 +0100)]
qtdemux: extract bit depth from codec data for ALAC

The info in the sound sample description might not be
accurate if it's an older version atom.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/686>

4 years agoauparse: fix compiler warnings
Jordan Petridis [Tue, 28 Jul 2020 15:46:30 +0000 (18:46 +0300)]
auparse: fix compiler warnings

GCC 10 was complaining like following. It really is complaining about default cases returning
with potentially unitialized *desval, but those cases in the switch should never be hit.

```
 ../subprojects/gst-plugins-good/gst/auparse/gstauparse.c: In function 'gst_au_parse_chain':
../subprojects/gst-plugins-good/gst/auparse/gstauparse.c:481:37: error: 'timestamp' may be used uninitialized in this function [-Werror=maybe-uninitialized]
  481 |       GST_BUFFER_TIMESTAMP (outbuf) = timestamp;
../subprojects/gst-plugins-good/gst/auparse/gstauparse.c:482:36: error: 'duration' may be used uninitialized in this function [-Werror=maybe-uninitialized]
  482 |       GST_BUFFER_DURATION (outbuf) = duration;
../subprojects/gst-plugins-good/gst/auparse/gstauparse.c:480:34: error: 'offset' may be used uninitialized in this function [-Werror=maybe-uninitialized]
  480 |       GST_BUFFER_OFFSET (outbuf) = offset;
cc1: all warnings being treated as errors
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/671>

4 years agortspsrc: drop stream-start message posted by the internal udp sink(s)
George Kiagiadakis [Wed, 29 Jul 2020 11:06:55 +0000 (14:06 +0300)]
rtspsrc: drop stream-start message posted by the internal udp sink(s)

See #1368

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/685>

4 years agotests: qtdemux: test correct pad names are created
Hosang Lee [Wed, 22 Jul 2020 07:24:15 +0000 (16:24 +0900)]
tests: qtdemux: test correct pad names are created

Test correct pad names are created in accordance to their media type
in mss mode.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/628>

4 years agoqtdemux: create correct pad names in encrypted streams
Hosang Lee [Tue, 16 Jun 2020 08:23:44 +0000 (17:23 +0900)]
qtdemux: create correct pad names in encrypted streams

Refer to "original-media-type" when setting stream's subtype
for encrypted streams in mss mode.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/628>

4 years agomatroskamux: Do caps renegotiation when it only adds fields
Thibault Saunier [Wed, 22 Jul 2020 18:31:13 +0000 (14:31 -0400)]
matroskamux: Do caps renegotiation when it only adds fields

Matroskamux can accept caps renegotiation if the new caps is a
superset of the old one, meaning upstream added new info to
the caps.

Same logic as a5f22f03aa25b04726f78ae619f40b3b648f7d48 in qtmux.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/678>

4 years agortpfunnel: protect internal srccaps with lock
Tim-Philipp Müller [Fri, 24 Jul 2020 13:02:26 +0000 (14:02 +0100)]
rtpfunnel: protect internal srccaps with lock

These are modified from sink pad event handlers, so
could be accessed from multiple threads at the same
time.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/681>

4 years agortpfunnel: copy caps before sending them in a caps-event
Havard Graff [Sun, 23 Feb 2020 22:44:16 +0000 (23:44 +0100)]
rtpfunnel: copy caps before sending them in a caps-event

Reason being we don't want downstream to own a ref to our
internal caps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/681>

4 years agortpmanager: fix various documentation issues
Mathieu Duponchelle [Mon, 27 Jul 2020 13:41:26 +0000 (15:41 +0200)]
rtpmanager: fix various documentation issues

Improper naming of properties, improper links, misc

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/684>

4 years agorpicamsrc: hypothetical fix for data pointer calculation
Tim-Philipp Müller [Fri, 24 Jul 2020 16:13:04 +0000 (17:13 +0100)]
rpicamsrc: hypothetical fix for data pointer calculation

mmal buffer header docs say data is valid for length bytes
from offset. In practice offset always seems to be 0 so
far though.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/682>

4 years agorpicamsrc: mark buffers as header and keyframe/delta-unit
Tim-Philipp Müller [Fri, 24 Jul 2020 15:35:43 +0000 (16:35 +0100)]
rpicamsrc: mark buffers as header and keyframe/delta-unit

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/682>

4 years agorpicamsrc: fix nal alignment of output buffers
Tim-Philipp Müller [Fri, 24 Jul 2020 15:14:00 +0000 (16:14 +0100)]
rpicamsrc: fix nal alignment of output buffers

We claim output buffers are nal-aligned, but that wasn't
actually true: We would push out a partial nal in case
the nal doesn't fit into the max encoder-selected output
buffer size, and then the next buffer would not start
with a sync marker. That's not right and makes h264parse
unhappy.

Instead accumulate buffers until we have a full frame
(we can't rely on the NAL_END flag, it's always set).

Fixes #768

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/682>

4 years agorpicamsrc: fix "Could not find component vc.ril.camera" on recent raspios
Tim-Philipp Müller [Mon, 13 Jul 2020 22:43:48 +0000 (23:43 +0100)]
rpicamsrc: fix "Could not find component vc.ril.camera" on recent raspios

Make extra sure all the required mmal libs such as libmmal_vc_client.so
actually get linked and stay linked. Otherwise the above error happens
it seems.

buster (10.4) with meson 0.55 and pi ref 2020-05-27
pi-gen, 825107f04027269db77426046f5085475b1ea22f, stage5

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/682>

4 years agorpicamsrc: deviceprovider: hook up i18n properly
Tim-Philipp Müller [Mon, 13 Jul 2020 16:01:42 +0000 (17:01 +0100)]
rpicamsrc: deviceprovider: hook up i18n properly

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/682>

4 years agorpicamsrc: deviceprovider: advertise (M)JPEG as well
Tim-Philipp Müller [Mon, 13 Jul 2020 15:55:48 +0000 (16:55 +0100)]
rpicamsrc: deviceprovider: advertise (M)JPEG as well

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/682>

4 years agorpicamsrc: deviceprovider: also advertise constrained-baseline profile
Tim-Philipp Müller [Mon, 13 Jul 2020 15:50:58 +0000 (16:50 +0100)]
rpicamsrc: deviceprovider: also advertise constrained-baseline profile

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/682>

4 years agomeson: add a plugin summary
Stéphane Cerveau [Thu, 23 Jul 2020 14:58:00 +0000 (16:58 +0200)]
meson: add a plugin summary

This summary displays a list of plugins which
have been enabled.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/679>

4 years agov4l2: enhance v4l2 control interface to support string type CID
Haihua Hu [Wed, 22 Jul 2020 01:46:47 +0000 (09:46 +0800)]
v4l2: enhance v4l2 control interface to support string type CID

add string type cid support for v4l2 implementation

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/676>

4 years agoqtdemux: add Dolby Vision fourcc
Stéphane Cerveau [Wed, 1 Jul 2020 13:17:47 +0000 (15:17 +0200)]
qtdemux: add  Dolby Vision fourcc

This identifiers are registered in the MPEG-RA and defined
to be used by the Dolby Vision AVC/HEVC streams.

This is a first step to present the stream to the decoder.
Additional box parsing of DOVIConfigurationBox is necessary
to complete the media presentation with proper Dolby Vision
enhancements.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/658>

4 years agoimagefreeze: Copy GstCapsFeatures to caps for source pad
Luke Yelavich [Sun, 17 May 2020 05:51:09 +0000 (15:51 +1000)]
imagefreeze: Copy GstCapsFeatures to caps for source pad

Allows using imagefreeze with buffers in GLMemory. The following pipeline
works.

gst-launch-1.0 filesrc location=image.jpg ! jpegdec ! glupload ! \
imagefreeze ! glcolorconvert ! glimagesinkelement

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/594>

4 years agortpmanager: fix "redefinition of typedef RTPTWCCManager" compiler warning
Tim-Philipp Müller [Mon, 20 Jul 2020 17:20:59 +0000 (18:20 +0100)]
rtpmanager: fix "redefinition of typedef RTPTWCCManager" compiler warning

G_DECLARE_FINAL_TYPE includes this typedef as well.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/675>

4 years agortp*pay: Allocate using the base class for audio codecs
Olivier Crête [Fri, 17 Jul 2020 20:39:25 +0000 (16:39 -0400)]
rtp*pay: Allocate using the base class for audio codecs

This is required to add RTP header extensions from the
meta automatically.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/674>