Commit graph

1762 commits

Author SHA1 Message Date
Thibault Saunier d11f13f476 Introduce the videocolorscale element
Now that videoconvert and videoscale's are both based on
GstVideoConverter and are using the exact same code, it makes much more
sense to have one element doing the two operation, and it can be
more efficient in some cases (one single path for both operations).

This removes the `videoscale` and `videoconvert` plugins but keeps the element
but makes them also do both operations (adding some APIs to each element).

There is a small change in API for the `videoscale:dither` property which
was previously a totally unused boolean, it is now an enum and is used.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/898>
2022-04-20 17:03:21 -04:00
Seungha Yang 6a3776c527 qsv: Add GPU description to element long-name on Windows
Would be useful for a multi-Intel-GPU system

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2249>
2022-04-20 18:49:18 +00:00
Edward Hervey 8f2d347559 hls: Relax webvtt checks
If no hour field is present (which is allowed), the remaining data can be less
than 15 character.

Fix time translation failures if the hour field wasn't present

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2248>
2022-04-20 17:47:00 +00:00
Víctor Manuel Jáquez Leal 722a6c7708 vapostproc: Notify if hdr-tone-mapping property changes.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2247>
2022-04-20 17:01:52 +00:00
Guillaume Desmottes 8eccf79fff gstleaks: log the number of alive objects
Can help checking if the number of alive objects is growing over time or stays stable.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2245>
2022-04-20 15:58:29 +00:00
Víctor Manuel Jáquez Leal e207ff905b va: Expose a couple va surface/buffer methods.
And use them in va plugin.

Also, set as default logging category the vadisplay one.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2077>
2022-04-20 15:15:56 +00:00
Sebastian Dröge 02115a5efc rtpmanager: Move some duplicated constant and helper function to a single place
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2132>
2022-04-20 14:40:25 +00:00
Sebastian Dröge 1eb7f81f9d gstreamer: Document various caps for the reference timestamp meta
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2132>
2022-04-20 14:40:25 +00:00
Sebastian Dröge c7e12974ba rtpbin/rtpjitterbuffer: Don't parse RTCP SRs twice unless needed
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2132>
2022-04-20 14:40:25 +00:00
Sebastian Dröge 82169aa140 rtpjitterbuffer: Add property to throttle handling of RTCP SR / NTP-64 syncing
This proxies the "rtcp-sync-interval" property of rtpbin.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2132>
2022-04-20 14:40:25 +00:00
Sebastian Dröge ce38614e1a rtpsession: Handle RTCP-SR-REQ (RFC6051) RTCP feedback message
This causes an RTCP SR to be sent at the earliest possible time.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2132>
2022-04-20 14:40:25 +00:00
Sebastian Dröge 0c819d2f31 rtpbin/rtpjitterbuffer: Allow syncing to an SR without CNAME if the CNAME is already known
The RTCP SR packet might be without SDES in case of a reduced-size RTCP
packet. For syncing purposes the CNAME is needed but it might be known
already from an earlier RTCP packet or out of band, via the SDP for
example.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2132>
2022-04-20 14:40:25 +00:00
Sebastian Dröge cbaac3cdba rtpbin/jitterbuffer: Use inband 64-bit NTP timestamps according to RFC6051 for faster synchronization
When signalled via the caps that the header extension is used, it will
be read and used in the same way as the RTP/NTP time mapping from RTCP
SRs.

If the CNAME of the stream's SSRC is provided out of band via e.g. the
SDP then this allows streams to be synchronized immediately on the first
packet instead of having to wait for the first RTCP SR to arrive.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2132>
2022-04-20 14:40:25 +00:00
Sebastian Dröge 7c796b3c05 rtpsession: Only add send latency to the running time if it is actually known
Otherwise we can't know the running time yet if rtcp-sync-send-time is
set, and have to wait until the latency is known later.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2132>
2022-04-20 14:40:25 +00:00
Sebastian Dröge 7ffc830959 rtpsession: Update 64-bit NTP header extensions with the actual NTP time in senders
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2132>
2022-04-20 14:40:25 +00:00
Sebastian Dröge 8980c35efe rtpmanager: Add header extension implementation for the 64-bit RFC6051 NTP header extension
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2132>
2022-04-20 14:40:25 +00:00
Sebastian Dröge 06f90deb5f sdp: Parse the RFC5576 Source-specific media SDP attributes into caps
The format of the caps fields is
    ssrc-(SSRC_VALUE)-(ATTRIBUTE_NAME)=(ATTRIBUTE_VALUE)
.

Parsing of the attributes from the caps into the SDP is not implemented
as this depends not only a single stream's caps but on the whole rtpbin
configuration.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2132>
2022-04-20 14:40:25 +00:00
Sebastian Dröge a91b1c64a1 rtsp-server: Add RFC5576 Source-specific media attribute to the SDP media for signalling the CNAME
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2132>
2022-04-20 14:40:25 +00:00
Wonchul Lee 150db81287 dashsink: Unlock when failed to get content
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2242>
2022-04-20 09:07:29 +00:00
Camilo Celis Guzman 4c0d64dd10 gstglmixerbin: minor refactor of _find_element_pad_template
As suggested by @slomo, make the loop more readable and prevent returning
a garbage value to the caller from the previous implementation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2232>
2022-04-20 07:04:44 +00:00
Camilo Celis Guzman 8707d0cb26 gstav1parse: fixup various possible logical errors
Found via an analyzed build for Clang. Specifically we had:

gstav1parse.c[1850,11] in gst_av1_parse_detect_stream_format: Logic error: The left operand of '==' is a garbage value
gstav1parse.c[1606,11] in gst_av1_parse_handle_to_small_and_equal_align: Logic error: The left operand of '==' is a garbage value

Also a couple of false-positives:

gstav1parse.c[1398,24] in gst_av1_parse_handle_one_obu: Logic error: Branch condition evaluates to a garbage value
gstav1parse.c[1440,37] in gst_av1_parse_handle_one_obu: Logic error: The left operand of '-' is a garbage value

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2230>
2022-04-19 18:36:38 +00:00
Xavier Claessens e950095867 Always define ENABLE_NLS
GLib guarantees libintl API is always available, provided by
proxy-libintl as last resort. GLib itself unconditionally define
ENABLE_NLS.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2028>
2022-04-19 18:01:06 +00:00
Xavier Claessens 82ca0e291b Delete unused i18n headers
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2028>
2022-04-19 18:01:06 +00:00
Xavier Claessens b99ecc78ca Replace gst-i18n-*.h with gi18n-lib.h
GLib guarantees libintl is always present, using proxy-libintl as
last resort. There is no need to mock gettex API any more.

