platform/upstream/gstreamer.git
3 years agov4l2src: Calculate framerate from DV timings
Nicolas Dufresne [Wed, 10 Feb 2021 21:37:01 +0000 (16:37 -0500)]
v4l2src: Calculate framerate from DV timings

And use this framerate in our preference. Note that we also flush
the probed caps as it seems that the format enumeration may change
when a new source change event get triggered.

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

3 years agov4l2rc: Add DV_TIMINGS query and locking
Nicolas Dufresne [Wed, 10 Feb 2021 20:52:55 +0000 (15:52 -0500)]
v4l2rc: Add DV_TIMINGS query and locking

This adds support to DV_TIMINGS query and locking. The timing width and
height is then used as a preference.

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

3 years agov4l2src: Force renegotiation on resolution change
Nicolas Dufresne [Wed, 10 Feb 2021 20:49:03 +0000 (15:49 -0500)]
v4l2src: Force renegotiation on resolution change

As mandated by the specification, make sure to cycle through streamoff
/ streamon regardless if the caps have changed or not.

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

3 years agov4l2object: Remove unused streaming member
Nicolas Dufresne [Wed, 10 Feb 2021 19:52:14 +0000 (14:52 -0500)]
v4l2object: Remove unused streaming member

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

3 years agov4l2src: Refactor to use PreferredCapsInfo structure
Nicolas Dufresne [Wed, 10 Feb 2021 15:48:48 +0000 (10:48 -0500)]
v4l2src: Refactor to use PreferredCapsInfo structure

Avoid passing around a bare structure for the preference, this removes
the need to copy and free that structure and simplify the code. Also
fix a type in the structure name, Prefered -> Preferred.

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

3 years agov4l2src: Stub preferred resolution support
Nicolas Dufresne [Mon, 8 Feb 2021 22:27:20 +0000 (17:27 -0500)]
v4l2src: Stub preferred resolution support

This stubs the ability to use preferred resolution from digital
video timings, analog TV standards or driver reported native
resolution.

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

3 years agov4l2: Subscribe source_change for the current input
Nicolas Dufresne [Tue, 9 Feb 2021 19:44:02 +0000 (14:44 -0500)]
v4l2: Subscribe source_change for the current input

When we subscribe for source-change event, we need to specify for which
input. Make sure we subscribe for the current input.

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

3 years agov4l2src: Add input signal status detection
Nicolas Dufresne [Mon, 8 Feb 2021 22:26:20 +0000 (17:26 -0500)]
v4l2src: Add input signal status detection

As part of the support to select a preferred size, we can also
detect the signal status. This is a split patch so that feature
is separated to ease review.

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

3 years agov4l2: Add helper to query input status
Nicolas Dufresne [Mon, 8 Feb 2021 22:24:00 +0000 (17:24 -0500)]
v4l2: Add helper to query input status

This is a wrapper around ENUM_INPUT renamed for readability.

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

3 years agov4l2: Fix input/output index sign
Nicolas Dufresne [Mon, 8 Feb 2021 22:22:37 +0000 (17:22 -0500)]
v4l2: Fix input/output index sign

This is an unsigned integer in the kernel API.

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

3 years agov4l2src: Add source resolution change support
Nicolas Dufresne [Thu, 4 Feb 2021 21:59:44 +0000 (16:59 -0500)]
v4l2src: Add source resolution change support

This patch adds support for source resolution change detection.
Resolution change is signaled by drivers when a change in the detected
signal have been detected. This is notably seen on HDMI receivers.

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

3 years agov4l2bufferpool: Handle resolution change event
Nicolas Dufresne [Thu, 4 Feb 2021 19:13:32 +0000 (14:13 -0500)]
v4l2bufferpool: Handle resolution change event

This patch adds the detection, dequeuing and reporting of the SOURCE_CHANGE
event when the CH_RESOLUTION flag is set. The acquire function will now return
a new custom success called GST_V4L2_FLOW_RESOLUTION_CHANGE. In order to use
this new feature, elements must enable it by calling:

  gst_v4l2_buffer_pool_enable_resolution_change (pool);

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

3 years agov4l2object: Add event helpers
Nicolas Dufresne [Thu, 4 Feb 2021 16:01:38 +0000 (11:01 -0500)]
v4l2object: Add event helpers

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

3 years agov4l2bufferpool: use FLOW_LAST_BUFFER
Nicolas Dufresne [Thu, 4 Feb 2021 15:10:34 +0000 (10:10 -0500)]
v4l2bufferpool: use FLOW_LAST_BUFFER

This uses the GST_V4L2_FLOW_LAST_BUFFER alias instead of
GST_FLOW_CUSTOM_SUCCESS to make the code more readable.

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

