Commit graph

112906 commits

Author SHA1 Message Date
Jakub Adam
fb8ed9e5d2 d3d11desktopdup: Support desktop switches
Before creating output duplication interface, call SetThreadDesktop()
with HDESK of the current input desktop in case a desktop switch has
occurred.

This allows d3d11desktopdupsrc to capture Windows User Account Control
(UAC) prompts, which appear on a separate secure desktop. Otherwise
IDXGIOutput1::DuplicateOutput() will return E_ACCESSDENIED and the
element won't produce any frames as long as the UAC screen is active.

Note that in order to access secure desktop the application still has to
run at LOCAL_SYSTEM privileges. For GStreamer applications running with
regular user privileges this change has no effect.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2209>
2021-04-30 04:47:36 +00:00
Jakub Adam
aac012ce72 dxgicapture: reinitialize duplication interface on ERROR_ACCESS_LOST
IDXGIOutputDuplication can become invalid for example when there's
desktop switch, resolution change or Windows User Account Control prompt
appears on screen.

When that happens, try to re-create the duplication interface for the
changed output. Note that in the case of UAC prompt this operation will
fail if the GStreamer process doesn't run at LOCAL_SYSTEM privileges. In
such situation the source element won't create any frames as long as the
output is occupied by UAC screen.

In order to enable UAC access to sufficiently privileged GStreamer
processes, call SetThreadDesktop() with the desktop handle that
currently receives user input before creating our output duplication.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2204>
2021-04-30 04:06:42 +00:00
Haihao Xiang
6750123d5c msdk: set correct parameters for BGRx frame
Otherwise when mapping BGRx frame onto CPU's memory, CPU will get wrong
data for B, G, R components

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2205>
2021-04-30 02:12:46 +00:00
Doug Nazar
a98eafa5a7 avmux: Blacklist ttml subtitles
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-libav/-/merge_requests/133>
2021-04-29 21:32:18 -04:00
Stéphane Cerveau
e4421c3c90 bash-completion: add completion for gstreamer tools
Allow to autocomplete with elements/properties
in the devenv using gst-launch-1.0 etc.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/232>
2021-04-29 23:54:33 +00:00
Stéphane Cerveau
9b6a425aa4 playback-test: add window title
If playbin mode, display the current uri

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1122>
2021-04-29 23:47:05 +00:00
Jan Schmidt
7c5f2185a9 qtmux: Make sure to write 64-bit STCO table when needed.
qtmux attempts to choose between writing a 32-bit stco chunk offset table
when it can, but switch to a 64-bit co64 table when file offsets go over
4GB.

This patch fixes a problem where the atom handling code was checking
mdat-relative offsets instead of the final file offset (computed by
adding the mdat position plus the mdat-relative offset) - leading to
problems where files with a size between 4GB and 4GB+offset-of-the-mdat
would write incorrect STCO tables with some samples having truncated
32-bit offsets.

Smaller files write STCO correctly, larger files would switch to
co64 and also output correctly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/970>
2021-04-30 08:12:47 +10:00
Matthew Waters
5835f2aa8d webrtc: advertise support for transport-cc rtcp-fb by default
Still requires explicit enabling by the application through the header
extension on all the relevant payloaders.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2207>
2021-04-29 22:01:54 +10:00
Matthew Waters
1ab58736df webrtc/stats: provide the twcc stats when available
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2207>
2021-04-29 22:01:54 +10:00
Matthew Waters
1ca747436f sdp/caps: support translating transport-cc rtcp-fb from caps to sdp attributes
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1130>
2021-04-29 21:16:57 +10:00
Doug Nazar
274c8e6b97 rtsp-media: Ensure the bus watch is removed during unprepare
It's possible for the destruction of the source to be delayed.
Instead of relying on the dispose() to remove the bus watch, do
it ourselves.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/202>
2021-04-29 03:07:42 -04:00
Doug Nazar
7725c90d5c rtp: Fix request-extension signal call
Signal is registered as taking a guint however was being passed a
guint64 which fails on 32-bit.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1102>
2021-04-28 22:50:53 -04:00
Víctor Manuel Jáquez Leal
87193af4d5 xvimagesink: Handle cropping when copying frames.
Cropping was not handled properly when frames have to be copied to
xvimage's buffer pool, first because the crop meta were dropped, and
second because the allocated frame size in xvimage's buffer pool were
smaller than the incoming frame.

