Commit graph

112649 commits

Author SHA1 Message Date
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
Xavier Claessens ebcca1e5ea Meson: Avoid using add_global_arguments() when gst-build is a subproject
Meson only allows the main project to use it. We already set that flag
in all GStreamer modules just like warning flags.

Fixes: #152
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/236>
2021-08-12 14:17:30 +00:00
Thibault Saunier c24958c781 git-update: Fix passing fetch_args
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/255>
2021-08-12 13:20:15 +00:00
Thibault Saunier b29665f3bd git-update: Force fetching tags
Making it simpler for user to specify tags in manifests

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/255>
2021-08-12 13:20:15 +00:00
Matthew Waters cfd4a9a6d9 qt: always update the sink_retrieved flag when the sink retrieves
Fixes a case where adding a qmlgloverlay element after an existing
qmlglsink elements was already in the pipeline would create an entirely
separate GstGLDisplay pointing to the same underlying display resource.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1050>
2021-08-12 22:57:01 +10:00
Sebastian Dröge 01c430fa45 webrtcbin: Don't assume that non-audio medias are video medias when creating transceivers
And print the unknown media kind in the logs.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2464>
2021-08-12 12:31:15 +00:00
Sebastian Dröge 7a03acc546 webrtcbin: Use the correct media for deciding the media kind when creating the transceiver from the SDP
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2464>
2021-08-12 12:31:15 +00:00
He Junyan 70ce2327d0 codecs: h264dec: Output the picture directly if already a frame.
We forget one case that is the frame and field pictures may be mixed
together. For this case, the dpb is interlaced while the last picture
may be a complete frame. We do not need to cache that complete picture
and should output it directly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2448>
2021-08-12 07:41:28 +00:00
Víctor Manuel Jáquez Leal 862aa25e53 videocrop: Resurrect logging category.
Fix for a regression from commit 8f1384c9. That commit moved the debug
category definition, as static, into a gstvideocropelement.c, but that
category was used as default, in gstvideocrop.c, so it was never used
at logging, so the debug selector never showed the logs for
videocrop.

This patch move back the category definition into gstvideocrop.c and
leaving the function videocrop_element_init() as a noop.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1049>
2021-08-11 16:09:06 +02:00
He Junyan 2505ab17e9 va: caps: Make the template raw video caps classified by features.
The current output of raw video caps is not good. When we have multi
profiles and each profile support different formats, the output of
gst-inspect may like:

 SRC template: 'src'
 Availability: Always
 Capabilities:
   video/x-raw(memory:VAMemory)
         width: [ 1, 16384 ]
         height: [ 1, 16384 ]
         format: NV12
   video/x-raw
         width: [ 1, 16384 ]
         height: [ 1, 16384 ]
         format: NV12
   video/x-raw(memory:VAMemory)
         width: [ 1, 16384 ]
         height: [ 1, 16384 ]
         format: P010_10LE
   video/x-raw
         width: [ 1, 16384 ]
         height: [ 1, 16384 ]
         format: P010_10LE
   video/x-raw(memory:VAMemory)
         width: [ 1, 16384 ]
         height: [ 1, 16384 ]
         format: P012_LE
   video/x-raw
         width: [ 1, 16384 ]
         height: [ 1, 16384 ]
         format: P012_LE

The gst_caps_simplify does not classify the caps by same features, but
just leave them interweaved. We need to handle them manually here, the
result should be:

  SRC template: 'src'
  Availability: Always
  Capabilities:
    video/x-raw
          width: [ 1, 16384 ]
          height: [ 1, 16384 ]
          format: { (string)P010_10LE, (string)P012_LE, (string)NV12 }
    video/x-raw(memory:VAMemory)
          width: [ 1, 16384 ]
          height: [ 1, 16384 ]
          format: { (string)P010_10LE, (string)P012_LE, (string)NV12 }

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2456>
2021-08-11 09:37:33 +00:00
Víctor Manuel Jáquez Leal f20b3b8156 vapostproc: Inherit from GstVaBaseTransform.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2442>
2021-08-10 17:31:58 +00:00
Víctor Manuel Jáquez Leal 977a8f3b01 va: Add base transform class.
This base transform class is a derivable class for VA-based filters,
for example vapostproc right now, but it will be used also for
future elements such as vadeinterlace.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2442>
2021-08-10 17:31:58 +00:00
Víctor Manuel Jáquez Leal 2added54c3 va: pool: Add gst_va_pool_new_with_config().
It is a function helper.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2442>
2021-08-10 17:31:58 +00:00
Seungha Yang 1f6fd7550c d3d11window: Misc code cleanup
* Remove unnecessary upcasting. We are now dealing with C++ class objects
  and don't need explicit C-style casting in C++ world
