Commit graph

19305 commits

Author SHA1 Message Date
Mathieu Duponchelle
2c85fd1be9 deinterlace: reduce noise when gst_pad_set_caps fails
It may be that downstream is simply flushing, in which case logging
an error is misleading.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1029>
2021-07-13 06:52:26 +00:00
Mathieu Duponchelle
a6d6e99f59 splitmuxsink: always use factory property when set
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1024>
2021-07-08 02:23:02 +02:00
Yacine Bandou
ce0be27caf qtdemux: No need for new "application/x-cbcs" caps
Instead of using the new "application/x-cbcs" caps, we are just adding
a new structure field "ciphe-mode", to indicate which encryption scheme
is used: "cenc", "cbcs", "cbc1" or "cens".

Similarly for the protection metadata, we add the "cipher-mode" field
to specify the encryption mode with which the buffers are encrypted.

"cenc": AES-CTR (no pattern)
"cbc1": AES-CBC (no pattern)
"cens": AES-CTR (pattern specified)
"cbcs": AES-CBC (pattern specified, using a constant IV)

Currently only "cenc" and "cbcs" are supported.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1013>
2021-07-06 12:12:24 +00:00
Philippe Normand
304a75a67a qt: Fix clang build
The updatePaintNode method is part of the QQuickItem class interface, so needs
to be flagged as overriding the default implementation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/567>
2021-07-05 16:12:57 +01:00
Philippe Normand
5f1b290fe8 qt: Add navigation events support
Currently handles only mouse events.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/567>
2021-07-05 11:44:30 +01:00
Philippe Normand
a9bb6d4572 gtk: Scroll events dispatch support
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/567>
2021-07-05 11:44:30 +01:00
Jan Schmidt
d270fa498c matroskamux: Always write a tags element into seekhead
If there are only stream tags, we still want to write the
tags entry into the seekhead, so that tags can be found
quickly in the player.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1020>
2021-07-02 07:45:07 +00:00
Seungha Yang
adae01e4c3 qtmux: Don't need to update track per GstCaps if it's not changed
Skip GstQTMuxPad::set_caps() call for duplicated caps.
All the processing done in set_caps() method for duplicated caps
are redundant.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1019>
2021-07-02 06:22:41 +00:00
Sebastian Dröge
6e2924ff9c rtpssrcdemux: Remove pads and reset the element also in READY->NULL
Mostly for completeness.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1018>
2021-07-01 13:19:53 +03:00
Sebastian Dröge
c94469339a rtpptdemux: Remove pads also in PAUSED->READY
They're based on per-stream information and that should be reset
whenever going to READY state.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1018>
2021-07-01 13:19:53 +03:00
Jakub Adam
2bd38697ed docs: update plugins cache for vp9enc
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/874>
2021-06-28 16:05:46 +00:00
Jakub Adam
9f1b9fed06 vpx: add enum for adaptive quantization modes
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/874>
2021-06-28 16:05:46 +00:00
Jakub Adam
a5cccf13d4 vp9enc: expose frame-parallel-decoding property
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/874>
2021-06-28 16:05:46 +00:00
Jakub Adam
846ee58cac vp9enc: expose aq-mode property
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/874>
2021-06-28 16:05:46 +00:00
Seungha Yang
e76218c1cb multiudpsink: Fix broken SO_SNDBUF get/set on Windows
SO_SNDBUF has been undefined on Windows because of missing WinSock2.h
include. And don't use native socket functions (e.g., setsockopt())
if code is expected to be built on Windows. We don't link ws2_32.lib
for this plugin.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1016>
2021-06-28 15:32:51 +00:00
Olivier Crête
38e906de5d rtpmanager: Access GstRTPHdrExt fields through accessor
This way, the implementation can be private.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1017>
2021-06-24 14:57:14 -04:00
Jan Schmidt
34a6acede1 qtdemux: Refuse seeks in BYTES format
If downstream tries to seek in BYTES format, don't pass that through
to upstream. The byte positions downstream requests won't make any
sense in the muxed stream. There might be other formats we want to
pass through to upstream, but BYTES is not one of them. If we get a
seeking query about BYTES format, refuse that too.

This fixes a situation where we're playing a fragmented mp4 over http
and qtdemux refuses the initial seek (in TIME format), but then
h264parse/baseparse send a seek in BYTES format and everything falls
apart.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1014>
2021-06-22 18:05:56 +10:00
Nirbheek Chauhan
95f6c31c21 rtph265depay: update codec_data in caps regardless of format
Updating of codec_data in the caps is important to propagate changes
in sps/pps/vps via NALs. Without this, downstream does not renegotiate
when upstream changes resolution.

