Commit graph

113094 commits

Author SHA1 Message Date
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
Seungha Yang
00e1561bf2 d3d11decoder: Set flushing to internal pool on flush event
d3d11 decoders use internal pool for DPB texture and
Gst*Decoder::new_picture() will be blocked if internal pool is full.
We should be able to unblock in on flush-start event as expected.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2192>
2021-04-24 01:37:01 +09:00
reed.lawrence
9f2de279c5 gstframepositioner: fix operator magic number
In gst_frame_positioner_init, there was the magic number 1
when assigning the default value of the operator. Now it
has the default value for the operator pulled from the
compositor.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/241>
2021-04-23 09:01:35 -05:00
Guillaume Desmottes
309269a93b level: make properties thread-safe
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/962>
2021-04-23 15:14:44 +02:00
Doug Nazar
846442c256 tests: Don't fail tests if IPv6 not available.
On computers with IPv6 disabled it shouldn't result in a test failure.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/196>
2021-04-23 10:23:22 +00:00
Stéphane Cerveau
403e0024f1 playback-test: fix seek crash
check that app->seek_format exists before seeking.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1095>
2021-04-23 11:43:17 +02:00
Guillaume Desmottes
f61bd6239a level: disable passthrough when audio-level-meta is enabled
Ensure we receive a writable buffer to add the meta.

Fix #878

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/962>
2021-04-23 11:41:36 +02:00
Seungha Yang
e4fe65a03e d3d11: Fix wrong GstD3D11BufferPool type check
Fix typos

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2190>
2021-04-23 16:54:15 +09:00
Sebastian Dröge
c0d68d03a6 matroskamux: Don't pass a non-GObject pointer to GST_DEBUG_OBJECT and similar
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/964>
2021-04-23 08:28:06 +03:00
Edward Hervey
338db31c4a rtsp-media: Add one more case to seek avoidance
This is an extension to the previous commit. There can also be cases where the
start position is not specified, in those cases we should also avoid doing
seeking unless it's forced.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/197>
2021-04-23 07:18:48 +02:00
Zhang yuankun
722d6bb625 libs: encoder: VP9: fix > 4k encode fail issue
The VP9 spec defines the MAX_TILE_WIDTH_B64(64), which is the maximum
width of a tile in units of superblocks. So the max width of one tile
should not be larger than 64x64=4096. When the width exceeds 4k, we
need to split it into multiple tiles in columns. The current vp9 encoder
does not handle this correctly.
The command such as:
  gst-launch-1.0 videotestsrc ! video/x-raw,width=7680,height=4320 ! \
    vaapivp9enc ! fakesink
will crash.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/424>
2021-04-23 11:02:05 +08:00
Thibault Saunier
788dfdbfa6 rtpsrc: Fix wrong/NULL URI handling
We can reset the URI to NULL and this fix a deadlock in that case or
when the URI was invalid.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2132>
2021-04-23 01:23:03 +00:00
Nazar Mokrynskyi
fe190fb5eb webrtcbin: downgrade "dropping ICE candidates from SDP" from warning to debug level
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2187>
2021-04-23 00:15:26 +00:00