3 years agov4l2object: prefer NV12 over I420
Lucas Stach [Mon, 10 Dec 2018 13:10:05 +0000 (14:10 +0100)]
v4l2object: prefer NV12 over I420

Considering NV12 an 'odd' format is a historical artifact. This format
is now quite common, and usually preferable to I420 due to more memory
friendly access patterns.

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

3 years agowavparse: fix seeking in READY state
Guillaume Desmottes [Thu, 18 Feb 2021 09:34:25 +0000 (10:34 +0100)]
wavparse: fix seeking in READY state

wavparse claims to be able to support seeking in the READY state by
saving the pending seek event and actually seeking later after having parsed the
header.
Problem was that this seek event was reset on the READY to PAUSED
transition, making all this code useless. Fixing it by stop resetting
on READY to PAUSED transition as we already reset on PAUSED to READY
and when initiating the element.

Note that DTS marker detection isn't support in such scenario as
gst_type_find_helper_for_buffer() needs a buffer containing the
beginning of the stream.

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

3 years agotests: wavparse: factor out create_pipeline()
Guillaume Desmottes [Thu, 18 Feb 2021 09:05:03 +0000 (10:05 +0100)]
tests: wavparse: factor out create_pipeline()

No semantic change.

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

3 years agodocs: update plugins cache with new h264 / vp8 depay properties
Mathieu Duponchelle [Wed, 17 Feb 2021 23:34:02 +0000 (00:34 +0100)]
docs: update plugins cache with new h264 / vp8 depay properties

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

3 years agortph264depay: expose request-keyframe property
Mathieu Duponchelle [Wed, 9 Dec 2020 00:40:45 +0000 (01:40 +0100)]
rtph264depay: expose request-keyframe property

When set, the depayloader will request new keyframes on packet
loss

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

3 years agortpvp8depay: expose request-keyframe property
Mathieu Duponchelle [Wed, 9 Dec 2020 00:34:20 +0000 (01:34 +0100)]
rtpvp8depay: expose request-keyframe property

When set, the depayloader will request new keyframes on packet
loss

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

3 years agortph264depay: expose wait-for-keyframe property
Mathieu Duponchelle [Wed, 9 Dec 2020 00:24:57 +0000 (01:24 +0100)]
rtph264depay: expose wait-for-keyframe property

Similar to rtpvp8depay, when packet loss occurs, the depayloader
starts waiting for a keyframe.

We try to only stop waiting when all the packets for the new keyframe
have been received, by only resetting waiting_for_keyframe when
encountering the first packet of a keyframe, this is slightly
fragile because there is no bit that explicitly marks the start
of an access unit, so we rely on the existing picture_start
detection code.

As a consequence, the property is only meaningful when outputting
access units, and is ignored when outputting NALs directly.

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

3 years agovideomixer: document as deprecated
Mathieu Duponchelle [Wed, 17 Feb 2021 23:36:43 +0000 (00:36 +0100)]
videomixer: document as deprecated

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

3 years agowavenc: Fixed INFO chunk corruption, caused by odd sized data not being padded. Code...
Ashley Brighthope [Tue, 16 Feb 2021 11:20:17 +0000 (22:20 +1100)]
wavenc: Fixed INFO chunk corruption, caused by odd sized data not being padded. Code style was updated.

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

3 years agortpopuspay: add info regarding (non-standard) multichannel support
Jakub Adam [Mon, 7 Dec 2020 18:51:35 +0000 (19:51 +0100)]
rtpopuspay: add info regarding (non-standard) multichannel support

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

3 years agodocs: update plugins cache for rtpopus
Jakub Adam [Mon, 7 Dec 2020 15:50:01 +0000 (16:50 +0100)]
docs: update plugins cache for rtpopus

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

3 years agotests: add rtpopus multichannel test cases
Jakub Adam [Tue, 1 Dec 2020 19:09:58 +0000 (20:09 +0100)]
tests: add rtpopus multichannel test cases

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

3 years agortpopusdepay: support libwebrtc-compatible multichannel payload
Jakub Adam [Tue, 1 Dec 2020 15:43:32 +0000 (16:43 +0100)]
rtpopusdepay: support libwebrtc-compatible multichannel payload

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

3 years agortpopuspay: support libwebrtc-compatible multichannel payload
Jakub Adam [Mon, 30 Nov 2020 20:49:48 +0000 (21:49 +0100)]
rtpopuspay: support libwebrtc-compatible multichannel payload

When the audio has more than 2 channels, add optional fields to output
caps from which webrtcbin can generate SDP in the syntax recognized by
"multiopus" codec present in libwebrtc [1].

e.g. for 5.1 audio:

a=rtpmap:96 multiopus/48000/6
a=fmtp:96 num_streams=4;coupled_streams=2;channel_mapping=0,4,1,2,3,5

[1] https://webrtc-review.googlesource.com/c/src/+/129768

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

3 years agortpopuspay: make use of gst_rtp_base_payload_set_outcaps_structure()
Jakub Adam [Mon, 30 Nov 2020 21:10:14 +0000 (22:10 +0100)]
rtpopuspay: make use of gst_rtp_base_payload_set_outcaps_structure()

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

3 years agoeffectv: Remove redundant license file
Olivier Crête [Wed, 10 Feb 2021 00:31:28 +0000 (19:31 -0500)]
effectv: Remove redundant license file

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

3 years agoApply 1 suggestion(s) to 1 file(s)
Kevin Song [Fri, 5 Feb 2021 00:55:12 +0000 (00:55 +0000)]
Apply 1 suggestion(s) to 1 file(s)

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

3 years agoApply 1 suggestion(s) to 1 file(s)
Kevin Song [Fri, 5 Feb 2021 00:55:04 +0000 (00:55 +0000)]
Apply 1 suggestion(s) to 1 file(s)

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

3 years agov4l2videoenc: support resolution change stream encode.
Bing Song [Thu, 4 Feb 2021 05:43:17 +0000 (13:43 +0800)]
v4l2videoenc: support resolution change stream encode.

Resolution change stream transcoding will drain before send new video
frame buffer. Need encode video frame after process EOS.

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

3 years agoqtdemux: added support for cbcs encryption scheme
Xabier Rodriguez Calvar [Thu, 4 Feb 2021 10:44:53 +0000 (11:44 +0100)]
qtdemux: added support for cbcs encryption scheme

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

3 years agortp: add rtphdrextrfc6464
Guillaume Desmottes [Thu, 21 Jan 2021 17:04:58 +0000 (18:04 +0100)]
rtp: add rtphdrextrfc6464

Header Extension for Client-to-Mixer Audio Level Indication as
defined in RFC 6464.

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

3 years agolevel: add GstRTPAudioLevelMeta on buffers
Guillaume Desmottes [Tue, 16 Jun 2020 10:01:30 +0000 (12:01 +0200)]
level: add GstRTPAudioLevelMeta on buffers

This meta can be used by a RTP payloader to send the level information
to the peer.

Part of https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/446

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

3 years agodeinterlace: Provide documentation for GST_DEINTERLACE_BUFFER_STATE
Robert Swain [Wed, 3 Feb 2021 15:10:20 +0000 (17:10 +0200)]
deinterlace: Provide documentation for GST_DEINTERLACE_BUFFER_STATE

More information available in
https://gstconf.ubicast.tv/videos/interlacing-and-telecine-in-gstreamer/

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

3 years agodeinterlace: Fix telecine/onefield mixup
Vivia Nikolaidou [Sat, 30 Jan 2021 14:16:13 +0000 (16:16 +0200)]
deinterlace: Fix telecine/onefield mixup

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

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

3 years agodeinterlace: Better alternate support
Vivia Nikolaidou [Sat, 30 Jan 2021 13:49:23 +0000 (15:49 +0200)]
deinterlace: Better alternate support

Improve line offset halving based on whether this field is top or
bottom.

Also handle the buffer state the same as mixed.

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

3 years agov4l2h265codec: fix HEVC profile string issue.
Bing Song [Wed, 13 Jan 2021 17:12:06 +0000 (01:12 +0800)]
v4l2h265codec: fix HEVC profile string issue.

Keep HEVC profile compatible with other module.

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

3 years agov4l2object: Need keep same transfer as input caps.
Bing Song [Tue, 15 Dec 2020 02:41:40 +0000 (10:41 +0800)]
v4l2object: Need keep same transfer as input caps.

GST_VIDEO_TRANSFER_BT2020_12 and GST_VIDEO_TRANSFER_BT2020_10 will
be mapped to V4L2_XFER_FUNC_709. Need check input caps when map
V4L2_XFER_FUNC_709 back to GST_VIDEO_TRANSFER_BT2020_12 and
GST_VIDEO_TRANSFER_BT2020_10

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/816
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/841>

3 years agortspsrc: Do not wait for response while flushing
Tobias Ronge [Mon, 7 Dec 2020 09:01:53 +0000 (10:01 +0100)]
rtspsrc: Do not wait for response while flushing

Due to the may_cancel flag in GstRTSPConnection, receiving might not get
cancelled when supposed to. In this case, gst_rtsp_src_receive_response
will have to wait until timeout instead but if busy receiving RTP
data, this timeout will never occur.