The comment referring to rtph264pay is from 2015 and is out of date.
rtph264pay stopped doing that in 2017 with commit
dabeed52a9

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1011>
2021-06-16 16:35:07 +05:30
Jordan Petridis
aad9c8a216 doc: update gst_plugins_cache.json
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1006>
2021-06-04 13:56:27 +03:00
Matthew Waters
fbf60a61a0 qtitem: don't potentially leak a large number of buffers
The only other place where these queued buffers are removed, is in
setCaps() but that is not called at all on shutdown so this list of
buffers could not be removed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1004>
2021-06-03 20:33:45 +10:00
Nicolas Dufresne
be83a52db9 jpegenc: Remove arbitrary encoding size limitation
The encoder is happy to encode with sizes less then 16x16, so remove this
arbitrary limitation. This also fixes the fact the sink and src template caps
disagree.

Fixes #888

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/998>
2021-06-02 13:28:18 -04:00
Tim-Philipp Müller
21c90afd92 qtdemux: use g_memdup2() as g_memdup() is deprecated
- atom nodes/bytereader sizes are already checked
- palettes: are fixed/known size

g_memdup() is deprecated since GLib 2.68 and we want to avoid
deprecation warnings with recent versions of GLib.

Also use gst_buffer_new_memdup() instead of _wrapped(g_memdup(),..).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/993>
2021-06-02 17:34:38 +01:00
Tim-Philipp Müller
05854f74c5 matroskademux: use g_memdup2() as g_memdup() is deprecated
- ebml-read: add some sanity checks when going from 64-bit
  to 32-bit length
- matroska-ids: codec_data_size has been checked via
  gst_ebml_read_binary(), is existing allocation.
- matroska-demux: alloc size is from existing allocations

g_memdup() is deprecated since GLib 2.68 and we want to avoid
deprecation warnings with recent versions of GLib.

Also use gst_buffer_new_memdup() instead of _wrapped(g_memdup(),..).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/993>
2021-06-02 17:34:38 +01:00
Tim-Philipp Müller
bf56fd97b6 Use g_memdup2() where available and add fallback for older GLib versions
- png: alloc size variable is a png type that's always 32-bit
- vpx: alloc size based on existing allocation
- wavpack: alloc size based on existing allocation
- icles: gdkpixbufoverlay: trusted and hard-coded input data
- rtp tests: rtp-payloading, vp8, vp9, h264, h265: trusted and/or static input data

g_memdup() is deprecated since GLib 2.68 and we want to avoid
deprecation warnings with recent versions of GLib.

Also use gst_buffer_new_memdup() instead of _wrapped(g_memdup(),..)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/993>
2021-06-02 17:34:38 +01:00
Tim-Philipp Müller
af3527ce24 Back to development 2021-06-01 15:28:36 +01:00
Tim-Philipp Müller
0dcb2aaadc Release 1.19.1 2021-06-01 00:11:46 +01:00
Tim-Philipp Müller
aa4448cdd6 rtpjpegpay: fix image corruption when compiled with MSVC on Windows
On Windows with MSVC, jpeg_header_size would end up 2 bytes larger
than it should be. This then leads to the first 2 bytes of the
actual jpeg image data to be dropped, because we think those
belong to the header, which results in an undecodable image when
reconstructed in the depayloader.

What happens is that when the compiler evaluates

  jpeg_header_size = mem.offset + read_u16_and_inc_offset_by_2(&mem);

it actually uses the mem.offset value after it has been increased
by the function call on the right hand size of the equation.

From section 6.5 of the C99 spec:

  3. The grouping of operators and operands is indicated by the syntax [74].
     Except as specified later (for the function-call (), &&, ||, ?:, and
     comma operators), the order of evaluation of subexpressions and the
     order in which side effects take place are both unspecified.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/999>
2021-05-29 14:31:34 +01:00
Hou Qi
f4049fc292 v4l2videoenc: Set default latency if the frame duration is invalid
If the duration of the v4l2object is invalid, use default 25fps instead.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/996>
2021-05-28 11:54:53 +00:00
Seungha Yang
80567ca939 deinterlace: Drop "field-order" field while transforming caps
Like other basetransform subclasses are doing, drop field
which can be converted by deinterlace.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/997>
2021-05-27 12:58:30 +00:00
Seungha Yang
9a8aea4a6a deinterlace: Drop field-order field if outputting progressive
Progressive with field-order doesn't make sense

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/997>
2021-05-27 12:58:30 +00:00
Havard Graff
26c94af2ea rtpssrcdemux: fix "data flow before segment event" crash
This crash could happen at any time a RTP and RTCP buffer arrived
simultaneously in ssrcdemux.

The problem was that sticky-event arriving while the rtp and rtcp pads
were being set up could arrive just too late to be included in the initial
forwarding.

The fix checks if the stickies have been sent on the srcpad about to be
pushed on, and if not sends them. It also blocks any stickes from
being forwarded *prior* to this happening, to avoid them arriving on
the srcpad multiple times.

