Commit graph

113066 commits

Author SHA1 Message Date
Víctor Manuel Jáquez Leal
64c4eb2def va: caps: Don't use image formats for decoded frames.
Initially we tried to use the internal color conversion used in i965
and Gallium drivers when decoding. But this approach has showed
limitations and problems.

This patch removes completely the possible color conversion at
decoding, since it show problems with deinterlacing, for example:

gst-launch-1.0 filesrc location=interlaced.mpg2 ! parsebin ! vampeg2dec ! vadeinterlace ! xvimagesink

Allowing only the surface formats when decoding is more stable.

For color conversion is better to do it explicitly with vapostproc.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2531>
2021-09-19 20:44:58 +00:00
He Junyan
9289df4291 test: bitwriter: Add a test for reset_and_get_data when not byte unaligned.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/886>
2021-09-19 22:43:11 +08:00
He Junyan
25dbae6e73 bitwriter: Fix a memory leak in reset_and_get_buffer.
We should record the ownership of the data before we reset the bitwriter.
Or we will always dup the buffer data and leak the memory.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/886>
2021-09-19 22:43:06 +08:00
He Junyan
81cf9754e3 bitwriter: Fix the trailing bits lost when getting its data.
In reset_and_get_data and reset_and_get_buffer, it fails to include
the trailing bits less than 8. So, when the bit_size is not byte
aligned, the trailing bits are lost in the return buffer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/886>
2021-09-19 20:41:59 +08:00
Marijn Suijten
397b0cc492 player: Add missing nullable annotations
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2197>
2021-09-19 12:29:44 +00:00
Marijn Suijten
7dc976885b play: Add missing nullable annotations
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2197>
2021-09-19 12:29:44 +00:00
Fabian Orccon
71c4355b1c sys: shm: Define shm_enable and shm_deps before escape meson subdir
Fixes meson configure in tests if the shm plugin is disabled