With this patch, gst_rtsp_src_receive_response returns GST_RTSP_EINTR
if flushing is set to TRUE instead of continuing to receive.

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

3 years agomeson: allow libdv subproject fallback
Tim-Philipp Müller [Thu, 14 Jan 2021 19:13:03 +0000 (19:13 +0000)]
meson: allow libdv subproject fallback

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

3 years agoqtdemux: Allow streams with no specified protection system ID
Xabier Rodriguez Calvar [Mon, 21 Dec 2020 12:55:58 +0000 (13:55 +0100)]
qtdemux: Allow streams with no specified protection system ID

This is necessary in cases like CMAF where there won't be any events
passing thru.

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

3 years agov4l2object: Map correct video format for RGBA
Hou Qi [Thu, 7 Jan 2021 08:57:27 +0000 (16:57 +0800)]
v4l2object: Map correct video format for RGBA

Map V4L2_PIX_FMT_RGBA32 pixel format to GST_VIDEO_FORMAT_RGBA instead of
GST_VIDEO_FORMAT_RGB video format to support RGBA.

Fixes #823

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

3 years agoudpsrc: Fix marker links
Sanchayan Maity [Sat, 2 Jan 2021 07:36:16 +0000 (13:06 +0530)]
udpsrc: Fix marker links

These should be with a single ':'. The double '::' results in a CI with
build failure message like below.

ERROR: [links]: (mandatory-link-not-found): Mandatory link Link GstSocketTimestamp -> None (GstSocketTimestamp) could not be resolved
ERROR: [check-missing-since-markers]: (missing-since-marker): Missing since marker for udpsrc:socket-timestamp
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/828>

3 years agoudpsrc: Allow use of socket control message timestamps for DTS
Sanchayan Maity [Thu, 17 Dec 2020 05:54:07 +0000 (11:24 +0530)]
udpsrc: Allow use of socket control message timestamps for DTS

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

3 years agovideoflip: fix possible crash when setting the video-direction while running
Matthew Waters [Wed, 9 Dec 2020 09:20:18 +0000 (20:20 +1100)]
videoflip: fix possible crash when setting the video-direction while running

A classic case of not enough locking.

One interesting thing with this is the interaction between the
rotation value and caps negotiation.  i.e. the width/height of the caps
can be swapped depending on the video-direction property.  We can't lock
the entirety of the caps negotiation for obvious reasons so we need to
do something else.  This takes the approach of trying to use a single
rotation value throughout the entirety of the negotiation and then
subsequent output frame in a kind of latching sequence.

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/792
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/836>

3 years agotests: add tests for videoflip
Matthew Waters [Wed, 9 Dec 2020 08:49:47 +0000 (19:49 +1100)]
tests: add tests for videoflip

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

3 years agodeinterlace: force -DPREFIX on macos
Ignacio Casal Quinteiro [Wed, 30 Dec 2020 12:38:46 +0000 (13:38 +0100)]
deinterlace: force -DPREFIX on macos

This is due to a bug in meson where it will not detect properly
the compiler if the symbols need an undercore.
https://github.com/mesonbuild/meson/issues/5482

Fixes #821

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

3 years agortspsrc: Use proper types instead of G_TYPE_POINTER for the RTSP messages in the...
Sebastian Dröge [Tue, 15 Dec 2020 09:36:27 +0000 (11:36 +0200)]
rtspsrc: Use proper types instead of G_TYPE_POINTER for the RTSP messages in the "handle-request" signal

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

3 years agosplitmuxsink: Avoid deadlock when releasing a pad from a running muxer
Vivia Nikolaidou [Thu, 10 Dec 2020 12:27:49 +0000 (14:27 +0200)]
splitmuxsink: Avoid deadlock when releasing a pad from a running muxer

Might not drain correctly

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

3 years agov4l2object: Use active resolution during fallback colorspace probe
Hou Qi [Fri, 11 Dec 2020 03:24:14 +0000 (11:24 +0800)]
v4l2object: Use active resolution during fallback colorspace probe

For legacy drivers that don't implement ENUM_FRAMESIZE, use active
resolution to probe colorspace. This can improve the accuracy of the
result when the colorspace depends on the resolution. This fixes a
wrong colorspace issue on board with vendor bsp at resolution 2560x1440.

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

3 years agortpst2022-1-fecdec: don't xor out of bounds
Mathieu Duponchelle [Sat, 12 Dec 2020 03:02:37 +0000 (04:02 +0100)]
rtpst2022-1-fecdec: don't xor out of bounds

When reconstituting packets from a stream with variable packet
sizes, don't xor larger packets past the length of the protected
packet

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

