Commit graph

113094 commits

Author SHA1 Message Date
Thibault Saunier
a56823d8f4 validate:scenario: Allow forcing running action on idle from scenario file
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/235>
2021-05-15 18:55:19 -04:00
Thibault Saunier
f00048781f validate:scenario: Add a run-command action type
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/235>
2021-05-15 18:55:19 -04:00
Tim-Philipp Müller
d347728f1b contribute: update backporting workflow section
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-docs/-/merge_requests/154>
2021-05-15 18:02:04 +01:00
Jose Quaresma
56380af717 tests: use the real name of the videoscale test in GST_REGISTRY
The videoscale tests uses the same name as the one used in base tests.
Fix this and use the name of the videoscale test on the test environment GST_REGISTRY

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1146>
2021-05-14 23:24:20 +01:00
Nicolas Dufresne
e7b962d9b5 alphacombine: Ignore all events coming from the alpha_pad
As per usage of this element, everything from this pad is a
duplicate. Instead of implemented needless aggregation, simply
drop all events from this pad and let the one from the main stream
passthrough. Also stop proxying some queries from the alpha pad_too.

This fixes racy test failure:
- validate.file.playback.scrub_forward_seeking.opus_vp9-alpha_webm

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2247>
2021-05-14 14:11:39 -04:00
Nicolas Dufresne
0484d658a8 codecalphademux: Do not set a GstFlowReturn from a boolean
This was a small overlook, gst_pad_send_event() returns a boolean,
so setting it into ret could confuse the flow combiner. Though,
it didn't bug, since both 0 and 1 are success (though 1 being
undefined).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2247>
2021-05-14 14:11:39 -04:00
Nicolas Dufresne
35775f1aec codecalphademux: Remove eos flow return workaround
It turns out that downstream returning OK after EOS is a bug in
multiqueue. As we moved to queue, we no longer have this issue.
Let's keep the code clean and just assuming that downstream will
keep returning EOS and allow convergence of flow.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2247>
2021-05-14 14:11:39 -04:00
Seungha Yang
bf5741f424 smart-mixer: Add support for d3d11compositor and glvideomixer
Some hardware compositor elements (d3d11compositor and glvideomixer)
consist of wrapper bin with internal mixer element.
So, we need special handling for such elements.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/242>
2021-05-15 01:36:45 +09:00
Seungha Yang
eaaaf78090 framepositioner: Install operator property only when compositor is used
Other compositor/mixer elements might not have the property. For instance,
d3d11compositor and glvideomixer define graphics API specific blending
properties, instead of simple "operator" one.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/242>
2021-05-15 01:36:44 +09:00
Mathieu Duponchelle
2a710a484c concat: adjust running time offsets on events
When concat adjusts the base of the segments it forwards
downstream, it needs to also adjust the running time offsets,
as GstPad does when an offset is set by the application on a pad.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/819>
2021-05-14 12:53:20 +00:00
Thibault Saunier
2247cdadca validate:monitor: Only get_name on GstObject
GObject don't have such method!

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/235>
2021-05-14 01:59:09 +00:00
Olivier Crête
ba079092f8 webrtc: Use properties to access the inside of the transceiver object
This will allow hiding the insides from unsafe application access.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/36>
2021-05-13 17:49:49 -04:00
Olivier Crête
761206291b openh264: Don't use GOnce for ABI check
It turns out the value used for g_once_* APIs can't be
zero. And this is a very cheap check, so let's just do it every time.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2240>
2021-05-13 21:40:02 +00:00
Olivier Crête
8b595e7c8b webrtc test: Print content of error GstMessage
Makes it easier to interpret the result of the CI!

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2183>
2021-05-13 16:37:31 -04:00
Olivier Crête
78d2d6cf6f webrtcbin tests: Add test for intersection src pad caps
This checks that the codec preferences are intersected also with what
the src pad can handle.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2183>
2021-05-13 16:37:31 -04:00
Olivier Crête
cc556452ce webrtc test: Add explicit test clock
This way the test clock is not linked to the multiple harnesses

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2183>
2021-05-13 15:05:00 -04:00
Olivier Crête
f34be8a3bd webrtcbin: Intersect answer with codec prefs & capabilities
In case the local capabilities changed since the last negotiaton,
we need to re-intersect and see if the result would be different.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2183>
2021-05-13 15:05:00 -04:00
Olivier Crête
3065ac49fb webrtcbin: Ignore current caps for codec negotiation
On the sink pad, we want the caps of the current stream, those
are the "received_caps" field. If we haven't received caps yet, then
we only care about the caps that the next element can accept, that is
the caps from the peer pad (and the preferences). Otherwise, we prevent
re-negotiation to a better codec when possible.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2183>
2021-05-13 15:05:00 -04:00
Olivier Crête
4bb94c6970 webrtcbin: Remove dead code
The function is only called to create an offer, so no
need to pass the offer parameter and then check it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2183>
2021-05-13 15:05:00 -04:00
Olivier Crête
2aa7efedd3 webrtc test: Add test for codec preferences negotiation
Validate that it does the intersection with the caps from
the sink pad and rejects the offer creation otherwise.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2183>
2021-05-13 15:05:00 -04:00
Olivier Crête
f6345b4b03 webrtcbin: Refactor codec preference retrieval
Now intersect against pads on both sides if they are available.
If the intersection fails, we now just reject the creation of the offer
or answer as it means that the codec_preferences are too restrictive or
that the caps on both sides the webrtcbin are not compatible.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2183>
2021-05-13 15:05:00 -04:00
Olivier Crête
48f4498801 webrtcbin: Intersect codec preferences with caps from pads
When creating an offer or an answer, also take into account
the caps on the pads as well as the codec preferences when both are set.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2183>
2021-05-13 15:05:00 -04:00
Olivier Crête
70befc0b21 webrtcbin: Implement caps queries on sinkpad based on codec preferences
Also includes a unit test.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2183>
2021-05-13 15:05:00 -04:00
Olivier Crête
dc6655542d webrtcbin: Hold transceiver lock when accessing codec_preferences
This is required to allow the applications to modify the preferences.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2183>
2021-05-13 15:05:00 -04:00
Olivier Crête
e9f14ed117 webrtcbin: Hold lock while accessing the codec preferences
They could be changed at runtime by the application, so take the lock
when modifying them.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2183>
2021-05-13 15:05:00 -04:00
Olivier Crête
6a3a62abae webrtcbin tests: Use properties to access the inside of the transceiver object
This will allow hiding the insides from unsafe application access.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2183>
2021-05-13 15:05:00 -04:00
Olivier Crête
4c3270409d webrtc rtptransceiver: Implement "codec-preferences" property
This allows safer access to the internals of the codec-preferences

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2183>
2021-05-13 15:05:00 -04:00
Olivier Crête
97a78a903a webrtc rtptransceiver: Implement "kind" property
Implement the property as read-only to follow the WebRTC spec

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2183>
2021-05-13 15:05:00 -04:00
Olivier Crête
5fd0ee3227 webrtc rtptransceiver: Implement "current-direction" property
Implement the property as read-only to follow the WebRTC spec

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2183>
2021-05-13 15:05:00 -04:00
Olivier Crête
7e7678f4cb webrtc rtptransceiver: Implement "mid" property
Implement the property as read-only to follow the WebRTC spec

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2183>
2021-05-13 15:05:00 -04:00
Nicolas Dufresne
c63b2f2712 alphadecodebin: Use normal queues instead of multiqueue
The multiqueue was too flexible for our need, allowing to queue passed
the configured threshold. It also didn't work well when trying to
propagate EOS flow return.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2238>
2021-05-13 14:38:47 +00:00
Nicolas Dufresne
1229257ad4 alphacombine: Implement flow return propagation
The EOS handling was not the problem way. Instead of this, implement
proper prorogation of the flow return for the alpha chain function.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2238>
2021-05-13 14:38:47 +00:00
Nicolas Dufresne
ea08442699 codecalphademux: Fix handling of flow combine
As the alphacombine is simplified to received matching pair of buffers,
we can't just stop streaming when we receive EOS from downstream. Due
to usage of queue, the moment we get this return value may differ.

