Commit graph

112674 commits

Author SHA1 Message Date
Olivier Crête
a4a1782872 tracer: Add new tracer to list loaded elements and other features
This new tracer will list loaded elements and plugins. This should
make it easier to generate minimal builds of GStreamer.

This also traces other features such as typefind functions, device
providers and dynamic types.

The format of the output of gst-stats should match the parameters
expected by the meson based gst-build system.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/782>
2021-08-18 17:01:27 -04:00
Olivier Crête
8332b44a2a tracers: Add tracepoint when a plugin feature it loaded
This makes it possible to trace which ones are loaded in a specific
program to make nice statistics.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/782>
2021-08-18 17:01:27 -04:00
Nicolas Dufresne
0a6a8e3869 v4l2slh264dec: Fix slice header bit size calculation
The emulation bytes need to be removed as bytes, not bit. This fixes
decoding issues with files that have emulation bytes with the Cedrus
driver.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2471>
2021-08-18 18:02:00 +00:00
Arun Raghavan
2c6be7373f matroska-mux: Add a timestamp-offset property
Adds a user-controllable timestamp offset to clusters and blocks. This
should be useful if we want to have timestamps that have significance
outside of the current file (for example, we might set the offset to the
wallclock when the file is being created, or some other common base, if
we want to correlate streams across multiple files).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1051>
2021-08-18 10:51:15 -04:00
Víctor Manuel Jáquez Leal
5c5083586d example: va: Add skin tone enhancement.
If camera is used as input stream and skin tone parameter is available
in vapostproc, and no random changes are enabled, the skin tone will
be enabled.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2470>
2021-08-18 14:51:01 +02:00
Víctor Manuel Jáquez Leal
dc825d6a52 vapostproc: Use vapostproc as debug category name.
Otherwise is difficult to remember the different name.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2470>
2021-08-18 14:51:01 +02:00
Sebastian Dröge
bf71ef17e3 pbutils: Expose functions for getting a file extension for caps and flags for describing the format of the caps
This information was available internally already but not available from
the outside.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1221>
2021-08-18 12:06:16 +00:00
Sebastian Dröge
52bca104e4 playbin/uridecodebin: Emit source-setup signal early before doing the scheduling query
Some elements will require the source to be set up properly before the
scheduling query returns useful results, e.g. appsrc and giostreamsrc.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1241>
2021-08-18 09:07:07 +00:00
Víctor Manuel Jáquez Leal
e9395bbcd1 examples: va: Add random cropping.
And remove unused caps filter.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2443>
2021-08-18 09:00:55 +00:00
Víctor Manuel Jáquez Leal
6853c3eea8 vapostproc: Disable cropping in pass-through mode.
Originally, if a buffer arrives with crop meta but downstream doesn't
handle crop allocation meta, vapostproc tried to reconfigure itself to
non pass-through mode automatically. Sadly, this behavior was based on
the wrong assumption that propose_allocation() vmethod would bring
downstream allocation query, but it is not.

Now, if vapostproc is in pass-through mode, the cropping is passed to
downstream.  Pass-through mode can be disabled via a parameter.

Finally, if pass-through mode isn't enabled, it's assumed the buffer
is going to be processed and, if cropping, downstream already
negotiated the cropped frame size, thus it's required to do the
cropping inside vapostproc to avoid artifacts because of the size of
downstream allocated buffers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2443>
2021-08-18 09:00:55 +00:00
Víctor Manuel Jáquez Leal
4784d107ed vapostproc: Update filters update_properties().
Right after instantiating the VA filter and changing the element
state, rebuild the image filters.

This will fix a regression from f20b3b815, where properties in a
gst-launch pipeline are not applied.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2443>
2021-08-18 09:00:55 +00:00
Edward Hervey
2b01467934 pad: Ensure last flow return is set on sink pads in push mode
The last flow return field was never updated on sink pads in push mode. This
fixes it and makes it consistent.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/868>
2021-08-18 10:25:08 +02:00
Sebastian Dröge
751f68740f decklinkvideosrc: Fix PAL/NTSC widescreen autodetection when switching back to non-widescreen
Previously it would only switch to widescreen but never back.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2469>
2021-08-18 09:13:45 +03:00
Mengkejiergeli Ba
86872b1b46 msdkvpp: Fix frc from lower fps to higher fps
There are three framerate conversion algorithms described in
<https://github.com/Intel-Media-SDK/MediaSDK/blob/master/doc/mediasdk-man.md>,
interpolation is not implemented so far and thus distributed timestamp algorihtm
is considered to be more practical which evenly distributes output timestamps
according to output framerate. In this case, newly generated frames are inserted
between current frame and previous one, timestamp is calculated by msdk API.

