Commit graph

112906 commits

Author SHA1 Message Date
Stéphane Cerveau
f30e74bb20 faad: fix typo in element documentation
seealso is now see_also

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2323>
2021-06-21 07:35:26 +00:00
Jan Schmidt
7f29361488 parse: Don't do delayed property setting for top-level properties.
If a property is supplied to gst-launch-1.0 to set on a property that
implements GstChildProxy, it would always accept any property name
and try to set it later. This means that (for example) decodebin
will accept and not complain about property names that can never exist like:

gst-launch-1.0 videotestsrc ! decodebin NON-EXISTING_PROPERTY=adsfdasf ! fakesink

Instead, only try to do deferred property setting for property names
that contain the :: separator that indicates it's a setting on a child
that might appear later.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/832>
2021-06-21 07:32:27 +00:00
Víctor Manuel Jáquez Leal
046e92c503 tests: msdkh264dec: Run test only if factory is available.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2336>
2021-06-21 06:30:07 +00:00
Víctor Manuel Jáquez Leal
78f4777a82 msdk: Demote error log message to warning.
It is not an error that the available hardware doesn't support VA-API/MSDK. Just
none plugin features will be registered.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2336>
2021-06-21 06:30:07 +00:00
Seungha Yang
2c14a7253b libs: d3d11: Port to C++
In general, C++ COM APIs are slightly less verbose and more readable
than C APIs. And C++ supports some helper methods
(smart pointer and C++ only macros for example) which are not allowed for C.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2343>
2021-06-20 20:10:24 +09:00
Thibault Saunier
2f46350910 git-update: Respect specified revision from manifest for gst-build
This broke in b9acfcace8

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/249>
2021-06-17 21:41:10 -04:00
U. Artie Eoff
300f25ae36 msdk: declare external dependencies
Track kernel and VA driver dependencies so gstreamer
will re-inspect the plugin if any of them change.

Also, do not blacklist the plugin if !msdk_is_available
since it could be a transient issue caused by one or
more external dependency issues (e.g. wrong/missing
driver specified, but corrected by user later on).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2335>
2021-06-17 02:56:45 +00:00
Seungha Yang
058957fc22 h264parse,h265parse: Push parameter set NAL units again per segment-done
Some decoder implementations might drain out internal buffers and
reset its status on segment-done event. So, in case that
upstream stream-format is packetized but downstream supports only
byte-format, required codec-data might not be forwarded toward
downstream if such parameter set NAL units don't exist in inband
bitstream. Therefore, parse elements should re-send parameter set NAL
units like the case of flush event.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2334>
2021-06-16 18:00:39 +00:00
Nicolas Dufresne
2696bcd9e2 vp8decoder: Drain the output queue on EOS/finish
The finish() virtual method was flushing the queue, instead push the
remaining buffers. It is not required to reset in finish() unlike
drain(). This a regression causing last frame to always be lost.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2333>
2021-06-16 17:34:54 +00:00
Nicolas Dufresne
e5e2b6a652 v4l2slvp8dec: Only ask for output delay once per negotiation
While it's technically possible to change it per frame, asking for
that every frame is not very useful. This mimic H264 decoder better.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2333>
2021-06-16 17:34:54 +00:00
François Laignel
777be5fad9 Check mandatory ClockTime arguments
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/258>
2021-06-16 17:12:11 +02:00
François Laignel
973f0bf552 Check mandatory ClockTime arguments
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1205>
2021-06-16 14:52:38 +00:00
He Junyan
8d7e6bfb86 va: Improve the default mapping between rt_format and video format.
We add 12 bits entries into this default mapping. And the old mapping
is not precise. For example, the NV12 should not be used as the default
mapping for VA_RT_FORMAT_YUV422 and VA_RT_FORMAT_YUV444, it is even not
a 422 or 444 format.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2332>
2021-06-16 14:12:59 +00:00
He Junyan
0849583210 va: Add 12 bits rt_format setting in H265.
In order to support 12 bits format decoding, we need to add the
support for 12 bits rt_format in H265.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2332>
2021-06-16 14:12:59 +00:00
He Junyan
1b4c9eaebb va: Fix a typo in video format mapping.
GST_VIDEO_FORMAT_Y412_LE is a 4:4:4 format and so should be mapped
to VA_RT_YUV444_12 rt format.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2332>
2021-06-16 14:12:59 +00:00
He Junyan
7feed2f1ac h265parse: Fix a typo in get_compatible_profile_caps().
The GST_H265_PROFILE_MAIN_444_10 profile should be compatible with
GST_H265_PROFILE_SCREEN_EXTENDED_MAIN_444_10, not the current
GST_H265_PROFILE_SCREEN_EXTENDED_MAIN_10.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2328>
2021-06-16 13:23:50 +00:00
Nirbheek Chauhan
95f6c31c21 rtph265depay: update codec_data in caps regardless of format
Updating of codec_data in the caps is important to propagate changes
in sps/pps/vps via NALs. Without this, downstream does not renegotiate
when upstream changes resolution.