3 years agortpst2022-1-fecenc: memset when reallocating xored payload
Mathieu Duponchelle [Sat, 12 Dec 2020 03:00:41 +0000 (04:00 +0100)]
rtpst2022-1-fecenc: memset when reallocating xored payload

When protecting packets with a variable payload length, we
reallocate the xored payload when needed. It is a good idea
to memset the extended memory to 0 so that we don't xor
data with garbage!

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

3 years agortpst2022-1-fec-*: protect additional RTP header fields
Mathieu Duponchelle [Sat, 12 Dec 2020 02:56:11 +0000 (03:56 +0100)]
rtpst2022-1-fec-*: protect additional RTP header fields

While the standard is a bit vague about whether the padding,
extension and marker bits should be protected:

> The usage, by senders and receivers, of the following bits shall
> be defined by the associated video/audio transport standards:

It is obviously necessary and useful for some formats (eg VP8)
that those indeed be protected.

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

3 years agosplitmuxsink: Unit test - check format/opened/closed sequence
Jan Schmidt [Fri, 11 Dec 2020 16:28:56 +0000 (03:28 +1100)]
splitmuxsink: Unit test - check format/opened/closed sequence

Check the sequence of format-location/fragment-opened/fragment-closed
events is respected. There should be 1 format-location call for each
fragment-opened message, and 1 fragment-closed for each.

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

3 years agosplitmuxsink: Fix for 'reference bytes muxed' check.
Jan Schmidt [Tue, 8 Dec 2020 13:40:52 +0000 (00:40 +1100)]
splitmuxsink: Fix for 'reference bytes muxed' check.

https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/798
introduced a check in the need-new-fragment logic to avoid starting a
new fragment unless there has been some data on the reference stream,
but the check is done against the number of bytes that have been
received on the input, not the number that were released for output
into the current fragment.

Fix the check to remember and test against bytes that have been sent
for output.

This also fixes a problem where starting a new fragment fails to
request a new filename from the format-location signal.

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

3 years agosplitmuxsink: Add debug for fragment opened/closed msgs
Jan Schmidt [Mon, 14 Sep 2020 14:27:24 +0000 (00:27 +1000)]
splitmuxsink: Add debug for fragment opened/closed msgs

When posting fragment-opened and fragment-closed messages,
put a debug statement in the logs

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

3 years agosplitmuxsink: Convert asserts into element errors.
Jan Schmidt [Tue, 18 Aug 2020 06:06:14 +0000 (16:06 +1000)]
splitmuxsink: Convert asserts into element errors.

Change some g_assert into element errors so that they can be
caught and the pipeline shut down.

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

3 years agortpmanager: update for rtp header extensions
Matthew Waters [Fri, 10 Jul 2020 05:36:54 +0000 (15:36 +1000)]
rtpmanager: update for rtp header extensions

Provide an implementation of the transport-wide-cc header extension and
use it in rtpfunnel.

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

3 years agorpicamsrc: add vchostif library as it is required to build successful
Jose Quaresma [Sun, 15 Nov 2020 11:30:07 +0000 (11:30 +0000)]
rpicamsrc: add vchostif library as it is required to build successful

fix: undefined reference to `vc_gencmd'
/usr/src/debug/gstreamer1.0-plugins-good/1.18.1-r0/build/../gst-plugins-good-1.18.1/sys/rpicamsrc/RaspiCamControl.c:1440: undefined reference to `vc_gencmd'

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

3 years agotests/rtp-payloading: Use new AudioFormatInfo::fill_silence function
Marijn Suijten [Wed, 25 Nov 2020 16:51:24 +0000 (17:51 +0100)]
tests/rtp-payloading: Use new AudioFormatInfo::fill_silence function

The function is renamed to be properly associated with AudioFormatInfo
(its instance) instead of AudioFormat (an unrelated enum), see [1] for
the rename itself.

[1]: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/940

3 years agodeinterlace: Enable x86 assembly with nasm on MSVC
Nirbheek Chauhan [Tue, 24 Nov 2020 16:41:50 +0000 (22:11 +0530)]
deinterlace: Enable x86 assembly with nasm on MSVC

We need to remove x86inc.asm from the list of compiled assembly files
because it is not supposed to be compiled separately. It is directly
included by yadif.asm, and it exports no symbols.

The object file was getting ignored on all platforms except on msvc
where it was causing a linker hang when building with debugging
enabled because the object file had no debug symbols (or similar).
We've seen this before in FFmpeg too, which uses nasm:
https://gitlab.freedesktop.org/gstreamer/meson-ports/ffmpeg/-/merge_requests/46

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

3 years agoqml: add some docs on display and contexts
Matthew Waters [Thu, 19 Nov 2020 06:47:21 +0000 (17:47 +1100)]
qml: add some docs on display and contexts

