Commit graph

113094 commits

Author SHA1 Message Date
Sanchayan Maity
79efd372c1 udpsrc: Fix marker links
These should be with a single ':'. The double '::' results in a CI with
build failure message like below.

ERROR: [links]: (mandatory-link-not-found): Mandatory link Link GstSocketTimestamp -> None (GstSocketTimestamp) could not be resolved
ERROR: [check-missing-since-markers]: (missing-since-marker): Missing since marker for udpsrc:socket-timestamp
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/828>
2021-01-04 15:23:22 -05:00
Sanchayan Maity
e0b09a1612 udpsrc: Allow use of socket control message timestamps for DTS
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/828>
2021-01-04 15:23:22 -05:00
Thibault Saunier
be19c30254 Update theme and use new way of specifying gi language in markdown 2021-01-04 14:56:14 +00:00
Tim-Philipp Müller
89bd37f24e tagdemux: resize and trim buffer in place to fix interaction with oggdemux
Elements operating in pull mode may optionally pass a buffer to
pull_range that should be filled with the data. The only element
that does that at the moment is oggdemux operating in pull mode.

tagdemux currently creates a sub-buffer whenever a buffer pulled
from upstream (filesrc, usually) needs to be trimmed. This creates
a new buffer, however, so disregards any passed-in buffer from a
downstream oggdemux.

This would cause assertion failures and playback problems for
ogg files that contain ID3 tags at the end.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/848

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/994>
2021-01-04 14:21:43 +00:00
He Junyan
4c66a0265c va: mpeg2dec: Using the current picture's surface when missing reference.
When missing the reference frames, we should not just discard the current
frame. Some streams have group of picture header. It is an optional header
that can be used immediately before a coded I-frame to indicate to the decoder
if the first consecutive B-pictures immediately following the coded I-frame can
be reconstructed properly in the case of a random access.
In that case, the B frames may miss the previous reference and can still be
correctly decoded. We also notice that the second field of the I frame may
be set to P type, and it only ref its first field.
We should not skip all those frames, and even the frame really misses the
reference frame, some manner such as inserting grey picture should be used
to handle these cases.

The driver crashes when it needs to access the reference picture while we set
forward_reference_picture or backward_reference_picture to VA_INVALID_ID. We
now set it to current picture to avoid this. This is just a temp manner.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1929>
2021-01-04 13:09:01 +00:00
He Junyan
41d2edc964 codecs: mpeg2decoder: Creating the field based on its arriving time.
Spec says:
In a frame picture top_field_first being set to ‘1’ indicates that the
top field of the reconstructed frame is the first field output by the
decoding process. top_field_first being set to ‘0’ indicates that the
bottom field of the reconstructed frame is the first field output by
decoding process.

Here, the "output" should be interpreted just as the output order, not
including the decoding order. The field should be decoded as the order
they comes in the stream. Namely, no matter top_field_first is 0 or 1,
the first coming field is the first one to be decoded.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1929>
2021-01-04 13:09:01 +00:00
He Junyan
b2b0483d03 va: mpeg2dec: Apply buffer_flags to the output buffer.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1929>
2021-01-04 13:09:01 +00:00
He Junyan
459abad096 codecs: Add buffer_flags for mpeg2 picture.
We need to store the buffer flags such as GST_VIDEO_BUFFER_FLAG_INTERLACED
and GST_VIDEO_BUFFER_FLAG_TFF for interlaced video. Without these flags,
the VPP and display elements can not apply filter correctly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1929>
2021-01-04 13:09:01 +00:00
He Junyan
339a816c81 codecs: Reset the quant matrices for each sequence in mpeg2 decoder.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1929>
2021-01-04 13:09:01 +00:00
Matthew Waters
db15ec9286 videoflip: fix possible crash when setting the video-direction while running
A classic case of not enough locking.

