Commit graph

19050 commits

Author SHA1 Message Date
Nicolas Dufresne 1094e2548e 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>
2021-02-19 16:02:02 -05:00
Nicolas Dufresne bb1d9b398e 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>
2021-02-19 16:02:02 -05:00
Nicolas Dufresne 4be9bf4085 v4l2object: Add event helpers
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/870>
2021-02-19 16:02:02 -05:00
Nicolas Dufresne 954e38a6b9 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>
2021-02-19 15:22:47 -05:00
Lucas Stach 1b1ad32b90 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>
2021-02-19 13:12:54 -05:00
Guillaume Desmottes 1796f3f5e4 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>
2021-02-18 16:32:24 +01:00
Guillaume Desmottes 4aa39da2d3 tests: wavparse: factor out create_pipeline()
No semantic change.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/879>
2021-02-18 10:38:18 +01:00
Mathieu Duponchelle f07fe93202 docs: update plugins cache with new h264 / vp8 depay properties
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/834>
2021-02-18 01:54:03 +00:00
Mathieu Duponchelle 49de1e6679 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>
2021-02-18 01:54:03 +00:00
Mathieu Duponchelle 20fc6da913 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>
2021-02-18 01:54:03 +00:00
Mathieu Duponchelle 69a43dd00b 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>
2021-02-18 01:54:03 +00:00
Mathieu Duponchelle e71648e214 videomixer: document as deprecated
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/878>
2021-02-18 01:48:24 +01:00
Ashley Brighthope 2a4c63036b 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>
2021-02-17 09:54:40 +02:00
Jakub Adam 5fe0aa03eb rtpopuspay: add info regarding (non-standard) multichannel support
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/832>
2021-02-11 07:46:04 +00:00
Jakub Adam 748a1866af docs: update plugins cache for rtpopus
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/832>
2021-02-11 07:46:04 +00:00
Jakub Adam b105797163 tests: add rtpopus multichannel test cases
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/832>
2021-02-11 07:46:04 +00:00
Jakub Adam 8f6969429d rtpopusdepay: support libwebrtc-compatible multichannel payload
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/832>
2021-02-11 07:46:04 +00:00
Jakub Adam b9ed5c7fa0 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>
2021-02-11 07:46:04 +00:00
Jakub Adam 8b4147c757 rtpopuspay: make use of gst_rtp_base_payload_set_outcaps_structure()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/832>
2021-02-11 07:46:04 +00:00
Olivier Crête 45d105bea2 effectv: Remove redundant license file
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/869>
2021-02-09 19:31:28 -05:00
Kevin Song c63ff9c06c Apply 1 suggestion(s) to 1 file(s)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/868>
2021-02-05 00:55:49 +00:00
Kevin Song fd6c296021 Apply 1 suggestion(s) to 1 file(s)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/868>
2021-02-05 00:55:49 +00:00
Bing Song 025b43e512 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>
2021-02-05 00:55:49 +00:00
Xabier Rodriguez Calvar 61d204ab22 qtdemux: added support for cbcs encryption scheme
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/865>
2021-02-04 12:30:22 +01:00
Guillaume Desmottes 7b7e49de31 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>
2021-02-04 11:12:51 +01:00
Guillaume Desmottes 4b6c3c9a1b 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>
2021-02-04 11:12:47 +01:00
Robert Swain 25f98ab134 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>
2021-02-03 17:10:20 +02:00
Vivia Nikolaidou c7b11482d0 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>
2021-02-03 16:30:15 +02:00
Vivia Nikolaidou 4c4e1b580e 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>
2021-02-03 16:30:15 +02:00
Bing Song 5f00810ee0 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>
2021-01-27 01:22:41 +00:00
Bing Song b87db31fbe 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>
2021-01-18 04:26:04 +00:00
Tobias Ronge 706d91371c 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>
2021-01-15 09:24:51 +00:00
Tim-Philipp Müller c854e6bd39 meson: allow libdv subproject fallback
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/854>
2021-01-14 19:13:03 +00:00
Xabier Rodriguez Calvar c5ebaadf9d 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>
2021-01-14 10:11:10 +01:00
Hou Qi 386b785e48 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>
2021-01-11 09:05:05 +08:00
Sanchayan Maity 79efd372c1 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>
2021-01-04 15:23:22 -05:00
Sanchayan Maity e0b09a1612 udpsrc: Allow use of socket control message timestamps for DTS
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/828>
2021-01-04 15:23:22 -05:00
Matthew Waters db15ec9286 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>
2021-01-04 12:10:12 +00:00
Matthew Waters 35018d67ef tests: add tests for videoflip
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/836>
2021-01-04 12:10:12 +00:00
Ignacio Casal Quinteiro 219b659320 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>
2020-12-30 13:40:35 +01:00
Sebastian Dröge 39c6bc0507 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>
2020-12-21 09:59:43 +00:00
Vivia Nikolaidou 81d2f67ba5 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>
2020-12-16 06:17:08 +00:00
Hou Qi ff1dd307f2 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>
2020-12-14 09:15:18 +08:00
Mathieu Duponchelle 6d4dcb430d 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>
2020-12-12 09:29:15 +00:00
Mathieu Duponchelle 6d98415fd4 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>
2020-12-12 09:29:15 +00:00
Mathieu Duponchelle 081509e030 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>
2020-12-12 09:29:15 +00:00
Jan Schmidt 2d24a45c89 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>
2020-12-12 03:28:56 +11:00
Jan Schmidt d7a9a844f6 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>
2020-12-12 03:28:19 +11:00
Jan Schmidt 67f70af1bb 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>
2020-12-09 01:03:01 +11:00
Jan Schmidt df8b147e75 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>
2020-12-09 01:03:01 +11:00