* Use helper macro IID_PPV_ARGS() everywhere. It will make code
  a little short.
* Use ComPtr smart pointer instead of calling manual IUnknown::Release()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2461>
2021-08-10 16:20:37 +00:00
Seungha Yang a1048ce110 d3d11compositor: Fix indent
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2461>
2021-08-10 16:20:37 +00:00
Tim-Philipp Müller bb48c4c9f6 plugin: load plugins with unknown license strings
We shouldn't fail to load plugins just because we don't
recognise the license string. It's not our job to validate
licenses, and the license list is outdated and ambiguous
anyway.

Also add MPL-2.0 to the list, and fix some defunct license
URLs in the code comments.

Get rid of the hard-coded skip index, doesn't really buy us
much versus just skipping with a few strlens, and is harder
to maintain.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/864>
2021-08-10 14:10:22 +01:00
Matthew Waters 04856a3828 glbuffer: support persistent buffer mappings
Requires OpenGL 4.4 or EXT_buffer_storage

Current mesa exposes GL_ARB_buffer_storage when retrieving the relevant
functions returns no-ops and causes failures.

Improves throughput of uploads by roughly 30%-60% and download throughput by
roughly 10-30% across depending on the exact scenario and hardware.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1191>
2021-08-10 08:34:46 +00:00
Thibault Saunier e4c82f450d openh264: Respect level set downstream
We were not specifying the requested level to openh264  meaning that
it was choosing anything and was not respecting what was specified\
downstream

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2289>
2021-08-09 20:17:54 +00:00
He Junyan c5fda68403 x265: Fix a deadlock when failing to create the x265enc.
The GST_ELEMENT_ERROR will call the gst_object_get_path_string and
use gst_object_get_parent to get the full object path name, which
needs to lock the object. But we are already in a locked context and
so this will cause a deadlock, the pipeline can not exit normally.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2451>
2021-08-09 10:28:11 +00:00
Stéphane Cerveau 72d0d28811 avdemux: add xwma support
Add xwma tested with the media

b8edfb1e970ed7892f35b34a1ef36fee_wma.wav

from this ticket:

http://trac.ffmpeg.org/ticket/9358

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-libav/-/merge_requests/138>
2021-08-09 10:27:45 +02:00
R S Nikhil Krishna 34c81d13b6 rtmpsrc: mention setting librtmp flags in docs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2424>
2021-08-09 01:27:01 +05:30
Tim-Philipp Müller 681068a59d subprojects: pin pango wrap to tag
master branch got renamed to main, but might as well pin it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/256>
2021-08-08 19:42:24 +01:00
Stéphane Cerveau 20c6668f5a ges: freeze commit during render
In render mode, do not commit the timeline
as the position can be invalid and lead to
missing frames.

Fixes #136

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/262>
2021-08-06 13:42:45 +00:00
Mathieu Duponchelle c5d725652d mpeg2enc: fix interlace-mode detection
Previously, the code was always assuming progressive input,
fix this by looking at the caps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2455>
2021-08-05 23:12:32 +02:00
Piotrek Brzeziński 2bb2ff380e timeline: Check if metadata value holds object on marker snapping
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/263>
2021-08-05 22:59:07 +02:00
Tim-Philipp Müller a561b1bd86 Use g_memdup2() where available and add fallback for older GLib versions
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-bad/-/merge_requests/2280>
2021-08-05 20:51:00 +05:30