This patch updates xvimagesink's video info when propose_allocation()
is called, and copies the GstVideoCropMeta from source frame to
destination one.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1088>
2021-04-28 11:00:56 +00:00
Víctor Manuel Jáquez Leal
c38bede8ba xvimagesink: Delay pool creation until it's needed.
Buffer pool is created every time setcaps() is called, but it's
required only when upstream doesn't use it, so it's only needed to
copy frames onto XV buffers.

This patch delay the creation of the buffer pool until it's frame copy
is required.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1088>
2021-04-28 11:00:56 +00:00
Víctor Manuel Jáquez Leal
166082f3c3 va: allocator: Disable derived for Gallium if RGB and reading.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2127>
2021-04-28 12:08:58 +02:00
Víctor Manuel Jáquez Leal
ced093c738 va: allocator: Disable derived for i965 if YUV and writing.
The problem is for uploading YUV frames using derived images, is that
derived images imply tiling, so frames are wrongly uploaded.

Though derived for reading might work we cannot know the Intel graphics
generation to validate the caching. Overall, it's safer to disable derived
images for i965.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2127>
2021-04-28 12:06:17 +02:00
Víctor Manuel Jáquez Leal
2b0fa73c10 va: display: Fix typo.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2127>
2021-04-28 11:39:24 +02:00
Víctor Manuel Jáquez Leal
e2ff55b40d va: allocator: Hack for i965 to get linear RGB DMABufs.
i965 driver has a hack to provide linear dmabufs, which is required for RGB
formats, since they are directly uploaded by glupload, ignoring tiled modifiers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2127>
2021-04-28 11:39:24 +02:00
Víctor Manuel Jáquez Leal
672c977927 va: postproc: Remove unused parameter.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2127>
2021-04-28 11:39:24 +02:00
Víctor Manuel Jáquez Leal
9365073d50 va: postproc: Set usage hint generic if DMABuf.
iHD driver sets a tiled DRM modifier if surface's usage hint is set to
VPP_WRITE. This result in a garbled rendering when using glimagesink.