This fix static build on Windows because G_INTL_STATIC_COMPILATION must
be defined before including libintl.h, and glib does it for us as part
as including glib.h.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2028>
2022-04-19 18:01:06 +00:00
Xavier Claessens 50b58aa974 gst-play: Do not split translatable string
Concatenating N_() strings does not work with gi18n.h macro, was working
only with GStreamer's redefinition.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2028>
2022-04-19 18:01:06 +00:00
Thibault Saunier dcd2ccad59 cuda: Fix typo in gst_cuda_buffery_copy_type_to_string
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1472>
2022-04-19 16:39:43 +00:00
Thibault Saunier 86dcfc29dc cuda: Add a gst_cuda_context_new_wrapped constructor
So that application or people implementing cuda element from
outside GStreamer itself can ensure that their contexts are used
by GStreamer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1472>
2022-04-19 16:39:43 +00:00
Thibault Saunier c033f8fad2 cuda: Factor out a public GstCUDA library
So applications and elements implemented outside GStreamer can reuse
our infrastructure

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1472>
2022-04-19 16:39:43 +00:00
Thibault Saunier 3549d59725 nvenc: Give more details about errors
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1472>
2022-04-19 16:39:43 +00:00
Nicolas Dufresne b7ded51382 video: Fix possible overrun when iterating comp[] array
Fix 2 iterations that can overrun the array if the number of component is
equal to the size of the array.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2239>
2022-04-19 11:12:42 -04:00
Nicolas Dufresne e0ad0eda23 Revert "video-frame: avoid possible out of bound memory access"
This reverts commit c4255f08f7.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2239>
2022-04-19 10:57:14 -04:00
Nirbheek Chauhan 97655eb8ac meson: Add -Wl,-rpath,${libdir} on macOS
We made the gstreamer installation prefix relocatable by picking up
plugins relative to the location of libgstreamer-1.0.dylib, similar to
how it's done for Windows:

https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1627

This had a lot of side-effects:

https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1051
https://gitlab.freedesktop.org/gstreamer/cerbero/-/issues/363
https://gitlab.freedesktop.org/gstreamer/cerbero/-/issues/371
https://gitlab.freedesktop.org/gstreamer/cerbero/-/issues/362

A partial fix for the cerbero side of these was:

https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/807

However, this relied on the consumers knowing that they need to add
`LC_RPATH` entries to the libdir of the prefix. This is done
automatically by build systems like Meson, but not by others, such as
Autotools, CMake, Cargo, XCode, etc. For those, we need to add the
RPATH entries to the gstreamer-1.0.pc file.