The comment referring to rtph264pay is from 2015 and is out of date.
rtph264pay stopped doing that in 2017 with commit
dabeed52a9

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1011>
2021-06-16 16:35:07 +05:30
François Laignel
5230cab38d Check mandatory ClockTime arguments
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/837>
2021-06-16 12:33:28 +02:00
Randy Li (ayaka)
0d746d1022 waylandsink: prevent frame callback being released twice
For those using context from the application which
would be the embedded video case, if the frame callback
is entering at the same time as window is finalizing,
a wayland proxy object would be destroyed twice, leading
the refcout less than zero in the second time, it can
throw an abort() in wayland.

For those top window case, which as a directly connection
to the compositor, they can stop the message queue then
the frame callback won't happen at the same time as the
window is finalizing. It doesn't think it would bother
them about this.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1883>
2021-06-15 16:25:17 -04:00
Nicolas Dufresne
4ac9f91921 alphadecodebin: Fix stall due to QoS
alphacombine element is a simple element that assumes buffers are always
paired, or at least that missing buffers are signalled with a GAP. The QoS
implementation in the GstVideoDecoder base class allow decoders dropping
frames independently and that could lead to stall in alphacombine.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2326>
2021-06-14 16:33:15 -04:00
Stéphane Cerveau
a71ec17cf0 jpeg2000parse, openjpeg: add support for YCrCb 4:1:1 sampling
Add YCrCb 4:1:1 support in openjpeg elements
and fix in jpeg2000parse the YCrCb 4:1:0 support

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2321>
2021-06-14 11:05:45 +02:00
Seungha Yang
a63539b213 d3d11decoder: Don't print error log when no DPB texture is available
... but we are flushing. The condition is quite expected situation
when pipeline is in the middle of seeking operation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2320>
2021-06-14 07:02:20 +00:00
Scott Moreau
885c1c605b gl/wayland: Use consistent wl_display when creating work queue for proxy wrapper
Without this, glimagesink since wayland 727c7903 fails with
gst-launch-1.0: ../src/wayland-client.c:2181: wl_proxy_set_queue:
Assertion 'proxy->display == queue->display' failed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1200>
2021-06-11 09:31:58 -06:00
Haihua Hu
58f4217468 gl/viv-fb: fix gl plugin hang when run with viv-fb backend
below commit change the window resize thread and cause viv-fb backend
hang, need move resize code after window->open is called. Otherwise,
the resize message will send to a thread that not start running and
window resize call will waiting forever.

Commit:        b887db1efe
glwindow: fix racy resize updates

Take locks around resize handling and marshall all resizes to the
windowing thread by default.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1195>
2021-06-11 04:52:40 +00:00
Yinhang Liu
8530ac286a msdkenc: add extbrc support in ext-coding-props property
The SDK can support external bitrate control [1], so add extbrc
to enable this feature.

