Commit graph

113094 commits

Author SHA1 Message Date
Stéphane Cerveau
63de6d564e videodecoder: add API to receive subframes
A video decoder can now receive subframes and start decoding
instead of waiting for the full frame to be complete.
Subframe support will reduce latency as described in the
video encoder base class.

A unit test illustrating this API is available in
tests/check/libs/videodecoder.c.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/454>
2021-07-08 13:19:21 +02:00
Seungha Yang
f57370c4db mfvideosrc: Fix negotiation when interlace-mode is specified
Given caps does not need to be strictly subset of device caps.
Allow accept it if device caps and requested caps can intersect

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1619
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2384>
2021-07-08 19:06:28 +09:00
Kasper Steensig Jensen
674e6fcf65 Add meson description for tracer_hooks
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/849>
2021-07-08 11:48:58 +02:00
Mathieu Duponchelle
64190e7452 cccombiner: mark field 0 as valid when generating padding CDP
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2383>
2021-07-08 00:26:05 +00:00
Mathieu Duponchelle
a6d6e99f59 splitmuxsink: always use factory property when set
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1024>
2021-07-08 02:23:02 +02:00
Olivier Crête
81cbd0deb6 avviddec: Split allocation tracking from decode-only-ness
When doing subframe decoding, handle_frame will be called multiple
times, so the DECODE_ONLY flag gets re-set when it shouldn't. Instead,
let's create our own flag to track this.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-libav/-/merge_requests/66>
2021-07-07 18:45:51 +02:00
Seungha Yang
2cd83fb4ef mfvideobuffer: Don't error for unexpected Unlock/Unlock2D call
Some GPU vendor's MFT implementation calls IMFMediaBuffer::Unlock()
without previous IMFMediaBuffer::Lock() call. Which is obviously
driver bug but we can ignore the Unlock call.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2381>
2021-07-07 16:07:28 +00:00
Stéphane Cerveau
a8c2b65880 dashsink: fix crash with no pad name for representation
if there is no pad name, the representation id
was NULL, causing a crash when writing the mpd file.

gst-launch-1.0 videotestsrc num-buffers=900 ! video/x-raw, width=800,
height=600, framerate=30/1 ! x264enc ! video/x-h264, profile=high !
dashsink

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2064>
2021-07-07 13:50:35 +00:00
Stéphane Cerveau
506bd90bf7 dashsink: Add signals for allowing custom playlist/fragment
Instead of always going through the file system API we allow the
application to modify the behaviour. For the playlist itself and
fragments, the application can provide a GOutputStream. In addition the
sink notifies the application whenever a fragment can be deleted.

Following the HLS change:
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/918

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2064>
2021-07-07 13:50:35 +00:00
He Junyan
078b2699e7 codecs: h265dec: Disable the POC order warning for negative POC.
There may be leading frames after the IRAP frames, which has negative
POC. This kind of frames are allowed and they will be displayed before
the IRAP frame. So the warning should not be triggered for them. Init
the last_output_poc to G_MININT32 can avoid this.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2380>
2021-07-06 14:33:21 +00:00
He Junyan
1fa9f26a53 codecs: h264dec: Disable the POC order warning for negative POC.
There may be leading frames after the IDR frame, which has negative
POC. This kind of frames are allowed and they will be displayed before
the IDR frame. So the warning should not be triggered for them. Init
the last_output_poc to G_MININT32 can avoid this.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2380>
2021-07-06 14:33:21 +00:00
Yacine Bandou
ce0be27caf qtdemux: No need for new "application/x-cbcs" caps
Instead of using the new "application/x-cbcs" caps, we are just adding
a new structure field "ciphe-mode", to indicate which encryption scheme
is used: "cenc", "cbcs", "cbc1" or "cens".

Similarly for the protection metadata, we add the "cipher-mode" field
to specify the encryption mode with which the buffers are encrypted.