One interesting thing with this is the interaction between the
rotation value and caps negotiation.  i.e. the width/height of the caps
can be swapped depending on the video-direction property.  We can't lock
the entirety of the caps negotiation for obvious reasons so we need to
do something else.  This takes the approach of trying to use a single
rotation value throughout the entirety of the negotiation and then
subsequent output frame in a kind of latching sequence.

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/792
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/836>
2021-01-04 12:10:12 +00:00
Matthew Waters
35018d67ef tests: add tests for videoflip
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/836>
2021-01-04 12:10:12 +00:00
Raghavendra
08b1485862 srt: Add authentication to srtsink and srtsrc elements
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1725>
2021-01-04 00:03:47 +05:30
Mathieu Duponchelle
06c158957d appsrc: fix signal documentation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/992>
2020-12-31 17:01:40 +00:00
Haihua Hu
a4a532c092 dashsink: fix critical log when exit dynamic pipeline
availability-start-time and publish-time shared the same
GstDateTime object, this object will be unref twice and
cause reference count issue. Should use g_value_dup_boxed()
to copy this object.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1928>
2020-12-31 10:34:50 +08:00
Edward Hervey
65b6994df6 videoaggregator: Pop out old buffers on timeout
This situation happens in the situation where an input stream has a framerate
exceeding the timeout latency (Ex: 1fps with a latency of 500ms) and an input
stream greater than output framerate (ex: 60fps in, 30 fps out).

The problem that would happen is that we would timeout, but then buffers from
the fast input stream would only be popped out one by one.... until a buffer
reaches the low-framerate input stream at which point they would quickly be
popped out/used. The resulting output would be "slow ... fast ... slow ... fast"
of that input fast stream.

In order to avoid this situation, whenever we detect a late buffer, check if
there's a next one and re-check with that one.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/990>
2020-12-30 16:03:13 +01:00
Ignacio Casal Quinteiro
219b659320 deinterlace: force -DPREFIX on macos
This is due to a bug in meson where it will not detect properly
the compiler if the symbols need an undercore.
https://github.com/mesonbuild/meson/issues/5482

Fixes #821

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/845>
2020-12-30 13:40:35 +01:00
Haihao Xiang
1f1a5b4ad1 msdkenc{h264,h265}: add min-qp and max-qp properties
The SDK allows user to set a QP range [1], so add min-qp and max-qp to
sepecify QP range. By default, there is no limitations on QP.

[1] https://github.com/Intel-Media-SDK/MediaSDK/blob/master/doc/mediasdk-man.md#mfxextcodingoption2

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1908>
2020-12-30 06:40:36 +00:00
Haihao Xiang
7bc3d51b42 msdkenc{h264,h265}: add p-pyramid property
The SDK can support P-Pyramid reference structure [1], so add a new
property to enable this feature in msdkenc{h264,h265}.

[1] https://github.com/Intel-Media-SDK/MediaSDK/blob/master/doc/mediasdk-man.md#preftype

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1908>
2020-12-30 06:40:36 +00:00
Haihao Xiang
af988e282a msdkh265enc: add b-pyramid property
Like as msdkh264enc, b-pyramid is added to enable B-Pyramid reference
structure for H265 encoding

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1908>
2020-12-30 06:40:36 +00:00
Haihao Xiang
ff206f6525 msdkh265enc: add transform-skip property
Since the SDK API 1.26, TransformSkip was added to control
transform_skip_enabled_flag setting in PPS [1]

[1] https://github.com/Intel-Media-SDK/MediaSDK/blob/master/doc/mediasdk-man.md#mfxextcodingoption3

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1908>
2020-12-30 06:40:36 +00:00
Haihao Xiang
bdff6f5e42 msdk: needn't close mfx session when failed
Otherwise we will get double free issue because mfx session is closed in
finalize. See
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1867#note_739346
for the double free issue.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1916>
2020-12-30 05:08:52 +00:00
Mathieu Duponchelle
e0a4d3ac4e compositor/blend.c: fix MT checker pattern
When filling the checker pattern from multiple threads, y_start
needs to be taken into account to determine the shade of the
current pixel.

Example pipeline:

gst-launch-1.0 videotestsrc ! video/x-raw, width=1920, height=1080, format=I420 ! \
  queue ! compositor sink_0::xpos=200 ! video/x-raw, format=I420 ! videoconvert ! \
  xvimagesink

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/988>
2020-12-29 22:48:08 +00:00
Mathieu Duponchelle
247f821826 compositor/blend.c: fix MT fill_checker for YUY2
The initial byte offset should be calculated from the stride,
not from the dest_add variable

Example pipeline:

gst-launch-1.0 videotestsrc ! video/x-raw, width=1920, height=1080, format=YUY2 ! \
  queue ! compositor sink_0::xpos=200 ! video/x-raw, format=YUY2 ! xvimagesink

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/988>
2020-12-29 22:48:08 +00:00
Mathieu Duponchelle
8ff5079e5e compositor/blend: fix blending of subsampled components
The correct way to determine the byte offset at a certain yoffset
in a subsampled component is to shift the yoffset by the component's
hsub