This also has the side-effect of fixing the loading of gstreamer rust
plugins on macOS:

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1159

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1149

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2218>
2022-04-19 12:11:17 +00:00
Camilo Celis Guzman c4255f08f7 video-frame: avoid possible out of bound memory access
Although the components' initialization code would fill in -1 to all
unset components, make the code a bit more defensive and check for an
index bound first.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2231>
2022-04-19 11:18:52 +00:00
Tim-Philipp Müller 0dd04764f7 tests: dash_mpd: fix linker issues with non-optimizing compilers
undefined reference to `download_request_take_buffer'

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2117#note_1344646

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2228>
2022-04-19 10:35:30 +00:00
Ruben Gonzalez 70579285a8 gst_plugin_load_file: force plugin reload if diff filename
If a file includes a new version of a plugin that exits in the
registry, the output of gst-inspect is incorrect. The output has the
correct version but incorrect filename, and element description.

This seems to have also fixed some documentation issues.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1344>
2022-04-19 14:26:08 +05:30
Tim-Philipp Müller 819d436ec4 docs: design: fix up some document titles
These show up in the index.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2222>
2022-04-18 21:39:32 +00:00
Tim-Philipp Müller d726a839e4 docs: design: add adaptive streaming design docs to sitemap
.. and some small additions to make it clearer what exist
and what's new.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2222>
2022-04-18 21:39:32 +00:00
Seungha Yang c38869212c d3dvideosink: Remove outdated comment
d3dvideosink is not a primary video sink element

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2223>
2022-04-18 20:27:34 +00:00
Seungha Yang 9d51cae7ee h264decoder,h265decoder: Do not hold codec_data buffer
... also do not need to extract it from caps.

Decoder uses codec_data only once per set_format() and
baseclass will extract codec_data buffer already.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2212>
2022-04-18 19:55:15 +00:00
Seungha Yang dd32e2efbc d3d11decoder: Do not preallocate texture using downstream d3d11 buffer pool
Our decoder implementation does not use downstream d3d11 pool for
decoding because of special requirement of D3D11/DXVA. So preallocation
using the downstream buffer pool will waste GPU memory in most cases.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2211>
2022-04-18 18:31:02 +00:00
Tulio Beloqui cf684051dd gstdevicemonitor: added cleanup of signal handlers and hidden providers list
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2182>
2022-04-18 15:30:35 +00:00
Edward Hervey af78c16dd5 New HLS, DASH and MSS adaptive demuxer elements
This provides new HLS, DASH and MSS adaptive demuxer elements as a single plugin.

These elements offer many improvements over the legacy elements. They will only
work within a streams-aware context (`urisourcebin`, `uridecodebin3`,
`decodebin3`, `playbin3`, ...).

Stream selection and buffering is handled internally, this allows them to
directly manage the elementary streams and stream selection.

Authors:
* Edward Hervey <edward@centricular.com>
* Jan Schmidt <jan@centricular.com>
* Piotrek Brzeziński <piotr@centricular.com>
* Tim-Philipp Müller <tim@centricular.com>

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2117>
2022-04-18 14:11:23 +00:00
Hou Qi 8dcb8a28af v4l2videodec: copy colorimetry values to output_state caps
This is to avoid transcoding negotiation fail between v4l2h265dec
and v4l2h264enc caused by colorimetry mismatch.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2192>
2022-04-18 13:17:55 +00:00
Vivia Nikolaidou cb8da91f7a h264parse: Include coded-picture-structure info in caps
This reverts commit 652773de36 and
modifies it to rename the caps field name to coded-picture-structure.

It was previously removed because it confuses the decoder and we didn't
have a valid use case for including it in the encoded caps at this
stage. We now do have such a use case but still don't want to confuse
the decoder, so the field is renamed.

However, it is still not accurate without looking at the SEI picture
structure of each frame, so it was named coded-picture-structure. If its
value is "frame" it is most likely progressive, if it's "field" it is
most likely interlaced or mixed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2177>
2022-04-18 11:00:29 +00:00
Guillaume Desmottes 7933fff83c libav: fix frame leak on negotiation error
The function owns a reference on the frame. Drop it if negotiation
failed as we are already doing for the other error cases.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2196>
2022-04-18 07:13:09 +00:00
Guillaume Desmottes e482b995fb decodebin3: fix collection leak
get_merged_collection() returns an owned stream collection and was
leaked in the else block.

Fix leak when running:
GST_TRACERS=leaks GST_DEBUG="GST_TRACER:7,leaks:6" gst-play-1.0 --use-playbin3 test.mkv

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/954>
2022-04-18 09:41:12 +03:00
He Junyan 4c5d34648c va: h264enc: Fix the forgotten unlock() when getting device path property.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2215>
2022-04-18 12:44:19 +08:00
Seungha Yang 23e280f05b qsvdecoder: Use system memory for non-d3d11 downstream
QSV's memory download implementation seems to be more faster
than our implementation

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2206>
2022-04-17 22:59:48 +09:00
Seungha Yang 9543998aa3 qsv: Add H.265 decoder
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2206>
2022-04-17 20:57:31 +09:00
Seungha Yang d136c98770 qsv: Include single gstva.h
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2206>
2022-04-17 20:57:31 +09:00
Seungha Yang fba44e8a01 qsvh264dec: Don't register element if it's not supported by device
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2206>
2022-04-17 20:57:31 +09:00
Seungha Yang 0692a5dde9 qsvh264dec: Add support for packetized format
Handle avc/avc3 packetized formats

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2206>
2022-04-17 20:57:26 +09:00
Seungha Yang 3c3274a8da qsv: Move debug init into each source file
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2206>
2022-04-17 04:15:13 +09:00
Seungha Yang a9a49c235d qsvdecoder: Reset next_task_index per init_session()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2206>
2022-04-17 04:15:13 +09:00
Seungha Yang b5a8bef5a7 d3d11decoder: Copy HDR10 related caps field manually
If negotiate() is called from the set_format() chain, sinkpad may not
hold caps yet, so baseclass cannot copy it over to srcpad caps.
Copy them manually.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2203>
2022-04-16 18:36:41 +00:00
Seungha Yang 86cf307a6c qsvencoder: Rename property name i-frames to idr-interval
... and clarify the meaning of the value for each h264 and h265
encoder since the usage of mfxInfoMFX::IdrInterval is different
per codec.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2204>
2022-04-16 23:34:41 +09:00
Seungha Yang f848619ff4 qsvh265enc: Write HDR10 metadata SEI
If device supports HDR10 metadata API, write the information
into bitstream per IDR.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2204>
2022-04-16 23:34:41 +09:00
Víctor Manuel Jáquez Leal cd0d1787a5 gst_plugins_cache.json: Update va plugins.
* Update conditionally-available attribute in vah264enc properties.
* Update GstVaFeature usage.
* Update GstVaEncoderRatecontrol usage.
* Update vapostproc classification.
* Add `add-borders` property in vapostproc.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2169>
2022-04-16 11:11:51 +00:00
Víctor Manuel Jáquez Leal a2a6ece487 vah264enc: Use GstVaFeature enum for enabling MBBRC.
GstVaFeature is a common enumeration for auto/disabled/enabled kind of
property setting.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2169>
2022-04-16 11:11:51 +00:00
Víctor Manuel Jáquez Leal 3a7c1ddb3c vah264enc: Move rate-control enum to encoder class helper.
Since it's a common enumeration used, as user setting property, for
most of codecs.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2169>
2022-04-16 11:11:51 +00:00
Víctor Manuel Jáquez Leal 81951c59ef vah264enc: Add device-path property.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2169>
2022-04-16 11:11:51 +00:00
Guillaume Desmottes bf15f1a69f gstleaks: fix pthread_atfork return value check
pthread_atfork() returns 0 on success.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2195>
2022-04-16 09:18:42 +00:00
Fabrice Fontaine 26c2385fae gst-python: fix build on systems without C++ compiler
Fix the following build failure on systems without C++ compiler:

The following exception(s) were encountered:
Running "/home/autobuild/autobuild/instance-0/output-1/host/bin/i686-buildroot-linux-gnu-g++ --version" gave "[Errno 2] No such file or directory: '/home/autobuild/autobuild/instance-0/output-1/host/bin/i686-buildroot-linux-gnu-g++'"

Fixes:
 - http://autobuild.buildroot.org/results/eebf65036f79d21d347714d62afecd0108393308

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2200>
2022-04-16 02:56:36 +00:00
Corentin Damman c68c40a6bc cudautils: fix critical typo in gst_cuda_buffer_fallback_copy
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2194>
2022-04-16 02:16:22 +00:00
hoonhee.lee 3d9f25d322 playbin3: fix missing lock when unknown stream type in pad-removed cb
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2193>
2022-04-16 01:31:18 +00:00
Edward Hervey ed5db9bce7 decodebin3: Don't duplicate stream selections
Make sure that the requested stream selection isn't identical to the current
one. If that's the case, just carry on as usual.

This avoids multiple `streams-selected` posting ... when the selection didn't
change.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2185>
2022-04-16 00:56:14 +00:00
Sebastian Dröge ea80952998 x264enc: Don't try to fixate ANY allowed caps
Instead fall back to the template caps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2197>
2022-04-16 00:24:21 +00:00
Tim-Philipp Müller f515ee6bdf appsrc: fix annotations
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2188>
2022-04-15 23:49:40 +00:00
Sebastian Dröge fa070d20cf rtpbasepayload: Don't write header extensions if there's no corresponding input buffer for the packet
The GstRTPHeaderExtension API requires the input buffer to exist.

This can happen if the output packet is generated e.g. from a caps or
tags event like in the case for rtpgstpay.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2198>
2022-04-15 19:56:49 +03:00
Brad Hards 488b760e7e tests: rename 'icles' subdir to be more descriptive
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2178>
2022-04-14 11:57:11 +00:00
Havard Graff 71891e5647 qtdemux: fix leak of channel_mapping
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2179>
2022-04-14 19:41:36 +09:00
Edward Hervey d678d7136c tsdemux: Fix AC-4 detection
This regression was introduced by
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1102
and has been present since 1.18

* Stream Type 0x06 is defined in the base mpeg-ts specification as Private PES
Packets. Determining the content should be solely based on descriptors found
within the PMT.
* This was abused in that commit by defining a "bluray-only" stream type for AC4
: `ST_BD_AUDIO_AC4`
* This should be entirely handled in the regular private pes handling further
down in the code

Fixes #1154

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2175>
2022-04-14 08:33:34 +02:00
Seungha Yang 04bb1ac3ef docs: Update for Windows specific parts
* glimagesink is not a recommended one on Windows
* Remove directdrawsink section
* d3dvideosink is legacy and should not be recommended
* Add d3d11videosink part
* directsoundsink should be deprecated
* Add wasapisink/wasapi2sink part

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2144>
2022-04-14 03:55:56 +09:00
Sebastian Dröge 83a0232225 ptpclock: Fix wrong condition order from last commit
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2171>
2022-04-13 17:00:25 +03:00
Marc Leeman 5926da85ba gst-rtsp-server: minor spelling fixes
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2170>
2022-04-13 14:38:52 +02:00
He Junyan c5546d476a va: h264enc: Correct the hierarchical level name for pyramid-b frames.
The current way names the level by the number of B frames it contains, the
less it contains, the higher level it is. So the non ref B frames are in the
lowest layer and the B frames in the highest level refer to I/P frames.
But the widely used way is just the opposite, the ref B frames are in the
lower level and non ref B frames are at the highest level.
The is just a terminology change, and does not have any effect for compression
result and quality.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2149>
2022-04-13 08:22:32 +00:00
Ming Qian 030d749019 doc: Update cache after NV12_8L128 and NV12_10BE_8L128 addition
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2158>
2022-04-13 07:20:58 +00:00
Ming Qian dce02a870e v4l2: Add NV12_8L128 in gst_v4l2_object_get_caps_info
It should be included in
<https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1379>

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2158>
2022-04-13 07:20:58 +00:00
Ming Qian 6af66167d0 v4l2: Add a missed break
Fix a typo that miss a break in the switch statement

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2158>
2022-04-13 07:20:58 +00:00
He Junyan 7f6cd7ac3c codecs: av1parser: Fix a typo in seq_level_idx check.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2157>
2022-04-13 02:36:09 +00:00
Seungha Yang 5ec1d85494 meson: gst-play: Restore Windows high-resolution timer support
Fix regression of the commit 2952a73f40

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2154>
2022-04-12 19:36:49 +00:00
Sebastian Dröge 416e16aefd ptpclock: Allow at least 100ms delay between Sync/Follow_Up and Delay_Req/Delay_Resp messages
It doesn't matter for measurement purposes whether receiving them takes
a while and various PTP servers are not prioritizing to send them,
causing them to be dropped unnecessarily and preventing proper
synchronization with such servers.

This is especially a problem if the RTTs in the network are very low
compared to the additional delay imposed by the server.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2161>
2022-04-12 18:57:23 +00:00
Seungha Yang 83ba83924a amfh265enc: Handle preset option
Add missing preset option handling

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2165>
2022-04-13 01:46:34 +09:00
Seungha Yang 097919f79b amfencoder: Do shared resource copy only if texture belongs to other device
Staging texture from the same d3d11device can be copied without
shared resource handling

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2165>
2022-04-13 01:42:34 +09:00
Seungha Yang 2548014dfc win32: Enable high-resolution timer for MinGW build
timeapi.h is missing in our MinGW toolchain. Include mmsystem.h
header instead, which defines struct and APIs in case of our MinGW
toolchain. Note that in case of native Windows10 SDK (MSVC build),
mmsystem.h will include timeapi.h

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2153>
2022-04-12 15:09:16 +00:00
Sebastian Dröge c1a3aaa3ec Fix transfer gobject-introspection annotation typos
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2160>
2022-04-12 12:43:08 +00:00
Olivier Crête 2771490992 wpevideosrc: Give WebKit the keyboard, touch and pointer modifiers
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2156>
2022-04-12 11:52:34 +00:00
Olivier Crête 41967e503c wpesrc: Convert from utf32 to support other keys
This makes all of the non-letter keys work.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2156>
2022-04-12 11:52:34 +00:00
Olivier Crête 3ca61ae0d3 wpesrc: Initialize key event to 0
Otherwise, WebKit sees random modifiers

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2156>
2022-04-12 11:52:34 +00:00
Andoni Morales Alastruey 2df32360b2 amfcodec: fix setting quality presets
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2159>
2022-04-12 12:14:04 +02:00
Edward Hervey 25b37c33dd mxfdemux: Fix issue with re-syncing
In case of re-syncing (i.e. moving to another partition to avoid too much of an
interleave), there was previously no checks to figure out whether a given
partition was already fully handled (i.e. when coming across it again after a
previous resync).

In order to handle this at least for single-track partitions, check whether we
have reached the essence track duration, and if so skip the partition.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2150>
2022-04-12 07:57:38 +00:00
Edward Hervey 3a77a3c696 mxfdemux: Don't double-increase track position
The essence track position should only be overriden if we sucesfully switched to
another position. In case of EOS we do not want to override it else we would
increase the track position *again* at the end of this function

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2150>
2022-04-12 07:57:37 +00:00
Seungha Yang ad9c435647 amfcodec: Fix for MinGW build
timeapi.h header might not be missing depending on toolchain.
Also do hard meson error if winmm dep is not available but
amfcodec is explicitly enabled.
And fixing various GCC build warning errors.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2155>
2022-04-11 18:44:40 +00:00
Robert Rosengren e4a6521ac7 rtpbin: Fix division by zero when using ts-offset-smoothing-factor
avg_ts_offset may cause division by zero when calculating potential
overflow protection. This fix will avoid the division.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2151>
2022-04-11 15:29:49 +02:00
Seungha Yang ad434759a9 qsv: Add JPEG encoder
Note that YUY2 is not supported yet, since the format support is not
implemented now.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2142>
2022-04-10 23:38:07 +09:00
Matthew Waters c2ac57f6c9 subparse: don't try to index string with -1
If the len of the string turns out to be 0, str[len - 1] resolved to
str[-1] which is not a good idea.

Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=46543
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2147>
2022-04-10 10:57:08 +10:00
Tim-Philipp Müller aa121fd120 Update openh264 wrap to v2.2.0 + fixes from master
Commit 0819f288dc5fc24fb34089113bc230aea65c8375 to be precise.

We need post-v2.2.0 build fixes from master, otherwise linking
fails because of missing symbols.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2145>
2022-04-09 21:44:42 +01:00
Seungha Yang 89293656e4 amfcodec: Update plugin cache
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2143>
2022-04-10 03:15:02 +09:00
Seungha Yang a0d8133d60 nvencoder: Update property names and default values
Update properties of newly written D3D11/CUDA mode encoders
to be consistent with Intel QSV plugin. And rename "zerolatency"
to "zero-reorder-delay" because previous "zerolatency" may
misleading

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2140>
2022-04-09 14:00:35 +00:00
Seungha Yang 7b89cdbefe qsvencoder: Update property names and default values
Stop using MSDK plugins property naming, instead use unified names
and default values to be consistent with newly written NVIDIA encoders.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2140>
2022-04-09 14:00:35 +00:00
Seungha Yang f413449a28 amfcodec: Add support for h264/h265 encoding
New encoder implementations for AMD GPU using AMF API

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2109>
2022-04-08 17:59:12 +00:00
Seungha Yang c41a72a1ff amfcodec: Import AMF SDK headers
SDK version v1.4.24 at the commit of
fbf12cd39f

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2109>
2022-04-08 17:59:12 +00:00
Seungha Yang 6e4ffaee1e msdk: Fix Windows build
Headers of gstva should not be included on Windows

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2141>
2022-04-09 02:13:57 +09:00
Tristan Matthews 86f0f8b67f rtpopusdepay: assume 2 channels if sprop-stereo is missing
Fixes #1064

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2125>
2022-04-08 13:11:25 +00:00
Seungha Yang 2291781087 d3d11window: Use ANSI version WIN32 API explicitly
We were using ANSI version APIs implicitly because UNICODE is not
defined by ourselves. But potentially it can be broken if user
defines UNICODE.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2131>
2022-04-08 11:51:37 +00:00
Seungha Yang fb226f4733 d3d11: Run indent
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2131>
2022-04-08 11:51:37 +00:00
Matthew Waters 62d09f73b7 ogg: fix possible buffer overrun
If an ogg stream does not match our expectations of how the end of a
buffer may be structured, it was possible to read memory past the end of
the buffer parsed by libogg.  Include a bounds check for this case and
stop parsing.

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3930

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2134>
2022-04-08 08:52:45 +00:00
Mathieu Duponchelle 4c98e2d289 rtpbasepayload: fix transfer annotation for push and push_list
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2133>
2022-04-08 07:20:31 +00:00
Matthew Waters d06187c218 gst: remove custom logger for critical/warnings/fatals
It's not really needed anymore (only calls out to
g_log_default_handler() and interferes with applications using
g_log_set_default_handler().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2135>
2022-04-08 06:50:02 +00:00
hoonhee.lee 27b945aa03 riff-media: fix memory leak after usage for g_strjoin
This leak is observed with valgrind.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2129>
2022-04-07 20:36:42 +00:00
Seungha Yang d4f9676c9c h265parser: Fix short_term_ref_pic_set() size calculation
This field is used by DXVA/NVDEC/VA, and each specification
describes (NVDEC is not well documented) that it's the number of
bits used in short_term_ref_pic_set().

DXVA doesn't explicitly mention that whether the size of
emulation preventation bytes (EPB) is inclusive or not, but
VA is clearly specifying that it's the size after removing
EPB. Excluding EPB size here makes more sense therefore.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1930>
2022-04-07 18:46:12 +00:00
Bastian Krause c39181903e gltransformation: let graphene alloc its structures memory aligned
With NEON instructions enabled, graphene expects the memory passed to it
16-byte-aligned. Otherwise unaligned memory access faults occur causing
SIGBUS signals.

graphene has alloc functions for its structures that take care of this,
so use them.

See also: https://github.com/ebassi/graphene/issues/215#issuecomment-794744829

Suggested-by: Sebastian Dröge <sebastian@centricular.com>
Signed-off-by: Bastian Krause <bst@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1321>
2022-04-06 18:14:53 +02:00
Matthias Fuchs 42ec223f94 qmlglsrc: Fix deadlock when stopping
This fix makes sure that streaming thread stops waiting when the
qmlglsrc element transitions from playing to paused.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2115>
2022-04-06 10:54:51 +00:00
Edward Hervey 80e83089b5 mxfvanc: Handle empty VANC packets
Some XDCAM recorders store empty packets for VANC, and don't even include the
2byte length.

Handle them in the same way as VANC packets with 0 packets.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2122>
2022-04-06 10:05:09 +00:00
Matthias Fuchs af71adf315 qmlglsrc: Fix missing depth & stencil buffer
Qt Quick primitives which have some kind of alpha blending
(transparency, rounded corners) are z-sorted by Qt and rendered in the
correct order. For opaque primitives Qt relies on the OpenGL depth
buffer to correctly determine the visibility of stacked elements.

This change enables the depth buffer to make sure that opaque primitives
are correctly z-stacked.

https://doc.qt.io/qt-6/qtquick-visualcanvas-scenegraph-renderer.html#opaque-primitives

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2114>
2022-04-06 09:18:16 +00:00
Fuga Kato 8a55dd9233 docs: design: negotiation: Fix indentation in pseudo-code
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2120>
2022-04-06 09:05:53 +00:00
Sebastian Dröge 0813efc821 rtpstats: Remove non-existing twcc field docs from RTPPacketInfo and add missing field docs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2121>
2022-04-06 10:15:13 +03:00
Sebastian Dröge 46d7763879 rtpsession: Remove unused twcc fields from the struct
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2121>
2022-04-06 10:15:13 +03:00
Fabrice Fontaine 1477eb1fad gst-libav: fix build on systems without C++ compiler
Fix the following build failure on systems without C++ compiler:

The following exception(s) were encountered:
Running "/nvmedata/autobuild/instance-9/output-1/host/bin/or1k-buildroot-linux-musl-g++ --version" gave "[Errno 2] No such file or directory: '/nvmedata/autobuild/instance-9/output-1/host/bin/or1k-buildroot-linux-musl-g++'"

Fixes:
 - http://autobuild.buildroot.org/results/8ac0ba5eaaf7571857b4d8cfabf1488d640dc59a

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2112>
2022-04-05 16:47:34 +00:00
Nirbheek Chauhan bfe43121f1 appsrc: Clarify buffer ref semantics in signals
The documentation could be read to mean that the caller continuous to
'own' the buffer, and that there is some other mechanism to find out
when to unref it.

Clarify that "not taking ownership" here means "taking a reference",
and specify that you can unref it at any time after calling the
function.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2110>
2022-04-05 14:40:21 +00:00
Andoni Morales Alastruey 6ddb443743 gstreamer-sharp: apply new code style to alll sources
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/983>
2022-04-05 08:28:50 +00:00
Andoni Morales Alastruey f89dff303a gstreamer-sharp: ensure a consitent code format
Use EditorConfig and dotnet-format to ensure a consistent
code style.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/983>
2022-04-05 08:28:50 +00:00
Sangchul Lee 8537433f24 webrtc/datachannel: Change initial data channel state to CONNECTING
It complies with http://w3c.github.io/webrtc-pc/#dom-rtcdatachannelstate.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2099>
2022-04-04 23:46:25 +00:00
Seungha Yang 26fa35dcdf qsvencoder: Don't use USAGE_HINT_ENCODER and enable derived image support
Peformance issue by disabled derived image support was reported

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2111>
2022-04-04 21:18:13 +00:00
Seungha Yang b74da32b5c Revert "vah264enc: Disable derived image support"
This reverts commit 0011feb0d6.

The commit caused performance-wise regression for some platforms

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2111>
2022-04-04 21:18:13 +00:00
Tong Wu 4e97cc24a7 msdk: use mfxU32 instead of uint32_t
Msdk should use mfx variables defined in mfxdefs.h. Replace uint32_t
with mfxU32.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2091>
2022-04-04 20:28:25 +00:00
Stéphane Cerveau 5020a6e83a gst-examples: add -xobjective-c for darwin
To avoid error when including #include <AppKit/AppKit.h>
the  build should include the c args xobjective-c

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2095>
2022-04-04 16:27:45 +00:00
Stéphane Cerveau e7f198a898 bad: examples: fix unused res warning
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2095>
2022-04-04 16:27:45 +00:00
Zhao Zhili dd27850a9a examples: fix build on macOS with gtk+-quartz-3.0
gdk_quartz_window_get_nsview is not declared in the header file now:
error: implicit declaration of function 'gdk_quartz_window_get_nsview'
is invalid in C99 [-Werror,-Wimplicit-function-declaration]

fixes #979

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2095>
2022-04-04 16:27:45 +00:00
Haihua Hu df0958e855 ximagesink/xvimagesink: use GST_XINITTHREADS to ensure call to XInitThreads
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2098>
2022-04-04 15:49:02 +08:00
Johan Sternerup 1842ffc906 webrtc: Improve robustness of nice agent signal handlers
NiceAgent and it's associated thread is alive for as long as
GstWebRTCICE is alive so make sure any signal handlers connected to
NiceAgent do not access data that is deleted earlier.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2073>
2022-04-04 02:10:35 +00:00
Seungha Yang 5ed8e416fe nvcodec: Fix typos
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2107>
2022-04-03 22:12:33 +09:00
Seungha Yang 9b5fe81d01 nvencoder: Fix operator overloading
GUID equality check was inverted

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2107>
2022-04-03 22:09:19 +09:00
Tim-Philipp Müller 296094508e libs: va: make sure va-enumtypes.h is generated before it's used
Need to add a dep for the generated header file to the dependency()
so that it gets generated before anyone tries to #include files
from it (which may happen before the actual lib is built because
that's only needed when stuff is linked together later).

See https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2057#note_1323236
and CI build failures in https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2096

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2103>
2022-04-02 18:58:52 +00:00
Seungha Yang 0011feb0d6 vah264enc: Disable derived image support
Behavior of derived image seems to be platform dependent and
it's buggy in some cases.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1110
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2086>
2022-04-02 07:04:03 +00:00
He Junyan 976356e159 va: h264enc: Do not use USAGE_HINT_ENCODER for input pool.
It seems that the VA_SURFACE_ATTRIB_USAGE_HINT_ENCODER is used only
for the recon surfaces, if we set this flags for input raw surfaces,
the alignment is wrong and we get broken result.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2100>
2022-04-02 06:23:03 +00:00
Nicolas Dufresne 8d9e649570 va: Fix printf format modifier for drm modifiers
DRM modifiers are 64bit, the printf modifier is platform dependant. Use
the G_GINT64_MODIFIER macro to make this printf portable.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2102>
2022-04-01 20:09:36 +00:00
Jan Schmidt 029d6a4a19 aggregator: Improve debugging of arriving buffers
Log some details about the buffers that are arriving and
being enqueued on each sink pad.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2096>
2022-04-01 19:05:44 +00:00
Jan Schmidt 0a5c2a9afb gstreamer: Remove GST_DATAFLOW debug category
Nothing has logged anything to this category since event and
buffer dataflow was de-unified in 2005.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2097>
2022-04-01 17:56:28 +00:00
Xavier Claessens a40634eebe Use gmodule-no-export-2.0
We don't need `-Wl,--export-dynamic`, that's used only for executables
that needs to export an API to be used by plugins they load.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2031>
2022-04-01 16:32:17 +00:00
Xavier Claessens b004464ac6 Remove glib and gobject dependencies everywhere
They are part of gst_dep already and we have to make sure to always have
gst_dep. The order in dependencies matters, because it is also the order
in which Meson will set -I args. We want gstreamer's config.h to take
precedence over glib's private config.h when it's a subproject.

While at it, remove useless fallback args for gmodule/gio dependencies,
only gstreamer core needs it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2031>
2022-04-01 16:32:17 +00:00
Xavier Claessens f270f9e974 Fix cross build with mingw32
At least on Ubuntu 20.04 the x86_64-w64-mingw32-gcc toolchain defaults
to WinXP. We require at least Vista for FILE_STANDARD_INFO.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2022>
2022-04-01 15:52:28 +00:00
Xabier Rodriguez Calvar d522b17d9c ges-smart-video-mixer: use the proper pad to get the positioner meta
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2094>
2022-04-01 13:07:46 +02:00
Xabier Rodriguez Calvar 199b62570f glcolorconvert: should copy metadatas from the incoming buffer
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2094>
2022-04-01 13:07:46 +02:00
Xavier Claessens fa38827c44 Android: Implement JNI_OnLoad()
When building for Android, chances are that gstreamer is going to be
loaded from Java using System.loadLibrary(). In that case we can
initialize GStreamer (including static plugins), redirect log functions,
etc.

This code is copied from cerbero because it can be used with
gstreamer-full-1.0 too. Cerbero needs to be adapted to drop that code
and generate gst_init_static_plugins() function.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/617>
2022-04-01 08:15:53 +00:00
Sebastian Dröge 16ed0a6961 playbin/playbin3: Allow setting a NULL URI
The URI is already initialized to NULL at the beginning and GstPlayer
was assuming that it is possible to set to NULL at a later time too.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1124

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2090>
2022-04-01 10:25:23 +03:00
Thibault Saunier b358897a3b navigation: Rename parse_state to parse_modifier_state
`parse_state` sounds a bit weird and `parse_modifier_state` is clearer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2087>
2022-04-01 06:38:43 +00:00
Stéphane Cerveau 8492dd4255 base:gl: add x11 deps to gstglx11_dep
On MacOS with homebrew the xlib-xcb.h is in
own cellar /opt/homebrew/Cellar/libx11/1.7.3.1/include
Need to add the windowing dependencies to gl tests

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2061>
2022-04-01 00:43:54 +00:00
Seungha Yang b5ed0eb4b0 qsvencoder: Add support for VA memory
Use VA allocator and buffer pool implementation for zero-copy
encoding with upstream VA elements

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2030>
2022-03-31 20:48:24 +00:00
Seungha Yang 9c44b32c21 qsv: Use pipeline's VA context
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2030>
2022-03-31 20:48:24 +00:00
Xavier Claessens c24d8838f5 Update openjp2 and libxml2 from wrapdb
This fix their static link for Windows.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2084>
2022-03-31 14:19:46 -04:00
Víctor Manuel Jáquez Leal 6d2f57b6c7 libs: va: add VA allocator parameter for derived images usage.
Added GstVaFeature enum type, and new parameter for VA allocator's
set_format() and get_format(). Also added a new parameter in VA pool
gst_va_pool_new_with_config() and
gst_buffer_pool_config_set_va_allocation_params().

This new parameter will define if derived images will by used for
buffer mapping.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2057>
2022-03-31 14:14:45 +00:00
Sangchul Lee a801d6dd63 webrtcstats: Unify 'packets-lost' data type to int64
Previously, 'packets-lost' member of RTCReceivedRtpStreamStats had
a value of G_TYPE_INT from rtpsource or a value of G_TYPE_UINT64
from rtpjitterbuffer.
Because of the negative value of estimated amount of packets lost
in rtpsource as well as the description in
https://www.w3.org/TR/webrtc-stats/#dom-rtcreceivedrtpstreamstats
it is fixed to set this value with G_TYPE_INT64.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2049>
2022-03-31 05:37:39 +00:00
Xavier Claessens 368f7b2cf2 overlay: Fix qt support detection
On Ubuntu moc-qt5 command is called moc. This requires Meson 0.54.0 for
the new has_tools() method.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2075>
2022-03-30 22:54:57 +00:00
Víctor Manuel Jáquez Leal 8759014f4c va: encoder: Remove unused allocation config.
Since it's also done inside of gst_va_pool_new_with_config().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2072>
2022-03-30 22:18:06 +00:00
Seungha Yang 6451a13b0b vadisplay: Add description readonly property
Expose description of vendor for user information, similar to
the description property of d3d11device.
Also, set description and DRM device path on GstContext structure
so that user can read them and it will be printed on terminal
when gst-launch-1.0 is used

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2064>
2022-03-30 21:41:27 +00:00
Seungha Yang f465156bf9 gst-play: Improve Win32 keyboard input handling
The console HANDLE will be keep signalled state unless application
reads console input buffer immediately. So we should read and flush
console input buffer from the thread where the event is signalled,
instead of GMain context thread.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2058>
2022-03-30 20:37:54 +00:00
Thibault Saunier 2952a73f40 tools: Add support for building gstreamer tools against gst-full
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1581>
2022-03-30 17:43:17 +00:00
Enrique Ocaña González 2a30f1038a playsink: improve GL context sharing
Configure playsink tried element with the bus of the main pipeline.
That tried element can be a gl video sink, which would benefit from being
able to propagate context messages to the main pipeline and have other
internal pipeline elements configured with it. Having different elements
configured with the same GL context allows them to share buffers with
video/x-raw(memory:GLMemory) caps and achieving zero-copy.

Thanks to Alicia Boya García <aboya@igalia.com> for her work co-debugging
the issue and contributing to find a solution.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2056>
2022-03-30 15:32:19 +00:00
Edward Hervey 656baad90f docs/design: Updates for upstream selection
Update existing documentation for various behaviours.

Add new information on how selection "upstream" of decodebin3 happens.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1905>
2022-03-30 14:30:54 +00:00
Edward Hervey a6f213ad62 urisourcebin: When streams-aware, remove pads immediately
For the same reason we add them immediately

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1905>
2022-03-30 14:30:54 +00:00
Edward Hervey 8648182fd1 urisourcebin: Don't wait for pads content when streams-aware
If the adaptive demux is streams-aware it can add/remove pads at any point in
time without the need for no-more-pads or data blocking

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1905>
2022-03-30 14:30:54 +00:00
Edward Hervey 76d01f0d73 urisourcebin: Don't do buffering if source already does
Sources that can internally handle buffering shouldn't have yet-another
buffering element after it. This can be simply detected by checking if it can
answer a TIME BUFFERING query just after creation.

If that is the case, we can expose the element source pads directly

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1905>
2022-03-30 14:30:54 +00:00
Edward Hervey 7eea928dd0 decodebin3: Handle upstream selection
Detect if upstream handles stream-selection, and if so bypass all stream
selection handling (streams are forwarded as-is).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1905>
2022-03-30 14:30:54 +00:00
Edward Hervey e291ad2cbb query: Add a new stream selection query
This new API allows querying whether elements can handle stream selection
themselves or not.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1905>
2022-03-30 14:30:54 +00:00
Víctor Manuel Jáquez Leal 602d249847 va: Don't expose internal classes.
VA allocators and pools classes don't need to be exposed as external
symbols.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2070>
2022-03-30 11:36:03 +02:00
Haihua Hu 630acb40f0 gstplay: don't print error log in warning_cb
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2069>
2022-03-30 08:12:05 +00:00
Víctor Manuel Jáquez Leal 599257bf10 vapostproc: Build classification dynamically.
By default, the classification is
"Converter/Filter/Colorspace/Scaler/Video/Hardware", but if VA
post-processor driver supports either color balance, skin tone
enhancement, sharpening or noise reduction, "Effect" is added.

Thus, if vapostproc ranking is raised, it can be chosen by
autovideosink.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2066>
2022-03-30 04:24:35 +00:00
Matthew Waters 041eee6c2e webrtc: produce stats for all relevant streams
Instead of only using the last ssrc that was pushed into a sink pad.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1664>
2022-03-29 23:55:41 +00:00
Matthew Waters 04de1a161f webrtc: avoid different versions of gnu-indent always wanting to change !!
Add some sneaky parenthesis to avoid always having to use git commit -n
or revert out hunk of the change.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1664>
2022-03-29 23:55:41 +00:00
Matthew Waters 5bfe36746a webrtc: implement initial simulcast fec/rtx usage
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1664>
2022-03-29 23:55:41 +00:00
Matthew Waters 5741ee38e0 webrtc/datachannel: fix use-after-free in sctp state notification
g_signal_disconnect*() doesn't stop any existing callbacks from running
which means that if the notify::state callback is in progress in one
thread and the data channel object is finalize()ed in another thread,
then there could be a use-after-free trying lock the data channel
object.

We can't reasonably use a GWeakRef as we don't have a 'parent' object to
free the GWeakRef after the data channel is finalized.  This is also
complicated by the fact that the application can hold a reference to the
data channel object that would live beyond the lifetime of webrtcbin
itself.

We solve this by implementing a ghetto weak-ref solution internally with
a list of outstanding data channels.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1664>
2022-03-29 23:55:40 +00:00
Matthew Waters 831b34fb43 tests/webrtc: fix a use-after-free in test_data_channel_close
g_object_weak_ref() is not thread-safe and the data channel object's
refs/unrefs can happen on multiple threads.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1664>
2022-03-29 23:55:40 +00:00
Matthew Waters f11e0e76c6 tests/webrtc: fix a race in the tests related to state tracking
If things progress fast enough, some state changes may not be seen be
the waiting code.

Fix by:
1. keeping a list of all the state changes
2. waiting checks each entry and if the relevant state is found, all
   states up to and including then are removed.

This ensures that any waits will see all the state sets.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1664>
2022-03-29 23:55:40 +00:00
Matthew Waters 5257093268 tests/webrtc: factor out src pad property checking to a separate function
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1664>
2022-03-29 23:55:40 +00:00
Matthew Waters 2377f8b3f2 webrtcbin: initial support for sending and receiving simulcast streams
Input (sink pads) is the already-ssrc-muxed stream with the relevant rtp
sdes header extensions already applied:
  - mid
  - stream-id
  - repaired-stream-id

Output (src pads) have the pads separated into individual ssrc's as
that's what rtpbin gives us.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1664>
2022-03-29 23:55:40 +00:00
Matthew Waters 75b23d646a tests/webrtc: test for enabled bundled fec/rtx
Doesn't actually check that any fec/rtx happens, just that the pipeline
is vaguely sane and doesn't error.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1664>
2022-03-29 23:55:40 +00:00
Matthew Waters 699739c130 webrtcbin: support multiple received streams for a single mline
Each rtpbin exposed recv_src pad is now exposed as webrtcbin src_%u pad
now with no meaining applied to the value of %u.  Previously this used
to mean the mline in the SDP.  If this is is still required, then the
transceiver can be retrieved from the pad and the "mlineindex" property
from the transciever.  The "mid" is also retrievable from the
transceiver.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1664>
2022-03-29 23:55:40 +00:00
Matthew Waters e28c45fd05 webrtc: explicitly error out in a couple of renegotiation cases
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1664>
2022-03-29 23:55:40 +00:00
Matthew Waters 318a639e43 webrtc/transportstream: add debug category
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1664>
2022-03-29 23:55:40 +00:00
Matthew Waters e18ee04cd2 tests/webrtc: also check valid mline for srcpad codec-preferences negotiation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1664>
2022-03-29 23:55:40 +00:00
Matthew Waters 2aeca9ed84 webrtcbin: don't name src pads based on the mline specifically anymore
Naming based on the mline doesn't really work with e.g. simulcast
scenarios.

It is entirely possible to retrieve the transceiver and then the mline
from that if that is so required.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1664>
2022-03-29 23:55:40 +00:00
Matthew Waters 8a65fa40c7 webrtc/tests: print the correct media idx on error
Instead of the attribute index

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1664>
2022-03-29 23:55:40 +00:00
Matthew Waters b153ffdd56 webrtc/tests: give slightly better names to the dot file dumps
Don't use printf-specifiers with g_strconcat().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1664>
2022-03-29 23:55:40 +00:00
Matthew Waters cda81bdb1e webrtcbin: improve some debugging output
- Put human readable names into debug strings.
- Demote some frequent rtpbin signal logging
- Don't use GST_PTR_FORMAT in g_set_error()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1664>
2022-03-29 23:55:40 +00:00
Matthew Waters c02c8a85ce webrtcbin: silence spurious warning when creating answer transceiver
When creating a transceiver when creating an answer, the media kind of the
transceiver was never set correctly initially.  This would lead to a
GST_WARNING being produced about changin a transceiver's media kind.

Fix by retrieving the GstSDPMedia kind from the offer instead as the answer
GstSDPMedia has not been set as the answer caps have not been chosen yet.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1664>
2022-03-29 23:55:40 +00:00
Matthew Waters 246374c4e7 tests/webrtc: always use a unique SSRC for each stream
Will become more relevant with mid/rid->ssrc mappings

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1664>
2022-03-29 23:55:40 +00:00
Matthew Waters 533d4937fe webrtcbin: add a specific find_transceiver_by_mid function
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1664>
2022-03-29 23:55:40 +00:00
Matthew Waters 79d58200c9 webrtcbin: explicitly use a variable for the rtp session idx
Slightly clearer in meaning.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1664>
2022-03-29 23:55:40 +00:00
Matthew Waters 9a758d78a9 webrtcbin: support using an a=mid value from the sink/transceiver caps
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1664>
2022-03-29 23:55:40 +00:00
Víctor Manuel Jáquez Leal 400faf7361 va: Set <gst/va/gstva.h> as library single point entry header.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2048>
2022-03-29 19:48:30 +00:00
He Junyan 990fbb3b52 va: Move allocators and pool objects into gstva library.
In order to other plugins use gstva objects, such as allocators and buffer
pools, this merge request move them from the va plugin to the gstva library.

This objects are not exposed in <gst/va/gstva.h> since they are not expected
to be used by users, only by plugin implementators.

Because of the surface copy design, which is used to implement allocator's
mem_copy() virtual function, depends on the vafilter, which is kept inside
the plugin, memory copy through VAPosproc is disabled and removed temporarly.

Also added some missing parameter validation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2048>
2022-03-29 19:48:30 +00:00
He Junyan 53783eab6c va: Move the video format functions into gstlibva.
Untabifying header file.

The logging category was moved from the plugin generic category to
the display category. It can argue that video formats hacks are
display dependant.

Added validations for input parameters.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2048>
2022-03-29 19:48:30 +00:00
Nirbheek Chauhan b7086a368f meson: Add some messages when selecting libsoup
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2032>
2022-03-29 18:30:03 +00:00
Nirbheek Chauhan 54eff61f0f soup: Fix usage of symbols / defines that are gone in libsoup3
I am not sure about the SOUP_MESSAGE_OVERWRITE_CHUNKS change, but it
was definitely already broken when using libsoup-3.0 in a shared
build. souphttpsrc probably needs to be ported from SoupMessage to
SoupServerMessage when using libsoup-3.0.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1111

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2032>
2022-03-29 18:30:03 +00:00
Nirbheek Chauhan 6c910dc746 soup: Fix pre-processor macros in souploader for libsoup-3.0
Some of the preprocessor conditionals in the loader were very broken
with libsoup-3.0 + --default-library=static

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1111

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2032>
2022-03-29 18:30:03 +00:00
Edward Hervey 00187ddb0c pbutils: Fix wmv screen detection
strncmp vs !strncmp :)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2050>
2022-03-29 17:31:44 +00:00
Stéphane Cerveau 39e45e5b1c ges: remove memory leak with description
free the capsdesc

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2047>
2022-03-29 16:50:13 +00:00
Stéphane Cerveau ef9962d66a nle: clear seek event properly
Use gst_clear_event instead of g_clear_object
avoiding a failing gobject unref

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2047>
2022-03-29 16:50:13 +00:00
Seungha Yang 886cfecd36 qsvencoder: Add support for dynamic bitrate update
... and add more encoding options.

QSV API supports dynamic bitrate change without IDR insertion.
That's more efficient way of runtime encoding option update
than starting from new sequence with IDR per bitrate option change.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2039>
2022-03-29 15:52:58 +00:00