This implementation first pushes newly generated buffers(outbuf_new) forward and
the current buffer(outbuf) is handled at last round by base transform automatically.
A flag "create_new_surface" is used to indicate if new surfaces have been generated
and then push new outbuf forward accordingly.

Considering the upstream element may not be the msdk element, it is necessary to
always set the input surface timestamp as same as input buffer's timestamp and
convert it to msdk timestamp.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2418>
2021-08-18 03:06:59 +00:00
Stéphane Cerveau
508a565163 matroska: demux: update stream_start_time
The stream_start_time can be less than the first detected.
In case of B-Frame based media, the first frame PTS might be
greater than the next one.

Need to keep the segment.start if a seek has been performed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1030>
2021-08-17 16:09:14 -04:00
Nicolas Dufresne
65deef0b0c mastrokademux: Remove redundant assignment
The segment.position is unconditionnaly set few lines below.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1030>
2021-08-17 16:08:33 -04:00
Devarsh Thakkar
297b1e68e2 ext: alsa: Fix fallback paths for setting buffer and period times
Below fallback paths were introduced in
9759810d82
if setting period time after buffer time failed :
1) Set period time and then buffer time if it doesn't work
2) Set only buffer time
3) Set only period time

These all were not functioning properly since they were using old
copy of snd_pcm_hw_params_t which already had some fields set
as per previous try and this was causing issues as driver was
referring to that old value while trying to set them again in
fallback paths.

So now we always use the initial copy of snd_pcm_hw_params_t
for every fallback  and same is also being done at
557c429510

Also we change the sequence to set period time earlier than
buffer time since period bytes being the smaller unit, most of the times
if underlying alsa device has a dependency then it is of period bytes
to be a multiple of some value (as per underlying DMA constraint)
and rest of the parameters like buffer bytes need to be adjusted
as per period bytes.

The same sequence is also followed in alsa-utils at
9b621eeac4

Fix 2) and 3) scenarios by returning success if the exclusive setting is passed
and not doing any further setting for buffer time or period time.

Add new fallback path of not setting any buffer time and period time
if all above fallback paths fail. The same is also being
followed at aforementioned pulseaudio commit.

In case of alsasink, remove the retry goto label, since it is not
required anymore as fallback paths take care of setting default
values if driver is not accepting any of the fallback paths.

Use separate label for exit to free params structs and return err
code. This also fixes leak in no_rate goto path in alsasink

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1212>
2021-08-17 19:52:59 +00:00
Víctor Manuel Jáquez Leal
d1cd310e42 videocrop: Fix icles tests.
Internally videcrop can call gst_video_crop_set_info() with NULL as in
caps. Then critical messages are raised when the in caps are
processed.

To fix this the in caps are checked, and if they are present, its
capsfeature is extracted, otherwise, the previous raw caps detection
remains as before.

Also the videocrop-test removes the format field in the structure
because now its always passed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1056>
2021-08-17 17:19:16 +00:00
Jakub Adam
286208576f rtp: Color Space header extension
Implements WebRTC header extension defined in
http://www.webrtc.org/experiments/rtp-hdrext/color-space.

It uses RTP header to communicate color space information and optionally
also metadata that is needed in order to properly render a high dynamic
range (HDR) video stream.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/853>
2021-08-17 15:28:19 +00:00
Jakub Adam
b4a00f78bc videoencoder: pass upstream HDR information through codec state
Don't copy HDR metadata from sink pad, because its caps may not have
been set yet if GstVideoEncoder::negotiate is called from
GstVideoEncoder::set_format, as e.g. vpx encoder does.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1175>
2021-08-17 14:54:06 +00:00
Jakub Adam
b3c7b9be49 videoutils: add HDR metadata fields to GstVideoCodecState
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1175>
2021-08-17 14:54:06 +00:00
Hou Qi
0e7a485528 v4l2: Add protection when set decoder capture fps accroding to output fps
Some v4l2 drivers don't have the capacity to change framerate. There is
chance to make decoder capture fps to be 0/0 if numerator and denominator
returned by G_PARM ioctl are both 0. It causes critical warning
"passed '0' as denominator for `GstFraction'".

In order to fix this, add protection when set decoder capture fps according
to output fps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1048>
2021-08-17 13:27:28 +00:00
Nirbheek Chauhan
9c7a2df4a8 cerbero: Always fetch sources with four parallel jobs
The default number of parallel jobs is two, which is too few. We can
easily use four or more. Should speed up image builds and also
downloading of (new) sources that aren't already cached in the image.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-ci/-/merge_requests/411>
2021-08-17 16:04:42 +05:30
Per Förlin
9a216d0ffa rtspsrc: Add support to ignore x-server HEADER reply
When connecting to an RTSP server in tunnled mode (HTTP) the server
usually replies with a x-server header. This contains the address
of the intended streaming server. However some servers return an
"invalid" address. Here follows two examples when it might happen.