This patch changes the usage hint to generic if the caps feature is
DMABuf. Either way only iHD driver, so far, uses the usage hint flag.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2127>
2021-04-28 11:39:24 +02:00
Víctor Manuel Jáquez Leal
b4535093f6 va: postproc: Get info from caps in decide_allocation()
decide_allocation() occurs before set_caps(), where out_info is set,
thus setting srcpad_info with zeros or old values. Instead of it, the
caps, from the allocation query, are converted and used.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2127>
2021-04-28 11:39:24 +02:00
Timo Wischer
2ef4639fe0 avtp: crf: Remove superfluous sink_event variable
This variable was introduced by commit 12ad2a4bcd ("avtp: Introduce
the CRF Sync Element") but it was never used:
$ git log -G "sink_event" -- ext/avtp

Signed-off-by: Timo Wischer <timo.wischer@de.bosch.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2201>
2021-04-28 08:59:14 +00:00
Haihao Xiang
449f0ee52a msdkh265dec: Add support for error report too
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/909>
2021-04-28 08:30:38 +00:00
Haihao Xiang
5d891eb40c msdkh264dec: report error to user
Sometimes user want to know what the error is when decoding a stream,
This commit adds a property of report-error to msdkh264dec. When
report-error is TRUE, msdkh264dec may catch bitstream error and frame
corruption, then report the error to application by using GST_ELEMENT_ERROR

Refer to the code in
https://github.com/Intel-Media-SDK/MediaSDK/tree/master/samples

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/909>
2021-04-28 08:30:38 +00:00
Haihao Xiang
b6eca79557 msdkdec: allow sub class to add extra parameters for additional configuration
MSDK allows user add extended buffers to a bitstream for additional
configuration. This commit is to support this feature in this plugin

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/909>
2021-04-28 08:30:38 +00:00
Seungha Yang
957034d71a d3d11: Handle device change
If incoming buffer holds other d3d11 device, and user wants any device
(i.e., adapter index wasn't specified explicitly) update our device
with that of buffer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2191>
2021-04-28 16:26:58 +09:00
Seungha Yang
227aaed8d4 d3d11videosink: Delay window setup as much as possible
... so that videosink can handle device update with
d3d11 device of the first buffer

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2191>
2021-04-28 16:26:53 +09:00
Matthew Waters
c16412dd63 gl/download: add support for output memory:NVMM buffers
Currently RGBA-only.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1071>
2021-04-28 12:44:38 +10:00
Matthew Waters
94f0d9c69b gl/bufferpool: add api for retrieving the configure gl allocation params
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1071>
2021-04-28 12:44:38 +10:00
Matthew Waters
2f35aeca8c glupload: add support for uploading memory:NVMM buffers
Currently RGBA-only.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1071>
2021-04-28 12:42:15 +10:00
Matthew Waters
f770982635 glupload: guard against glEGLImageTexture2D not existing
e.g. if targetting EGL/opengl, we would attempt to use this GLES
function when wrapping EGLImage's.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1071>
2021-04-28 12:42:15 +10:00
Hou Qi
5e932395a4 v4l2object: Add interlace-mode back to caps for camera
skip_try_fmt_probes is set to TRUE for v4l2src to skip interlace-mode and
colorimetry when probe caps. gst_v4l2_object_set_format_full() will add
colorimetry back to caps when iterating over the negotiated caps. There is
one case that v4l2src is first in preview state then starts recording.
v4l2src caps will change with an additional interlace-mode structure after
renegotiation, then v4l2src needs to reset. But this camera driver can't
orphan buffer pool, it causes require buffer failed as streaming is still
in active state.

To fix this, also need to add interlace-mode back to caps for camera to
avoid reset.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/961>
2021-04-27 13:47:21 -04:00
Seungha Yang
6cd13c3b09 ges: Port to gst_print*
Sync with gst-launch, as g_print* will print broken string on Windows.
See also
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/258

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/245>
2021-04-28 01:17:12 +09:00
Seungha Yang
70c96cf0dd d3d11: Don't accept buffer pool which holds different device
At the moment, d3d11 plugin doesn't support texture sharing between
different device

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2191>
2021-04-28 00:25:57 +09:00
Seungha Yang
41218dacec d3d11decoder: Run gst-indent
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2191>
2021-04-28 00:25:56 +09:00
Aaron Boxer
f71eb29497 onnx: add plugin to apply ONNX neural network models to video
This MR provides a transform element that leverage ONNX runtime
to run AI inference on a broad range of neural network toolkits, running
on either CPU or GPU. ONNX supports 16 different providers at the
moment, so with ONNX we immediately get support for Nvidia, AMD, Xilinx
and many others.

For the first release, this plugin adds a gstonnxobjectdetector element to
detect objects in video frames. Meta data generated by the model is
attached to the video buffer as a custom GstObjectDetectorMeta meta.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1997>
2021-04-27 13:05:21 +00:00
Xavier Claessens
4ef5c91697 gstgl: Fix build when Meson >= 0.58.0rc1
"implicit_include_directories: false" now also means that current build
directory is not added to include paths by default any more. We have to
add it manually because we have some custom_target() that generate
headers in current build directory.

See https://github.com/mesonbuild/meson/issues/8700.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1125>
2021-04-27 08:26:18 +00:00
Marc Leeman
a8a45b5776 docs: minor spelling correction in README
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/200>
2021-04-27 09:22:21 +02:00
Marc Leeman
5df7f9a7e0 test-replay-server: minor spelling corrections
Bumped on these while investigating the example code.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/200>
2021-04-27 09:05:39 +02:00
Sebastian Dröge
f1ec6ddd5e decklinkvideosrc: Fix AFD/Bar VANC size check
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2193>
2021-04-26 15:03:34 +00:00
Sebastian Dröge
56af02f9c8 decklinkvideosrc: Automatically detect widescreen vs. normal NTSC/PAL
Based on the AFD aspect ratio flag the source can detect (in mode=auto)
whether this NTSC/PAL mode is actually a normal or a widescreen one and
select the caps according to that.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2193>
2021-04-26 15:03:34 +00:00
Guillaume Desmottes
5fa3325335 rtpopuspay: set MARKER flag
Set MARKER flag on first buffer after DTX.

According to RFC 3551 section 4.1 the marker bit needs to be set on
"the first packet after a silence period during which packets have
not been transmitted contiguously".

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/967>
2021-04-26 15:25:56 +02:00
Guillaume Desmottes
41ba8c1b00 rtpopuspay: add DTX support
If enabled, the payloader won't transmit empty frames.

Can be tested using:
  opusenc dtx=true bitrate-type=vbr ! rtpopuspay dtx=true

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/967>
2021-04-26 15:25:56 +02:00
Doug Nazar
a0067316e7 taglib: Update createFrame() to non-deprecated version.
ID3v2::FrameFactory::createFrame() versions not taking a Header have
been deprecated since v1.5 (Jan 2008).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/965>
2021-04-26 08:48:58 +00:00
Doug Nazar
b14c2e6fb0 opengl: Silence macOS OpenGL deprecations
As of macOS 10.14 the entire OpenGL system is deprecated. No need to
log the general warnings about it. Specific warnings are still enabled.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1123>
2021-04-24 22:26:36 -04:00
Havard Graff
d75c678479 rtpjitterbuffer: fix divide-by-zero
The estimated packet-duration can sometimes end up as zero, and dividing
by that is never a good idea...

The test reproduces the scenario, and the fix is easy.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/966>
2021-04-25 02:21:04 +02:00
Havard Graff
1368b4214b rtpjitterbuffer: clean up and improve missing packets handling
* Try to make variable and function names more clear.
* Add plenty of comments describing the logic step-by-step.
* Improve the logging around this, making the logs easier to read and
  understand when debugging these issues.

* Revise the logic of packets that are actually beyond saving in doing
  the following:
1. Do an optimistic estimation of which packets can still arrive.
2. Based on this, find which packets (and duration) are now hopelessly
   lost.
3. Issue an immediate lost-event for the hopelessly lost and then add
   lost/rtx timers for the ones we still hope to save, meaning that if
   they are to arrive, they will not be discarded.

* Revise the use of rtx-delay:
  Earlier the rtx-delay would vary, depending on the pts of the latest
  packet and the estimated pts of the packet it being issued a RTX for,
  but now that we aim to estimate the PTS of the missing packet accurately,
  the RTX delay should remain the same for all packets.
  Meaning: If the packet have a PTS of X, the delay in asked for a RTX
  for this packet is always a constant X + delay, not a variable one.

* Finally ensure that the chaotic "check-for-stall" tests uses timestamps
  that starts from 0 to make them easier to debug.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/952>
2021-04-24 13:53:58 +00:00
Edward Hervey
75fb364bf4 avviddec: Take into account coded_height for pool
Failure to do this would cause the decoders to constantly request a new
bufferpool thinking the height had changed ... whereas it hadn't.

Fixes #95

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-libav/-/merge_requests/131>
2021-04-24 10:07:31 +02:00
Seungha Yang
3ee8672897 framepositioner: Allow ANY caps features
framepositioner will not touch raw video data and therefore should
be able to accept ANY caps features

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/243>
2021-04-23 19:35:25 +00:00
Olivier Crête
4b47b96ae1 jpegparse: Don't generate timestamp for 0/1 framerates
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2194>
2021-04-23 17:54:30 +00:00