This fixes out-of-bounds memory accesses and visible artefacts,
example pipeline with the samples from #802:

gst-launch-1.0 compositor name=vmixer sink_1::xpos=1910 sink_1::ypos=1080 ! \
    videoconvert ! videorate ! xvimagesink \
  filesrc location=VID_20200723_203606.mp4 ! decodebin name=demux1 ! \
    queue ! videoflip method=vertical-flip ! vmixer. \
  filesrc location=bridgeoverstubbledwater.mp4 ! decodebin name=demux2 ! \
    queue ! vmixer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/988>
2020-12-29 22:48:08 +00:00
Olivier Crête
51ef4557b5 webrtcstats: PLI/FIR/NACK direction are the opposite of the media
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1924>
2020-12-29 15:07:03 -05:00
Seungha Yang
8f2cab6c03 avauddec: Drain decoder on decoding failure
... and call finish_frame() so that baseclass can reset internal
status. Otherwise baseclass will keep holding the status for
decoding failed frame which will result in outputting buffer with
wrong timestamp.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-libav/-/merge_requests/112>
2020-12-29 16:27:30 +00:00
Sebastian Dröge
b258144c16 assrender: Don't try unlocking unlocked mutex
When flushing right at the beginning of the video chain function or
when failing negotiation at the top of the function, the assrender mutex
would be unlocked without being previously locked.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1918>
2020-12-29 11:19:53 +00:00
Seungha Yang
68a47eb316 d3d11compositor: Add support for resolution change
Not only for position update (e.g., xpos, ypos),
we need to configure shader again per resolution change of each
input stream.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1912>
2020-12-28 16:05:20 +00:00
Seungha Yang
4151e8e052 d3d11shader: Fix ID3DBlob object leak
Even if HLSL compiler was able to compile our shader code, D3DCompile()
might return ID3DBlob object for compile warnings and the object
should be released.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1914>
2020-12-28 14:18:36 +00:00
He Junyan
29be6ff83a codecs: Fix a typo in mpeg2 stateless decoder base class.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1915>
2020-12-28 17:13:22 +08:00
Víctor Manuel Jáquez Leal
f1fe62dbe5 va: mpeg2dec: cosmetic changes
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1798>
2020-12-28 13:17:21 +08:00
Víctor Manuel Jáquez Leal
060c54ab07 codecs: mpeg2decoder: fix documentation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1798>
2020-12-28 13:15:50 +08:00
Víctor Manuel Jáquez Leal
5243048cb0 codecs: mpeg2decoder: simplify macros
For constructors, instead of casting to pointers, cast to the structures.

For compare, use inlined functions.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1798>
2020-12-28 13:14:51 +08:00
He Junyan
19811759d6 va: Add mpeg2 VA decoder.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1798>
2020-12-28 13:14:06 +08:00
He Junyan
0e161dd363 codecs: Add mpeg2 stateless decoder base class.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1798>
2020-12-28 13:05:29 +08:00
Seungha Yang
e82f1f8b0b mfvideoenc: Re-define default GOP size value
The behavior for zero AVEncMPVGOPSize value would be
varying depending on GPU vendor implementation and some
GPU will produce keyframe only once at the beginning of encoding.
That's unlikely expected result for users.

To make this property behave consistently among various GPUs,
this commit will change default value of "gop-size" property to -1
which means "auto". When "gop-size" is unspecified, then
mfvideoenc will calculate GOP size based on framerate
like that of our x264enc implementation.

See also
https://docs.microsoft.com/en-us/windows/win32/directshow/avencmpvgopsize-property

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1911>
2020-12-27 03:58:39 +09:00
Seungha Yang
8df131ab42 mfvideoenc: Fix use of uninitialized value
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1911>
2020-12-27 03:51:16 +09:00
Seungha Yang
7eab7ae8cc d3d11device: Add property for getting adapter LUID
LUID (Locally Unique Identifier) can used for identifying GPU
and that's required for some Windows APIs (e.g., MFTEnum2()) to setup device.

See also
https://docs.microsoft.com/en-us/windows/win32/api/mfapi/nf-mfapi-mftenum2

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1910>
2020-12-26 23:50:52 +09:00
Seungha Yang
4b522dd355 mfvideoenc: Remove duplicated class registration code
Each codec subclass has the same code for class/element registration,
so we can move the code into one helper methodm and that will make
future enhancement simple.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1909>
2020-12-26 14:25:06 +00:00
Baek
d614591657 Fix typo
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-docs/-/merge_requests/129>
2020-12-26 07:12:33 +00:00
Sebastian Dröge
15fb391401 decodebin3: When reconfiguring a slot make sure that the ghostpad is unlinked
This was only taken care of previously if there was a decoder before.
However if previously a decoder was not needed then the ghostpad
would've been linked directly to the slot's srcpad.