Fixes #1664

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2534>
2021-09-18 22:13:55 +00:00
Seungha Yang
45409d4558 d3d11videosink: Display title of content if possible
Update title text of window (currently it's always "Direct3D11 renderer")
when we are rendering on internal HWND, not external HWND.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2529>
2021-09-18 16:02:15 +00:00
Seungha Yang
3817efb275 d3d11videosink: Remove unused enum value
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2529>
2021-09-18 16:02:15 +00:00
Mengkejiergeli Ba
5628955624 msdkenc: Pass color properties to MediaSDK for encoding
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2523>
2021-09-18 14:40:24 +00:00
Sebastian Dröge
4c4d55a404 avcodecmap: Add support for GBRA_10LE/BE
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-libav/-/merge_requests/142>
2021-09-18 12:25:52 +03:00
Mengkejiergeli Ba
788826b205 msdkh265enc: Add profile main10 still picture for hevc
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2524>
2021-09-18 06:04:56 +00:00
Nicolas Dufresne
afa1c19b37 waylandsink: Fix double render check
Our code does not support rendering twice the same wl_buffer in a row, so it
tries to skip that case, but for this it relied on the GstBuffer pointer,
while the cache actually works at the GstMemory level now. To avoid this
compare the GstWlBuffer instead.

This fixes crash when use in zero-copy with videorate element.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2526>
2021-09-17 14:14:42 +00:00
Víctor Manuel Jáquez Leal
f51371d7b9 codecs: mpeg2decoder: Use tsg framerate for latency.
Latency setting relies on src pad caps, but they aren't set when the
function is called, and latency is never updated.

In order to fix it, this patch uses TSG framerate first, and if it's
not set yet, sinkpad caps are used to get the framerate.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2514>
2021-09-17 12:48:33 +00:00
Seungha Yang
7d1f6459a0 d3d11decoder: Refactor for more unified decoding flow
... and various code cleanup.

* Move spreaded decoding API calls into one method
Previously, decoding flow of most codecs are
- Call DecoderBeginFrame() on start_picture()
- Call {Get,Release}DecoderBuffer() on decode_slice()
- Call SubmitDecoderBuffers() and DecoderEndFrame() on end_picture()
Such spreaded API calls make it hard to keep track of status
of decoding. Now it will be done at once in a new method.

* Drop a code for non-zero wBadSliceChopping
When bitstream buffer provided by driver is not sufficient
to write compressed bitstream data, host decoder needs to make use
of wBadSliceChopping so that driver can understand there are
multiple bitstream buffer. But it's a bit unrealistic and
not tested. Since FFMpeg's DXVA implemetaion doesn't support it,
we might be able to ignore the case for now.

* Make code more portable
Consider common logic of GstCodecs -> DXVA translation for all D3D APIs
(i,e., D3D9, D3D11, and D3D12).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2525>
2021-09-17 20:03:28 +09:00
Seungha Yang
a77f793c8b d3d11decoder: Remove duplicated class_init and property related code
Move them into the decoder helper code to remove duplication

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2525>
2021-09-17 18:44:51 +09:00
Seungha Yang
4f45828641 d3d11: Get rid of "extern "C"" wrapping for GST_DEBUG_CATEGORY_EXTERN
Instead, change the file defining debug category to cpp

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2525>
2021-09-17 00:48:45 +09:00
Havard Graff
e0811f890f videodecoder: Fix min-force-key-unit-interval logic and logging
The new keyframe is needed when the deadline of the buffer has exeeded
the waiting time, not while it is within it.

Also, since we look at the deadline of the frame, log that instead of PTS.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1278>
2021-09-16 17:00:14 +03:00
U. Artie Eoff
48474d3cf7 tests: skip cc tests if plugin is disabled
Skip the closedcaption element tests if the
closedcaption option is disabled at compile
time (i.e. -Dclosedcaption=disabled).

v2: rename pangocairo_dep to avoid conflict
with later definition in ext/ttml/meson.build
as suggested by @tpm.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1388>
2021-09-15 10:04:14 -07:00
Olivier Crête
972184f434 rtphdrhext-twcc: Return failure on map failure
This feels like exactly like a case that should fail.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1059>
2021-09-15 17:02:01 +00:00
Olivier Crête
f8f24a2619 rtphdrext: Update write() API to return a signed value
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1059>
2021-09-15 17:02:01 +00:00
Olivier Crête
fd93c1ac19 rtphdrext: Make write function return a signed value
Since the return value is documented to possibly be smaller than 0,
then it needs to be signed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1258>
2021-09-15 16:35:09 +00:00
Olivier Crête
98f2a84a28 videorate: Add unit test for closing a segment and opening a separate one
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/767>
2021-09-15 15:35:43 +00:00
Olivier Crête
24fd80344d videorate: Drop incoming buffers that are outside of the segment
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/767>
2021-09-15 15:35:43 +00:00
Olivier Crête
6f7922b4db videorate: Only "close" the segment if it is discontinous
Otherwise, it will drop valid buffers on a simple segment update

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/767>
2021-09-15 15:35:43 +00:00
Olivier Crête
a76f38b2c7 videorate: Add test for segment update
Continue as-is on segment update.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/767>
2021-09-15 15:35:43 +00:00
Olivier Crête
75b4809ebc videorate: Update the base time on segment updates
Dropping it to 0 makes videorate push buffers from timestamp 0 again.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/767>
2021-09-15 15:35:43 +00:00
He Junyan
162026961b codecs: h264dec: Check bumping again after inserting current picture.
In order to get the lowest latency, we can add another bumping check after
inserting the current picture into the DPB immediately. That can avoid
waiting for another decoding circle of the next frame and so the latency
is lower.

Fix: #1628
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2501>
2021-09-15 13:20:28 +00:00
He Junyan
28eb729b53 codecs: h264: Add protection to to_insert picture in bump check.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2501>
2021-09-15 13:20:28 +00:00
He Junyan
5c73725c9b codecs: h264dec: Improve the policy to infer max_num_reorder_frames.
The max_num_reorder_frames number can change the way we bumping the
pictures in the DPB. The smaller it is, the lower latency we will
get. So it is important for live mode streams, but it is not given
in VUI parameters sometimes. We now improve the policy to infer it:
1. Never guess it in the "strict" compliance.
2. For baseline and constrained baseline profiles, which do not have
   B frames, set it to 0.
3. For -intra only profiles, set it to 0.
4. Otherwise, not guess it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2501>
2021-09-15 13:20:28 +00:00
U. Artie Eoff
8b1634930f tests: skip aes test if elements not built
In ext/aes/meson.build, the aes_dep will return
not-found if -Daes=disabled, regardless of whether
openssl is found or not.  Thus, we don't need a
separate check for the option.  This will also
ensure that aes_dep is always defined and we can
use it in the tests/check/meson.build unit.

Fixes #1660

v2: handle -Daes=disabled, too.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2522>
2021-09-14 23:15:44 -07:00
Vivienne Watermeier
d78b00163d validate: fix relative paths for test files
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/256>
2021-09-14 15:09:20 +02:00
Seungha Yang
4576abde67 qtdemux: Try to build AAC codec-data whenever it's possible
AAC codec_data is a just collection of AAC profile, samplerate, and
channels. We can know samplerate and channels from parsed
SampleEntry data. Although the AAC profile is unknown there,
let's assume it as AAC-LC like we've been doing for the version 1
atom.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1082>
2021-09-14 17:55:13 +09:00
Philippe Normand
5dc39091f3 wpe: Add support for web:// URIs
The CEF source already supports this. No good reason for wpesrc not too ;)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2503>
2021-09-13 15:02:24 +00:00
Mathieu Duponchelle
c6acee201e multiqueue: fix obsolete comment re initial flow status
The initial single queue srcresult is OK, it hasn't been
NOT_LINKED since 2007.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/885>
2021-09-13 14:16:06 +00:00
Mathieu Duponchelle
67eb70bb9c multiqueue: never consider a queue that is not waiting
.. when computing the high id.

