Edward Hervey [Thu, 15 Jul 2021 08:16:34 +0000 (10:16 +0200)]
mxfdemux: Refactor pull seek
In order to figure out the exact start position (backed by a keyframe) accross
all tracks, we first figure out the backing keyframe position, and *then* seek
to that position.
Avoids ending up in situations where we would properly seek to the backing
keyframe on video ... but not on the audio streams (they would have been set to
the original non-keyframe position). Fixes key-unit seeking.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2371>
Edward Hervey [Wed, 14 Jul 2021 05:58:01 +0000 (07:58 +0200)]
mxfaes-bwf: Handle new custom-constant-sized variant
Defined by Amendment 2:2013 to SMPTE ST 382:2007
Also define a new "UNKNOWN" wrapping type to make the difference with known
wrapping types
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2371>
Edward Hervey [Wed, 14 Jul 2021 05:54:38 +0000 (07:54 +0200)]
mxfmpeg: Fix essence coding detection
The picture essence coding matching was wrong. Use the proper "base" MXFUL for
video mpeg compression for matching.
Also handle the case where some old files would put the essence container label
in the essence coding field
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2371>
Edward Hervey [Thu, 1 Jul 2021 06:35:01 +0000 (08:35 +0200)]
mxfdemux: Refactor index table and offset handling
* Streamline offset <=> entry handling. Historically the demuxer didn't support
information from index tables and stored the discovered information in an array
per track. When index table support was added, a parallel system was setup for
that relationship. This commit unifies this into one system with the
`find_edit_entry()` and `find_entry_for_offset()` functions.
* By extension, per-track offset entry tables are only created/used if no index
table is present for those tracks.
* Use index table information as-is. The index table system from MXF is quite
complex and there are various ways to use the information contained
within. Instead of converting that information we store the data from the tables
as-is and extract the needed information when needed.
* Handle index tables without entries (i.e. all content package units are of the
same size).
* Allow collecting index table segments as we go instead of only once if a
random-index-pack is present. This also improves support of some files in
push-mode.
* When searching for keyframe entries, use the keyframe_offset if
present (speeds up searching).
* For interleaved content (i.e. several tracks in the sample essence container),
we use a system to be able to identify the position of each track in the delta
entries of index tables.
* Handle temporal offset only on tracks which *do* need it (as specified in the
delta entries of the index tables). If present, those offsets are stored in a
pre-processed table which allows computing PTS from DTS with a simple offset.
* Add a quirk for files which are known to be have wrongly stored temporal
offsets.
* Overall opens the way to handle more types of MXF files, especially those with
non-frame-wrapping.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2371>
Edward Hervey [Tue, 29 Jun 2021 13:29:36 +0000 (15:29 +0200)]
mxfdemux: Drop duplicate seek events
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2371>
Edward Hervey [Thu, 24 Jun 2021 07:53:08 +0000 (09:53 +0200)]
mxf: Improve index entry debug log
By printing out the various known flag values
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2371>
Edward Hervey [Wed, 23 Jun 2021 07:08:33 +0000 (09:08 +0200)]
mxf: Demote error message when resolving valid empty reference
A Source Clip can have zero'd SourcePackageID and SourceTrackID, this indicates
it terminates the source reference chain
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2371>
Edward Hervey [Thu, 17 Jun 2021 14:38:54 +0000 (16:38 +0200)]
mxfdemux: Handle temporal reordering shift
This is similar to how the same issue was handled in qtdemux.
In order for the "DTS <= PTS" constraint to be respected, we calculate the
maximum temporal reordering that can happen (via index tables).
If there is a non-0 temporal reordering, we:
* Shift all outgoing PTS by that amount
* Shift segment for that stream by that amount
* Don't modify DTS (i.e. they might end up having negative running-time, before
the start of the segment)
Also ensure all entries have a valid PTS set, previously this wouldn't be set
for entries with a temporal offset of 0.
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/584
(and maybe a lot of other issues)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2371>
Víctor Manuel Jáquez Leal [Sat, 17 Jul 2021 18:49:15 +0000 (20:49 +0200)]
va: vp9dec: Minor cleanups.
Added a comment with a future to-do, enhanced another comment and
fixed a typo in an error log message.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2417>
Víctor Manuel Jáquez Leal [Sat, 17 Jul 2021 18:48:21 +0000 (20:48 +0200)]
va: decoder: Group decoder methods.
Move up gst_va_decoder_get_config() to group decoders function in the
same file area.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2417>
Víctor Manuel Jáquez Leal [Sat, 17 Jul 2021 18:45:48 +0000 (20:45 +0200)]
va: Refactor _format_changed() to _config_is_equal().
Change gst_va_decoder_format_changed() to
gst_va_decoder_config_is_equal(), which is more similar with other
GStreamer API.
The function call is replaced but it has to be negated because the
return value is the opposite.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2417>
Víctor Manuel Jáquez Leal [Sat, 17 Jul 2021 18:37:52 +0000 (20:37 +0200)]
va: Refactor _change_resolution() to _update_frame_size().
Rename gst_va_decoder_change_resolution() to
gst_va_decoder_update_frame_size() which resembles
gst_va_decoder_set_frame_size().
Also added a comment to clarify the function use and makes more
specific the error message.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2417>
Víctor Manuel Jáquez Leal [Sat, 17 Jul 2021 18:29:45 +0000 (20:29 +0200)]
va: Refactor _set_format() to _set_frame_size().
Renamed gst_va_decoder_set_format() to
gst_va_decoder_set_frame_size_with_surfaces() which resembles better
the passed parameters. Internally it creates the vaContext.
Added gst_va_decoder_set_frame_size() which is an alias of
gst_va_decoder_set_frame_size_with_surfaces() without surfaces. This
is the function which replaces gst_va_decoder_set_format() where
used.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2417>
He Junyan [Fri, 16 Jul 2021 07:24:11 +0000 (15:24 +0800)]
codecs: h265decoder: Fix a typo of NumPocTotalCurr when process ref pic list.
We should use the NumPocTotalCurr value stored in decoder, which is a calculated
valid value, rather than use the invalid value in the slice header. Most of the
time, the NumPocTotalCurr is 0 and make the tmp_refs a very short length, and
causes the decoder's wrong result.
By the way, the NumPocTotalCurr is not the correct name specified in H265 spec,
its name should be NumPicTotalCurr. We change it to the correct name.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2414>
He Junyan [Fri, 16 Jul 2021 05:21:11 +0000 (13:21 +0800)]
va: h265dec: Do not add non reference frames into ref list.
The VA's ReferenceFrames should only contain the reference frame, we
should not add the non reference frames into this list.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2414>
Seungha Yang [Thu, 15 Jul 2021 10:44:21 +0000 (19:44 +0900)]
tests: Enable closedcaption test on Windows
... if closedcaption plugin is available
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2411>
Seungha Yang [Thu, 15 Jul 2021 07:44:18 +0000 (16:44 +0900)]
mfvideoenc: Disable RGB format support
Some GPUs support BGRA format and it will be converted to subsampled
YUV format by GPU internally. Disable this implicit conversion
since the conversion parameters such as input/output colorimetry
are not exposed nor it's written in bitstream (e.g., VUI).
We prefer explicit conversion via our conversion elements.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2410>
He Junyan [Thu, 15 Jul 2021 13:32:54 +0000 (21:32 +0800)]
va: h265dec: Fix a temp var overflow bug when write pred weight table.
The temp guint8 var of delta_chroma_offset_l0 and delta_chroma_offset_l1
can not cover the full range of delta_chroma_weight_l0/1 in the slice
header. When overflow happens, the decoder result is wrong.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2412>
Philippe Normand [Mon, 12 Jul 2021 11:08:20 +0000 (12:08 +0100)]
dash: Store entire ContentProtection node in protection event data
Some manifests use the ContentProtection node to store additional information
such as the license server url. Our MPD parser used to process the
ContentProtection node, extracting Playready PSSH boxes. However for other DRM
systems, only the `value` attribute was passed down to the protection event, so
for example, Widevine data was not parsed at all and "Widevine" was passed to
the event, which is not very useful for decryptors that require a PSSH init
data.
Parsing should now be done by decryptors which will receive the entire
ContentProtection XML node as a string. This gives more "freedom" to the
decryptor which can then detect and parse custom nodes as well.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2400>
He Junyan [Wed, 14 Jul 2021 14:36:52 +0000 (22:36 +0800)]
va: vp9dec: We need to check the resolution changes for every frame.
The VP9 streams have the ability to change the resolution dynamically
at any time point. It does not send ad KEY frame before change the
resolution, even the INTER frame can change the resolution immediately.
So we need to check the resolution change for each frame and do the
re-negiotiation if needed.
Some insaned stream may play in resolution A first and then dynamically
changes to B, and after 1 or 2 frames, it use a show_existing_frame to
repeat the old frame of resolution A before. So, not only new_picture(),
but also duplicate_picture() need to check this.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2407>
He Junyan [Wed, 14 Jul 2021 06:43:51 +0000 (14:43 +0800)]
va: vp9dec: Do not re-create context for dynamical resolution change.
The driver for VP9 should have the ability to handle the dynamical resolution
changes. So if only the resolution changes, we should not re-create the config
and context in negotiation.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2407>
He Junyan [Wed, 14 Jul 2021 06:27:34 +0000 (14:27 +0800)]
va: decoder: Add helper functions to get and change the resolution.
Some codecs such as VP9, its config and context have the ability to
dynamically. When we only change the width and height, no need to
re-create the config and context. The helper function can just change
the resolution without re-creating config and context.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2407>
Jan Schmidt [Fri, 28 May 2021 20:03:26 +0000 (06:03 +1000)]
mpegtsmux: Quieten "missed PCR" warnings in VBR mode.
When the muxer is operating in VBR mode, it's kind of expected
for now that we might not put the PCR in exactly the right place,
because the muxer doesn't schedule packets that way. In that case
don't warn constantly about the PCR ending up a few ms off target.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2295>
Matthew Waters [Tue, 13 Jul 2021 11:38:10 +0000 (21:38 +1000)]
rtmp2src: workaround a GLib race when destroying a GMainContext/GSource
https://gitlab.gnome.org/GNOME/glib/-/issues/803
Basically, if destruction of a GSource and its associated GMainContext are
not synchronised, Then the GSource destruction can access freed
GMainContext resources and cause a crash. This is not super common but
can happen.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2405>
Mads Buvik Sandvei [Thu, 8 Jul 2021 12:25:23 +0000 (14:25 +0200)]
codecs: h265decoder: Always free messages while parsing SEI
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2390>
Seungha Yang [Wed, 14 Jul 2021 10:39:11 +0000 (19:39 +0900)]
vp9parse: Skip parsing decode-only frame
Decode-only frame (i.e., show_existing_frame == 1) doesn't hold
any valid information apart from the index of frame to be duplicated.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2408>
Philippe Normand [Tue, 13 Jul 2021 15:55:30 +0000 (16:55 +0100)]
wpesrcbin: Use gst_buffer_new_memdup()
g_memdup() is deprecated.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2406>
He Junyan [Mon, 12 Jul 2021 15:25:02 +0000 (23:25 +0800)]
codecs: vp9statefulparser: not init segmentation_abs_or_delta_update.
The segmentation_abs_or_delta_update is a stateful var, it should not
be inited every time when parsing the segmentation.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2403>
Seungha Yang [Mon, 12 Jul 2021 14:21:29 +0000 (23:21 +0900)]
tests: wasapi2: Add more device reuse cases
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2402>
Seungha Yang [Mon, 12 Jul 2021 13:17:22 +0000 (22:17 +0900)]
wasapi2ringbuffer: Close IAudioClient on GstAudioRingBuffer::release
IAudioClient interface is not reusable once it's initialized.
So we should close the handle and reopen it.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2402>
Seungha Yang [Mon, 12 Jul 2021 18:35:22 +0000 (03:35 +0900)]
wasapi2ringbuffer: Run gst-indent
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2402>
Daniel Almeida [Mon, 12 Jul 2021 12:01:06 +0000 (09:01 -0300)]
codecparsers: av1: fix underflow in last_frame_idx
The spec mandates this field be parsed using unsigned arithmetic. Nevertheless,
av1parser will use -1 apparently as an uninitialized value in
gst_av1_parse_frame_header. This immediately underflows last_frame_idx
though, since its type was defined as guint8. Fix this by converting to gint8.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2401>
Jakub Janků [Thu, 18 Mar 2021 09:55:58 +0000 (10:55 +0100)]
wasapi: fix reinit of audioclient in prepare()
When the sink goes from PLAYING to READY and then back to PLAYING,
the initialization of the audioclient in prepare() fails with the
error AUDCLNT_E_ALREADY_INITIALIZED. As a result, the playback
stops.
To fix this, we need to drop the AudioClient in unprepare() and
grab a new one in prepare() to be able to initialize it again
with the new buffer spec.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2096>
Jakub Janků [Wed, 17 Mar 2021 21:45:57 +0000 (22:45 +0100)]
wasapi: split gst_wasapi_util_get_device_client()
The functionality now resides in
gst_wasapi_util_get_device() and
gst_wasapi_util_get_audio_client().
This is a preparatory patch. It will be used in the following
patch to init/deinit the AudioClient separately from the device.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2096>
Jakub Janků [Sun, 11 Jul 2021 16:14:46 +0000 (18:14 +0200)]
tests: wasapi: check PLAYING -> READY -> PLAYING
Such sequence of state changes is valid and no error should happen.
At the moment, the test fails. Following patches aim to fix it.
Partially based on the code in tests/check/elements/wasapi2.c
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2096>
Guido Günther [Fri, 9 Jul 2021 12:55:43 +0000 (14:55 +0200)]
play: Emit correct signal
SIGNAL_MEDIA_INFO_UPDATED should be emitted on media info changes,
not SIGNAL_VIDEO_DIMENSIONS_CHANGED.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2398>
Víctor Manuel Jáquez Leal [Fri, 5 Mar 2021 08:18:15 +0000 (09:18 +0100)]
vulkan: Declare missing auto-pointer cleanup functions.
Also removed a couple guards since, given the glib dependency, they
are set.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2396>
Víctor Manuel Jáquez Leal [Wed, 3 Mar 2021 11:54:20 +0000 (12:54 +0100)]
vulkan: filter: Use filter variable name for choosing queue.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2396>
Víctor Manuel Jáquez Leal [Wed, 3 Mar 2021 07:50:13 +0000 (08:50 +0100)]
vulkansink: Fix element metadata.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2396>
Yinhang Liu [Fri, 25 Jun 2021 01:19:25 +0000 (09:19 +0800)]
msdkvpp: use NV12 as default format on srcpad
By default, sinkpad is NV12 format and srcpad is BGRA format, the
different format will trigger an implicit format conversion in
msdkvpp, which will cause performance drop.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2394>
Dominique Martinet [Mon, 31 May 2021 23:40:17 +0000 (08:40 +0900)]
gst-libs/gst/wayland: handle display passing better
failure to pass a display in 'handle' would result in uninitialized value
being returned, which would often segfault later down the road when trying
to initialize gstreamer context with it.
Check the return value of gst_structure_get() to make sure we return valid
data.
Furthermore, the gstglimagesink in gst-plugins-base also has a similar
mechanism but uses 'display' as field name to pass the value; instead of
requiring the application to behave differently depending on what sink
was automatically detected just try to read both values here, with display
being the new default.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2292>
Philippe Normand [Thu, 8 Jul 2021 13:46:11 +0000 (14:46 +0100)]
dashdemux: Log protection events on corresponding pad
GstDashDemuxStream is not a GstObject, so use its pad as associated object when
emitting log messages.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2389>
He Junyan [Thu, 8 Jul 2021 08:49:27 +0000 (16:49 +0800)]
va: vpp: Improve the color properties setting.
The current setting of color properties are not very correct and
we will get some kind of "unknown Color Standard for YUV format"
warnings printed out by drivers. The video-color already provides
some standard APIs for us, and we can use them directly.
We also change the logic to: Finding the exactly match or explicit
standard first. If not found, we continue to find the most similar
one.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2385>
Seungha Yang [Thu, 8 Jul 2021 10:03:06 +0000 (19:03 +0900)]
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>
Mathieu Duponchelle [Thu, 8 Jul 2021 00:24:18 +0000 (02:24 +0200)]
cccombiner: mark field 0 as valid when generating padding CDP
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2383>
Seungha Yang [Tue, 6 Jul 2021 08:14:21 +0000 (17:14 +0900)]
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>
Stéphane Cerveau [Wed, 30 Jun 2021 08:30:43 +0000 (10:30 +0200)]
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>
Stéphane Cerveau [Tue, 9 Mar 2021 10:40:43 +0000 (11:40 +0100)]
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>
He Junyan [Tue, 6 Jul 2021 06:06:24 +0000 (14:06 +0800)]
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>
He Junyan [Tue, 6 Jul 2021 05:38:16 +0000 (13:38 +0800)]
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>
Jan Alexander Steffens (heftig) [Fri, 25 Jun 2021 13:57:03 +0000 (15:57 +0200)]
interlace: Push the reconfigure event in the right direction
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2361>
He Junyan [Mon, 5 Jul 2021 07:44:34 +0000 (15:44 +0800)]
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>
Seungha Yang [Sun, 4 Jul 2021 17:05:03 +0000 (02:05 +0900)]
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>
Edward Hervey [Mon, 5 Jul 2021 05:42:39 +0000 (07:42 +0200)]
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>
Seungha Yang [Sun, 4 Jul 2021 16:54:02 +0000 (01:54 +0900)]
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>
Haihao Xiang [Tue, 11 May 2021 06:07:14 +0000 (14:07 +0800)]
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>
Seungha Yang [Sat, 3 Jul 2021 15:36:27 +0000 (00:36 +0900)]
mediafoundation: Port to IID_PPV_ARGS
Make code short where possible
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2375>
Seungha Yang [Sat, 3 Jul 2021 15:24:09 +0000 (00:24 +0900)]
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>
Seungha Yang [Sat, 3 Jul 2021 14:12:08 +0000 (23:12 +0900)]
mediafoundation: Fix typos
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2375>
Seungha Yang [Sat, 3 Jul 2021 13:56:48 +0000 (22:56 +0900)]
mediafoundation: Run gst-indent
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2375>
He Junyan [Sat, 26 Jun 2021 13:42:37 +0000 (21:42 +0800)]
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>
He Junyan [Sun, 27 Jun 2021 07:34:28 +0000 (15:34 +0800)]
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>
He Junyan [Sat, 26 Jun 2021 07:11:47 +0000 (15:11 +0800)]
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>
He Junyan [Thu, 1 Jul 2021 11:27:28 +0000 (19:27 +0800)]
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>
He Junyan [Wed, 30 Jun 2021 07:23:15 +0000 (15:23 +0800)]
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>
He Junyan [Wed, 30 Jun 2021 07:32:42 +0000 (15:32 +0800)]
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>
He Junyan [Wed, 30 Jun 2021 04:15:42 +0000 (12:15 +0800)]
codecparsers: vp9parser: Delete the verbose redefine of MAX_LOOP_FILTER.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2369>
He Junyan [Tue, 29 Jun 2021 15:21:24 +0000 (23:21 +0800)]
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>
Matthew Waters [Fri, 2 Jul 2021 03:10:25 +0000 (13:10 +1000)]
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>
He Junyan [Wed, 9 Jun 2021 07:16:39 +0000 (15:16 +0800)]
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>
Seungha Yang [Tue, 15 Jun 2021 16:07:09 +0000 (01:07 +0900)]
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>
Edward Hervey [Mon, 21 Jun 2021 11:23:13 +0000 (13:23 +0200)]
mxfvanc: Handle empty ANC essence
Not having any *actual* ANC is totally fine and common usage with several MXF
variants.
In order to properly advance the streams, the essence handler returns an empty
GAP buffer which gets converted to a GST_EVENT_GAP.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2345>
Seungha Yang [Wed, 30 Jun 2021 09:11:46 +0000 (18:11 +0900)]
mfvideoenc: Don't ignore previous flow return value
In case of ASYNC MFT (hardware encoder), we were ignoring previous
finish_frame or pad_push return value. so, error wasn't propagated.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2370>
Seungha Yang [Wed, 19 May 2021 15:49:15 +0000 (00:49 +0900)]
d3d11compositor: Add scaling policy to support PAR-aware scaling
Identical to https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1156
but for D3D11.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2263>
youngsoo.lee [Wed, 30 Jun 2021 04:56:49 +0000 (13:56 +0900)]
opencv: Fix build error on macOS
The build fails on macos with the following error:
/usr/local/Cellar/opencv/4.5.0_5/include/opencv4/opencv2/core/mat.hpp:2226:15: error: no template named 'initializer_list' in namespace 'std'
Mat_(std::initializer_list<_Tp> values);
fatal error: too many errors emitted, stopping now [-ferror-limit=]
35 warnings and 20 errors generated.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2368>
Ezequiel Garcia [Wed, 3 Mar 2021 18:38:45 +0000 (15:38 -0300)]
v4l2codecs: vp8: Check kernel version
Print a warning if the kernel version is too old.
Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2075>
Ezequiel Garcia [Tue, 2 Mar 2021 21:13:27 +0000 (18:13 -0300)]
v4l2codecs: vp8: Update to the new uAPI
Starting from Linux v5.13, the V4L2 stateless VP8 uAPI
is updated and stable.
Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2075>
Seungha Yang [Sat, 26 Jun 2021 16:15:49 +0000 (01:15 +0900)]
nvcodec: Enhance CUDA runtime compiler library loading on Windows
The name of installed CUDA runtime compiler library is formed like
nvrtc64_{major-version}{minor-version}_0.dll on Windows
(which is differnt from documented in https://docs.nvidia.com/cuda/nvrtc/index.html)
And minor version might not be exactly same as that of CUDA.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2362>
Seungha Yang [Mon, 14 Jun 2021 09:49:20 +0000 (18:49 +0900)]
d3d11: Add AV1 decoder
Introduce Direct3D11/DXVA AV1 decoder element
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2365>
Seungha Yang [Sun, 27 Jun 2021 14:09:30 +0000 (23:09 +0900)]
av1decoder: Store display resolution for duplicated picture
Target display resolution might be required by subclass implementation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2365>
Seungha Yang [Sun, 27 Jun 2021 11:35:49 +0000 (20:35 +0900)]
av1decoder: Fix debug typo
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2365>
Seungha Yang [Sun, 27 Jun 2021 11:19:39 +0000 (20:19 +0900)]
av1parser: Fix tile size calculation
Remaining size should exclude already read "tile size bits".
And see also "5.11.1. General tile group OBU syntax"
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2365>
Olivier Crête [Tue, 29 Jun 2021 01:13:56 +0000 (21:13 -0400)]
webrtc receivebin: Drop serialized queries before receive queue
If they're not dropped, they can be blocked in the queue even if it is
leaky in the case where there is a buffer being pushed downstream. Since
in webrtc, it's unlikely that there will be a special allocator to
receive RTP packets, there is almost no downside to just ignoring the
queries.
Also drop queries if they get caught in the pad probe after the queue.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2363>
Olivier Crête [Sat, 26 Jun 2021 18:31:01 +0000 (14:31 -0400)]
webrtc receivebin: Only set queue to leaky when the pad is blocked
When the pad is no longer blocked, remove the leakyness to make sure
everything gets into the jitterbuffer.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2363>
Olivier Crête [Sat, 26 Jun 2021 18:25:39 +0000 (14:25 -0400)]
webrtc receivebin: Don't unblock pad until sender is unblocked
As ther OpenSSL session is created when the receiver goes into
playing, we have to wait for the ICE session to be connected before we
can start delivering packets to the DTLS element.
Fixes #1599
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2363>
Sebastian Dröge [Thu, 24 Jun 2021 10:17:09 +0000 (13:17 +0300)]
webrtcbin: Sync to the clock per stream and not per bundle
By using the clocksync inside the dtlssrtpenc, all streams inside a
bundled are synchronized together. This will cause problems if their
buffers are not already arriving synchronized: clocksync would wait for
a buffer on one stream and then buffers from the other stream(s) with
lower timestamps would all be sent out too late.
Placing the clocksync before the rtpbin and rtpfunnel synchronizes each
stream individually and they will be send out more smoothly as a result.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2355>
Olivier Crête [Thu, 24 Jun 2021 18:58:12 +0000 (14:58 -0400)]
webrtc: Remove the webrtc-priv.h header from public headers
And this time for real, also import it in a couple more places
inside the webrtc element to make it build.
Fixes #1607
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2359>
He Junyan [Wed, 9 Jun 2021 09:29:19 +0000 (17:29 +0800)]
va: change AV1 GstVideoAlignment setting to left-top corner.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2298>
He Junyan [Fri, 18 Jun 2021 02:37:06 +0000 (10:37 +0800)]
va: h264dec: Set the GstVideoAlignment correctly.
We should set GstVideoAlignment based on the sequence's crop information.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2298>
He Junyan [Wed, 9 Jun 2021 09:21:18 +0000 (17:21 +0800)]
va: h265dec: Set the GstVideoAlignment correctly.
We should set GstVideoAlignment based on the conformance window info.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2298>
He Junyan [Wed, 9 Jun 2021 09:19:04 +0000 (17:19 +0800)]
va: pool: Add VideoCropMeta to the buffer if crop_top/left > 0.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2298>
He Junyan [Wed, 9 Jun 2021 09:14:42 +0000 (17:14 +0800)]
va: basedec: Copy the frames into other_pool if needed.
If decoder's crop_top/left value > 0 and the downstream does not
support the VideoCropMeta, we need to manually copy the frames
into the other_pool and output it.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2298>
He Junyan [Wed, 9 Jun 2021 07:44:33 +0000 (15:44 +0800)]
va: basedec: Setup the other_pool to copy output if crop_left/top.
If the decoder has crop_top/left value > 0(e.g. the conformance
window in the H265). Which means that the real output picture
locates in the middle of the decoded buffer. If the downstream can
support VideoCropMeta, a VideoCropMeta is added to notify the
real picture's coordinate and size. But if not, we need to copy
it manually and the other_pool is needed. We always assume that
decoded picture starts from top-left corner, and so there is no
need to do this if crop_bottom/right value > 0.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2298>
He Junyan [Sun, 6 Jun 2021 16:49:49 +0000 (00:49 +0800)]
va: No need to set the alignment for VideoMeta
The base va decoder's video_align is just used for calculation the
real decoded buffer's width and height. It does not have meaning
for the VideoMeta, because it does not align to the real picture
in the output buffer. We will use VideoCropMeta to replace it later.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2298>
He Junyan [Wed, 2 Jun 2021 16:07:05 +0000 (00:07 +0800)]
va: Delete the useless align expand in va_pool_set_config().
The base va decoder's video_align is just used for calculation the
real decoded buffer's width and height. While the gst_video_info_align
just calculate the offset and stride based on the video_align. But
all the offsets and strides are overwritten in gst_va_dmabuf_allocator_try
or gst_va_allocator_try, which make that calculation useless.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2298>
Sebastian Dröge [Mon, 28 Jun 2021 14:41:38 +0000 (17:41 +0300)]
webrtc: Re-add WebRTC object docs to the public headers
So they end up in the generated documentation and the Since markers
appear in the .gir files too.
Also remove wrong "Since: 1.16" markers for some objects that were
available since 1.14.0 already.
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1609
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2366>
Sebastian Dröge [Fri, 25 Jun 2021 07:20:06 +0000 (10:20 +0300)]
webrtcbin: Set transceiver kind and codec preferences immediately when creating it
Otherwise the on-new-transceiver signal will always be emitted with kind
set to UNKNOWN and no codec preferences although both are often known at
this point already.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2360>
Sebastian Dröge [Fri, 25 Jun 2021 09:14:03 +0000 (12:14 +0300)]
webrtcbin: Add a test for setting codec preferences as part of "on-new-transceiver" when setting the remote offer
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2310>
Sebastian Dröge [Fri, 25 Jun 2021 09:13:42 +0000 (12:13 +0300)]
webrtc: Use fail_unless_equals_string() for string assertions
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2310>
Sebastian Dröge [Tue, 8 Jun 2021 08:40:14 +0000 (11:40 +0300)]
webrtcbin: Store newly created transceivers when creating an answer also in the seen transceivers list
Otherwise it might be used a second time for another media afterwards.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2310>