Though, by continuing pushing, we override the last_flowret on the pad
which can make us miss that we effectively can combine all flow into
EOS.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2238>
2021-05-13 14:38:47 +00:00
Thibault Saunier
3f5d580f4e playback: Handle sources with dynamic pads and pads already present
In case we already have a pad but more might be added later we were
ignoring the new pads added later, we should track the element
new pads and expose them as they are added.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1120>
2021-05-13 11:58:12 +00:00
Thibault Saunier
2e13d97dd6 playback: Stop giving "source" as name to sources
This makes it very hard to understand what source we are talking about

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1120>
2021-05-13 11:58:12 +00:00
Matthew Waters
7066c849e4 glcontext: add support for influencing the backing configuration
New API:
- gst_gl_context_get_config()
- gst_gl_context_request_config()

A GL context configuration is a GstStructure that has some well-known
names for common values that can also be extended in platform-specific
ways if necessary.

Wrapped OpenGL contexts may be able to retrieve the GL context
configuration depending on the platform.  If that information is
available, GstGLContext will attempt to create an context that matches
the shared OpenGL context config unless gst_gl_context_request_config()
has been called.

A new environment variable 'GST_GL_CONFIG' will be read to influence the
configuration chosen.  The environment variable will only be used as a
fallback if gst_gl_context_request_config() has not been called.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/809>
2021-05-13 16:44:28 +10:00
Matthew Waters
dfd749c5da gl/context/egl: change header guard to be unique
The header guard in gst/gl/egl/gstglcontext_egl.h was the same as
gst/gl/egl/egl.h

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/809>
2021-05-13 16:19:42 +10:00
Matthew Waters
f03071439f gl/api: improve the to/from string for GstGLAPI/GstGLPlatform
With unit tests now!

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/809>
2021-05-13 15:35:23 +10:00
Thibault Saunier
61a04cf51f testbinsrc: Handle setting URI on the fly
Reusing existing streams when possible

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2210>
2021-05-13 02:03:57 +00:00
Bing Song
711008674b transcoding: add encoding target for TS.
Add encoding target for streamming.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1965>
2021-05-13 01:33:30 +00:00
Doug Nazar
60856d5a6f xml-formatter: Write xml directly to file
Skip allocation of temp buffer (which was undersized).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/250>
2021-05-12 18:59:16 -04:00
Nicolas Dufresne
76cd3ff183 doc: base: Fix reference to virtual function
The hotdoc syntax is #ClassName::function, but the code was using
without anything before.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/808>
2021-05-12 13:17:00 +00:00
Matthew Waters
3c3d978578 gl/framebuffer: expand documentation on valid usage
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/809>
2021-05-12 16:51:25 +10:00
Matthew Waters
5f9ba620ce webrtc/validate: update for fixed data channel closing scenario
Requires: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2186
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/39>
2021-05-12 05:22:49 +00:00
Doug Nazar
9efd519c81 gstcheck: Ensure unused threadpool threads are stopped
Ensures that all unused threads are exited before the atexit()
handlers run.