"cenc": AES-CTR (no pattern)
"cbc1": AES-CBC (no pattern)
"cens": AES-CTR (pattern specified)
"cbcs": AES-CBC (pattern specified, using a constant IV)

Currently only "cenc" and "cbcs" are supported.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1013>
2021-07-06 12:12:24 +00:00
Jan Alexander Steffens (heftig)
f50089ec63 interlace: Push the reconfigure event in the right direction
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2361>
2021-07-06 07:41:03 +00:00
Philippe Normand
304a75a67a qt: Fix clang build
The updatePaintNode method is part of the QQuickItem class interface, so needs
to be flagged as overriding the default implementation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/567>
2021-07-05 16:12:57 +01:00
He Junyan
77a2ad5b1a va: basedec: Fix some artifact when do the crop copy.
The default video converter setting will add some artifact into
the picture for 10/12 bits conversion. This make the MD5 checksum
change from the original picture.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2379>
2021-07-05 14:36:36 +00:00
Seungha Yang
0d2664c668 d3d11decoder: Enable zero-copy for Qualcomm
Qualcomm GPU works fine with current implementation now.
Noticeable difference between when it was disabled and current
d3d11 implementation is that we now support GstD3D11Memory
pool, so there will be no more frequent re-binding decoder surface anymore.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2377>
2021-07-05 12:17:55 +00:00
Philippe Normand
5f1b290fe8 qt: Add navigation events support
Currently handles only mouse events.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/567>
2021-07-05 11:44:30 +01:00
Philippe Normand
a9bb6d4572 gtk: Scroll events dispatch support
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/567>
2021-07-05 11:44:30 +01:00
Göran Jönsson
43572a8943 Protection against early RTCP packets.
When receiving RTCP packets early the funnel is not ready yet and
GST_FLOW_FLUSHING will be returned when pushing data to it's srcpad.
This causes the thread that handle RTCP packets to go to pause mode.
Since this thread is in pause mode there will be no further callbacks to
handle keep-alive for incoming RTCP packets. This will make the session
time out if the client is not using another keep-alive mechanism.

Change-Id: Idb29db05f59c06423fa693a2aeeacbe3a1883fc5
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/211>
2021-07-05 10:41:43 +00:00
Edward Hervey
8c08cdf9fe gstinfo: Improve usage of libdw for backtraces
When getting backtraces, we were always creating a new Dwfl context and then
discarding it. The problem with that is that it resulted in having to re-scan a
lot of information for every single backtrace.

In order to fix that issue, use a global on-demand Dwfl context and use it with
a lock.

Furthermore, we were scanning the mappings of the
process (dwfl_linux_proc_report) for *every single step* in the backtrace, and
that function is horrendously expensive (does sscanf on /proc/PID/maps
...). While there is a possibility that new mappings might be available (new
plugins being loaded for example), we can limit ourselves to just do it once per
backtrace.

These two modifications speed up the elements_leaks unit test (which traces all
pads with full backtraces) by a factor of 6.