Especially considering some dynamic pipeline scenarios.

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

3 years agorpicamsrc: Added "src->started = FALSE;" to gst_rpi_cam_src_stop
Tim Schneider [Wed, 18 Nov 2020 19:09:24 +0000 (20:09 +0100)]
rpicamsrc: Added "src->started = FALSE;" to gst_rpi_cam_src_stop

Makes the element reusable multiple times after a state change back to READY.
Fixes #105

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

3 years agov4l2: caps negotiate wrong as interlace feature
Bing Song [Thu, 12 Nov 2020 01:32:30 +0000 (09:32 +0800)]
v4l2: caps negotiate wrong as interlace feature

gst_caps_simplify() will move interlace format before normal video
format. It will cause caps negotiate prefer interlaced caps which
isn't expected. Seperate normal caps and interlaced caps and then
merge it will keep prefer progress video format.
Add ARGB/BGRA for interlaced caps.

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

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

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

3 years agortpsession: never send on a non-internal source
Havard Graff [Fri, 13 Nov 2020 20:25:42 +0000 (21:25 +0100)]
rtpsession: never send on a non-internal source

This will end up as a "received" packet, due to the code in
source_push_rtp, which will think this is a packet being received.

Instead drop the packet and hope that either:
1. Something upstream responds to the GstRTPCollision event and changes
   SSRC used for sending.
2. That the application responds to the "on-ssrc-collision" signal, and
   forces the sender (payloader) to change its SSRC.
3. That the BYE sent to the existing user of this SSRC will respond to
   the BYE, and that we timeout this source, so we can continue sending
   using the chosen SSRC.

The test reproduces a scenario where we previously would have sent
on a non-internal source.

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

3 years agortpsource: rewrite timeout-check to avoid underflow
Havard Graff [Fri, 13 Nov 2020 11:39:53 +0000 (12:39 +0100)]
rtpsource: rewrite timeout-check to avoid underflow

If current_time is < collision_timeout, we get an uint64 underflow, and
the check will trigger prematurely.

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

3 years agoaacparse: Fix caps change handling
Vivia Nikolaidou [Fri, 13 Nov 2020 12:58:44 +0000 (14:58 +0200)]
aacparse: Fix caps change handling

In baseparse we set the fixed caps flag on all src pads, therefore the
source pad caps query in get_allowed_caps will return the current caps.
Current caps won't necessarily intersect with the new caps (e.g. sample
rate change). Replace get_allowed_caps with peer_query_caps.

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

3 years agotests: qtdemux: fix typo in caps field
Tim-Philipp Müller [Thu, 12 Nov 2020 23:39:21 +0000 (23:39 +0000)]
tests: qtdemux: fix typo in caps field

timesacle -> timescale

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

3 years agotests: qtdemux: fix crash on 32-bit architectures
Tim-Philipp Müller [Thu, 12 Nov 2020 23:38:21 +0000 (23:38 +0000)]
tests: qtdemux: fix crash on 32-bit architectures

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

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

3 years agortp: ldacpay: Add LDAC RTP payloader
Sanchayan Maity [Mon, 14 Sep 2020 07:42:50 +0000 (13:12 +0530)]
rtp: ldacpay: Add LDAC RTP payloader

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

3 years agoqmlglsink: Keep old buffers around a bit longer if they were bound by QML
Sebastian Dröge [Tue, 3 Nov 2020 13:58:30 +0000 (15:58 +0200)]
qmlglsink: Keep old buffers around a bit longer if they were bound by QML

We don't know exactly when QML will stop using them but it should be
safe to unref them after at least 2 more buffers were bound.

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

3 years agortspsrc: Ensure same group-id used for both TCP/UDP stream-start events
ChrisDuncanAnyvision [Tue, 10 Nov 2020 18:18:12 +0000 (18:18 +0000)]
rtspsrc: Ensure same group-id used for both TCP/UDP stream-start events

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

3 years agortspsrc: Use consistent URI hashed stream-id for UDP and TCP/Interleaved streams
ChrisDuncanAnyvision [Tue, 10 Nov 2020 16:17:23 +0000 (16:17 +0000)]
rtspsrc: Use consistent URI hashed stream-id for UDP and TCP/Interleaved streams

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

3 years agomeson: Enable some MSVC warnings for parity with GCC/Clang
Nirbheek Chauhan [Wed, 4 Nov 2020 13:13:04 +0000 (18:43 +0530)]
meson: Enable some MSVC warnings for parity with GCC/Clang

This makes it easier to do development with MSVC by making it warn
on common issues that GCC/Clang error out for in our CI configuration.

Continuation from https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/223

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