Since the test loops 1000 times, this will make running under valgrind
take forever, so use the RUNNING_ON_VALGRIND variable to detect we
are running under valgrind, and reduce the loop-count to 2 in that case.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/992>
2021-05-25 22:04:41 +00:00
Havard Graff
de3a3882e9 rtpssrcdemux: refactor destruction of GstRtpSsrcDemuxPads
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/992>
2021-05-25 22:04:41 +00:00
Havard Graff
c721c6fe72 rtpssrcdemux: make naming consistent
Use plural for GstRtpSsrcDemuxPads, since it contains two pads, and
use the variable-name 'dpads' everywhere.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/992>
2021-05-25 22:04:41 +00:00
Tim-Philipp Müller
80966ed0a3 wavparse: use g_strndup() for copying text data
So we don't rely on NUL terminators inside the data.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/994>
2021-05-23 15:20:16 +01:00
Tim-Philipp Müller
5353ff355f wavparse: clean up adtl/note/labl chunk parsing
We were passing the size of the adtl chunk to the note/labl
sub-chunk parsing function, which means we may memdup lots of
data after the chunk string's NUL terminator that doesn't
really belong to it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/994>
2021-05-23 15:19:41 +01:00
Tim-Philipp Müller
3dd8de1d7c wavparse: guard against overflow when comparing chunk sizes
Could be rewritten as lsize > (size - 8) a well, but the
extra check seems clearer. Doesn't look like it was problematic,
lsize wasn't actually used when parsing the sub-chunks.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/994>
2021-05-23 15:17:27 +01:00
Daniel Almeida
4f2189a6e1 doc: update gst_plugins_cache.json
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/991>
2021-05-21 16:42:04 -04:00
Stéphane Cerveau
918d882021 matroskademux: fix decoder glitches with H264 content
To avoid decoder starvation causing glitches on screen,
the demuxer shall clip only when the buffer is a key frame
and the lace time is greater than the stop time.

Fixes gst-editing-services#128

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/973>
2021-05-20 15:07:07 +02:00
Matthew Waters
c75bd32539 qml: don't use buffers that have invalid contents
If the GL context is not shareable, ignore it.

A future change may also not output the relevant output either.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/983>
2021-05-12 02:55:51 +00:00
Matthew Waters
3b4673eba3 qml: also use the dummy texture when no buffer has been set
Fixes corrupted texture output when changing OpenGL display/contexts.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/983>
2021-05-12 02:55:51 +00:00
Nicolas Dufresne
13cba418f0 doc: Update cache for RGBP format addition
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/968>
2021-05-11 17:20:00 -04:00
Nicolas Dufresne
d877f7f816 matroskademux: Advertise codec-alpha in caps
This will be used to select the appropriate decoders. We also only attach the
GstVideoCodecAlphaMeta if the AlphaMode element is set, this is to stay on the
safe side and mimic what browsers (verified in Firefox and Chromium code) do.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/968>
2021-05-11 16:52:22 -04:00
Nicolas Dufresne
b2e857efc6 matroskademux: Store alpha stream in VideoCodecAlphaMeta
This generalize the feature over using mini object quark data. If
that feature was Matroska specifc, using the new CustomMeta would have
been enough and arguably cleaner then QData, though it seems that
similar technique is use with AV1 Image Format (AVIF).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/968>
2021-05-11 16:06:44 -04:00
Tim-Philipp Müller
b84bad6ac3 matroska-demux: extract VP8 alpha from BlockAdditionals
And put it on buffers as qdata (which is easier in this
case than a private custom meta because it can be picked
up easily in other modules).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/968>
2021-05-11 16:06:44 -04:00
Matthew Waters
c7181bedac qt: return a different GstGLDisplay object when the first sink requests
This allows the 'replace-gstreamer-opengl-context' context machinery to
correctly replace the OpenGL context used by the pipeline when the first
qmlglsink is added to the pipeline.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/982>
2021-05-11 06:40:38 +00:00
Jan Alexander Steffens (heftig)
0ff50d6723 udpsrc: Plug leaks of saddr in error cases
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/977>
2021-05-07 10:09:38 +00:00
Jan Alexander Steffens (heftig)
e425bcada5 udpsrc: Whitespace
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/977>
2021-05-07 10:09:38 +00:00
Jan Alexander Steffens (heftig)
fa1cc0a81f deinterlace: Plug a method subobject leak
Changing the method would leak the previous method.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/976>
2021-05-07 09:31:48 +00:00
Nicolas Dufresne
d9a0313aa0 vp9enc: Add color range support
When setting the colorspace, we now clear the range to reduced range,
the default, and then we also set the range so the VP9 encoder encodes
the right information in the bitstream.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/975>
2021-05-06 16:00:47 -04:00
Nicolas Dufresne
91da1c3c08 vp9enc: Move colorspace configuration in VP9 enc
This is not supported by VP8 and was causing a warning.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/975>
2021-05-06 16:00:47 -04:00