Partially fixes #567

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/504>
2021-07-05 07:52:55 +00:00
Edward Hervey
49b061241e mxfdemux: Check validity of interleaved File Package
As specified by the S377 MXF core specification, if a file package has
interleaved content, then all tracks must be using the same Edit Rate

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2378>
2021-07-05 07:07:15 +00:00
Seungha Yang
65a78effdb d3d11vp9dec: Fix for incorrect use_prev_in_find_mv_refs setting
Set use_prev_in_find_mv_refs depending on context. The value seems
to be used by AMD and Qualcomm (Intel and NVIDIA doesn't make difference
as per test)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2376>
2021-07-05 15:02:53 +09:00
Haihao Xiang
04de66ee7b gstmsdkvpp: add RGBP and BGRP in src pad
It requires MFX version 2.4+

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2234>
2021-07-05 03:47:05 +00:00
Piotrek Brzeziński
3e66d05ed2 timeline: Implement snapping to markers
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/259>
2021-07-04 21:08:38 +02:00
Seungha Yang
d4f8e3cf53 mediafoundation: Port to IID_PPV_ARGS
Make code short where possible

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2375>
2021-07-04 00:38:44 +09:00
Seungha Yang
f9699b2444 mfaudioenc: Remove pointless enumerating for hardware audio encoder
Hardware audio encoder can exist in theory, but it's untested
and we are not sure whether it can be preferred over software
implementation which is implemented by MS

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2375>
2021-07-04 00:38:33 +09:00
Seungha Yang
812b9eae1d mediafoundation: Fix typos
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2375>
2021-07-04 00:38:00 +09:00
Seungha Yang
3f8632dc96 mediafoundation: Run gst-indent
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2375>
2021-07-04 00:37:57 +09:00
Seungha Yang
aa34710bb6 gl/context/wgl: Add missing NULL init
The value of uninitialized local variable is varying depending
on compiler and not guaranteed to be NULL initialized.
That results in pointing random address instead of expected function pointer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1222>
2021-07-03 11:40:25 +00:00
Jordan Petridis
765fc5703b harfbuzz.wrap: Use the latest tag instead of tip of git
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/237>
2021-07-02 17:08:48 +03:00
He Junyan
b269cd5319 va: Consider the compatibility when we get_profile() for H265 decoder.
Adding the compatile profiles when we decide the final profile used for decoding.
The final profile candidates include:
1. The profile directly specified by SPS, which is the exact one.
2. The compatile profiles decided by the upstream element such as the h265parse.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2322>
2021-07-02 10:27:41 +00:00
He Junyan
8ba730a564 h265parse: Add special profile case for profile_idc 0.
This is a work-around to identify some main profile streams having
wrong profile_idc. There are some wrongly encoded main profile streams
which doesn't have any of the profile_idc values mentioned in Annex-A,
instead, general_profile_idc has been set as zero and the
general_profile_compatibility_flag[general_profile_idc] is TRUE.
Assuming them as MAIN profile for now.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2322>
2021-07-02 10:27:41 +00:00
He Junyan
42a861fe59 h265parse: Map -intra profiles to non-intra compatible profiles.
All the -intra profiles can map to non-intra profiles as compatible
profiles, except the monochrome case for main and main-10.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2322>
2021-07-02 10:27:41 +00:00
He Junyan
ac51e41928 va: vp9dec: update segmentation and store the result.
The segmentation is stateful, its information may depend on the previous
segmentation setting. For example, if loop_filter_delta_enabled is TRUE,
the filter_level[GST_VP9_REF_FRAME_INTRA][1] should inherit the previous
frame's value and can not be calculated by the current frame's segmentation
data only. So we need to maintain the segmentation state inside the vp9
decoder and update it when the new frame header comes.