This prevents a race with any thread that used the OpenSSL library
between it's thread cleanup routine and it's atexit() cleanup routine
which can cause a SIGSEGV.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/812>
2021-05-12 03:08:30 +00:00
Johan Sternerup
caefc3a831 webrtcbin: Add unit test for closing of data channels
Add test for verifying that the data channel "close" action signal
triggers an SCTP_RESET_STREAMS request that is propagated to the other
side and eventually leads to both sides closing properly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2186>
2021-05-12 03:02:27 +00:00
Johan Sternerup
4d514abfd6 webrtcbin: Fix deadlock when receiving new sctp stream
When receiving an sctp message for a stream that not yet has an
sctpdec pad associated with it means we end up in
_on_sctpdec_pad_added. At this point we're holding the sctpassocation
lock. Then it's not possible to take the pc_lock because then code
executing under the pc_lock (which means anything in the webrtc
thread) may not take the sctpassociation lock. For example, running
the data channel close procedure from the webrtc thread means we
eventually end up sending a SCTP_RESET_STREAMS packet which needs to
grab the sctpassociation lock.

This means _on_sctpdec_pad_added simply cannot take the pc_lock and
also it is not possible to postpone the channel creation as we need to
link the pads right there. The solution is to introduce a more
granular dc_lock that protects only the things that needs to be done
to create the datachannel.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2186>
2021-05-12 03:02:27 +00:00
Johan Sternerup
8dbdfad914 webrtcbin: Support closing of data channels
Support for closing WebRTC data channels as described in RFC
8831 (section 6.7) now fully supported. This means that we can now
reuse data channels that have been closed properly. Previously, an
application that created a lot of short-lived on-demand data channels
would quickly exhaust resources held by lingering non-closed data
channels.

We now use a one-to-one style socket interface to SCTP just like the
Google implementation (i.e. SOCK_STREAM instead of SOCK_SEQPACKET, see
RFC 6458). For some reason the socket interface to use was made
optional through a property "use-sock-stream" even though code wasn't
written to handle the SOCK_SEQPACKET style. Specifically the
SCTP_RESET_STREAMS command wouldn't work without passing the correct
assocation id. Changing the default interface to use from
SOCK_SEQPACKET to SOCK_STREAM now means we don't have to bother about
the association id as there is only one association per socket. For
the SCTP_RESET_STREAMS command we set it to SCTP_ALL_ASSOC just to
match the Google implementation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2186>
2021-05-12 03:02:27 +00: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