1. A server use Apache combined with a separate RTSP process to handle
   Https request on port 443. In this case Apache handle TLS and
   connects to the local RTSP server, which results in a local
   address 127.0.0.1 or ::1 in the x-server reply. This address is
   returned to the actual RTSP client in the x-server header.
   The client will receive this address and try to  connect to it
   and fail.

2. The client use a ipv6 link local address with a specified scope id
   fe80::aaaa:bbbb:cccc:dddd%eth0 and connects via Http on port 80.
   The RTSP server receives the connection and returns the address
   in the x-server header. The client will receive this address and
   try to connect to it "as is" without the scope id and fail.

In the case of streaming data from RTSP servers like 1. and 2. it's
useful to have the option to simply ignore the x-server header reply
and continue using the original address.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1007>
2021-08-17 10:15:27 +00:00
Sebastian Dröge
a14f4f48c4 video-overlay-composition: Allow empty overlay compositions
Allowing to pass NULL to the constructor removes the need to
special-case the first rectangle in calling code and generally
simplifies application code.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1256>
2021-08-16 21:13:27 +00:00
Matthew Waters
18314764fc webrtc: improve matching on the correct jitterbuffer
The mapping between an RTP session and the SDP m= line is not always the
same, especially when BUNDLEing is used.

This causes a failure in a specific case where if when bundling,
if mline 0 is a data channel, and mline 1 an audio/video section,
then retrieving the transceiver at mline 0 (rtp session used) will fail
and cause an assertion.

This fix is actually potentially a regression for cases where the remote
part does not provide the a=ssrc: media level SDP attributes as is now
becoming common, especially when simulcast is involved.

The correct fix actually requires reading out header extensions as used
with bundle for signalling in the actual data, what media and therefore
transceiver is being used.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2467>
2021-08-16 16:15:44 +00:00
Dmitry Shusharin
a92c855dd5 gstqmlgl: fix indent
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1032>
2021-08-16 11:25:58 +00:00
Dmitry Shusharin
a338ed98d6 gstqmlgl: wrap raw GstGLContext into GWeakRef
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1032>
2021-08-16 11:25:58 +00:00
Dmitry Shusharin
b8cb9ae526 gstqmlgl: add multisink test application
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1032>
2021-08-16 11:25:58 +00:00
Dmitry Shusharin
0bb37c5135 gstqmlgl: refactoring: rename ambiguous variables, clean up unused and duplicated ones
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1032>
2021-08-16 11:25:58 +00:00
Dmitry Shusharin
5dca098f6a gstqmlgl: rework WGL-specific context init code
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1032>
2021-08-16 11:25:58 +00:00
Dmitry Shusharin
83dbeac150 gstqmlgl: retrieve correct device bound to current GL context (+ minor code cleanup)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1032>
2021-08-16 11:25:58 +00:00
Dmitry Shusharin
38b26c2f3f gstqmlgl: correct validation for Qt GL context
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1032>
2021-08-16 11:25:58 +00:00
Dmitry Shusharin
211aaaf8b8 gstqmlgl: create helper QRunnable-based class for render jobs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1032>
2021-08-16 11:25:58 +00:00
Tulio Beloqui
9af6ce974a rtpjitterbuffer: fixed stall on gap when using rtx
Co-authored-by: Håvard Graff <havard@pexip.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1055>
2021-08-16 09:51:05 +00:00
Per Förlin
535c02c73b gstrtspconnection: Add support to ignore x-server header reply
When connecting to an RTSP server in tunnled mode (HTTP) the server
usually replies with a x-server header. This contains the address
of the intended streaming server. However some servers return an
"invalid" address. Here follows two examples when it might happen.

1. A server use Apache combined with a separate RTSP process to handle
   Https request on port 443. In this case Apache handle TLS and
   connects to the local RTSP server, which results in a local
   address 127.0.0.1 or ::1 in the x-server reply. This address is
   returned to the actual RTSP client in the x-server header.
   The client will receive this address and try to  connect to it
   and fail.

2. The client use a ipv6 link local address with a specified scope id
   fe80::aaaa:bbbb:cccc:dddd%eth0 and connects via Http on port 80.
   The RTSP server receives the connection and returns the address
   in the x-server header. The client will receive this address and
   try to connect to it "as is" without the scope id and fail.