We also fix the CLAMP issue of lvl_seg and intra_lvl because of their wrong
uint type here.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2369>
2021-07-02 08:44:15 +00:00
He Junyan
17e8fea158 codecparsers: vp9statefulparser: Fix the gst_vp9_get_qindex clamp issue.
The alternate quantizer is a delta value and should be int type.
We mark it wrongly as uint, that will make CLAMP (data, 0, 255)
always choose 255 rather than 0 if the data < 0.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2369>
2021-07-02 08:44:15 +00:00
He Junyan
f38d944c0f codecparsers: vp9parser: Use macro to define the size of filter_level in Segmentation.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2369>
2021-07-02 08:44:15 +00:00
He Junyan
f941673862 codecparsers: vp9parser: Delete the verbose redefine of MAX_LOOP_FILTER.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2369>
2021-07-02 08:44:15 +00:00
He Junyan
fb4aeb6636 va: allocator: dma: Fail when mapping the non-linear buffer.
The current way of DMA buffer mapping is simply forwarding the job
to parent's map function, which is a mmap(). That can not handle the
non-linear buffers, such as tiling, compressed, etc. The incorrect
mapping of such buffers causes broken images, which are recognized
as bugs. We should directly block this kind of mapping to avoid the
misunderstanding.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2353>
2021-07-02 08:15:49 +00:00
Jan Schmidt
d270fa498c matroskamux: Always write a tags element into seekhead
If there are only stream tags, we still want to write the
tags entry into the seekhead, so that tags can be found
quickly in the player.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/905

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1020>
2021-07-02 07:45:07 +00:00
Matthew Waters
8fd2c68968 ccconverter: fix framerate caps negotiation from non-cdp to cdp
We can only convert from non-cdp to cdp within the confines of valid cdp
framerates.  The existing caps negotiation code was allowing any
framerate to convert to a cdp output which is incorrect and would hit an
assertion later.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2372>
2021-07-02 10:22:31 +03:00
Seungha Yang
adae01e4c3 qtmux: Don't need to update track per GstCaps if it's not changed
Skip GstQTMuxPad::set_caps() call for duplicated caps.
All the processing done in set_caps() method for duplicated caps
are redundant.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1019>
2021-07-02 06:22:41 +00:00
Francisco Javier Velázquez-García
6389eef70d videotestsrc: Add SMPTE75 RP-219 color bars conformant
Implement 8-bit values of SMPTE RP 2019-1:2014.  The bar widths and
heights are the result of fractions as integers.  The remainders of
widths are distributed in a way that they match the values in Table
C.1 (a) in the specification.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1063>
2021-07-01 18:03:14 +02:00
Jan Alexander Steffens (heftig)
7ab7a8ad7c videotestsrc: Add a start parameter to _blend_line
Makes it easier to paint part of a line.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1063>
2021-07-01 18:03:14 +02:00
Jan Alexander Steffens (heftig)
96decaf7ef videotestsrc: Keep tmpline unchanged in_convert_tmpline
This will allow us to repeatedly
call it to render subsequent lines.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1063>
2021-07-01 18:03:14 +02:00
Jan Schmidt
df52bdc5d4 parse: Fix a critical when using the : operator.
Fix "has no handler with id" output criticals when the :
multilink operator is used. These were caused by disconnecting
a signal handler multiple times.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/846>
2021-07-02 01:59:18 +10:00
He Junyan
5d96e9e7bd codecs: h265decoder: Consider the conformance window changes when new_sequence().
The change of conformance_window_flag and crop windows size also has impact on the
output resolution and caps. So it deserves a trigger of new_sequence() to notify
the sub class to update caps and pool.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2312>
2021-07-01 14:39:53 +00:00
Seungha Yang
b5b13a6f5c h265decoder: Don't hold reference to GstVideoCodecFrame for dropped picture
We are dropping RASL (Random Access Skipped Leading picture) which
is associated with an IRAP (Intra Random Access Picture) that has
NoRaslOutputFlag equal to 1, since the RASL picture will not be
outputted and also it should not be used for reference picture.
So, corresponding GstVideoCodecFrame should be released immediately.
Otherwise GstVideoDecoder baseclass will hold the unused frame.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2330>
2021-07-01 14:10:30 +00:00
He Junyan
677d1e0105 plugins: encode: fix a deadlock because of _drain()
We call gst_vaapiencode_drain() in gst_vaapiencode_change_state(),
whose context does not hold the stream lock of the encoder. The
current gst_vaapiencode_drain inside unlock/lock pair adds a extra
lock count to the stream lock of encoder and causes hang later.
We just remove the gst_vaapiencode_drain() and expand its logic
correctly according to the lock/unlock context.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/433>
2021-07-01 11:57:10 +00:00
He Junyan
d152ab1d37 libs: decoder: av1: Clean the film_grain_info field.
We need to clean all film_grain_info fields when the film grain
feature is not enabled. It may have random data because the picture
parameter buffer is not cleaned.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/434>
2021-07-01 11:14:15 +00:00
Sebastian Dröge
6e2924ff9c rtpssrcdemux: Remove pads and reset the element also in READY->NULL
Mostly for completeness.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1018>
2021-07-01 13:19:53 +03:00