[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/2139>
2021-06-11 02:00:51 +00:00
Yinhang Liu
ea5636af2c msdkenc: add ext-coding-props for external coding options
This property supports passing multiple parameters using GstStructure.

Example usage:
ext-coding-props="props,key0=value0,key1=value1,..."

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2139>
2021-06-11 02:00:51 +00:00
Nicolas Dufresne
025a14e7fe eglimage: Add AV12 DMABuf import support
The per plane format mapping for AV12 was missing, which would force
raw upload.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1199>
2021-06-10 12:41:31 -04:00
Nicolas Dufresne
0661b15957 eglimage: Fix wrong stride when importing DMABuf
When the code was ported to use component index instead of plane
index, the call to GST_VIDEO_INFO_PLANE_STRIDE() was accidently ported
to use component index, but this macro takes a plane index.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1199>
2021-06-10 12:39:34 -04:00
He Junyan
9f02c3fa4c Decoder: H264: Add the support for frame packing arrangement SEI message.
Frame packing arrangement SEI message is an alternative simple stereo 3D
manner for AVC. We need to recognize that SEI message and report the correct
3D caps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/420>
2021-06-10 22:22:14 +08:00
He Junyan
2db3ce32ef codecs: Fix the H265 poc out of order warning.
We always get a warning such as:
h265decoder gsth265decoder.c:1432:gst_h265_decoder_do_output_picture: \
<vah265dec0> Outputting out of order 255 -> 0, likely a broken stream
in H265 decoder.

The problem is caused because we fail to reset the last_output_poc when
we get IDR and BLA. The incoming IDR and BLA frame already bump all the
frames in the DPB, but we forget to reset the last_output_poc, which
make the POC out of order and generate the warning all the time.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2294>
2021-06-10 12:36:34 +00:00
Seungha Yang
a1350852e7 wasapi2sink: Fix ringbuffer object leak
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2315>
2021-06-10 07:48:38 +00:00
Seungha Yang
cd9b96e143 wasapi2ringbuffer: Implement GstAudioRingBuffer::pause()
WASAPI doesn't support PAUSE so it's not different from Stop().
When pipeline is in paused state, we don't need to waste CPU resource
for feeding silent buffers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2315>
2021-06-10 07:48:38 +00:00
Seungha Yang
f90506e33b d3d11memory: Implement GstAllocator::mem_copy method
There are a few places which require deep copy
(basesink on drain for example). Also this implementation can be
useful for future use case.
One probable future use case is that copying DPB texture to
another texture for in-place transform since our DPB texture is never
writable, and therefore copying is unavoidable.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2308>
2021-06-10 01:20:32 +09:00
Seungha Yang
b7abd34285 wasapi2src: Add support for loopback recording
... and add various device error handling.

This loopback implementation is functionally identical to that of wasapisrc.
When it's enabled, wasapi2src will read data from render device instead of
capture device.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2311>
2021-06-09 22:15:06 +09:00
Thibault Saunier
ea3bd58289 validate: use extract_objects to avoid rebuilding all files for the tracer
And add the tracer to the plugins list so it can be used in our
uninstalled environment.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/250>
2021-06-08 12:28:49 -04:00
Sebastian Dröge
1565b9635b appsrc: When dropping buffers before handling the initial segment use the latest input segment
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1198>
2021-06-08 17:31:02 +03:00
Seungha Yang
a8ec40c850 wasapi2: Rewrite plugin and implement audioringbuffer subclass
... based on MediaFoundation work queue API.

By this commit, wasapi2 plugin will make use of pull mode scheduling
with audioringbuffer subclass.
There are several drawbacks of audiosrc/audiosink subclassing
(not audiobasesrc/audiobasesink) for WASAPI API, which are:
* audiosrc/audiosink classes try to set high priority to
  read/write thread via MMCSS (Multimedia Class Scheduler Service)
  but it's not allowed in case of UWP application.
  In order to use MMCSS in UWP, application should use MediaFoundation
  work queue indirectly.
  Since audiosrc/audiosink scheduling model is not compatible with
  MediaFoundation's work queue model, audioringbuffer subclassing
  is required.
* WASAPI capture device might report larger packet size than expected
  (i.e., larger frames we can read than expected frame size per period).
  Meanwhile, in any case, application should drain all packets at that moment.
  In order to handle the case, wasapi/wasapi2 plugins were making use of
  GstAdapter which is obviously sub-optimal because it requires additional
  memory allocation and copy.
  By implementing audioringbuffer subclassing, we can avoid such inefficiency.

In this commit, all the device read/write operations will be moved
to newly implemented wasapi2ringbuffer class and
existing wasapi2client class will take care of device enumeration
and activation parts only.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2306>
2021-06-08 19:39:27 +09:00
Seungha Yang
4b42671c99 wasapi2: Use AUDCLNT_STREAMFLAGS_NOPERSIST flag
... so that we can disable persistence of our mute/volume status

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2306>
2021-06-08 19:39:26 +09:00
Seungha Yang
d5384ffbd0 wasapi2src: Fix doc typo
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2306>
2021-06-08 19:39:26 +09:00
Sebastian Dröge
0b9976ac46 appsrc: Correctly check if this is the first buffer that was queued
By checking the queue length this would also count events and caps. We
already keep track of the number of buffers separately so just use that.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1197>
2021-06-08 13:05:46 +03:00
Doug Nazar
b16e96dd87 Use g_memdup2() where available and add fallback for older GLib versions
glib 2.68 deprecates g_memdup(). Replace with g_memdup2() and
add fallback if compiling against older versions, since we
want to avoid deprecation warnings.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/803>
2021-06-08 07:59:05 +00:00
Thibault Saunier
c7684b48d0 wpe: Rename undeserializable_type to not_deserializable_type
Making it more readable.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2273>
2021-06-08 03:15:05 +00:00
Thibault Saunier
da150c18bb wpe: Make forwarded messages layout more like GstBinForwaded messages
Making it look more like how we do this kind of things in other places.

See: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2252#note_927653
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2273>
2021-06-08 03:15:05 +00:00
Thibault Saunier
f29e75d1da wpe: Make wpesrc!video pad an always pad
There should always be a `video` pad no matter what.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2273>
2021-06-08 03:15:05 +00:00
Thibault Saunier
870d9b8bd6 wpe: Remove unused env var
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2273>
2021-06-08 03:15:05 +00:00
Thibault Saunier
81a0125a97 wpe: Fix atomic usage
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2273>
2021-06-08 03:15:05 +00:00
Thibault Saunier
3ffd78787d wpe: Add a note able requiring tracing subsystem for message forwarding
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2273>
2021-06-08 03:15:05 +00:00
Thibault Saunier
c38e0cfdb0 wpe: Fix check on whether MEMFD_CREATE is available
The ordering of the ifdef was wrong

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2273>
2021-06-08 03:15:05 +00:00
Thibault Saunier
d93131bfee wpe: Plug a leak
We were freeing after returning

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2273>
2021-06-08 03:15:05 +00:00
Thibault Saunier
ca1812f38c Revert "wpe: Properly respect LIBGL_ALWAYS_SOFTWARE"
This causes issues I didn't see:
     https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2252#note_927633

Let's just tell people to use capsfilter to force software rendering in
`wpesrc` for now.

The intent was to allow forcing it easily in playbin2 for the CI, but
we will do it some other way and see when time comes.

This reverts commit 9415106b02.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2273>
2021-06-08 03:15:05 +00:00