After a flush for instance, sq->srcresult is reset to OK,
yet it doesn't make sense to pick a non-existing position
id as the high id when a queue doesn't contain any items
in that situation either.

It is in any case completely OK to let the not-linked stream
get consumed without throttling at this stage, as any
first packet arriving on other single queues will get assigned
a higher position id.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/885>
2021-09-13 14:16:06 +00:00
He Junyan
364a2fe08e va: h264dec: Try to use ConstrainedBaseline or Main to decode BaseLine.
In the h264, the Baseline profile is widely misused. A lot of streams declare
that they are the Baseline, but in fact they just conform to ConstrainedBaseline.
The features such as FMO and ASO are not used at all.
If the decoder does not strictly conforms to the SPEC, we can just use Baseline
or Main profile to decode it to avoid lots of streams failure.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2428>
2021-09-13 21:51:12 +08:00
Vivienne Watermeier
44bfc00884 flv: fix seqnum handling for seeks
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1078>
2021-09-13 12:30:30 +00:00
Matthew Waters
f441c72e5a isomp4: also allow muxing different h264/5 profiles/levels/etc
All of that is advertised through the codec_data itself so can change
just fine within isomp4.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1071>
2021-09-13 09:42:15 +00:00
Sebastian Dröge
3592bf7726 matroska: Add support for muxing/demuxing ffv1
Previously only demuxing when stored via the RIFF/AVI mapping was
supported.

See https://github.com/FFmpeg/FFV1/blob/master/ffv1.md#matroska-file-format

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1080>
2021-09-13 10:05:18 +03:00
He Junyan
0b949ec07c codecs: h264dec: Improve the fast bump for the live mode.
We control the policy of fast bump by the profile and the compliance
property. For baseline and constrained baseline profiles, we can use
more radical bump policy. User can also change the bump policy by
setting the compliance property in run time.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2432>
2021-09-13 06:37:28 +00:00
He Junyan
56269d127f codecs: h264: Change the low_latency to an enum for dpb_needs_bump().
The bool parameter of low_latency is not enough. We have multi policies for
low latency bumping, from the safest to something radical. So we need an enum
to represent the proper latency requirement.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2432>
2021-09-13 06:37:28 +00:00
He Junyan
3c975ed918 codecs: h264dec: Add a compliance property to control behavior.
Some features such as the low-latency DPB bumping and mapping the
baseline profile as the constrained-baseline profile do not conform
to the H264 offical spec. But in practice, they are very useful and
are widely needed. We add this compliance property to control the
behavior of the decoder, make it fit more requirement.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2432>
2021-09-13 06:37:28 +00:00
Philippe Normand
a61d038cb6 docs: Update cache
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2521>
2021-09-12 12:23:36 +01:00
Philippe Normand
732b352df6 docs: Update cache
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1081>
2021-09-12 12:18:32 +01:00
Philippe Normand
a55dafe341 discoverer: Prevent stream tags from leaking in global tags
The PrivateStream should keep track of stream tags only. Likewise, the
GstDiscovererInfo should keep track of global tags only.

This patch fixes the issue where the discoverer would report duplicated tag
titles, especially for Matroska media files. The Matroska demuxer emits
correctly-scoped tags, but downstream was making no distinction of them.

Fixes #598, #836, https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/827

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1275>
2021-09-12 10:20:05 +01:00
Thibault Saunier
e3636642b7 validate: Fix double freeing of GstStructure
gst_validate_get_config is transfer-container only

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/255>
2021-09-10 20:12:28 +00:00
Jordan Petridis
d68d52e137 citemplate: only build rust docker images in gst-ci repos
They are only used by the gst-rs repos which aren't using
this template anyway, so we don't need to have the jobs for the
rest of the pipelines.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-ci/-/merge_requests/418>
2021-09-10 16:31:00 +00:00
Jordan Petridis
2a93d4f347 citemplate: Bump tag of latest rustc version
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-ci/-/merge_requests/418>
2021-09-10 16:31:00 +00:00
Víctor Manuel Jáquez Leal
4f0b619023 va: Update vapostproc documentation.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2495>
2021-09-10 17:48:23 +02:00