3 years agortpsource: Report for which local SSRC is a remote RB reporting on
Olivier Crête [Fri, 16 Oct 2020 01:42:40 +0000 (21:42 -0400)]
rtpsource: Report for which local SSRC is a remote RB reporting on

This is useful in the Bundle case because there may be multiple local
and remote SSRCs in the same session.

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

3 years agodocs: update plugins cache
Guillaume Desmottes [Thu, 29 Oct 2020 14:58:38 +0000 (15:58 +0100)]
docs: update plugins cache

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

3 years agortp: add rtpisacdepay
Guillaume Desmottes [Fri, 20 Mar 2020 12:15:33 +0000 (13:15 +0100)]
rtp: add rtpisacdepay

Depayload for the iSAC audio codec.

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

3 years agortp: add rtpisacpay
Guillaume Desmottes [Fri, 20 Mar 2020 12:15:33 +0000 (13:15 +0100)]
rtp: add rtpisacpay

Payload for the iSAC audio codec.

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

3 years agoqmlglsink: Set qtitem's implicit width/height
Dinesh Manajipet [Sun, 1 Nov 2020 18:36:49 +0000 (18:36 +0000)]
qmlglsink: Set qtitem's implicit width/height

This can be useful to let the layouts automatically resize qtitem
and also easily query a video's width/height from QML

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

3 years agoflvmux: Release pads via GstAggregator
Sebastian Dröge [Sun, 1 Nov 2020 08:30:27 +0000 (10:30 +0200)]
flvmux: Release pads via GstAggregator

See https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/797

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

3 years agoqtmux: support muxing multiple codec_data for h264/h265
Matthew Waters [Mon, 26 Oct 2020 01:40:49 +0000 (12:40 +1100)]
qtmux: support muxing multiple codec_data for h264/h265

Each codec_data is put into its own SampleTableEntry inside the stsd.

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

3 years agonavseek: add hold_eos property
Stéphane Cerveau [Thu, 29 Oct 2020 13:54:16 +0000 (14:54 +0100)]
navseek: add hold_eos property

This property will tell the element to hold
the EOS event and keep it until the next
keystroke.

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

3 years agosplitmuxsrc: Fix comment in a test
Jan Schmidt [Sat, 31 Oct 2020 01:52:04 +0000 (12:52 +1100)]
splitmuxsrc: Fix comment in a test

Fix a comment in the splitmuxsrc robust muxing test so it
describes the test properly.

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

3 years agosplitmuxsink: Change EOS catching logic.
Jan Schmidt [Sat, 31 Oct 2020 01:49:08 +0000 (12:49 +1100)]
splitmuxsink: Change EOS catching logic.

Add a new state for ending the overall stream, and use it to decide
whether to pass the final EOS message up the bus instead of dropping
it. Fixes a small race that makes the testsuite sometimes not generate
the last fragment(s) sometimes because the wrong EOS gets
allowed through too early.

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

3 years agosplitmuxsink: Don't use the element state lock
Jan Schmidt [Fri, 30 Oct 2020 15:19:07 +0000 (02:19 +1100)]
splitmuxsink: Don't use the element state lock

Using the element state lock to avoid splitmuxsink shutting
down while doing element manipulations can lead to a deadlock on
shutdown if a fragment switch happens at exactly the wrong moment.

Use a private mutex and a shutdown boolean instead.

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

3 years agosplitmuxsink: Don't busy loop on a non-ready pad.
Jan Schmidt [Thu, 29 Oct 2020 16:38:15 +0000 (03:38 +1100)]
splitmuxsink: Don't busy loop on a non-ready pad.

If a pad gets into the check_completed_gop method and then
the underlying conditions change on the reference context,
things could get stuck in a busy loop when the context should
instead jump back out and wait for more data.

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

3 years agosplitmuxsrc: Mark running=false on shutdown.
Jan Schmidt [Thu, 29 Oct 2020 16:36:51 +0000 (03:36 +1100)]
splitmuxsrc: Mark running=false on shutdown.

Make sure that any late gst_element_call_async() callbacks
know that the elements is shutting down and bail out instead
of operating on the element we're trying to stop.

Fixes a spurious test failure in elements_splitmuxsrc

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

3 years agosplitmuxsink: Forward EOS messages from async fragments.
Jan Schmidt [Wed, 28 Oct 2020 15:36:35 +0000 (02:36 +1100)]
splitmuxsink: Forward EOS messages from async fragments.

Re-enable forwarding EOS messages from fragments that are completing
asynchronously, so that splitmuxsink itself won't go EOS until they
are complete. This was disabled to work around a bug in core that
is fixed in
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/683

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