Reconfiguring the slot requires this to be undone so that linking can
happen normally.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/985>
2020-12-24 11:44:27 +02:00
Haihao Xiang
86fdd39147 msdk: check GstMsdkContext instead of mfxSession instance
When creating a GstMsdkContext instance, it also creates a mfxSession
instance, so we may check GstMsdkContext instead of mfxSession instance
to make sure MSDK is available. In addition, according to MSDK doc [1],
MFXVideoCORE_SetHandle function should be executed before any actual
usage of library including queries, otherwise the behavior is
unexpected, so we should call MFXVideoCORE_QueryPlatform after
MFXVideoCORE_SetHandle on Linux

[1] https://github.com/Intel-Media-SDK/MediaSDK/blob/master/doc/mediasdk-man.md#working-with-va-api-applications

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1867>
2020-12-24 02:53:13 +00:00
John Lindgren
d6d3ecaafb Add test cases for mountpoint of '/'
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/168>
2020-12-23 19:45:13 +00:00
John Lindgren
c4762da9b7 Make a mount point of "/" work correctly.
As far as I can tell, this is neither explicitly allowed nor
forbidden by RFC 7826.

Meanwhile, URLs such as rtsp://<IP>:554 or rtsp://<IP>:554/ are in
use in the wild (presumably with non-GStreamer servers).

GStreamer's prior behavior was confusing, in that
gst_rtsp_mount_points_add_factory() would appear to accept a mount
path of "" or "/", but later connection attempts would fail with a
"media not found" error.

This commit makes a mount path of "/" work for either form of URL,
while an empty mount path ("") is rejected and logs a warning.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/168>
2020-12-23 19:45:13 +00:00
Dmitry Samoylov
384fba13f4 gst: Fix doc comments
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/725>
2020-12-24 00:40:33 +07:00
Seungha Yang
1138c798ff d3d11: Remove unnecessary helper methods
We can query selected D3D_FEATURE_LEVEL and factory version
by using native D3D11 API

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1906>
2020-12-23 21:21:55 +09:00
Jordan Petridis
4afcde9c60 ci_template: re-enable the extraction of logs for windows jobs
Most of the networking issues with the runner should be fixed now.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-ci/-/merge_requests/385>
2020-12-23 04:46:19 +02:00
Seungha Yang
2ca298d459 d3d11: Re-implement Desktop Duplication source
Add a new video source element "d3d11desktopdupsrc" for capturing desktop image
via Desktop Duplication based on Microsoft's Desktop Duplication sample available at
https://github.com/microsoft/Windows-classic-samples/tree/master/Samples/DXGIDesktopDuplication

This element is expected to be a replacement of existing dxgiscreencapsrc
element in winscreencap plugin.

Currently this element can support (but dxgiscreencapsrc cannot)
- Copying captured D3D11 texture to output buffer without download
- Support desktop session transition
  e.g., can capture desktop without error even in case that
  "Lock desktop" and "Permission dialog"
- Multiple d3d11desktopdupsrc elements can capture the same monitor

Not yet implemented features
- Cropping rect is not implemented, but that can be handled by downstream
- Mult-monitor is not supported. But that is also can be implemented by
  downstream element for example via multiple d3d11desktopdup elements
  with d3d11compositor

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1855>
2020-12-22 19:23:25 +00:00
Michael Tretter
77e6c98f6f pipeline: clarify that applications should handle bus messages
The pipeline posts messages on the bus even if an application does not
handle the messages. This is expected behavior but may leak messages if
the messages are not handled.

Clarify the documentation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/680>
2020-12-22 14:00:02 +00:00
Seungha Yang
4337031430 d3d11device: Add an optional flags argument for creating device
Extend gst_d3d11_device_new() method so that caller can specify
D3D11_CREATE_DEVICE_FLAG value to use.

See https://docs.microsoft.com/en-us/windows/win32/api/d3d11/ne-d3d11-d3d11_create_device_flag
for more detail about D3D11_CREATE_DEVICE_FLAG

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1901>
2020-12-22 01:14:54 +09:00