In the case of streaming data from RTSP servers like 1. and 2. it's
useful to have the option to simply ignore the x-server header reply
and continue using the original address.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1192>
2021-08-16 09:06:37 +00:00
He Junyan
fbf6bfd4d8 va: Use GST_CAPS_FEATURE_MEMORY_VA to replace "memory:VAMemory".
"memory:VAMemory" is a commonly used string which notates our VA-kind
memory type. We now used a definition in va lib to replace the simply
string usage.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2466>
2021-08-16 16:25:15 +08:00
He Junyan
d14e8055ad va: Use MEMORY_DMABUF definition to replace "memory:DMABuf" strings.
GST_CAPS_FEATURE_MEMORY_DMABUF is already a common definition, we should
just use it rather than use the "memory:DMABuf" strings by ourselves.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2466>
2021-08-16 16:24:14 +08:00
Nirbheek Chauhan
620e9323c5 flv: use g_memdup2() as g_memdup() is deprecated
g_memdup() is deprecated since GLib 2.68 and we want to avoid
deprecation warnings with recent versions of GLib.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1052>
2021-08-16 08:00:53 +00:00
Sebastian Dröge
04963cac86 souphttpsrc: Always use the content decoder but set Accept-Encoding: identity if no compression should be used
Some servers respond with gzip-encoded responses regardless of whether
the request allowed it to be used in the response. By always having the
content decoder enabled, these invalid responses can be decoded
correctly while for well-behaving servers the `compress` property
selects between allowing compressed responses or not.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1053>
2021-08-15 12:29:06 +03:00
Mathieu Duponchelle
ee35cba6e8 launcher: don't start the pipeline before we're done updating it
Since 70e3b8ae2a the CommandLineFormatter
also emit "loaded" so we ended up doing this twice, once
as before in `run_pipeline` and another time in the `project:loaded`
callback.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/265>
2021-08-14 18:07:56 +02:00
Mathieu Duponchelle
e12b3b7cef ges-launcher: don't unref transfer none objects
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/265>
2021-08-14 18:07:56 +02:00
Piotrek Brzeziński
a5a793f8b6 clip: Copy trackelement's metadata upon splitting
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/260>
2021-08-14 15:46:07 +02:00
Piotrek Brzeziński
951e6181ce xml-formatter: Add support for metadata on sources
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/260>
2021-08-14 00:10:06 +02:00
Piotrek Brzeziński
9c03f99e58 marker-list: Add flags (de)serialization
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/260>
2021-08-14 00:10:06 +02:00
Thibault Saunier
a917648be3 fdkaacdec: Add Converter class to hint gst-validate
fdkaacdec have minimal conversion capability, adding the Converter class allow
gst-validate to behave properly and not spit an error when it notice that the
number of channels or rate miss-match in and out.

Same logic as with opusdec, see: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1142>

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2462>
2021-08-13 15:25:16 +00:00
Nirbheek Chauhan
e9d06cec5a gstbuffer: Use g_memdup2 instead of g_memdup
This was added in !826 which was created after !803 (which changes
g_memdup -> g_memdup2), but merged before it, so it slipped through.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/866>
2021-08-13 19:55:42 +05:30
Nirbheek Chauhan
3ced923da5 sdp: Avoid using g_memdup() since it is deprecated
g_memdup() is deprecated since GLib 2.68 and we want to avoid
deprecation warnings with recent versions of GLib. Instead of using
g_memdup2(), we can simply use the new gst_buffer_new_memdup() added
in 1.19.x

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1254>
2021-08-13 19:35:23 +05:30
Seungha Yang
b1dd20d57a wasapi2: Increase rank to primary + 1
wasapi2 plugin should be preferred than old wasapi plugin if available because:
* wasapi2 supports automatic stream routing, and it's highly recommended
  feature for application by MS. See also
  https://docs.microsoft.com/en-us/windows/win32/coreaudio/automatic-stream-routing
* This implementation must be various COM threading issue free by design
  since wasapi2 plugin spawns a new dedicated COM thread and all COM objects'
  life-cycles are managed correctly.
  There are unsolved COM issues around old wasapi plugin. Such issues are
  very tricky to be solved unless old wasapi plugin's threading model
  is re-designed.

Note that, in case of UWP, wasapi2 plugin's rank is primary + 1 already

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2314>
2021-08-13 12:35:11 +00:00
Mathieu Duponchelle
152813e71d ccconverter: fix overflow when not doing framerate conversion
When converting from one framerate to another, counters are
reset periodically, however when not converting they never are
and can_genearte_output ends up making overflow-prone calculations
with large values for input_frames and output_frames.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2465>
2021-08-13 03:37:28 +00:00