3 years agosplitmuxsink: Never start a new fragment with no reference buffers
Jan Schmidt [Thu, 17 Sep 2020 12:56:01 +0000 (22:56 +1000)]
splitmuxsink: Never start a new fragment with no reference buffers

If there has been no bytes from the reference stream muxed into
the current fragment, then time can't have advanced, there's no
GOP... this fragment would be broken or empty, so wait for some
data on the reference buffer.

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

3 years agoqtmux: Chain up when releasing pad, and fix some locking.
Jan Schmidt [Wed, 28 Oct 2020 15:38:16 +0000 (02:38 +1100)]
qtmux: Chain up when releasing pad, and fix some locking.

Release pads by calling up into aggregator so it can do the right
things. Don't clean up the pad until after that.

 Add some missing locks around some accesses to shared pad state.

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

3 years agortpvp9depay: Improve SVC parsing, aggregate all layers
Stian Selnes [Mon, 13 Aug 2018 13:35:11 +0000 (15:35 +0200)]
rtpvp9depay: Improve SVC parsing, aggregate all layers

- Fix start and end of picture to support multiple layers. Start of
  picture is the first packet of the base layer, while end of picture
  is when the marker bit is set (last packet of the enhancement
  layers).
- All "layers" (aka "frames") of a picture are pushed downstream in a
  single buffer when picture is complete.
- Forgive SID=0 for enhancement layers (invalid, but Chrome and
  Firefox sends it)

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

3 years agortpvp8depay: Send lost events when marker bit is missing
Stian Selnes [Fri, 30 Oct 2020 02:09:48 +0000 (03:09 +0100)]
rtpvp8depay: Send lost events when marker bit is missing

This means the previous frame was incomplete.

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

3 years agortpvp9depay: detect incomplete frames and bail out
Knut Saastad [Wed, 14 Oct 2020 21:17:53 +0000 (23:17 +0200)]
rtpvp9depay: detect incomplete frames and bail out

If a packet with the B bit set arrives but we haven't received
a packet with the marker or E bits set to end the previous frame,
we know the current frame was incomplete.

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

3 years agortpvp9depay: detect incomplete frames and bail out
Knut Saastad [Wed, 14 Oct 2020 21:17:53 +0000 (23:17 +0200)]
rtpvp9depay: detect incomplete frames and bail out

If a packet with the B bit set arrives but we haven't received
a packet with the marker or E bits set to end the previous frame,
we know the current frame was incomplete.

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

3 years agortpvp*depay: possibly forward might-have-been-fec PacketLost events
Mikhail Fludkov [Tue, 13 Oct 2020 23:28:50 +0000 (01:28 +0200)]
rtpvp*depay: possibly forward might-have-been-fec PacketLost events

This is ad adaptation of a Pexip patch for dealing with spurious
GstRTPPacketLost events caused by lost ulpfec packets: as FEC packets
under that scheme are spliced in the same sequence domain as the media
packets, it is not generally possible to determine whether a lost packet
was a FEC packet or a media packet.

When upstreaming pexip's ulpfec patches, we decided to drop all lost
events at the base depayloader level, and where the original patch
from pexip was making use of picture ids and marker bits to determine
whether a packet should be forwarded, this patch makes use of those
to determine whether they should be dropped instead (by removing their
might-have-been-fec field).

Spurious lost events coming out of the depayloader can cause the
decoder to stop decoding until the next keyframe and / or request a new
keyframe, and while this is not desirable it makes sense to forward
that information when we have other means to determine whether a lost
packet was indeed a FEC packet, as is the case with VP8 / VP9 payloads
when they carry a picture id.

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

3 years agortph264depay: Preserve SPS/PPS arrival order.
Jan Schmidt [Tue, 20 Oct 2020 12:22:36 +0000 (23:22 +1100)]
rtph264depay: Preserve SPS/PPS arrival order.

Even if SPS/PPS haven't changed, make sure to move them to the
end of the tracking array if needed, so we always know what the
most recent entries are, in case we need to discard the oldest
when generating codec_data.

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

3 years agortph264depay: Warn when max SPS/PPS are collected in AVC mode.
Jan Schmidt [Fri, 16 Oct 2020 13:05:15 +0000 (00:05 +1100)]
rtph264depay: Warn when max SPS/PPS are collected in AVC mode.

The AVC codec_data has a flaw that it can only accomodate
31 SPS headers, even though H.264 can have 32, and 255 PPS,
when there can be 256 in H.264. When streaming RTP some
clients like to cycle through SPS/PPS ids when changing
configuration and can eventually accumulate a full set.

In that case, we have no choice but to discard one (oldest)
entry, or else the count written into the codec_data is wrong
and downstream decoding failures ensue.

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