Commit graph

112681 commits

Author SHA1 Message Date
Philippe Normand 4af3442d4a wpe: Properly wait on context thread startup condition
Fixes #1661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2533>
2021-09-20 14:44:19 +00:00
Nicolas Dufresne 9dfd237741 doc: Update kmssink caps cache
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2530>
2021-09-20 14:08:56 +00:00
Nicolas Dufresne 360620fea4 kmssink: Add RGB16/BGR16 support
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2530>
2021-09-20 14:08:56 +00:00
Nicolas Dufresne f1b0b95dc4 kmssink: Sort format according to GST_VIDEO_FORMATS_ALL
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2530>
2021-09-20 14:08:56 +00:00
Nicolas Dufresne 107b8f3ba2 kmssink: Remove big endian format inversion
This has been a bad interpretation of the DRM docuemntation. The formats are
fixed regardless the CPU, but for some formats, they expressed in the opposite
order as GStreamer. Same change was done in waylandsink 2 years ago.

b393b650ab

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2530>
2021-09-20 14:08:56 +00:00
Nicolas Dufresne e05c022c48 kmssink: Add NV61 support
This identically handled to NV16, so no reason not to inclue it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2530>
2021-09-20 14:08:56 +00:00
Nicolas Dufresne 98da85ade0 kmssink: Add NV24 support
This was tested on RK3566 platform, using vendor DRM driver.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2530>
2021-09-20 14:08:56 +00:00
Seungha Yang 405d311106 codecs: av1decoder: Use GstFlowReturn everywhere
The same modification as that of VP8 decoder

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2528>
2021-09-20 13:03:44 +00:00
Seungha Yang e009e80178 codecs: vp9decoder: Use GstFlowReturn everywhere
The same modification as that of VP8 decoder

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2528>
2021-09-20 13:03:44 +00:00
Seungha Yang aaeb76f09c codecs: vp8decoder: Use GstFlowReturn everywhere
boolean return value is not sufficient for representing the reason
of error in most cases. For instance, any errors around new_sequence()
would mean negotiation error, not just *ERROR*.
And some subclasses will allocate buffer/memory/surface on new_picture()
but it could be failed because of expected error, likely flushing

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2528>
2021-09-20 13:03:44 +00:00
Sebastian Dröge fea7f02a1d gst: Initialize optional event/message fields when parsing
These might not exist inside the structure and then we would potentially
keep around uninitialized memory from the caller in the out parameter.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/887>
2021-09-20 13:12:12 +03:00
Sebastian Dröge f3601164d2 videodecoder: Add properties to automatically request sync points and vfunc to allow subclasses to handle packet loss / missing data
Subclasses could use the new vfunc to activate packet loss concealment,
for example.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1274>
2021-09-20 13:06:38 +03:00
Vivia Nikolaidou fcad4cc646 mpegtspacketizer: memcmp potentially seen_before data
Theoretically the version number is incremented every time there's a new
section, but in a world of streaming we can't easily make that
assumption.

An example of a broken use case is when we're cat-ing two mpeg-ts files
together, which is equivalent of capturing a DVB stream while switching
channels. A set-top box would know that we switched the channels and
reset the demuxer, but in practice this might not happen.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2468>
2021-09-20 09:31:08 +00:00
Sebastian Dröge f74a2bd303 player: Fix/add various annotations
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2538>
2021-09-20 11:35:51 +03:00
Seungha Yang 64725758eb meson: va: Make AV1 support always optional
Otherwise meson configure with -Dva=enabled will be failed
when installed libva version is < 1.8

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2532>
2021-09-19 21:20:54 +00:00
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