Commit graph

113095 commits

Author SHA1 Message Date
Jan Alexander Steffens (heftig)
de87e0d381 x264enc: Add the func/line info to the log callback
It looks awkward when it's missing. At least point us at the callback
function.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-ugly/-/merge_requests/85>
2021-09-21 15:38:04 +02:00
Jan Alexander Steffens (heftig)
de465be3e4 x264enc: Reduce log spam about bit depth support
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-ugly/-/merge_requests/85>
2021-09-21 15:17:59 +02:00
Nicolas Dufresne
3607c617a5 alsasink: Allow stop() function to happen during failing writes
In ALSA, there is possible temporary failures that may require a retry,
though in certain situation, this may leak to the write() function
holding on a lock forever preventing the pipeline from going to pause
or stop. Fix this by shortly dropping the lock between retries.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1261>
2021-09-20 18:06:44 +00:00
Nicolas Dufresne
7b76c97de9 alsasink: Improve logging in write() function
This moves the "written X frames" lower so that we don't trace
confusing negative values on errors and add the error code in the
"Write error" log.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1261>
2021-09-20 18:06:44 +00:00
Stéphane Cerveau
3c937c8023 openjpeg: add unit test
Test various format supported with subframes.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/979>
2021-09-20 15:11:03 +00:00
Stéphane Cerveau
0d0e89108b jpeg2000parse + openjpeg: Switch striped mode to its own caps
It's not compatible with any other element that use the non-striped
mode. In addition, in this mode, we require that every frame have the
same number of stripes or that the MARKER bit be present, which is
different from the other
formats too.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/979>
2021-09-20 15:11:03 +00:00
Stéphane Cerveau
619cbca642 openjpegdec: Fix crash with AYUV64 in subframe mode
Remove useless generic fill_frame methods to use
the packed one for AYUV and AYUV64.

Fix gst-launch-1.0 -v videotestsrc  !
video/x-raw,width=640,height=480,format=AYUV64  !  openjpegenc
num-stripes=8   !  openjpegdec max-threads=8  ! videoconvert !
autovideosink sync=false

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/979>
2021-09-20 15:11:02 +00:00
Stéphane Cerveau
86be138973 openjpegdec: support for a multithreaded decoding.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/979>
2021-09-20 15:11:02 +00:00
Aaron Boxer
18c3437546 openjpegdec: enable sub frame mode
Rebuild output frame from multiple stripes input.

Keep the first frame and fill it with the following stripes to finish
a complete frame only once.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/979>
2021-09-20 15:11:02 +00:00
Olivier Crête
9e2e2f01ec mpegtsmux: Require frame alignment for JPEG 2000
We have yet to implement stripe alignment with the required descriptor.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/979>
2021-09-20 15:11:02 +00:00
Olivier Crête
b2f7cb3372 openjpegdec: Reject stripes for now
They're not implemented.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/979>
2021-09-20 15:11:02 +00:00
Olivier Crête
27d1313404 openjpegenc: Only allow stripe with image/x-jpc format
It's the only format that our MPEG-TS muxer allows and the carriage of
JPEG 2000 stripes is only defined for MPEG-TS as far as I know.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/979>
2021-09-20 15:11:02 +00:00
Stéphane Cerveau
116a10d531 openjpegenc: support for a multithreaded encoding.
This commit introduces a multithreaded encoder allowing
to encode mulitple stripes or subframes in separated threads.
This feature aims to enhance the overall latency of a codec
pipeline.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/979>
2021-09-20 15:11:02 +00:00
Philippe Normand
0538929847 wpe: context thread dispatch fixes
Use dedicated mutex/cond/flag for jobs being dispatched in the context thread.
The previous code was signalling the thread startup condition, which is wrong.
When WPEContextThread::dispatch() is invoked it means the thread has already
correctly been started up.

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