Commit graph

2956 commits

Author SHA1 Message Date
Tim-Philipp Müller 99bbb1ef35 Back to development
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3115>
2022-10-04 03:57:31 +01:00
Tim-Philipp Müller 9820e58be6 Release 1.21.1 2022-10-04 01:18:20 +01:00
Tim-Philipp Müller c376d80e9b Update ChangeLogs for 1.21.1 2022-10-04 01:13:59 +01:00
Jan Schmidt e36440e7bb playsink: Hold a reference to the soft volume element
Always hold a reference to the soft volume element
provided by the playsinkaudioconvert bin helper, the
same as when volume is provided by a sink element,
or the soft volume element gets unreffed too soon.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3108>
2022-10-03 18:56:41 +00:00
Jan Schmidt eef76a9491 xvimagesink: Don't leak XvShmImage
If allocating an XvShmImage generates an X error, but
still returns some allocated memory, make sure to free it
so it doesn't leak.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3100>
2022-10-03 17:30:51 +00:00
Jan Schmidt 6b7d4f74f2 xvimagesink: Zero initialize mask array
Clear the stack array before setting bits to pass to
XISelectEvents(). Fixes spurious crash from an X error:

X Error of failed request:  BadValue (integer parameter out of range for operation)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3100>
2022-10-03 17:30:51 +00:00
Jan Schmidt c8cf714d37 xvimagesink: Don't leak temporary
Use a stack variable instead of a temporarily
malloced variable that wasn't being freed
properly. Fixes a small leak of a GstXvTouchDevice

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3100>
2022-10-03 17:30:51 +00:00
Jan Schmidt aae7b5416c decodebin3: Make sure event is writable before modifying
Make sure we're operating on a private copy of an event when
modifying it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3107>
2022-10-03 16:40:49 +00:00
Jan Schmidt bf6d30ed79 urisourcebin: Make sure event is writable before modifying.
Make sure we're operating on a private copy of an event before
modifying it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3107>
2022-10-03 16:40:49 +00:00
Jan Schmidt e5828c8295 decodebin3: Don't lose a ref on EOS event
Make sure not to give away the ref on the final EOS
event for which the probe handler is returning GST_PAD_PROBE_REMOVE
when pushing the event manually.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3107>
2022-10-03 16:40:49 +00:00
Edward Hervey f08bdf1c4a queue2: Hold the lock when modifying sinkresult
As it's done elsewhere. Avoids a potential race of the field being modified in
the meantime.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3110>
2022-10-03 15:18:09 +00:00
Edward Hervey f2a1769236 qtdemux: Don't stop task when resetting
This is a regression that was introduced in
cca2f555d1 (yes, 9 years ago).

The only place where a demuxer streaming thread should be stopped is when the
sinkpad is deactivated from pull mode (i.e. PAUSED->READY).

Attempting to stop the task in this function would cause this to happen when a
FLUSH_STOP or STREAM_START event is received... which can cause deadlocks.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3109>
2022-10-03 14:41:18 +02:00
Tim-Philipp Müller 237b063843 avauddec: fix unnecessary reconfiguration if the audio layout isn't specified
It would constantly want to renegotiate (and spam the debug log) even
though the channel layout hasn't actually changed. We use the same
fallback in gst_ffmpegauddec_negotiate() already.

This happens with WMA files for example.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3103>
2022-10-01 09:28:40 +00:00
Mathieu Duponchelle f8d8d67b8b splitmuxsrc: don't consider unlinked pads when deactivating part
If splitmuxsrc exposes multiple pads, but only one is linked, part pads
will never see an EOS event. This shouldn't prevent the part from being
eventually deactivated.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3099>
2022-10-01 02:33:08 +00:00
Tim-Philipp Müller 4c8a621809 pbutils: descriptions: add meta/x-klv
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3094>
2022-09-30 11:08:45 +03:00
Tim-Philipp Müller 2d53f9f97c pbutils: descriptions: fix gst_pb_utils_get_caps_description_flags()
And add a little unit test.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3094>
2022-09-30 11:08:45 +03:00
James Cowgill 4edfc86c2a xmptag: Call gst_tag_register_musicbrainz_tags during init
We need to call this to register the MusixBrainz tags before we use
them in an XMP schema.

Fixes this critical when attempting to run jpegparse on a JPEG
containing MusicBrainz XMP tags:

  GStreamer-CRITICAL **: 20:41:07.885: gst_tag_get_type: assertion 'info != NULL' failed

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3092>
2022-09-29 23:29:20 +00:00
Sebastian Dröge d2c13f0c26 test-effect-switch: Fix some memory leaks and make effect element ownership clearer
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3091>
2022-09-29 22:34:37 +00:00
Sebastian Dröge a2d121cf9a gaussblur: Fix memory leak when setting caps multiple times
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3091>
2022-09-29 22:34:37 +00:00
Christopher Obbard 0c83ddcdf7 v4l2codecs: Warn user when no media devices are found
Currently if the user is not able to access the devices under /dev/media*,
either due to no media devices present on the system or simply no permission
to access the device, v4l2codecs initialises with no features or debug messages.

Since calling `GST_DEBUG="v4l2*:7" gst-inspect-1.0 v4l2codecs` is a typical way
to diagnose why element(s) failed to enumerate, we should be more verbose here
when the user is not able to access any /dev/media* device. So print a simple
debug message in this case to aid debugging.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3088>
2022-09-29 19:12:14 +00:00
Philipp Zabel 3b900e1fa4 buffer: drop parent meta in deep copy/foreach_metadata
The purpose of a deep buffer copy is to be able to release the source
buffer and all its dependencies. Attaching the parent buffer meta to
the newly created deep copy needlessly keeps holding a reference to the
parent buffer.

The issue this solves is the fact you need to allocate more
buffers, as you have free buffers being held for no reason. In the good
cases it will use more memory, in the bad case it will stall your
pipeline (since codecs often need a minimum number of buffers to
actually work).

Fixes #283

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2928>
2022-09-28 12:34:44 -06:00
Mart Raudsepp 8a2edc6581 tsdemux: Don't trigger a program change when falling back to ignore-pcr behaviour
Since commit a79a756b79 we could change to ignore-pcr automatically at 500ms
into a live stream when no PCR is seen by then. However the stream counting in
program change detection was wrongly considering ignore-pcr programs to have a
separate PCR PID, even though we are actually ignoring the PCR PID completely,
resulting in an erroneous program switch getting triggered from the different
stream count. This in turn would send an EOS and switch out the pads for what
actually is still the same program, while we intended to simply apply a
workaround for broken encoders.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3060>
2022-09-28 07:18:45 +00:00
Aleix Conchillo Flaqué 453b0cec82 gst-docs: update macOS new project instructions
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3074>
2022-09-28 06:36:05 +00:00
Nirbheek Chauhan 6a3319c8f2 examples: Support multiple video streams in JS webrtc sendrecv
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3079>
2022-09-27 19:48:56 +00:00
Nirbheek Chauhan 0aa9d8ade6 rtspsrc: Fix usage of IPv6 connections in SETUP
If the SETUP request returns an IPv6 server address in the Transport
field, we would generate an incorrect URI, and multiudpsink would fail
to initialize:

```
     rtspsrc gstrtspsrc.c:9780:dump_key_value:<source>    key: 'Transport', value: 'RTP/AVP;unicast;source=fe80::dc27:25ff:fe5e:bd13:8080;client_port=62696-62697;server_port=4000-4001'
...
     rtspsrc gstrtspsrc.c:4595:gst_rtspsrc_stream_configure_udp_sinks:<source> configure RTP UDP sink for fe80::dc27:25ff:fe5e:bd13:8080:4000
...
multiudpsink gstmultiudpsink.c:1229:gst_multiudpsink_configure_client:<udpsink0> error: Invalid address family (got 23)
```

We can't look at stream->is_ipv6 because we can't rely on the server
returning the right value there. In the issue reported about this,
server reported itself as `KuP RTSP Server/0.1`, and the SDP was:

```
c=IN IP4
m=video 54608 RTP/AVP 96
a=rtpmap:96 H264/90000
```

So we need to parse the string value and figure out the family
ourselves.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1819>
2022-09-27 18:59:59 +00:00
Nirbheek Chauhan f8d56e5df6 meson: Remove builtin variable datadir from pkgconfig variables
Fixes warning with meson 0.62:

gst-plugins-bad| subprojects/gst-plugins-bad/meson.build:546: WARNING:
Project targets '>= 0.62' but uses feature deprecated since '0.62.0':
pkgconfig.generate variable for builtin directories. They will be
automatically included when referenced

and more.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3086>
2022-09-27 17:13:29 +00:00
Edward Hervey c22ddbc187 decodebin3: Fix memory issues with active selection list
This had a couple of issues:
* The backing strings (from GstStream) could disappear
* The actual list wasn't properly reset/freed when decodebin3 was re-used

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3083>
2022-09-27 16:21:25 +02:00
Tim-Philipp Müller 02a8f9973b qtdemux: guard against timestamp calculation overflow in gap event loop
Could possibly cause an endless loop.

Fixes #1400.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3084>
2022-09-27 13:07:15 +00:00
Jan Schmidt 3c2c4bbe2c dashdemux2: fix mpd unit test expectations
Update unit test for some mpd cases that were reporting
timestamps including the period start time, while
dashdemux2 expects that it needs to add the period
start time itself.

Fix the tests to not expect the period start time
to be included.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3025>
2022-09-27 00:00:49 +00:00
Junsoo Park 699f2ebb45 dashdemux2: Set timestamp relative to period start
These values will be referred to as timestamp relative to period start
so need to subtract period start time from the values.

Fixes a problem with determining the start position when playing Live content
with SegmentTimeline, presentationTimeOffset and a non-0 period start time.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3025>
2022-09-27 00:00:49 +00:00
Sebastian Dröge 498ad133ba gsturi: When setting the same string again do nothing
Otherwise code like gst_uri_set_host(uri, gst_uri_get_host(uri)) would
first free the string, then create a copy of the freed string and then
assigned that.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3076>
2022-09-26 14:17:18 +03:00
Xavier Claessens edef6b1149 Update all wraps from WrapDB
Update all wraps available in WrapDB. This is simply running the
command "meson wrap update --force" with that Meson PR:
https://github.com/mesonbuild/meson/pull/10357.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3042>
2022-09-23 11:08:06 -04:00
Jakub Adam cccc7a12e1 vp9: check if libvpx supports high bit depth
Detect at runtime if libvpx is compiled with --enable-vp9-highbitdepth
and enable 10bit video formats in element caps accordingly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3067>
2022-09-23 13:55:12 +02:00
Nirbheek Chauhan 6caa8524dd meson: Add a new option to control the source for orc
Previously we were unconditionally cloning the orc subproject because
we want the developer environment to use the latest orc. However, some
people want to use the system orc instead, or want to auto-detect
which to use, with the system orc getting preference. This requires
adding a new option to select that. See discussion at:
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2556

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3062>
2022-09-22 22:31:21 +00:00
Edward Hervey b2701418d7 basetransform: Avoid useless codepath
If QoS is disabled, skip the whole computation (avoids calculating values which
won't be needed)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3034>
2022-09-22 13:45:50 +00:00
Nirbheek Chauhan 3890e49772 bad/soundtouch: Fix interactive test build on MSVC
Needed for https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/930

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3064>
2022-09-22 07:20:45 +00:00
Nirbheek Chauhan a0e6278dba meson: Use implicit builtin dirs in pkgconfig generation
Starting with Meson 0.62, meson automatically populates the variables
list in the pkgconfig file if you reference builtin directories in the
pkgconfig file (whether via a custom pkgconfig variable or elsewhere).
We need this, because ${prefix}/libexec is a hard-coded value which is
incorrect on, for example, Debian.

Bump requirement to 0.62, and remove version compares that retained
support for older Meson versions.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3061>
2022-09-21 21:08:11 +05:30
Seungha Yang a9144f5313 adaptivedemux2: Always wake up loop thread on unpause
Otherwise loop thread will sleep forever because
GstAdaptiveDemuxLoop.paused flag update is not signalled
when loop was marked as stopped already from other thread.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3057>
2022-09-21 09:26:22 +00:00
Jan Schmidt a03f3df626 adaptivedemux2: Rework input download wakeups
Change the way streams are woken up to download more data.

Instead of checking the level on tracks that are being
output as data is dequeued, calculate a 'wakeup time'
at which it should download more data, and wake up
the stream when the global output position crosses
that threshold.

For efficiency, compute the earliest wakeup time
for all streams and store it on the period, so the
output loop can quickly check only a single value
to decide if something needs waking up.

Does the same buffering as the previous method,
but ensures that as we approach the end of
one period, the next period continues incrementally
downloading data so that it is fully buffered when
the period starts.

Fixes issues with multi-period VOD content where
download of the second period resumes only after
the first period is completely drained.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3055>
2022-09-20 19:48:17 +00:00
Víctor Manuel Jáquez Leal f9371ccc38 vabaseenc: Move out encoder validation from assertion.
Assertion can be disabled at compilation time. Still it's important to
validate it the encoder object was opened by the subclass. This patch
removes the assertion and returns if the encoder is open.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3051>
2022-09-20 18:59:18 +00:00
Thibault Saunier 7c26630651 validate:scenario: Make appsrc-push push a sample
Allowing setting a segment to the sample

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3052>
2022-09-20 17:14:36 +00:00
Thibault Saunier e290e7913c validate: Handle buffer pts/dts/duration in the appsrc-push action
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3052>
2022-09-20 17:14:36 +00:00
Thibault Saunier d2b4e7a38e validate:scenario: Simplify the way we override appsrc src pad chain
When pushing several buffers while the pipeline is in NULL state, meaning
that the action are executed "interlaced", previous code was deadlocking.

This new implementation makes it so the override is always on and we
expect all buffers to go through to be associated to a function, which
is a safe assumption.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3052>
2022-09-20 17:14:36 +00:00
Edward Hervey fdfa70997b hlsdemux2: Handle negative time mappings
Some servers can return playlists with "old" media playlists and different
Discont Sequence.

In those cases, the segment stream times would be negative when creating a new
time mapping. In order to properly handle such scenarios, shift the values to
stored accordingly to end up with non-negative reference stream time.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3054>
2022-09-20 14:34:34 +00:00
Thibault Saunier 7167721cac ges-video-source: Remove limit on frame duplication on EOS in videorate
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1352

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3000>
2022-09-20 13:23:02 +00:00
Thibault Saunier bb840bd116 videorate: Add a max-closing-segment-duplication-duration property
This allows users to let videorate fully fill the segments when received
EOS or on new segment, removing an arbitrary limit of 25 duplicates which
might not be what the user wants (for example on low FPS stream in GES,
that sometimes leaded to broken behavior)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3000>
2022-09-20 13:23:02 +00:00
Thibault Saunier 515e1b55ee validate:scenario: Fix a leak when done waiting for an ASYNC action
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3000>
2022-09-20 13:23:02 +00:00
Thibault Saunier 5724a64660 nlecomposition: Minor debug enhancement
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3000>
2022-09-20 13:23:02 +00:00
Thibault Saunier 65b2172fe8 ges: Enhance element names in video uri sources
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3000>
2022-09-20 13:23:02 +00:00
Xavier Claessens 5f0493d33a meson: Set install_tag on some targets
Trying to follow recommendation from Meson documentation:
https://mesonbuild.com/Installing.html#installation-tags

Move tools into 'bin' or 'bin-devel' categories to keep only libs and
plugins in the default 'runtime' category. This simplifies distribution
of GStreamer application skipping parts that are not needed, similarly
to what Cerbero does by hardcoding huge list of files.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3017>
2022-09-20 10:08:15 +00:00
Paweł Stawicki ccef26908e queue2: Fix deadlock when deactivate is called in pull mode
check is flush was called before waiting on condition

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2967>
2022-09-20 09:23:22 +00:00
Mengkejiergeli Ba 03a24de4cb msdkav1enc: We should not set other alignment here
According to spec, we have 32bit alignment for height (progressive) and
16bit alignment for width, so here we don't need to add other alignment
settings.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3050>
2022-09-20 16:25:15 +08:00
Mart Raudsepp beece4e778 shout: fix minimum requirement to libshout >= 2.4.3
commit e64c6f0b93 added usage of the SHOUT_USAGE_UNKNOWN symbol, but this
became available in the Icecast-libshout 2.4.3 release, not 2.4.2

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3048>
2022-09-19 20:50:25 +03:00
He Junyan cf2581953b va: h264enc: Fix rate control enum register failure for the second GPU.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3041>
2022-09-19 09:24:36 +00:00
Edward Hervey 8c49fcbc83 video-converter: Fix doc
Argument names weren't correct

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3043>
2022-09-19 08:54:48 +02:00
Tim-Philipp Müller c6c69ec66d subprojects: harfbuzz: bump to 5.2.0
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2507>
2022-09-17 22:41:40 +00:00
Tim-Philipp Müller 889ae68466 subprojects: libmicrodns: bump to 0.2.0 + meson fixes
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2507>
2022-09-17 22:41:40 +00:00
Tim-Philipp Müller 62317b27f6 subprojects: pango: bump to 1.50.10
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2507>
2022-09-17 22:41:40 +00:00
Tim-Philipp Müller b19260a72d subprojects: fribidi: bump to 1.0.12
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2507>
2022-09-17 22:41:40 +00:00
Tim-Philipp Müller e42ed55ef0 subprojects: cairo: bump to 1.17.6
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2507>
2022-09-17 22:41:40 +00:00
Tim-Philipp Müller a0f84a1f67 subprojects: glib, glib-networking: bump to 2.72
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2507>
2022-09-17 22:41:40 +00:00
Tim-Philipp Müller 683d2b383a subprojects: freetyp2: bump to 2.12.1
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2507>
2022-09-17 22:41:40 +00:00
Tim-Philipp Müller 345f66c706 subprojects: fontconfig: bump to 2.14.0
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2507>
2022-09-17 22:41:40 +00:00
Elliot Chen e76e98d109 v4l2videodec: add cap negotiation fail check in the capture configuration change
The capture configuration change may cause negotiation fail.
Need to check it to avoid enter the endless loop.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2960>
2022-09-17 21:21:22 +00:00
Víctor Manuel Jáquez Leal a8387fdc6b vah264enc: Avoid precision lost by just rounding up.
The code where dividing by 16 and later multiplying by 16, which is
spurious and a potential loose of precision.
2022-09-17 10:14:40 +02:00
Víctor Manuel Jáquez Leal 69c75f9827 vah264enc: Update AUD property if driver can't handle raw data. 2022-09-17 10:10:19 +02:00
Víctor Manuel Jáquez Leal 42861617d5 vah264enc: Remove unused dispose method. 2022-09-17 10:04:51 +02:00
Eric Knapp f720a5dd66 vadeinterlace: Fix passthrough latency query
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3038>
2022-09-17 05:47:41 +00:00
Thibault Saunier ec291ce6bb validate: Update action types documentation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3040>
2022-09-17 01:25:39 +00:00
Seungha Yang b6ca76eb68 nvh265sldec: Sync up with d3d11h265dec implementation
Each RefPicSetStCurrBefore/RefPicSetStCurrAfter/RefPicSetLtCurr array
might have empty element (i.e., reference pictures might not be stored
sequentially). Don't error out for the empty element case,
but instead, iterates each array and fill NVDEC's reference list
as much as possible

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1441
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3039>
2022-09-16 20:25:23 +00:00
Víctor Manuel Jáquez Leal f4260ecdc5 va: baseenc: Fix gobject style for chained method.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3035>
2022-09-16 19:10:12 +00:00
Seungha Yang a45273aaeb codectimestamper: Update document
Add more description about those elements

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3021>
2022-09-16 18:06:58 +00:00
Edward Hervey 7a5846d69d baseparse: If available, return average bitrate upstream
Helps improve queue2 buffering for single stream playback (ex: FLAC or mp3)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3033>
2022-09-16 16:12:03 +00:00
He Junyan 9a991cfe9e va: av1dec: user internal buffer pool for non output layers.
The AV1 support multi spatial layers within one TU with different
resolutions, and only the highest spatial layer need to be output.
For example, there are two spatial layer, base level is 800x600
and higher level is 1920x1080. We need to decode both because the
higher level needs base layer as reference, but we only need to output
1920x1080 frames here.

The current manner always renegotiates the caps once we detect the
current picture resolution changes, so we renegotiate again and
again between different layers. That's a big waste and has very
low performance. We now only do the renegotiation for the highest
output layer. For other non output layers, we just keep a internal
buffer pool which is big enough to handle the surface allocation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2382>
2022-09-16 09:45:00 +00:00
He Junyan 3d56f133f8 codecs: av1decoder: Add the highest_spatial_layer field.
As SPEC says, when multi spatial layer exists, we should only output
one frame with the highest spatial id from each TU. We now store the
highest spatial layer information in the base class in order to let
the sub class handle different layers easily.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2382>
2022-09-16 09:45:00 +00:00
Devin Anderson 31831eb47e voamrwbenc: Fix truncation of audio data at end-of-stream when audio data
doesn't align on 20 millisecond frame size.

The AMR-WB codec imposes a fixed 20 millisecond frame size.  In its current
form, the `voamrwbenc` plugin deals with this limitation by discarding any
audio at the end of the stream that falls short of 20 milliseconds.  This patch
keeps the audio data, and appends silence to the end to preserve frame size
alignment.

The patch also adds tests to check for the updated behavior.  I noticed that
tests weren't being built, so I changed the build to allow for building the
tests when the `tests` and `voamrwbenc` options are set.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3027>
2022-09-16 00:14:58 +00:00
Seungha Yang 4db55bc759 codectimestamper: Fix for unknown framerate
Use default framerate if numerator or denominator is unknown

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3031>
2022-09-15 21:48:30 +00:00
Thibault Saunier e866c1d967 decodebin2: Do not fail if one of the decoders isn't able to output the requested format
when expose-all=False

When trying to find an decoder in that case, we loop over the different
decoder factories, and check that it outputs a format that matches the
requested one (through the :caps property), but if we find a decoder
that do match but later on some other don't we end up failing
autopluging. This patch ensures that we still plug the decoder that can
work.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3011>
2022-09-15 21:03:14 +00:00
Thibault Saunier 339e5916c6 Build documentation for rust plugins
- Update the docker image we use, starting using the standard one adding
  `gtk4-doc` as required by rust plugins
- Update the plugins_doc_caches as required, some more plugins are built
  with the new image
- Install ninja from pip as the version from F31 is too old
- Avoid buildings all GSreamer plugins when building the doc as it takes
  time and resources for no good reason
- Stop linking to `GInstanceInitFunc` as it is not present in latest GLib
  documentation, leading to warnings in hotdoc.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2954>
2022-09-15 20:11:47 +00:00
Thibault Saunier a75f74d2cd gl:meson: Minor typo fix
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2954>
2022-09-15 20:11:46 +00:00
Thibault Saunier ebcaf35839 doc: Do not build plugins to build the doc
It is not actually necessary

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2954>
2022-09-15 20:11:46 +00:00
Thibault Saunier a5e8208c46 docs: Generate gst-plugins-rs documentation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2954>
2022-09-15 20:11:46 +00:00
Thibault Saunier 302464fa62 doc: Add an option to enable fatal warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2954>
2022-09-15 20:11:46 +00:00
Thibault Saunier c8a9736244 docs: plugin-scanner: Minor debug enhancement
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2954>
2022-09-15 20:11:46 +00:00
Thibault Saunier 1c4950718f discoverer: Fix discovering source that expose raw audio/video
Exposes a "uridecodebin:post-stream-topology" property as the discoverer
needs to have topology information about all streams so we need
`uridecodebin` to always plug decodebins for that case.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3009>
2022-09-15 19:25:01 +00:00
Thibault Saunier 71eda6e2e6 uridecodebin: Fix some property documentation syntax
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3009>
2022-09-15 19:25:01 +00:00
Thibault Saunier 1c6adcab89 uridecodebin: Ensure that pads caps are set before exposing them
We are supposed to guarantee that pads that are exposed have the caps
set, but for sources that have pad with "all raw caps" templates, we end
up exposing pads that don't have caps set yet, which can break code (in
GES for example).

To avoid that we let uridecodebin plug a `decodebin` after such pads and
let decodebin to handle that for us. In the end the only thing that
decodebin does in those cases is to wait for pads to be ready and expose
them, after that `uridecodebin` will expose those pads.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3009>
2022-09-15 19:25:01 +00:00
Tim-Philipp Müller 86dfe03be9 subprojects: orc: bump to latest commit
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3032>
2022-09-15 14:13:49 +01:00
Tim-Philipp Müller 2ac5d687e1 tests: add a few more orc tests
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3029>
2022-09-15 12:14:56 +01:00
Edward Hervey 124f93a05d hlsdemux2: Fix crash on live playlist with single entry
If there is a single entry, we would end up computing a minimum distance of 0,
and would therefore read entries from after the segment array

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3024>
2022-09-14 15:14:08 +01:00
Seungha Yang c91d72e677 nvdec: Fix for HEVC decoding when coded resolution is larger than display resolution
As documented in the SDK header, we should set coded width/height
values to the corresponding decoder configuration option,
instead of display resolution

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1438
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3022>
2022-09-14 05:59:20 +09:00
Jordan Petridis d75a69ec95 gstinfo: remove the vasprintf fallback
We are always building our printf implementation, even when
GST_DEBUG is disabled, since we are exposing api (gst_print*)
that's dependant on our printf behavior.

We don't need to keep __gst_info_fallback_vasprintf around anymore.

Close #640

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/739>
2022-09-13 19:53:40 +00:00
Seungha Yang ca47012a55 cudaupload,cudadownload: Fix document
* Fix typo, NVIDA -> NVIDIA
* Add cudadownload doc to the source file

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3018>
2022-09-13 16:40:51 +00:00
Seungha Yang 7ea3c55549 cudaupload,cudadownload: Use shared GstD3D11Device context if possible
Handle d3d11 device context in set_context() method with
additional device compatibility check so that only NVIDIA GPU
associated d3d11 device can be configured in the element.
And clear old d3d11 device per set_info() for d3d11 device to be
updated as well.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3018>
2022-09-13 16:40:51 +00:00
Seungha Yang 219bb769a2 cuda: Remove GST_CUDA_HAS_D3D define from header
... and fix d3d11 specific enum type name

GST_CUDA_HAS_D3D is a build time define which indicates whether
GstD3D11 library is available or not, but DirectX SDK headers
must be available on the build system already.

Expose Direct3D related symbols if the build target is Windows
(i.e., if G_OS_WIN32 is defined)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3018>
2022-09-13 16:40:51 +00:00
Zebediah Figura c4681ac428 meson: Build with -Wl,-z,nodelete to prevent unloading of dynamic libraries and plugins
GLib made the unfortunate decision to prevent libgobject from ever being
unloaded, which means that now any library which registers a static type
can't ever be unloaded either (and any library that depends on those,
ad nauseam).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/778>
2022-09-13 15:48:52 +00:00
Víctor Manuel Jáquez Leal 9bb560e7ee va: Remove from plugin cache.
GstVA is not currently build by CI, because libva version is lower
than expected. So, the gstva library is not build, thus some symbols
aren't documented, breaking the documentation CI.

To move things forward, let's just remove temporarly the va plugins
from cache. While we decide on how to update the libva package in
the CI.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1025>
2022-09-13 14:57:21 +02:00
Víctor Manuel Jáquez Leal de7cfa92e3 va: allocator: Fix parameter name to match signature.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1025>
2022-09-13 14:57:21 +02:00
Víctor Manuel Jáquez Leal e4f6ade308 va: Complete library and plugin documentation.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1025>
2022-09-13 14:57:21 +02:00
Víctor Manuel Jáquez Leal a51ac72b5e va: Move gstvavideoformat out of library headers.
Since it's no needed for API consumers. Though it can be added later.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1025>
2022-09-13 14:57:21 +02:00
Víctor Manuel Jáquez Leal 38491e25a3 docs: Generate libgstva GI and pkg-config.
Currently libgstva is only exposed internally to gst-plugins-bad. No
headers are installed, no documentation generated, pkgconfig file,
neither gobject-introspection files.

This patch turn on all that.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1025>
2022-09-13 14:52:39 +02:00
Jan Schmidt e5e72ede26 adaptivedemux2: Always check bitrate in live
When advancing fragment in live, it's normal to return
GST_FLOW_EOS when playing at the live edge of the available
fragments. In that case, we still want to adjust bitrate
dynamically.

Fixes issue with dashdemux2 where the current bitrate of
each adaptation set is changed to the lowest one when
updating the mpd for a live stream.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3020>
2022-09-13 09:02:43 +00:00
Chris Wiggins 5666debd5f rtsp-server: context: Add method to set the RTSPToken on some RTSPContext
Fixes #1399.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2979>
2022-09-13 10:42:52 +03:00
Matt Crane e64a5b9a85 rtpjitterbuffer: Fix calculation of reference timestamp metadata
Add support for RTCP SRs that contain RTP timestamps later than the
current timestamps in the RTP stream packet buffers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3019>
2022-09-12 20:17:08 +00:00
Seungha Yang 6a8a20ff92 Add H.264/H.265 timestamp correction element
Adding {h264,h265}timestamper element to correct timestamp of
encoded frames. This initial version supports only DTS
correction based on given PTS and SPS data.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2580>
2022-09-12 19:02:21 +00:00
Doug Nazar 79020fa355 registry: skip integration testsuite directory during plugin scan
When using an uninstalled development environment and running the
validation tests, the number of log files can grow substantially,
slowing down startup.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/799>
2022-09-12 18:52:51 +01:00
Christoph Reiter 472dc4b743 meson: use python.get_install_dir() to find the pygobject overrides dir
Instead of trying to hardcode site-packages paths for different platforms
just use python.get_install_dir() from meson and let it deal with the rest.
Also no longer try to import pygobject, which would otherwise not be
required at build time.

python.get_install_dir() was at the beginning broken on Windows, but
that was fixed in 0.60 via https://github.com/mesonbuild/meson/pull/9156
and since ges now requires >0.60 this can be ignored.

This change was motivated by the install path being wrong under MSYS2, where
the unix install layout is used and the detection code not taking that into
account.

This MR is a continuation of https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/230
see the discussion there for extra context.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3012>
2022-09-12 00:45:40 +00:00
Yeongjin Jeong 46dbf194bd x264enc: Print full option-string applied to x264_encoder in debug log
x264 encoder transfers all options applied to the encoder
to the SEI payload when the headers(SPS, PPS) is requested.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3014>
2022-09-11 23:34:46 +01:00
Yeongjin Jeong 8ebd854454 x264enc: Don't assume the order of nal unit
Just for extra safety, let's check the index of the nal unit
through the enum value of the nal type provided by x264.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3014>
2022-09-11 23:34:46 +01:00
Xavier Claessens a9ae28d10b doc: Clarify that gst_buffer_pool_acquire_buffer() blocks by default
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2955>
2022-09-11 19:29:19 +00:00
Thibault Saunier 64010bb1f8 testsrcbin: Add a way to specify caps for the output of the sources
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3007>
2022-09-09 15:25:45 +00:00
Thibault Saunier 19e33a6c5e testsrcbin: Plug some leaks
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3007>
2022-09-09 15:25:45 +00:00
Thibault Saunier 7f34b5610f testsrcbin: Add an 'expose-sources-async' property
Which allows simluating usual source which require decoding etc in decodebin for example

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3007>
2022-09-09 15:25:45 +00:00
Thibault Saunier 04f036edc4 validate:scenario: Some minor fixes
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3007>
2022-09-09 15:25:45 +00:00
Thibault Saunier 879ae5ba02 validate: Add a 'check-current-pad-caps' check action type
Allowing to check that a specific pad has some specific caps set

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3007>
2022-09-09 15:25:45 +00:00
Thibault Saunier 15e76aa7d6 validate: Add a 'check' field to waits to allow running check actions after it get executed
Adding the notion of 'check' action types

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3007>
2022-09-09 15:25:45 +00:00
Filip Hanes 29aec57ef6 pngenc: lower minimum width and height to 1x1
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3003>
2022-09-09 09:59:56 +00:00
Seungha Yang 11e4eb5490 video-format: Workaround MSVC build error
../gst-libs/gst/video/video-format.c(6779): error C2219: syntax error:
type qualifier must be after '*'

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2719>
2022-09-08 21:01:37 +00:00
Edward Hervey 855dabb578 dashdemux2: Remove bogus limitation checks for duration fields
Just like for the seconds field, there are no limitations on the hours and
minutes fields. The specification for xml schema duration fields doesn't forbid
specifying durations with only (huge) minutes or hours values.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2951>
2022-09-07 12:48:28 +00:00
Matthew Waters 1e269a3c6d subparse: fix crash when parsing invalid timestamps in mpl2
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=49245

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2989>
2022-09-07 07:20:53 +00:00
Víctor Manuel Jáquez Leal 1c69fe3fc8 vajpegdec: Enhance explanation comment.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2948>
2022-09-07 05:57:40 +00:00
Víctor Manuel Jáquez Leal 230e1e6bb4 va: caps: Use G_STMT_START / END
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2948>
2022-09-07 05:57:40 +00:00
Víctor Manuel Jáquez Leal 44fe871534 vajpegdec: Check if driver has internal color conversion.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2948>
2022-09-07 05:57:40 +00:00
Mathieu Duponchelle b454ec972f webrtcbin: fix picking available payload types
When picking an available payload type, we need to pick one that is
available across all media.

The previous code, when multiple media were present, looked at the first one,
noticed it had pt 96 as the media pt, then simply looked at the next media,
noticed it didn't, and decided 96 was available.

Instead, check if the pt is used by any of the media, if it is, decide
it is not available and go to the next pt. I'm fairly sure that was the
original intent.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2984>
2022-09-07 03:22:34 +00:00
Stéphane Cerveau 0c96e838e8 docs: update to mono repo locations
Some links/repos in the documentation were still pointing to old
repositories, change to mono repository

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2982>
2022-09-06 14:20:49 +02:00
Jordan Petridis a7f9c97454 fluidsynth: correctly version guard methods
We bumped the minimum version to 2.1 but the api we used
wasn't introduced till version 2.2 of fluidsynth

Follow-up to gstreamer/gstreamer!2718

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2835>
2022-09-05 17:48:27 +00:00
Jan Schmidt 43209d0ee6 dashdemux2: Preserve current representation on live manifest updates
When updating a manifest during live playback, preserve the current
representation for each stream.

During update_fragment_info, if the current representation changed
because it couldn't be matched, trigger a caps change and new
header download.

This reverts commit e0e1db212f
and reapplies "dashdemux: Fix issue when manifest update sets slow start
without passing necessary header & caps changes downstream" with
changes.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2920>
2022-09-05 16:07:00 +00:00
Jan Schmidt 4e25c519de dashdemux: Preserve current representation on live manifest updates
When updating a manifest during live playback, preserve the current
representation for each stream.

During update_fragment_info, if the current representation changed
because it couldn't be matched, trigger a caps change and new
header download.

This reverts commit e0e1db212f
and reapplies "dashdemux: Fix issue when manifest update sets slow start
without passing necessary header & caps changes downstream" with
changes.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/507
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1729

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2920>
2022-09-05 16:07:00 +00:00
Nirbheek Chauhan a5ef7e2781 examples: Disable bitcode support in iOS examples
For explanation, see:

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2978>
2022-09-03 18:04:34 +05:30
Sebastian Dröge cc454f0fc3 rtpjitterbuffer: Add test for crash caused by removing timers twice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2973>
2022-09-03 09:26:24 +00:00
Sebastian Dröge 648b8f3362 rtpjitterbuffer: Make it more explicit that update_rtx_timers() takes ownership of the passed in timer
It is not valid anymore afterwards and must not be used, otherwise an
already freed pointer might be used.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2973>
2022-09-03 09:26:24 +00:00
Sebastian Dröge e66f5e2423 rtpjitterbuffer: Don't shadow variable
While this didn't cause any problems in this context it is simply
confusing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2973>
2022-09-03 09:26:24 +00:00
Sebastian Dröge 0b19c457ca rtpjitterbuffer: Change RTX timer availability checks to assertions
It's impossible to end up in the corresponding code without a timer for
RTX packets because otherwise it would be an unsolicited RTX packet and
we would've already returned early.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2973>
2022-09-03 09:26:24 +00:00
Sebastian Dröge 2ca849499e rtpjitterbuffer: Only unschedule timers for late packets if they're not RTX packets and only once
Timers for RTX packets are dealt with later in update_rtx_timers(), and
timers for non-RTX packets would potentially also be unscheduled a
second time from there so avoid that.

Also don't shadow the timer variable from the outer scope but instead
make use of it directly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2973>
2022-09-03 09:26:24 +00:00
Tim-Philipp Müller 034faeae31 subprojects: update openh264 wrap to v2.3.0
.. and use tarball instead of git checkout.

Also bump ci image tags so the images cache the new tarball.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2968>
2022-09-02 18:41:32 +01:00
Bruce Liang 657cc3e6d6 gst-rtsp-server: Fix pushing backlog to client
Check back pressure of a stream transport before popping buffer from its backlog.

If the stream transport is not experiencing back pressure, the buffer can be popped from backlog and pushed to client.

Fixes:#1298

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2936>
2022-09-02 16:04:06 +00:00
Sebastian Dröge 57a6e48ed1 rtsp-server: stream: Don't loop forever if binding to the multicast address fails
The address/port is pre-defined by the caller of the function, so
retrying is only going to loop forever.

Ideally the multicast address should be checked after allocating but
this doesn't happen currently, so it's better to error out cleanly then
to loop forever trying the same address.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2975>
2022-09-02 14:28:26 +00:00
Florian Zwoch a1b60be22b va: Fix log message when registering H264 encoder.
The log message would report an error for the H264 decoder when
registering failed, but we tried to register the H264 encoder instead.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2974>
2022-09-02 10:29:11 +00:00
Olivier Crête 4b3b234f72 webrtcbin: Allow locked mlines with no caps, as the last ones
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2439>
2022-09-02 11:52:58 +02:00
Olivier Crête 0930c467d4 webrtcbin: Reject creating an offer if a locked mline has no caps
This avoids getting in a bunch of corner cases. We'd have to insert
a "rejected" line from the start as a place-holder to get around this,
but the rest of the code just becomes more complicated, so just
disallow it for now.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2439>
2022-09-02 11:52:58 +02:00
Olivier Crête 3503599e0a webrtcbin: Store pending mid to make create-offer idempotent
If the mid is not stored in the transceiver, but it is stored in
last_offer, then a further create-offer call will just ignore that
transceiver.

Also include unit test for ensure it doesn't regress.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2439>
2022-09-02 11:52:58 +02:00
Patricia Muscalu 3c9e4f4886 rtph265: keep delta unit flag
Without this patch all buffers that pass the payloader
are marked as non-delta-unit buffers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2969>
2022-09-02 08:56:13 +00:00
Mengkejiergeli Ba da9479a034 msdkvpp: Add va memory when fixating src caps
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2498>
2022-09-02 11:06:29 +08:00
Mengkejiergeli Ba bb79853d20 msdkvpp : Use va pool at linux path and system pool for windows
We use msdkvpp's own pool to allocate buffers instead of external frame
allocator mfxFrameAllocator.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2498>
2022-09-02 11:06:29 +08:00
Mengkejiergeli Ba 4c6b719445 msdkvpp: Import buffer to msdk_surface
If the buffer is not msdk_buffer, we can try to directly import the
attached memory (i.e. va mem and dmabuf mem) by applying the common
uitl function: import_to_msdk_function ().

Here add a flag "from_qdata" in GstMsdkSurface to handle the cropping case,
we should avoid updating the crop values when msdk_surface is from the
memory's qdata, because the crop info from this surface is the already
updated one.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2498>
2022-09-02 11:06:29 +08:00
Mengkejiergeli Ba 45819899c3 msdkvpp: Add va caps at sink and src pad
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2498>
2022-09-02 11:06:29 +08:00
Mengkejiergeli Ba 966a2c3754 msdkenc: Apply common util func to import mem as msdk_surface
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2498>
2022-09-02 11:06:29 +08:00
Mengkejiergeli Ba 2854af85fd msdk: Add help functions to get mfxFrameSurface1 from GstBuffer and wrap it as GstMsdkSurface
Note that the memory abstraction for system memory is for windows path.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2498>
2022-09-02 11:06:29 +08:00
Mengkejiergeli Ba 23f5bdcee7 msdkenc: Use va pool on linux and system pool for windows
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2498>
2022-09-02 11:06:29 +08:00
Mengkejiergeli Ba 956dc40fb8 msdkenc: Directly import dmabuf memory as mfx surface
When input buffer is of dmabuf memory but not a msdk buffer (i.e., the
allocator is not msdk_allocator), then we can try to get fd of this mem,
create the corresponding va surface and wrap it as mfx surface.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2498>
2022-09-02 11:06:29 +08:00
Mengkejiergeli Ba b2e18f7f88 msdkenc: Directly import va memory as mfx surface
If input buffer is of va memory, we can directly obtain va surface from
the buffer and wrap it as mfx surface.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2498>
2022-09-02 11:06:29 +08:00
Mengkejiergeli Ba a8c1cec051 msdk: Use va libs API to get VA surface from buffer
Direct apply gst_va_buffer_get_surface to get VASurface from a buffer,
so remove corresponding functions which are not used.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2498>
2022-09-02 11:06:29 +08:00
Thibault Saunier 6a4425e46a meson: Call pkgconfig.generate in the loop where we declare plugins dependencies
Removing some copy pasted code

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2970>
2022-09-01 21:17:35 +00:00
Thibault Saunier bc9c1e3956 meson: Namespace the plugins_doc_dep/libraries variables
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2970>
2022-09-01 21:17:35 +00:00
Thibault Saunier c971a6d71f cuda: meson: Fix generating GstCuda gir file against gstreamer-full
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2970>
2022-09-01 21:17:35 +00:00
Thibault Saunier b5e90fe579 meson: Rename plugins list and make them "dependency" objects
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2970>
2022-09-01 21:17:35 +00:00
Raul Tambre e1d3612321 rtpjitterbuffer: remove lost timer for out of order packets
When receiving old packets remove the running lost timer if present.
This fixes incorrect reporting of a lost packet even if it arrived in time.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2922>
2022-09-01 09:01:31 +00:00
Ádám Balázs 55716ac21c gstaudioconvert: doc: Fix mix-matrix example
mix-matrix should contain float elements, modify the example to do so

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2966>
2022-08-31 17:24:51 +00:00
Martin Dørum 5745791345 gstpluginloader: Don't hang on short reads/writes
If read_one or write_one was called but the stream closed before it could
read/write a whole packet, read_one/write_one would hang indefinitely,
consuming 100% CPU. This commit fixes that by treating a short read/write
as an error.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2964>
2022-08-31 16:54:24 +00:00
Thibault Saunier eca3e7c56f validate: Fix gir generation
It broke in https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2555
where we stopped parsing some .c files

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2965>
2022-08-31 16:17:52 +00:00
Jordan Petridis 272560463c validate: don't look for the common supression file
We no longer have a common submodule

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2841>
2022-08-31 14:51:20 +00:00
Xavier Claessens 165fbec0a3 gst_init: Initialize static plugins just before dynamic plugins
All plugins needs to be initialized after `gst_initialized = TRUE;`
otherwise they could complain that gst_init() has not been called.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2962>
2022-08-31 14:20:58 +00:00
Sebastian Dröge cbc6761199 rtpvp8depay: If configured to wait for keyframes after packet loss, also do that if incomplete frames are detected
This can happen if the data inside the packets is incomplete without the
seqnums being discontinuous because of ULPFEC being used.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2947>
2022-08-31 08:58:03 +00:00
Sebastian Dröge ad6ba10ae3 examples: webrtc: mp-sendrecv: Add missing semicolon
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2961>
2022-08-31 10:57:39 +03:00
Alireza Miryazdi eab9383812 examples/webrtc: add some missing unrefs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2958>
2022-08-31 05:07:52 +04:30
Seungha Yang 8b988605a8 d3d11memory: Fix GstAllocator::mem_copy() implementation
We were checking possible bind flags for the DXGI format
of the source texture but that's never applied to
the destination texture desc.

Just use the already configured bind (and misc) flags of source texture
for the destination texture allocation without additional check.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2950>
2022-08-30 19:58:29 +00:00
Rafael Caricio 8648f5f7d2 audiovisualizer: fix buffer mapping to not increase refcount
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2953>
2022-08-30 15:22:42 +00:00
Stéphane Cerveau 6b1ffadb0c docs: disable in static build
Following gst-plugins-base, disable docs if static_build
in:
 - gstreamer
 - gst-plugins-good
 - gst-plugins-ugly
 - gst-libav
 - gstreamer-vaapi

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2529>
2022-08-30 14:46:28 +00:00
Robert Rosengren ab9ce0500a curlbasesink: gst_curl_base_sink_transfer_thread_close is internal
gst_curl_base_sink_transfer_thread_close is moved from external header
to be static function, as it has no users.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2732>
2022-08-29 09:40:23 +00:00
Robert Rosengren 8677d573b7 curlhttpsink: Only set MIME as content-type if not set by property
Setting the content-type property shall override internally detected MIME
types, to make it possible to do as following example (where audio/basic to be
used prior to audio/x-mulaw):

gst-launch-1.0 ... ! mulawenc ! audio/x-mulaw,rate=8000,channels=1 !
  curlhttpsink location=<url> content-type=audio/basic

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2732>
2022-08-29 09:40:23 +00:00
Seungha Yang c3cf9521a5 d3d11: Update library doc
* Private header name is changed to gstd3d11-private.h to follow
  naming convention
* Add Since mark everywhere
* Update member variable names to be consistent with the other
  object implementations in this library
* Correct outdated documentation

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2945>
2022-08-27 22:40:34 +09:00
Olivier Crête 8e3e6ddba3 value: Use g_critical() when trying to serialize things that can't be
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2823>
2022-08-25 22:27:51 +00:00
Olivier Crête 927334ef43 gstvalue: Don't loop forever when serializing invalid flag
The serialization code would loop forever if an invalid flag was sent into it.

With unit test for this corner case.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2823>
2022-08-25 22:27:51 +00:00
Sebastian Dröge 404b646b6e bin: Don't propagate state change errors of elements in locked state
Theoretically having elements in locked state should not have any effect
at all when the surrounding bin is doing state changes. However
previously a state change error of a locked element would cause the
bin's state change to also fail, which is clearly not intended.

State change failures of locked elements are to be handled by whoever
set the element to locked state. By always returning them here it is
impossible for the owner of the element to handle state change failures
gracefully without potentially affecting the whole pipeline's state
changes.

Non-failure returns are still returned as-is as the distinction between
ASYNC/NO_PREROLL/SUCCESS has big consequences on the state changes of
the bin and overall pipeline. Theoretically SUCCESS should also be
returned in all cases but I can't estimate the effects this would have
on the overall pipeline.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2932>
2022-08-25 15:33:07 +00:00
Sebastian Dröge 65b15f72b5 x(v)imagesink: Don't create invalid GstNavigationModifierType by simply passing through X11 event states
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2931>
2022-08-25 14:57:22 +00:00
Piotr Brzeziński 0d72a6209c avfvideosrc: Fix wrong default framerate value
Current default G_MAXINT is not a correct value under any circumstances.
This creates an issue with screen capture, during which we currently do
not get any framerate info causing G_MAXINT to show up, where elements
downstream can possibly misbehave - for example, `vtenc` causes
a kernel panic.
Replace with 30/1 to avoid such scenarios.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2944>
2022-08-25 14:24:57 +00:00
He Junyan 67eb1223c0 jpegdecoder: return the real error of decode_scan and decode_frame.
The current handle_frame() does not return the real error that happens
in decode_scan and decode_frame, which makes the pipeline continue with
the error and may trigger asserting later.

We also return the error when decode_quant_table or decode_huffman_table
fails.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2938>
2022-08-25 17:42:55 +08:00
Seungha Yang e8666a7f94 examples: d3d11videosink: Add present signal example
Add an example to show the usage of present singal.
In this example, a text overlay with alpha blended background
will be rendered on swapchain's backbuffer by using
Direct3D11, Direct2D, and DirectWrite APIs.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2923>
2022-08-24 17:44:49 +00:00
Seungha Yang 0a65aaa6d2 d3d11videosink: Add display-format property
Make swapchian's display format configurable, since some DXGI formats
we can use for swapchain are not API interop compatible.
For instance, BGRA format should be used for Direct2D interop.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2923>
2022-08-24 17:44:49 +00:00
Seungha Yang 470436d7e6 d3d11videosink: Add present signal
The "present" signal will be emitted just before the
IDXGISwapChain::Present() call. The client can perform additional
GPU operation with given GstD3D11Device object and
ID3D11RenderTargetView handle. Or, the client can read back
the scene to be displayed on window using the signal.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2923>
2022-08-24 17:44:49 +00:00
Jianhui Dai 625e74100d v4l2allocator: Fix invalid imported dmabuf fd
Fix a typo that set userptr to dmabuf fd. It leads to failure of
dmabuf-import io-mode.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2935>
2022-08-24 09:59:14 +00:00
Mathieu Duponchelle 8756f523d1 playback: add onvif metadata caps to raw caps
+ remove encoding from x-onvif-metadata caps output by qtdemux

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2889>
2022-08-24 12:21:18 +03:00
Mathieu Duponchelle 31c1e586c3 videoconvert: fix passthrough on equivalent transfer
When the input info and output info are equal, except for the
transfer functions that are *not* equivalent, we need to set up
a converter as we won't be passthrough.

Fixes an assertion in that case.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2929>
2022-08-23 16:02:31 +02:00
zhiyuan.liu ffebd52e46 isoff: Fix earliest pts field parse issue
earliest pts will be covered by first_offset field on version 0 case.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2927>
2022-08-23 10:59:56 +00:00
Olivier Crête 96422cc9cf dmabuf: Make it clear that the FORMAT is a DRM fourcc
Some of the formats in GstVideoFormat are a combination
of a DRM format and modifier, making them unclear.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2616>
2022-08-22 22:43:54 +00:00
Seungha Yang 6c4c576699 h265decoder: Update SpsMaxLatencyPictures properly
The SpsMaxLatencyPictures value never gets back to zero even if
it's needed. Update the value properly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2915>
2022-08-22 19:48:53 +00:00
Seungha Yang 59e60203ba h265decoder: Reorganize debug printing
As of the MR
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2575
gst_h265_decoder_process_sps() is called per slice and it causes
noisy debug message print.
Reorganize related and the other debug printings at once.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2915>
2022-08-22 19:48:53 +00:00
Philippe Normand 0151d621af openh264: Register debug categories earlier
Otherwise the GST_ERROR message logged in case of ABI mismatch would be done on
an uninitialized category.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2918>
2022-08-22 13:34:33 +00:00
Philippe Normand cfd3bd4850 openh264enc: Fix constrained-high encoding
constrained-high is high without B-frames, there is no EProfileIdc for this, so
assume high instead of hitting an assert down the line.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2919>
2022-08-20 16:57:27 +01:00
Thibault Saunier d04a80676e webrtc:ice: Fix candidate stats related APIs for bindings
null-terminated arrays of structures is not usable.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2917>
2022-08-19 10:46:01 -04:00
He Junyan 42838c3b9e va: h265dec: Enable the scc_main_4:4:4_10 profile.
We should enable this profile which is already allown in vaprofile.c
after libva 1.8 version.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2909>
2022-08-19 00:50:53 +00:00
Jan Alexander Steffens (heftig) 5ae3c9318d adaptivedemux2: Fix download helper with libsoup 3.0.x
libsoup 3.0.x dispatches using a single source attached when the session
is created, so we need to create the session with the same context that
our download thread is later using.

2.74 or 3.1 will dispatch a response using the context which sent the
request. However, for any context other than the one that created the
session, this will also create and destroy sources, so there's still
some slight performance benefit.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1384
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2913>
2022-08-18 20:16:18 +00:00
U. Artie Eoff 135edee484 kmssink: add fd property
This allows an application to provide their own opened DRM device
fd handle to kmssink.  For example, an application can lease
multiple fd's from a DRM master to display on different CRTC
outputs at the same time with multiple kmssink instances.

Specifying the fd property is not allowed when driver-name
and/or bus-id properties are specified.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2807>
2022-08-18 18:31:59 +00:00
Seungha Yang 7bcfccd0bd d3d11: Use CRITICAL_SECTION instead of GRecMutex
The GRecMutex abstraction (and heap allocation happens in GLib)
is unnecessary for this plugin.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2914>
2022-08-18 17:48:57 +00:00
Jan Schmidt ba8f14e922 adaptivedemux2: Implement send_event() vfunc
Handle select-streams and seek events in an element
level send_event() vfunc, so they can be received
before any source pads are created.

This allows preferred streams to be selected before
segment downloading starts.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2912>
2022-08-18 15:30:05 +01:00
Thibault Saunier 050006e9f0 webrtc: doc: Cleanup Since markers
We hide some newly public symbols when moving some objects to the library
which was not really correct in the end. Properly add the Since markers
as needed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2891>
2022-08-18 08:34:36 +00:00
Thibault Saunier 82a7a23fa0 webrtc:ice: Reindent header
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2891>
2022-08-18 08:34:36 +00:00
Thibault Saunier 0ee9727df3 webrtc:ice: Mark protected fields as such
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2891>
2022-08-18 08:34:36 +00:00
Thibault Saunier 24b171735d webrtc: Fix documentaton moving symbols in the right pages
As those symbols are documented in a 'fwd' header smart indexing in
hotdoc wasn't working.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2891>
2022-08-18 08:34:36 +00:00
Thibault Saunier b3e0205c5a webrtc:ice: Avoid using GArray in public API
And use plain null terminated C arrays instead.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2891>
2022-08-18 08:34:36 +00:00
Thibault Saunier 50202d6b53 webrtc:ice: Fix some annotations
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2891>
2022-08-18 08:34:36 +00:00
Thibault Saunier 8dd4c215da webrtc: Make GstWebRTCIceCandidateStats a Boxed type
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2891>
2022-08-18 08:34:36 +00:00
Thibault Saunier ff0d73be57 webrtc:ice: Add padding to structures
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2891>
2022-08-18 08:34:36 +00:00
Seungha Yang 75e8f80999 cuda: Hide runtime compiler related header and symbols
That's already abstracted via gst_cuda_nvrtc_compile() method
and therefore, we do not need to expose such symbols yet.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2884>
2022-08-18 05:20:08 +09:00
Sebastian Dröge d9bd870db4 aggregator: Improve debug output to better understand why pads are not ready or can't accept more data
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2907>
2022-08-17 19:06:35 +00:00
Víctor Manuel Jáquez Leal b10fc4d8db vajpegdec: Fix memory leak.
Free value content.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2899>
2022-08-17 18:34:10 +00:00
Víctor Manuel Jáquez Leal a075e57c61 vajpegdec: Fix 4:2:2 for i965.
Since i965 uses NV12 either for 4:2:0 and 4:2:2 chroma (using an
internal color conversion) the chroma validation has to be shortcut.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2899>
2022-08-17 18:34:10 +00:00
Víctor Manuel Jáquez Leal 074bdad21f va: libs: Add Y42B format.
Enable 4:2:2 JPEG decoding in iHD.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2899>
2022-08-17 18:34:10 +00:00
Víctor Manuel Jáquez Leal 4dd6728ed5 va: Validate JPEG subsampling configurations.
There are Mesa Gallium drivers that report subsampling but without
any pixel format. So, strip out these subsamplings.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2899>
2022-08-17 18:34:10 +00:00
Víctor Manuel Jáquez Leal 0446e35a14 va: gst_va_create_raw_caps_from_config() may return NULL.
This patch verifies if the function returns NULL in the caller.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2899>
2022-08-17 18:34:10 +00:00
Eric Knapp 45408db258 decklink: Validate video input format
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2892>
2022-08-17 13:29:55 -04:00
Eric Knapp 0c42c4801c decklink: Auto-detect 10-bit YUV
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2892>
2022-08-17 13:29:55 -04:00
Seungha Yang 356a0ce8f4 examples: gtk: Fix MSVC build
gtk-play.c(370): error C2375: 'rewind_button_clicked_cb': redefinition;
different linkage

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2871>
2022-08-17 13:31:55 +00:00
Guillaume Desmottes cb1dc5c9ac base: video-converter: add accessors for input and output formats
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2905>
2022-08-17 12:33:54 +00:00
Víctor Manuel Jáquez Leal 664c051d79 vaapi: plugin: Handle when no encoders/decoders available.
Nouveau driver currently only exposes postproc entry. But
vaapidecodebin is registered independent if there are decoders or not,
exposing a segmentation fault.

This patch removes the encoder/decoder/codec arrays if no entries are
found, and if no decoders are found vaapidecodebin is not
registered. Also for vaapipostproc if no postproc entry is found.

Also, if general decoder, used by vaapidecodebin, doesn't have a sink
pad string, don't register the glib type.

Fixes: #1349
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2865>
2022-08-17 10:57:37 +00:00
Krystian Wojtas 73c75479d6 doc: Fix typo
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2903>
2022-08-17 07:45:01 +00:00
Daniel Morin d2fcf85796 gst-play: missing cleanup for g_autoptr
Without this change cleanup function for g_autoptr is not defined for
GstPlayMediaInfo, GstPlaySignalAdapter, GstPlayVideoRenderer,
GstPlayVideoOverlayVideoRenderer and GstPlayVisualization. Cleanup
function was defined in gstplay.h, but missing in other header files.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2888>
2022-08-17 09:52:00 +03:00
Jan Schmidt 4a6c2e6720 splitmuxsrc: Stop pad task before cleanup
When stopping the element, make sure the pad task
is stopped before destroying the part readers.

Closes a race where the pad task might access
a freed pointer.

Also add a guard against this sort of thing
by holding a ref to the reader in the pad loop.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2901>
2022-08-17 09:42:50 +10:00
Jan Schmidt c2fa0b50ce qtdemux: Avoid crash on reconfiguring.
When reconfiguring a stream that never created
an output pad, don't access a NULL GstPad pointer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2869>
2022-08-16 19:01:28 +00:00
Sebastian Dröge a3037eb453 qtdemux: Set parsed=true on ONVIF Timed Metadata caps
Inside MP4 the metadata must be properly parsed into frames and in
order.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2897>
2022-08-16 18:11:53 +00:00
Seungha Yang eedaf10359 meson: d3d11: Fix missing header install
Install gstd3d11compile.h header file

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2896>
2022-08-16 16:55:45 +00:00
Nicolas Dufresne d126f65485 v4l2bufferpool: Fix debug trace
The tracing of the buffer pointer was done on the secondary pointer, which
does not match with other traces of the same buffer. This made the trace
confusing and less useful.

Fixes #1379

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2893>
2022-08-16 14:33:24 +00:00
Jan Schmidt f4f1819416 adaptivedemux2: Fix for period switching in live streams
When playing live, it's possible that one stream reaches
the end of the available playback window and goes to sleep
waiting for a manifest update, and the manifest update
introduces a new period. In that case, the sleeping
stream needs to wake up and go 'properly' EOS before we
can advance the input to the new period.

Accordingly, make sure that a stream's last_ret value
is not marked as EOS if it's just sleeping waiting for a live
manifest update.

Also fix the output loop to go back and re-check if it's
time to switch to the next period after dequeuing and
discarding an EOS event.

https://livesim.dashif.org/livesim/periods_20/testpic_2s/Manifest.mpd

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2895>
2022-08-16 12:39:58 +00:00
Seungha Yang dbc8a7ab18 videoconvert,videoscale: Do conversion in videoconvert and scaling in videoscale
Keep behaving the same as before videoconvertscale port

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2778>
2022-08-16 12:08:36 +00:00
Seungha Yang 0d5c937642 Revert "videoconvertscale: Add properties to disable scaling/converting in videoconvert/videoscale"
This reverts commit cd7a91cef1.

Reverting properties, scaling in videoconvert and converting in
videoscale will be disabled by the other commit

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2778>
2022-08-16 12:08:36 +00:00
Hosang Lee 3cd79c4262 mssdemux2: Use gsturi structure to form fragment urls
Utilize gsturi to form fragment url paths.
A token query may contain the string "manifest" and this would lead
to improper url creations.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2859>
2022-08-16 17:57:19 +09:00
Nirbheek Chauhan a14df98ff4 meta: Set the parent refcount of the GstStructure correctly
The parent refcount is of the *transformed* buffer, not the input
buffer.

Also update the docs to clarify that @transbuf is the transformed
buffer, and not the buffer on which a transformation is being
performed.

Due to this bug, modifying the structure of a meta that has been
copied to another buffer fails with:

gst_structure_set: assertion 'IS_MUTABLE (structure) || field == NULL' failed

Add a test for the same.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2890>
2022-08-15 19:58:26 +00:00
Seungha Yang df64226e71 d3d11decoder: Do timer based DecoderBeginFrame retry
... instead of retry count based one, because the precision of Sleep()
varies depending on system and application configuration.
Also, don't retry DecoderBeginFrame if decoder is doing flush.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2886>
2022-08-15 19:16:16 +00:00
Seungha Yang 812bb14f28 cudaupload,cudadownload: Don't simplify caps in transform_caps
The simplified caps might not be a subset of filter caps
and basetransform will complain about it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2883>
2022-08-15 18:44:14 +00:00
Seungha Yang 9b4fafb882 d3d11decoder: Do not use miniobject qdata
The miniobject qdata uses global mutex.
Use ID3D11DeviceChild::{Set,Get}PrivateData methods instead.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2885>
2022-08-15 02:50:18 +09:00
Khem Raj ce1f1c9eff ssaparse: include required system headers for isspace() and sscanf() functions
Newer compilers ( clang 15 ) have turned stricter and errors out instead
of warning on implicit function declations

Fixes
gstssaparse.c:297:12: error: call to undeclared library function 'isspace' with type 'int (int)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    while (isspace(*t))

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2879>
2022-08-14 08:32:05 +00:00
Seungha Yang 852ba82e36 docs: Remove dxgiscreencapsrc from documentation
The implementation was dropped in
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1750

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2878>
2022-08-13 18:40:02 +00:00
Sebastian Dröge 723bdd2514 player: Don't leak wrapped video info
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1373

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2880>
2022-08-13 12:24:37 +03:00
Sebastian Dröge aff79db608 play: Make ownership of video-sink clearer in combination with floating references
And correctly handle the case of VideoRenderer::create_video_sink() not
actually returning a floating reference, which might be tricky for some
bindings.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2880>
2022-08-13 12:16:16 +03:00
Sebastian Dröge f060b8b6f3 play: Fix object construction
Ideally new() functions should simply call g_object_new() and not much
else, so let's do that here and handle all the construction properly in
a GObject way.

Now a play object created via g_object_new() is actually usable.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2880>
2022-08-13 12:16:16 +03:00
Sebastian Dröge abfbcc0b6f player: Fix object construction
Ideally new() functions should simply call g_object_new() and not much
else, so let's do that here and handle all the construction properly in
a GObject way.

Now a player object created via g_object_new() is actually usable.

In addition, also fix the video-renderer property so that reading it
returns an object of the correct type.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2880>
2022-08-13 12:05:47 +03:00
Sebastian Dröge 15ee056fb8 player: Release signal adapter on finalize
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2880>
2022-08-13 12:04:31 +03:00
Seungha Yang 3632e97df2 mxfdemux: Always calculate BlockAlign of raw audio
Workaround for nBlockAlign and nBitsPerSample mismatch. Always
use the formula described in the specification for BlockAlign value

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2864>
2022-08-12 19:26:08 +00:00
Sebastian Dröge 8e77c8155c rtspsrc: Consider the actual control base URI also in case the connection URI contains a query string
That is, get rid of unnecessary and wrong special-casing.

This could always use gst_rtsp_url_get_request_uri_with_control() but as
we only have the control base URI as string it is easier to just call
gst_uri_join_strings().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2868>
2022-08-12 18:52:29 +00:00
Sebastian Dröge edb0e47074 rtspurl: Use gst_uri_join_strings() in gst_rtsp_url_get_request_uri_with_control() instead of a hand-crafted, wrong version
For example the query string of the base must not be taken over to the
request URL unless there is no control path, and control paths can be
absolute and must not be considered relative if they start with a /.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2868>
2022-08-12 18:52:29 +00:00
Sebastian Dröge d69616b6ba rtspurl: Use fail_unless_equals_string() in tests
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2868>
2022-08-12 18:52:29 +00:00
Seungha Yang 7c842d9247 meson: d3d11: Fix build with GIR enabled
... and remove unused list

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2870>
2022-08-12 18:03:00 +00:00
Sebastian Dröge b0533d1ea0 qtdemux: Add reference timestamp meta with UTC times based on the ONVIF Export File Format CorrectStartTime box to outgoing buffers
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2525>
2022-08-12 16:13:50 +00:00
Matthias Clasen 491dcddf6e gstplayer: Plug a memory leak
This was showing up as a memory leak in GTK's
gstreamer media backend:

40 bytes in 1 blocks are definitely lost in loss record 18,487 of 40,868
   at 0x484586F: malloc (vg_replace_malloc.c:381)
   by 0x50D5278: g_malloc (gmem.c:125)
   by 0x50EDBA5: g_slice_alloc (gslice.c:1072)
   by 0x50EFBCC: g_slice_alloc0 (gslice.c:1098)
   by 0x51F2F45: g_type_create_instance (gtype.c:1911)
   by 0x51DAE37: g_object_new_internal (gobject.c:2011)
   by 0x51DC080: g_object_new_with_properties (gobject.c:2181)
   by 0x51DCB20: g_object_new (gobject.c:1821)
   by 0x9855F86: UnknownInlinedFun (gstplayer-wrapped-video-renderer.c:109)
   by 0x9855F86: gst_player_new (gstplayer.c:579)

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2875>
2022-08-12 15:43:05 +00:00
Jan Schmidt 025e446470 hlsdemux2: Fix reference leak of variant stream
When switching back to the previous variant stream
in gst_hls_demux_change_playlist(), fix a couple of
paths that would leak a reference to the previous
variant.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2873>
2022-08-12 13:52:59 +00:00
Jan Schmidt 9db19a3b06 hlsdemux2: Don't leak the datetime in time map structs
Add a function to clean up GstHLSTimeMap structs
and free the ref on the optional associated GDateTime

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2873>
2022-08-12 13:52:59 +00:00
Jan Schmidt a242428532 hlsdemux2: Fix typefind leak and invalid memory access
When typefinding aggregates incoming data to a pending
typefind buffer and then succeeds in typefinding, it
leaks the aggregated buffer, and leaves the caller
accessing an unreffed buffer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2873>
2022-08-12 13:52:59 +00:00
Jan Schmidt a6eb725413 hlsdemux2: m3u8: Fix memory leaks on parsing
Fix memory leaks when parsing of an m3u8 file is
incomplete, with EXTINF or EXT-X-PROGRAM-DATE-TIME
directives, but no segment url.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2873>
2022-08-12 13:52:59 +00:00
Jan Schmidt 0ff317f107 hlsdemux2: m3u8: Fix memory leak
Clear the GValue holding intermediate GstStructure field
data.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2873>
2022-08-12 13:52:59 +00:00
Jan Schmidt fd64e8c7ed adaptivedemux2: Fix uninitialised memory usage in debug
Fix printing uninitialised memory by clearing the
GstAdaptiveDemuxClock structure when allocating.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2873>
2022-08-12 13:52:59 +00:00
Nirbheek Chauhan d8c4ebccab rtpst2022-1-fecenc: Drain column packets on EOS
Otherwise we won't send the protection packets for the last few
packets when a stream ends.

Also send EOS on the FEC src row pad immediately, and on the FEC src
column pad after draining is complete. This makes it so that the FEC
src pads on rtpbin behave the same way as the RTCP src pads on rtpbin
when EOS is received on the send_rtp_sink pad.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2863>
2022-08-12 12:59:19 +00:00
Jan Schmidt c668f6fc22 basetextoverlay: Don't miscalculate text running times
When a new segment event arrives, it immediately updates
the current stored segment, which was used for calculating
the running time of the current text buffer for every
passing video frame. This means a segment that arrives
after the text buffer might get used to (mis)calculate
the running times subsequently.

Instead, calculate and store the right running time
using the current segment when storing the buffer. Later
the stored segment can get freely updated.

This fixes the case where pieces of video and text streams
are seamlessly concatenated and fed through the text overlay.
Previously, it could lead to the current text buffer suddenly
have a massive running time and blocking all further input.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2802>
2022-08-12 12:08:18 +00:00
Corentin Damman 0d07ff60c9 d3d11window: fix DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING swap chain flag for full screen
Fixes #1372 (regression introduced in 5eeec165)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2866>
2022-08-12 09:35:40 +00:00
Edward Hervey 63dcee34fb qtdemux: Don't use invalid values from failed trex parsing
If parsing the fragment default values (`trex` atom) failed, don't try to
compute a bogus sample_description_id value.

Fixes #1369

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2860>
2022-08-11 08:50:34 +02:00
Philippe Normand 90d46c1748 wpesrc: Switch URI handler to web+... protocols
The web://http:// URIs were not compliant with RFC 3986. Using web+http://
allows us to use the GstUri parser to pass down a valid URI to `wpevideosrc`.

Corresponding change for the CEF source element:
8d499495dd

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2856>
2022-08-10 15:10:26 +00:00
Krystian Wojtas 16a3fc3c6d docs: copy-paste fix
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2857>
2022-08-10 12:56:02 +00:00
Corentin Damman 0d5d94aabd nvcodec: fix caps leaks in nvh264/h265encoder
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2850>
2022-08-10 12:24:37 +00:00
Sebastian Dröge 0f0441564d gst: Protect initialization state with a recursive mutex.
Otherwise a gst_init() call from a plugin would deadlock if the plugin
is loaded as part of registry updating.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2740>
2022-08-10 11:31:50 +00:00
Sebastian Dröge cc2cc03717 registry: Remove dead code
Initialization/updating of the registry can't possible fail and all code
paths always returned TRUE.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2740>
2022-08-10 11:31:50 +00:00
Sebastian Dröge 8409798f17 gst: Don't fail gst_init() if updating the registry fails
Everything is already marked as initialized at that point and by failing
no tracers would be loaded or plugin feature rank overrides would be
applied.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2740>
2022-08-10 11:31:50 +00:00
Piotr Brzeziński c883a9f54b videoflip: Add support for 10/12bit planar formats
Implements support for I420, I422 and Y444 in 10/12 bit LE/BE variants.
I422 is handled separately from the rest, as it needs to consider
the endianness of the current format during most transforms.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2788>
2022-08-10 10:52:27 +00:00
Víctor Manuel Jáquez Leal ad15fc9169 vah264enc: Set codec frame sync point if IDR
This flag is used by GstVideoEncoder base class for certain configurations.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2852>
2022-08-10 08:00:18 +00:00
Víctor Manuel Jáquez Leal c4706ed219 vah264enc: Packed headers can be zero.
A driver can report back no packed header support (VA_ENC_PACKED_HEADER_NONE).
This patch removes that false verification.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2851>
2022-08-10 04:31:27 +00:00
Tim-Philipp Müller a13fd0ead5 opusenc: improve inband-fec property documentation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2853>
2022-08-09 23:34:59 +00:00
Haihua Hu 82025897c4 alpha: fix stride issue when out buffer has padding on right
if outbuf has padding on right, need jump to next line use stride,
otherwise downstream element will show a wrong picture when use the
same stride

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2842>
2022-08-09 13:04:11 +08:00
Seungha Yang 05dae94352 d3d11: Use WIN32 API directly for locking with RAII pattern
Such abstraction is unnecessary for this library/plugin.
Use WIN32 API directly instead of GLib wrappers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2848>
2022-08-08 20:13:51 +00:00
Seungha Yang a75e88fdd2 d3d11memory: Remove unnecessary locking
* memory map/unmap is already protected by d3d11 device lock.
  Don't need to take another memory lock.
* Use WIN32 critical section and slim reader/writer lock APIs
  directly instead of GLib wrappers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2848>
2022-08-08 20:13:51 +00:00
Víctor Manuel Jáquez Leal ecb12a05b8 vah264enc: Fix caps for mesa gallium.
Radeon mesa gallium driver has a bug which adds P010_10LE sink caps
format. This patch removes formats which arent 420 chroma.

gst_caps_set_format_array() wasn't used because the fix traverse
several structures with potential different formats.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2844>
2022-08-08 17:47:56 +00:00
Víctor Manuel Jáquez Leal 8c59ee29c2 vah264dec: Complete profiles in decoder.
Instead of specifying all the H.264 "supported" profiles in the global
hash table (used either by decoders and encoders), just complete them
in the decoder only, since the encoder doesn't support them.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2844>
2022-08-08 17:47:56 +00:00
Jan Schmidt edf84a7119 hlsdemux2: Requeue header buffer when restarting fragment
When returning GST_ADAPTIVE_DEMUX_FLOW_RESTART_FRAGMENT
for the first segment data, we might need to requeue the
header.

This was leading to occasional prerolling stalls on
HLS live streams with renditions.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2849>
2022-08-08 15:52:22 +00:00
Jan Schmidt 91e43048cf hlsdemux2: Fix buffer leak when resynching
Unref the buffer in gst_hls_demux_handle_buffer() when
returning GST_ADAPTIVE_DEMUX_FLOW_LOST_SYNC

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2849>
2022-08-08 15:52:22 +00:00
Olivier Crête 62c7402dbb dmabuf: Always skip modifier if it's linear
Accepting both NV12 and NV12:0x0000000000000000 will make the
intersection code too painful to write.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2617>
2022-08-08 13:30:57 +00:00
Seungha Yang 66d504ee58 d3d11: Don't find global default allocator
We were using global default allocator already. Pass null
allocator object to *_alloc() methods then the method will
use default allocator.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2843>
2022-08-06 23:55:18 +09:00
Seungha Yang 21e5c33797 d3d11memory: Allow null GstD3D11Allocator to alloc methods
Similar to gst_allocator_alloc(), use default GstD3D11Allocator
when caller passes null allocator object

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2843>
2022-08-06 23:54:56 +09:00
Seungha Yang 74f56632c3 d3d11: Use std::call_once()
g_once_init_enter() always takes global mutex for non-GCC build.
Use C++ once call implementation

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2843>
2022-08-06 23:27:23 +09:00
Jan Schmidt b7e662f400 adaptivedemux2: Fix a small race on shutdown
Make sure gst_adaptive_demux_loop_cancel_call()
never tries to operate on an invalidated main context. Make
sure to clear the main context pointer while holding the lock,
and to check it in gst_adaptive_demux_loop_cancel_call()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2847>
2022-08-05 23:36:49 +01:00
Seungha Yang cf64c9f588 d3d11device: Use WIN32 critical section API directly
GLib's GRecMutex will allocate another heap memory for CRITICAL_SECTION
struct and g_rec_mutex_lock/g_rec_mutex_unlock use WIN32 APIs actually.
We don't need such intermediate function calls and redundant heap allocation.
Just call WIN32 APIs directly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2845>
2022-08-06 05:12:41 +09:00
Víctor Manuel Jáquez Leal 67ce55f33e vah264enc: Lock properties read/write.
This is a first step for changing properties at runtime.

And add missing bitrate upate and notification.

Fixes: #1258
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2836>
2022-08-04 14:26:00 +00:00
Víctor Manuel Jáquez Leal cc9d69cb66 vah264enc: Use guint32 for rc_ctrl as it's for rc_ctrl_mode.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2836>
2022-08-04 14:26:00 +00:00
Víctor Manuel Jáquez Leal 7e95a8fc92 vah264enc: Split aud property and its usage.
Just as other property variables, it's split for ease it usage,
particularly after adding access locks.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2836>
2022-08-04 14:26:00 +00:00
Víctor Manuel Jáquez Leal c9f2108b43 va: baseenc: Untabbify and format.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2836>
2022-08-04 14:26:00 +00:00
Jan Schmidt d60c2f46e2 adaptivedemux2-stream: Silence a compiler warning
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2839>
2022-08-04 14:49:49 +01:00
Jan Schmidt 1060f72f90 adaptivedemux2: Move internal FLOW_SWITCH return value.
Move the internal-only FLOW_SWITCH custom return value
to GST_FLOW_CUSTOM_SUCCESS+2 to avoid collision with
GST_ADAPTIVE_DEMUX_FLOW_LOST_SYNC

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2839>
2022-08-04 14:49:33 +01:00
Edward Hervey 0857f5af5f adaptivedemux2: Modify custom sync loss flow return
Make it a custom sucess and not an error

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2839>
2022-08-04 14:49:33 +01:00
Edward Hervey 6934362817 hlsdemux2: Always check DSN if required
We don't want to consider the candidate as being before the playlist if the DSN
don't match

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2839>
2022-08-04 14:49:27 +01:00
Edward Hervey 5d0b112c0c adaptivedemux2/hlsdemux2: Handle loss of sync when dowloading.
Media playlist updates and fragment downloads happen in an interleaved
fashion. When a media playlist update fails *while* a segment is being
downloaded, this means we lost synchronization.

Properly propagate and handle this

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2839>
2022-08-04 14:49:27 +01:00
Edward Hervey 6a9bdceb5e hlsdemux2: Fix initial playlist setup.
There is now only a single case where we setup the initial playlist to 0, which
is for the very first variant stream.

Rendition streams will have the initial playlist "synchronized" against the
variant stream media playlist.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2839>
2022-08-04 14:49:27 +01:00
Edward Hervey 9ca1dcd563 hlsdemux2: Handle loss of synchronization in live
Loss of synchronization happens when the updated media playlist has no
relationship to the previous ones. This could happen because of network issues,
server issues, etc...

When this happens, we take no chance and "reset" ourselves so that we can "seek
back to live" against the new updated playlists.

Since this happens at the "media playlist update" level, make sure the custom
flow return is propagated up.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2839>
2022-08-04 14:49:27 +01:00
Edward Hervey abe5a06421 adaptivedemux2: Handle synchronously to lost sync
We are already in the main scheduler thread, therefore we can do the "seek back
to live" directly. This also avoids other pending actions to take place.

Also handle the loss of sync when doing manifest updates.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2839>
2022-08-04 14:49:27 +01:00
Edward Hervey 1aab9db803 hlsdemux2: Prune time maps when possible
Add a new method to prune unused time mappings (i.e. which aren't used by any
current media playlist).

Do that when doing flushing seeks. Could be used in other places later too.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2839>
2022-08-04 14:49:21 +01:00
Edward Hervey c20ad629c7 hlsdemux2: Allow DSN mismatches when re-syncing playlists
Some providers provide completely incompatible DSN across bitrates/renditions,
but do keep MSN consistent.

If we fail to synchronize playlist with DSN, retry without the DSN taken into
account.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2839>
2022-08-04 14:49:12 +01:00
Jan Schmidt da65a7b0ba adaptivedemux2: Fixes for period switching in the output loop
Close some race conditions in switching to the next period,
by ensuring the tracks are completely drained first and by
not outputting EOS events to the output source pad
if there is another period pending.

Fixes Manifest_MultiPeriod_1080p.mpd some more.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2838>
2022-08-04 13:43:57 +01:00
Jan Schmidt de7e2c9b6b adaptivedemux2: stream: Set period has_next_period flag before EOS
Before sending EOS, update the period's has_next_period
flag and/or create the next period. This closes a race
where the output loop might receive the EOS event
and either push it downstream (causing premature EOS),
or receive it and try and switch to the next period
before that period is completely set up.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2838>
2022-08-04 13:43:51 +01:00
Jan Schmidt 1863082efa adaptivedemux2: period: Rename 'closed' flag to 'has_next_period'
The flag is used to tell the output loop that a
next period is present, since the output loop
can't call the gst_adaptive_demux_has_next_period()
method.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2838>
2022-08-04 13:43:36 +01:00
Jan Schmidt e89d84a178 adaptivedemux2: Recheck for a pending track on drain
When a track is completely drained and EOS, but
there's a pending track on the slot loop again
to switch to that track.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2838>
2022-08-04 13:43:31 +01:00
Jan Schmidt f33fe73bb7 adaptivedemux2: Check stream selected instead of state
When combining stream flows, ignore streams that
are not selected, instead of checking whether
the stream state has changed yet.

Fixes another issue with dashdemux2 where it fails to
change to the next period when playing content with
several video, audio and text streams, as with
Manifest_MultiPeriod_1080p.mpd when seeking to 730
just before the end of the first period.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2838>
2022-08-04 13:43:25 +01:00
Tim-Philipp Müller 27d18f35e5 tracers: leaks: delay type name lookup
Micro optimisation: Store the quark of the type name when tracking
objects and only do the quark to string conversion (hashtable lookup)
later when we actually need the string.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2832>
2022-08-04 11:55:53 +01:00
Corentin Damman 75bdd2b7eb tracers: leaks: fix potentially invalid memory access when trying to detect object type
The is_gst_mini_object_check would sometimes detect a proper GObject
as a mini object, and then bad things happen.

We know whether a pointer is a proper GObject or a MiniObject here
though, so just pass that information to the right code paths and
avoid the heuristics altogether.

Eliminates all remaining uses of object_is_gst_mini_object().

Fixes #1334

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2832>
2022-08-04 11:55:15 +01:00
Tim-Philipp Müller 5a055ae70a tracers: leaks: fix potentially invalid memory access when trying to detect object type
The is_gst_mini_object_check would sometimes detect a proper GObject
as a mini object, and then bad things happen.

We know whether a pointer is a proper GObject or a MiniObject here
though, so just pass that information to the right code paths and
avoid the heuristics altogether.

There are probably more cases where the check should be eliminated.

Fixes #1334, maybe

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2832>
2022-08-04 11:54:33 +01:00
Jordan Petridis bc3e07dc21 gstalsaplugin: return the result of the element registration
Previously there were branches that would return FALSE, however
it looks like we forgot to return the new result variable.

https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/900

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2695>
2022-08-03 20:35:59 +00:00
Seungha Yang b8010e41a1 d3d11compositor: Add gamma-mode and primaries-mode properties
Allows controlling gamma remap and/or chromatic adaptation behavior.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2831>
2022-08-04 03:19:42 +09:00
Seungha Yang f89cb98495 d3d11videosink: Add gamma-mode and primaries-mode properties
Allows controlling gamma remap and/or chromatic adaptation behavior.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2831>
2022-08-04 02:48:57 +09:00
Seungha Yang 0ac7077d2d d3d11convert: Add gamma-mode and primaries-mode properties
Allows controlling gamma remap and/or chromatic adaptation behavior.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2831>
2022-08-04 02:48:57 +09:00
Seungha Yang 72ee96af42 d3d11converter: Add options for gamma and primaries conversion
Gamma remap and/or primaries conversion requires additional
processing which might be something user want to avoid, performance
reason for example

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2831>
2022-08-04 02:48:57 +09:00
Robert Mader e93773bda7 waylandsink: Logging code style updates
For better readability of debug messages and to keep similar code
in sync with `GstGtkWaylandsink`.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2694>
2022-08-03 14:25:17 +00:00
Robert Mader 062638a639 waylandsink: Rename occurrences of GstWaylandSink to 'self'
Rename all occurrences to `self`, making it consintent with `GstWl*`
and `GstGtkWaylandsink`.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2694>
2022-08-03 14:25:17 +00:00
Seungha Yang f5c5f881e4 ges: Update outdated comment
d3d11compositor is a videoaggregator subclass and no more wrapper bin
since the MR
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2631

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2825>
2022-08-02 21:45:21 +00:00
Víctor Manuel Jáquez Leal ce7070bf5b vapostproc: Check for colorimetry changes.
It uses what's merged in
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2765

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2777>
2022-08-02 17:39:24 +00:00
Olivier Crête fed0dfdd46 gtkwaylandsink test: Add navigationtest to example
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1515>
2022-08-02 16:34:13 +00:00
George Kiagiadakis 7e18fc1b1f Add new gtkwaylandsink element
This is based on gtksink, but similar to waylandsink uses Wayland APIs
directly instead of rendering with Gtk/Cairo primitives.

Note that the long term plan is to move this into the existing extension
in `-good`, which requires the Wayland library to move the as well.

For this reason several files like `gstgtkutils.*` and `gtkgstbasewidget.*`
are straight copies and should be kept in sync.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1515>
2022-08-02 16:34:13 +00:00
Mathieu Duponchelle efb18ec300 smartencoder: fix detection of avc1
While avc1 is the FourCC, avc is the name used in caps

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1549>
2022-08-02 15:48:12 +00:00
Mathieu Duponchelle 6bcfce7501 decodebin2: don't reverse stream topology order
This can be important for instance when a container holds multiple
tracks with the same media type, with no indication (eg tags) of
which track is the default one.

In that case, players usually pick the first track by default.

This is especially useful when using smart editing with GES, as
it will result in the same ordering as the input file that was
used as a template.

For reference, this yields the same order as ffprobe.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1549>
2022-08-02 15:48:12 +00:00
Mathieu Duponchelle 52f7150de4 ges: preserve discovery order
The previous code was storing container children in reverse
addition order, this was mitigated by the fact that track elements
were also stored in reverse order, thus restoring the original
order, but it seems more consistent to preserve order throughout,
the extra cost of append operations is negligible.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1549>
2022-08-02 15:48:12 +00:00
Mathieu Duponchelle b2c4052531 gstsmartencoder: don't make calculations for invalid DTS
Instead, as the current code relies on having a valid DTS (for lining
up passed through and re-encoded segments), simply compute a DTS
from the PTS if the DTS was invalid.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1549>
2022-08-02 15:48:12 +00:00
Mathieu Duponchelle 62c303c2e0 encoding-profile: don't order profiles by stream ID ..
when creating a profile from a discoverer info.

There is no justification for the existing code, and talking with
Thibault he cannot remember why the sort was in place.

On the other hand, this allows GES users to not have to implement
a callback for the select-tracks-for-object callback when using
it to trim a single clip, which the output profile was built from:
track elements will be placed in the appropriate track by default,
that is the one that will be connected to the matching profile.

For multi-clip timelines, the situation doesn't change, users will
still have to implement a callback and do the leg work of placing
track elements (if any) in a matching track (if any).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1549>
2022-08-02 15:48:12 +00:00
Mathieu Duponchelle 0f85a46148 encoding-profile: ignore more output caps fields
chroma-format, bit-depth-chroma, bit-depth-luma are all informative
fields set by the H265 and H265 parser upon receiving an SPS.

They shouldn't be constrained downstream of the parser, instead
if a user wants those to ultimately match certain values they
should do so by constraining a profile.

In this case however, we also always remove the profile constraint
in order to let encoders pick a suitable one as a function of the
raw input video format and their own capabilities.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1549>
2022-08-02 15:48:12 +00:00
Seungha Yang bc065d2cc2 d3d11videosink: Translate mouse position
Converts mouse cursor position represented in display coordinates to
stream coordinates.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2824>
2022-08-02 14:24:22 +00:00
Seungha Yang 7d4a1a5beb d3d11videosink: Early terminate mouse/keyboard event handling
... and add missing null check (plus coding style fix)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2824>
2022-08-02 14:24:22 +00:00
Edward Hervey f7e75a0208 parsebin: Avoid crash with unknown streams
With the new addition of handling unknown sream types we *could* end up with a
chain which doesn't have a current_pad (it's an intermediary one)

Fixes #1287

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2822>
2022-08-01 22:52:42 +00:00
Rafael Sobral e9a642feb8 aggregator: fix reversed active/flushing arguments in debug log output
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2813>
2022-08-01 23:03:59 +01:00
Philippe Normand 4bf62c788c webrtc: nice: WeakRef access fixes
The GstWebRTCNiceStream::ice property getter already hands-off a full reference,
so there is no need to call g_weak_ref_get() in call sites.

Fixes #1350

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2819>
2022-08-01 13:13:16 +00:00
Philippe Normand 3bdf3455a0 webrtc: ice: Fix GstWebRTCICE parent class
It is a GstObject, not a GObject.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2819>
2022-08-01 13:13:16 +00:00
Philippe Normand 10eaae1243 dtls: Properly name encoder/decoder logging categories
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2820>
2022-08-01 09:02:03 +00:00
Philippe Normand 7c3f73ec2e dtls: Make agent and connection GstObjects
Facilitates debug logs interpretation of GST_DEBUG_OBJECT() calls.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2820>
2022-08-01 09:02:03 +00:00
Nirbheek Chauhan 1de859ec55 meson: Update ogg.wrap from wrapdb
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2814>
2022-07-31 16:29:04 +05:30
Nirbheek Chauhan 19ebcd3955 build: Fix some compiler warnings by upgrading wraps
03d9f144cb

2913e72d85

c945c99fba

There's one more pygobject warning that will be fixed with this:

https://gitlab.gnome.org/GNOME/pygobject/-/merge_requests/210

Also bump the image versions to regen them.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2814>
2022-07-31 16:28:25 +05:30
Nirbheek Chauhan b2d22c0f00 meson: Don't pass -Werror to vendored code
Do it the correct way with libusrsctp -- override the option so that
it's done in a compiler-agnostic and future-proof way.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2494>
2022-07-30 11:27:12 +00:00
Nirbheek Chauhan 5da9f62313 rtsp+rtmp: Forward warning added to tls-validation-flags to our users
With the 2.72 release, glib-networking developers have decided that
TLS certificate validation cannot be implemented correctly by them, so
they've deprecated it.

In a nutshell: a cert can have several validation errors, but there
are no guarantees that the TLS backend will return all those errors,
and things are made even more complicated by the fact that the list of
errors might refer to certs that are added for backwards-compat and
won't actually be used by the TLS library.

Our best option is to ignore the deprecation and pass the warning onto
users so they can make an appropriate security decision regarding
this.

We can't deprecate the tls-validation-flags property because it is
very useful when connecting to RTSP cameras that will never get
updates to fix certificate errors.

Relevant upstream merge requests / issues:

https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2214

https://gitlab.gnome.org/GNOME/glib-networking/-/issues/179

https://gitlab.gnome.org/GNOME/glib-networking/-/merge_requests/193

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2494>
2022-07-30 11:27:12 +00:00
Nirbheek Chauhan 11ecda9d73 dtls: Disable OpenSSL 3.0 deprecation warnings for now
Fedora 36 ships with OpenSSL 3.0, which deprecates all low-level APIs,
so this code needs to be rewritten. There is no easy fix in the
porting guide, and it recommends disabling the warnings if you can't
use the high-level API.

https://wiki.openssl.org/index.php/OpenSSL_3.0#Upgrading_to_OpenSSL_3.0_from_OpenSSL_1.1.1

Here's the replacement API:

https://www.openssl.org/docs/man3.0/man7/migration_guide.html#Deprecated-low-level-object-creation

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2494>
2022-07-30 11:27:12 +00:00
Nirbheek Chauhan db28c81ee3 harfbuzz.wrap: Fix wrap type, and remove unnecessary patch
Forgot to change the wrap type in e0014ef4fe which broke the
subproject. Wasn't noticed by CI because the subproject cache wasn't
regenerated.

The accompanied patch was included in 2.8.2, so it is not needed. It
was originally needed with 2.8.1

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2812>
2022-07-29 19:56:11 +00:00
Tim-Philipp Müller 5966905930 subprojects: fix pango wrap diff file location
Must match the version of the pango wrap.

Fixes ci windows docker image rebuild issue.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2812>
2022-07-29 19:56:11 +00:00
Mark Nauwelaerts b5707e2371 videobox: avoid dropping caps fields for passthrough caps transform
Fixes potential negotiation failure in case downstream element
is a bit picky regarding the fields in question.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2786>
2022-07-29 18:44:13 +00:00
Seungha Yang ea47a82e9e compositor: Update plugins cache
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1486>
2022-07-29 13:29:39 +00:00
Seungha Yang 648739012a compositor: Warn when inputs are SDR/HDR mixed
Let user know that the result of mixed SDR/HDR is not guaranteed
to be a good visual quality.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1486>
2022-07-29 13:29:39 +00:00
Seungha Yang 56d47f641f compositor: Add support for all formats
For formats which we don't have fast-path implementation, compositor
will convert it to common unpack formats (AYUV, ARGB, AYUV64 and ARGB64)
then blending will happen using the intermediate formats.
Finally blended image will be converted back to the selected output format
if required.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1486>
2022-07-29 13:29:39 +00:00
Seungha Yang 22a4543c5f compositor: Add support for Y444 high bitdepth formats
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1486>
2022-07-29 13:29:39 +00:00
Seungha Yang 3cab0a9c08 compositor: Add support for I420/I422 high bitdepth formats
Implementation for {I420,I422}_{10,12}_{LE,BE} formats

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1486>
2022-07-29 13:29:39 +00:00
Seungha Yang 64eb4b8d62 compositor: Calculate background color only once
... instead of do that per fill_color() call in case of RGB format.
Moreover, respect selected GstVideoColorRange

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1486>
2022-07-29 13:29:39 +00:00
Seungha Yang 8fee6bf785 wasapi2: Fix initial mute/volume setting
Fix up volume/mute change flag setting

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2809>
2022-07-29 02:37:29 +09:00
Matthew Waters 598f2ab73f rtspconnection: protect cancellable by a mutex
It is entirely possible for the cancellable to be cancelled (and freed)
in gst_rtsp_connection_flush() while there may be an ongoing read/write
operation.

Nothing prevents gst_rtsp_connection_flush() from waiting for the
outstanding read/writes.

This could lead to a crash like (where cancellable has been freed
within gst_rtsp_connection_flush()):

 #0  0x00007ffff4351096 in g_output_stream_writev (stream=stream@entry=0x7fff30002950, vectors=vectors@entry=0x7ffe2c6afa80, n_vectors=n_vectors@entry=3, bytes_written=bytes_written@entry=0x7ffe2c6af950,  cancellable=cancellable@entry=0x7fff300288a0, error=error@entry=0x7ffe2c6af958) at ../subprojects/glib/gio/goutputstream.c:377
 #1  0x00007ffff44b2c38 in writev_bytes (stream=0x7fff30002950, vectors=vectors@entry=0x7ffe2c6afa80, n_vectors=n_vectors@entry=3, bytes_written=bytes_written@entry=0x7ffe2c6afb90, block=block@entry=1, cancellable=0x7fff300288a0) at ../subprojects/gst-plugins-base/gst-libs/gst/rtsp/gstrtspconnection.c:1320
 #2  0x00007ffff44b583e in gst_rtsp_connection_send_messages_usec (conn=0x7fff30001370, messages=messages@entry=0x7ffe2c6afcc0, n_messages=n_messages@entry=1, timeout=timeout@entry=3000000) at ../subprojects/gst-plugins-base/gst-libs/gst/rtsp/gstrtspconnection.c:2056
 #3  0x00007ffff44d2669 in gst_rtsp_client_sink_connection_send_messages (sink=0x7fffac0192c0, timeout=3000000, n_messages=1, messages=0x7ffe2c6afcc0, conninfo=0x7fffac019610) at ../subprojects/gst-rtsp-server/gst/rtsp-sink/gstrtspclientsink.c:1929
 #4  gst_rtsp_client_sink_try_send (sink=sink@entry=0x7fffac0192c0, conninfo=conninfo@entry=0x7fffac019610, requests=requests@entry=0x7ffe2c6afcc0, n_requests=n_requests@entry=1, response=response@entry=0x0, code=code@entry=0x0) at ../subprojects/gst-rtsp-server/gst/rtsp-sink/gstrtspclientsink.c:2845
 #5  0x00007ffff44d3077 in do_send_data (buffer=0x7fff38075c60, channel=<optimized out>, context=0x7fffac042640) at ../subprojects/gst-rtsp-server/gst/rtsp-sink/gstrtspclientsink.c:3896
 #6  0x00007ffff4281cc6 in gst_rtsp_stream_transport_send_rtp (trans=trans@entry=0x7fff20061f80, buffer=<optimized out>) at ../subprojects/gst-rtsp-server/gst/rtsp-server/rtsp-stream-transport.c:632
 #7  0x00007ffff4278e9b in push_data (stream=0x7fff40019bf0, is_rtp=<optimized out>, buffer_list=0x0, buffer=<optimized out>, trans=0x7fff20061f80) at ../subprojects/gst-rtsp-server/gst/rtsp-server/rtsp-stream.c:2586
 #8  check_transport_backlog (stream=0x7fff40019bf0, trans=0x7fff20061f80) at ../subprojects/gst-rtsp-server/gst/rtsp-server/rtsp-stream.c:2645
 #9  0x00007ffff42793b3 in send_tcp_message (idx=<optimized out>, stream=0x7fff40019bf0) at ../subprojects/gst-rtsp-server/gst/rtsp-server/rtsp-stream.c:2741
 #10 send_func (stream=0x7fff40019bf0) at ../subprojects/gst-rtsp-server/gst/rtsp-server/rtsp-stream.c:2776
 #11 0x00007ffff7d59fad in g_thread_proxy (data=0x7fffbc062920) at ../subprojects/glib/glib/gthread.c:827
 #12 0x00007ffff7a8ce2d in start_thread () from /lib64/libc.so.6
 #13 0x00007ffff7b12620 in clone3 () from /lib64/libc.so.6

Fix by adding a cancellable lock and returning an extra reference used
across all read/write operations.  gst_rtsp_connection_flush() can free
the in-use cancellable and it will no longer affect any in progress
read/write.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2799>
2022-07-28 10:32:15 +00:00
Philippe Normand 53800b308b GST_CHECK_VERSION: Fix unexpected "git = next version" assumption
1.21.0.1 should not satisfy a check for 1.22.0.

If someone needs more control they should do a feature check for
the symbol in the headers or lib.

Based on a similar patch by Tim-Philipp Müller for libnice.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2501>
2022-07-28 08:52:13 +00:00
Adrian Fiergolski 8e6872a36e videoflip: Fix caps negotiation when method is selected
The caps negotiation should respect the selected method to the test pipeline below works properly.
gst-launch-1.0 videotestsrc ! video/x-raw,width=320,height=600 ! videoflip method=clockwise ! video/x-raw,width=600,height=320 ! fakesink

Signed-off-by: Adrian Fiergolski <adrian.fiergolski@fastree3d.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2803>
2022-07-28 00:00:47 +00:00
U. Artie Eoff 76cc5f88c5 vaapi: h265dec: avoid possible NULL deref
Check "pi" before attempting to dereference it.

Captured by static analysis.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2801>
2022-07-27 08:45:45 -04:00
Eric Knapp d11a0d04ec va: h264enc: Make AUD the first NAL unit
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2796>
2022-07-27 06:46:21 +00:00
U. Artie Eoff e3e98da727 meson: webrtc: ensure definition of libgstwebrtcnice_dep
... and skip if it's disabled.

Fixes #1344

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2797>
2022-07-26 17:39:52 -04:00
Nicolas Dufresne 3d63b8c326 vaapi: h264dec: Remove dead code
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2795>
2022-07-26 21:09:08 +00:00
Nicolas Dufresne 04e0154fb5 vaapi: h265dec: Refresh our sps/pps copy
The decoder uses a copy of the SPS/PPS. Since
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2575
the SPS/PPS is updated when the slice header is parsed. As a side
effect, the H265 decoder was using an partially filled copy.

Fixes: 5ae05bb42a ("codecparsers: Defering computation of pps and sps fields")
Fixes: #1343
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2795>
2022-07-26 21:09:08 +00:00
fduncanh 197b72f32a v4l2object.c: add support for Apple's full-range bt709 colorspace variant
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2793>
2022-07-26 15:14:41 +00:00
yatinmaan 2c1e61ea16 webrtc: Split WebRTCICE into base classes and implementation.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2398>
2022-07-26 13:51:11 +00:00
Elliot Chen e0564b04c6 v4l2: fix the critical log when unreference the buffer with no data
In the trick mode, driver may queue a valid buffer follow by an
empty buffer which has no valid data to indicate EOS.For the empty
buffer whose memory is multi-plane, need to resize it before
unreference it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2731>
2022-07-25 16:44:05 +08:00
Seungha Yang cf94045dbf qsvencoder: Add support for D3D11 shared texture
Although input texture belongs to the other d3d11 device,
we can do GPU copy when its physical device is identical.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2790>
2022-07-23 16:53:14 +00:00
Seungha Yang 6fff608f27 d3d11: Port to GstD3D11Fence
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2790>
2022-07-23 16:53:14 +00:00
Seungha Yang ba259111d5 d3d11: Implement fence abstraction
Depending on device feature level, d3d11 runtime can support
ID3D11Fence which is equivalent to ID3D12Fence.
Waiting using fence has performance-wise benefit over pulling
ID3D11Query status. If ID3D11Fence is not supported by device,
then ID3D11Query will be used instead.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2790>
2022-07-23 16:53:14 +00:00
Tim-Philipp Müller ccb5d52be5 audiointerleave: fix property docs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2785>
2022-07-23 16:03:43 +00:00
Jan Schmidt 202c3bc4b1 video: Fix scaling in 4x horizontal co-sited chroma
4x downscaling of chroma with co-sited chroma has never worked
it seems.

Fixes incorrect videotestsrc output and videoconvert conversions
to Y41B, YUV9, YVU9 and IYU9 with co-sited chroma.

e.g.
gst-launch-1.0 videotestsrc ! video/x-raw,format=Y41B,width=1280,height=720 ! \
  videoconvert ! autovideosink

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2789>
2022-07-23 09:28:32 +00:00
Benjamin Gaignard 8ec0dca73b codecs: h265: Make sure that sps is processed just before decoding
It may happens that bitstream doesn't provided SPS in decoding order
(like in VPSSPSPPS_A_MainConcept_1 conformance test file).
To be sure that the decoder got the correct SPS parameters process
SPS just before start decoding the frame.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2575>
2022-07-22 16:13:47 -04:00
Sebastian Fricke 5019be9fdb codecs: h265: Fix typos
Fix multiple typos in warning and info messages.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2575>
2022-07-22 16:13:47 -04:00
Benjamin Gaignard a275e1e029 videoparsers: h265: Be less restrictive between PPS and SPS parsing order
Allow to parse PPS to be parser even if SPS hasn't been parsered before.
This help to parse VPSSPSPPS_A_MainConcept_1 conformance test

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2575>
2022-07-22 16:13:47 -04:00
Benjamin Gaignard 5ae05bb42a codecparsers: Defering computation of pps and sps fields
While possible defer computataion of pps and sps fields until
slice parsing since it may happens that bitstreams don't encoded
them in expected order.
A example weird ordered bitstreams is VPSSPSPPS_A_MainConcept_1
conformance test.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2575>
2022-07-22 16:13:47 -04:00
Nicolas Dufresne 316b182a86 v4l2codecs: h264: Reset the number of slices on picture start
This way, if we aborted a frame in the middle, we don't endup thinking
there is multiple slices to send.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1079>
2022-07-22 10:21:03 -04:00
Nicolas Dufresne c2144ec586 v4l2codecs: h264: Fix initialization of the slice array
The function g_array_sized_new() leaves the len to 0, but the slice
implementation assumes it would be set to 4. Sending multiple slices is
not yet support for H.264 as no driver needed it yet, but if that code
was to be used it would have overflowed as the array would never grow as
multiple 0 by 2 always results in 0.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1079>
2022-07-22 10:21:03 -04:00
Nicolas Dufresne a707d984ae v4l2codecs: h264: Rename count variable to num_controls
This is the counter for the used control slot. The term num_controls was
introduced in the HEVC decoder and felt like a better choice.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1079>
2022-07-22 10:21:02 -04:00
Nicolas Dufresne a2b219c7e1 v4l2codecs: hevc: Add an API check
This adds an API check and bump recommended base kernel version to 5.20.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1079>
2022-07-22 10:21:02 -04:00
Benjamin Gaignard 0eb7028570 v4l2codecs: Add v4l2 stateless H265 decoder
Add v4l2 stateless H265 decoder.

Co-authored-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Co-authored-by: Sebastian Fricke <sebastian.fricke@collabora.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1079>
2022-07-22 10:21:02 -04:00
Benjamin Gaignard 70941696ed v4l2codecs: Increase minimum payload size
Fluster MAXBINS_{A-C}_TI_5 HEVC tests files require to store
a payload larger than usual given their resolutions.
Increase the minimum payload size to handle them correctly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1079>
2022-07-22 10:21:02 -04:00
Nicolas Dufresne f1c98e2c9e v4l2codecs: Align v4l2 headers with HEVC final uAPI
HEVC uAPI have landed for kernel 5.10.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1079>
2022-07-22 10:21:02 -04:00
Nicolas Dufresne 74a811e718 codecparsers: h265: Introduce long_term_ref_pic_set_size
This is the size of the `if( long_term_ref_pics_present_flag )` inside
slice_segment_header( ) syntax. This size in bit, and after de-emulation
is needed by some HW.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1079>
2022-07-22 10:21:02 -04:00
Sebastian Dröge 0aad12fbce audiobuffersplit: Actually store number of samples to drop in gapless mode
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2780>
2022-07-22 08:01:45 +00:00
Sebastian Dröge fad0a72eca audiobuffersplit: Use input running time for comparison instead of the currently tracked running time
Otherwise gapless mode would do completely wrong calculations on
discontinuities and cause input/output to drift slowly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2780>
2022-07-22 08:01:45 +00:00
Sebastian Dröge 0485c354d2 audiobuffersplit: Combine two if expressions to reduce indentation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2780>
2022-07-22 08:01:45 +00:00
Seungha Yang 0cadd10474 videoaggregator: Don't force upstream alpha format
"video/x-raw,format=RGBA ! some-video-filter ! video/x-raw,format=NV12"
is a very common case and therefore such erroring at baseclass
does not seem to be a desired behavior.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2703>
2022-07-21 21:34:06 +00:00
Seungha Yang ac6577e2a9 d3d11compositor: Add support for crop meta
GstD3D11Converter supports cropping already. Cropping is just
a matter of setting source rectangle area to converter,
from d3d11 point of view

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2782>
2022-07-22 05:07:23 +09:00
Seungha Yang aa0b7f3284 examples: d3d11: Add GstD3D11Converter example
An example to demonstrate color space conversion, rescale and flip/rotation
using GstD3D11Converter

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2767>
2022-07-22 00:27:24 +09:00
Seungha Yang 1c3fac818d d3d11: Move GstD3D11Converter to gst-libs
The object is equivalent to GstVideoConverter but for D3D11.
Application can use this object directly for various conversions,
such as color space conversion, rescale, crop and flip/rotation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2767>
2022-07-22 00:08:51 +09:00
Seungha Yang 32eeadb4a5 d3d11: Define enum and flags types manually
gnome.mkenums_simple() doesn't work well for GstD3D11, seems to
be confused by numeric representation of D3D11, must be a bug
in GLib or so. Just don't rely on the incomplete automagic.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2767>
2022-07-22 00:07:52 +09:00
Seungha Yang 879eb9412b d3d11: Run gst-indent
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2767>
2022-07-22 00:07:52 +09:00
Jordan Petridis 3a20a4564f openmpt: update from now deprecated api
https://lib.openmpt.org/doc/classopenmpt_1_1module.html#ab2695af0baa274054f5687741fa7c05b

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2721>
2022-07-21 07:52:37 +00:00
Fan F He 6fe35ad59d msdkenc: Enable LowDelayBrc and MaxFrameSize for I/P frame
Enable these features for accurate bitrate control.
Feature introduction of LowDelayBRC, MaxFrameSizeI and MaxFrameSizeP could be found here:
https://github.com/Intel-Media-SDK/MediaSDK/blob/master/doc/mediasdk-man.md

Signed-off-by: Fan F He <fan.f.he@intel.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2742>
2022-07-20 07:10:19 +00:00
Seungha Yang ee289a65ce d3d11converter: Use GstStructure to set initialization options
Runtime updatable options are exposed via object properties
but there are a few options which should be known at initialization
time. Use GstStructure to signal it and to be easily extensible

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2776>
2022-07-20 07:05:51 +09:00
Seungha Yang d3d8820359 d3d11converter: Use primaries and transfer function compare methods
Different enum values could be functionally equal, then we don't need
to do full conversion.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2776>
2022-07-20 07:05:51 +09:00
Seungha Yang 16f4567a50 d3d11format: Move DXGI color space mapping method to gst-libs
Expose color space mapping method to public so that application
can configure GstCaps or GstVideoInfo using DXGI color space

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2776>
2022-07-20 07:05:46 +09:00
Seungha Yang 43052fabb5 gststructure: Add gst_structure_get_flags method
We don't prevent setting G_TYPE_FLAGS on GstStructure
but no helper method for getting the value.
Add a method similar to gst_structure_get_enum()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2770>
2022-07-19 20:54:31 +09:00
Sebastian Dröge 205034dea9 aggregator: Reset EOS flag after receiving a stream-start event
And also don't assert that there are no buffers queued up when handling
an EOS event. The pad's streaming thread might've already received a new
stream-start event and queued up a buffer in the meantime.

This still leaves a race condition where the srcpad task sees all pads
in EOS state and finishes the stream, while shortly afterwards a pad
might receive a stream-start event again, but this doesn't seem to be
solveable with the current aggregator design.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2769>
2022-07-18 15:46:21 +03:00
Seungha Yang 687f9feac6 d3d11convert: Use new colorimetry compare function
Avoid conversion if both are functionally identical

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2765>
2022-07-18 08:56:45 +00:00
Seungha Yang 953257782d video-converter: Use primaries compare function
Avoid conversion if both color primaries are functionally equal

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2765>
2022-07-18 08:56:45 +00:00
Seungha Yang 2ed64cad6a video-color: Add primaries and colorimetry compare functions
SMPTE 170M and 240M use the same RGB and white point coordinates
and therefore both primaries can be considered functionally
equivalent.
Also, some transfer functions have different name but equal
gamma functions. Adding another colorimetry compare function
to deal with thoes cases at once

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2765>
2022-07-18 08:56:45 +00:00
Sebastian Dröge 1728f8b72a qt: Fix another instance of Qt/GStreamer both defining GLsync differently
In file included from ../gstreamer1.0-plugins-good/1.20.3-r0/recipe-sysroot/usr/include/gstreamer-1.0/gst/gl/gstglfuncs.h:87,
                 from ../gst-plugins-good-1.20.3/ext/qt/qtglrenderer.cc:14:
../gstreamer1.0-plugins-good/1.20.3-r0/recipe-sysroot/usr/include/gstreamer-1.0/gst/gl/glprototypes/gstgl_compat.h:40:18: error: conflicting declaration 'typedef void* GLsync'
   40 | typedef gpointer GLsync;
      |                  ^~~~~~
In file included from ../gstreamer1.0-plugins-good/1.20.3-r0/recipe-sysroot/usr/include/QtGui/qopengl.h:127,
                 from ../gstreamer1.0-plugins-good/1.20.3-r0/recipe-sysroot/usr/include/QtQuick/qsggeometry.h:44,
                 from ../gstreamer1.0-plugins-good/1.20.3-r0/recipe-sysroot/usr/include/QtQuick/qsgnode.h:43,
                 from ../gstreamer1.0-plugins-good/1.20.3-r0/recipe-sysroot/usr/include/QtQuick/qsgrendererinterface.h:43,
                 from ../gstreamer1.0-plugins-good/1.20.3-r0/recipe-sysroot/usr/include/QtQuick/qquickwindow.h:44,
                 from ../gstreamer1.0-plugins-good/1.20.3-r0/recipe-sysroot/usr/include/QtQuick/QQuickWindow:1,
                 from ../gst-plugins-good-1.20.3/ext/qt/qtglrenderer.cc:6:
../gstreamer1.0-plugins-good/1.20.3-r0/recipe-sysroot/usr/include/QtGui/qopengles2ext.h:24:26: note: previous declaration as 'typedef struct __GLsync* GLsync'
   24 | typedef struct __GLsync *GLsync;
      |                          ^~~~~~

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2763>
2022-07-18 07:45:22 +00:00
Seungha Yang 35994eb5c9 d3d11testsrc: Fix SMPTE pattern rendering
It was wrong vertex shader code

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2766>
2022-07-17 23:59:04 +09:00
Nirbheek Chauhan 41bf3f6c1b osxaudio: Fix deprecation in macOS 12.0
kAudioObjectPropertyElementMaster has been renamed to
kAudioObjectPropertyElementMain

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2761>
2022-07-16 06:16:17 +00:00
Nirbheek Chauhan e0014ef4fe meson: Fix compile failures on macOS in harfbuzz and pango
These patches are taken from upstream, and they fix compile failures
with latest clang. These can be dropped when upgrading these wraps.

This is currently causing a warning because we do not require the
version of meson that ships with this feature: 0.63.0. The version has
not been bumped because older Meson versions gracefully ignore the
wrap field, this fix is optional and only needed on macOS, and 0.63.0
is a very new release with a bug that partially breaks this feature:

https://github.com/mesonbuild/meson/pull/10602

We can consider bumping the requirement once 0.63.1 is released.

Also switch from git to tarballs, no reason to use git here anymore.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2761>
2022-07-16 06:16:17 +00:00
Nirbheek Chauhan 2d890e6fd6 meson: Update some wraps, remove unused wraps
These wraps have point releases on the wrapdb, so update them.

Remove pcre.wrap since it is pulled in automatically by glib and not
used by gstreamer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2761>
2022-07-16 06:16:17 +00:00
Nirbheek Chauhan 61743ec1ae meson: Fix warning about check kwarg
This place was missed when we fixed this everywhere else.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2761>
2022-07-16 06:16:17 +00:00
Piotr Brzeziński 6bf15124e7 applemedia: Add HEVC support to vtenc and vtdec
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2754>
2022-07-16 05:20:56 +00:00
Seungha Yang 1dd29a2564 d3d11: Move HLSL compiler to gst-libs
We should move this functionality to gst-libs so that GstD3D11Converter
can be moved to gst-libs.
Another advantage is that applications can call our
HLSL compiler wrapper method without any worry about OS version
dependent system installed HLSL library.
Note that there are multiple HLSL compiler library versions
on Windows and system installed one would be OS version dependent.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2760>
2022-07-15 06:31:51 +09:00
Matthew Waters 390518a296 glimagesink: only allow setting the GL display/context if it is a valid value
Otherwise, when setting the external application context, then the
display may be cleared and then not used and the asharing mechanism does
not work anymore.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2750>
2022-07-13 01:20:00 +00:00
Thibault Saunier 073df3d820 webrtcbin: Add a signal to plug bandwidth estimator elements
We need GStreamer elements to do the bandwidth estimation as this way
they can also control the pacing of the transmission flow as specified
 in the [GCC] algorithm for example.

Bandwidth estimator element are placed right before the "RTPSession" as
an "rtp-aux-sender" element. This way they can use the "Transport-wide
Congestion Control" RTCP feedback messages through the "RTPTwcc" custom
events that are sent by the rtpsession.

Applications are responsible to react to the bandwidth estimator element
and set the encoder target bitrate etc... which means that we can not
pass an estimator as an element factory, so a signal as been chosen
instead.

[GCC]: https://datatracker.ietf.org/doc/html/draft-ietf-rmcat-gcc-02

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2562>
2022-07-12 20:40:55 +00:00
Corentin Damman f95ca93d25 tracers: leaks: fix object-refings.class flags
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2749>
2022-07-12 12:29:38 +00:00
Sebastian Dröge 47ac79d7b8 devicemonitor: Use a sync bus handler for the provider to avoid accumulating all messages until the provider is stopped
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/981

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2741>
2022-07-12 11:57:02 +00:00
Jan Schmidt ab459f0528 splitmuxsink: Fix memory leak
Fix a leak of the buffer info struct when reaching
EOS without data on the reference input.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2751>
2022-07-12 11:22:33 +00:00
Bruce Liang ebd8bd8f13 rtsp-client: Fix url for generating key in media factory
The mount point at / can be accessed by both the URL forms rtsp://<IP>:<PORT> and rtsp://<IP>:<PORT>/.
To make media factory generating the same key for both the URL forms, the url sent to gst_rtsp_media_factory_construct() needs to be normalized first.
This commit creates a new GstRTSPUrl as the normalized url to send to gst_rtsp_media_factory_construct().

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2681>
2022-07-12 10:01:35 +00:00
Jan Schmidt 3511be9a05 glupload: Add raw caps to sink pad when needed.
When checking if the current upload method can support
the requested caps filter in _transform_caps(),
make sure the sink pad reports raw caps.

Fixes #1311

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2725>
2022-07-12 09:30:46 +00:00
Jan Schmidt f8541b05aa gstglupload: Remove raw caps from individual methods
Raw memory upload should always be the least preferred input
caps, only added by the raw memory uploader as the last thing
in the caps.

Caps negotiation should still choose raw data when it needs to,
and other upload methods that can accept raw data buffers will still do so.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2725>
2022-07-12 09:30:46 +00:00
Mathieu Duponchelle 56ec817bf4 videoaggregator: always convert when user provides converter-config
The `converter-config` property may be used to perform cropping,
conversion should always be performed when the user set the property
to a non-NULL value.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2746>
2022-07-12 08:03:08 +00:00
Sebastian Dröge eb0746ba97 rtpjitterbuffer: Fix calculation of RFC7273 RTP time period start
This has to be based directly on the current estimated clock time and
has to allow for negative period starts.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2655>
2022-07-11 15:33:42 +00:00
Seungha Yang 5386a426f3 h265decoder: Report latency
Similar to that of h264decoder

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2726>
2022-07-11 11:59:02 +00:00
Andoni Morales Alastruey 94e1ddad43 glwindow_cocoa: fix a leak of the GstNSView
This leak is also causing a leak of the GstGLCAOpenGLLayer
which leaks the GstGLWrappedContext and the GstGLDisplay

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2736>
2022-07-11 11:25:54 +00:00
Andoni Morales Alastruey 7db2a3cf11 gl: Fix leak of the whole CGL context
This was leaking the CGL context and several resources
allocated in the context, around 70MB for a 1080p clip

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2736>
2022-07-11 11:25:54 +00:00
He Junyan 8e2bbfed13 va: baseenc: Do not use codec frame structure again after finish_frame().
In _push_out_one_buffer(), we use codec frame structure again for error handling
after we already call finish_frame(), which is a latent segment fault.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2739>
2022-07-11 10:12:29 +00:00
He Junyan 27c33f0161 va: baseenc: Do not clear the codec frame twice when error.
The current manner will clear the input codec frame twice if we fail
to push the output data, which will trigger an assert.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2739>
2022-07-11 10:12:29 +00:00
Jordan Petridis 3385ea3481 fluiddec: Remove workaround for version 1.1.9
We require >= 2.1 version since the previous commit

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2718>
2022-07-09 14:19:11 +00:00
Jordan Petridis 2fa6ec8733 fluidsynth: update from now deprecated api
fluid_synth_set_chorus_on and fluid_synth_set_reverb_on were
deprecated in favor of new funtions where you can also specify
the fx_group the effect would apply.

The behavior of the set_* variants was to apply to all groups
so we pass -1 to the new functions as per documentation.

https://www.fluidsynth.org/api/group__chorus__effect.html#ga3c48310eecdca9cd338799d19f19c32d

and

https://www.fluidsynth.org/api/group__reverb__effect.html#gacb7917564c988cf54f2e35189b509c8e

and the introduction of the change:

https://github.com/FluidSynth/fluidsynth/pull/673

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2718>
2022-07-09 14:19:11 +00:00
Marc Leeman 18f2f83b4a base: lookup RGB format without alpha
librfb requests a colour space for depth 32 and bpp 32 with alpha set to
0x0, treat this the same as depth 24 with bpp 32.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2627>
2022-07-09 12:06:58 +00:00
Seungha Yang b09ca8635f d3d11: Use scoped device lock
Make code simpler and more deadlock-free

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2728>
2022-07-09 03:36:17 +09:00
Jan Alexander Steffens (heftig) dfea5070df gstinfo: Parse "NONE" as a valid level name
This allows using `NONE` in `GST_DEBUG`,
`gst_debug_set_threshold_from_string`, etc. It was accessible before,
but only via the integer `0`.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2734>
2022-07-08 17:07:36 +00:00
Thibault Saunier 7aeb2f6711 python: Fix the audiotestsrc example
Since 830d1595b9 AudioInfo::from_caps has been hidden in python

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2675>
2022-07-08 14:37:14 +00:00
Thibault Saunier fab64c0b3a python: Add a Gst.init_python function to be called from plugins
Plugins know that they will be initialized after Gst was initialized
so they can call the initialization function dedicated for the python
bindings

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2675>
2022-07-08 14:37:14 +00:00
Thibault Saunier 37366ff2f4 python: Do not call gst_init when it is already is_initialized
GStreamer plugins written in python need to call `Gst.init` to ensure
that GStreamer is initialized so when loading a python plugin, we might
be recursively calling `gst_init` which is not a good idea.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2675>
2022-07-08 14:37:14 +00:00
Seungha Yang 0513e51716 libav: Fix for APNG encoder property registration
The AVClass name of Animated PNG in FFmpeg 5.x is "(A)PNG"
and it will be converted to "-a-png" through
g_ascii_strdown() and g_strcanon(). But GLib disallow leading '-'
character for a GType name. Strip leading '-' to workaround it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2724>
2022-07-08 13:56:35 +00:00
Seungha Yang 02c2485468 qsvencoder: Fix for latency report when B-frame is enabled
QSV runtime will introduce additional delay when B-frame is enabled

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2730>
2022-07-08 13:24:12 +00:00
Seungha Yang 4f90e9b561 qsvencoder: Do not query again if previous call succeeded
Don't need to query multiple times

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2730>
2022-07-08 13:24:12 +00:00
Seungha Yang 6cc6494287 d3d11screencapturesrc: Set colorimetry to caps
Make use of reported DXGI colorspace if possible

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2729>
2022-07-08 21:05:25 +09:00
Seungha Yang 2476678b3c d3d11: Update colorspace map
Map DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709 to sRGB colorimetry

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2729>
2022-07-08 20:15:28 +09:00
Seungha Yang 59d92ea62c d3d11: Add an utility method for DXGI colorspace conversion
Add a method for DXGI_COLOR_SPACE_TYPE -> GstVideoColorimetry conversion

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2729>
2022-07-08 20:03:06 +09:00
Seungha Yang f3d51ef235 d3d11: Serialize ensure_element_data() call
It can be called any time from random thread. Thus, multiple
device objects can be created for the same physical device
if the call is not serialized, that's not a scenario we expect.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2727>
2022-07-08 01:35:34 +09:00
Seungha Yang 8aeb8ea58f proxysink: Fix GstProxySrc leak
Clear weak pointer to peer src when disposing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1552>
2022-07-07 05:54:54 +09:00
Seungha Yang 37fdaaf8ff proxysink: Make sure stream-start and caps events are forwarded
There might be a sequence of event and buffer flow:
- Got stream-start/caps/segment events
- Got flush events
- And then buffers with a new segment event

In the above case, stream-start and caps event might not be reached to
peer proxysrc if peer proxysrc is not ready to receive them.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1552>
2022-07-07 05:42:21 +09:00
Seungha Yang b233df3537 splitmuxsink: Don't crash on EOS without buffer
Fix a case where upstream pushed EOS without buffers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2174>
2022-07-05 11:33:35 +00:00
Matthew Waters 6066e913ee webrtc: implement support for asynchronous host resolution
Doesn't block anymore if a mdns host resolution takes multiple seconds
to complete in e.g. stun/turn/ice candidate usage.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1961>
2022-07-05 03:20:57 +00:00
Matthew Waters dd4bbb6379 videoconvertscale: ensure writable caps when fixating format
gst_video_convert_scale_get_fixed_format() receives 'othercaps' from
basetransforms' fixate_caps() vmethod which explicitly mentions that
'`othercaps` may not be writable'.

The gst_caps_intersect() call just before may or may not produce new
caps. Particularly in cases like EMPTY or ANY caps on either of the
inputs, only a ref is taken and returned to the caller.

As a result, gst_video_convert_scale_fixate_format() may have attempted
to modify a non-writable caps structure.

Fix by adding a gst_caps_make_writable().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2709>
2022-07-04 19:57:10 +00:00
Thibault Saunier 339f950e79 rtprtx: Fix copying extension headers
There was a typo leading to reading memory from the buffer we were
writing to.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2696>
2022-07-04 19:20:57 +00:00
Seungha Yang e0d1b98827 d3d11converter: Remove convert() method
Expose only single convert_buffer() method. It's safer approach than
passing arbitrary list of SRV/RTV pointers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2713>
2022-07-04 18:46:51 +00:00
Seungha Yang df396b9acd d3d11testsrc: Use convert_buffer() method
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2713>
2022-07-04 18:46:51 +00:00
Seungha Yang 7a48843ca6 d3d11: Remove video processor
Processing using ID3D11VideoProcessor was integrated into
GstD3D11Converter and GstD3D11VideoProcessor implementation is
not used anymore.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2713>
2022-07-04 18:46:51 +00:00
Seungha Yang 347ad181be d3d11memory: Update alloc_wrapped() API to avoid staging texture alloc
Add size parameter and use it for CPU accessible memory size
instead of allocating staging texture per API call.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2713>
2022-07-04 18:46:51 +00:00
Ignazio Pillai 76dbe45b83 wasapi: Implement default audio channel mask
Some multichannel capture devices does not provide a channel mask value
which will result in a pipeline failure due to the empty channel mask.

Implemented the same fix used for wasapi2

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2692>
2022-07-04 08:56:15 +00:00
Matthew Waters b06a97c429 examples/webrtc/signalling: Fix compatibility with Python 3.10
- ssl module requires an explicit TLS_SERVER role
- asyncio throws a deprecation warning when using
  asyncio.get_event_loop().  Remove custom event loop handling entirely
- No need to keep the websocket server in a member variable, can use
  a future to signal exit case along with the async with context manager
  of websockets.serve()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2698>
2022-07-04 03:17:15 +00:00
fduncanh 735723c230 v4l2videodec: replace multiple decoder bug warnings with single one
Achieve this by dropping frames after a drain if the driver failed to so.
This works around RaspberryPi driver issue [1].

[1] https://github.com/raspberrypi/linux/issues/5059#issuecomment-

Fixes #1103

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2518>
2022-07-02 23:56:00 +00:00
Seungha Yang 5f39388ae5 d3d11videosink: Add support for rotation
Adding "rotate-method" property

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1396
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2708>
2022-07-02 20:40:37 +00:00
Seungha Yang 4e75ca0351 d3d11videosink: Protect window with lock at every place
Access to the object should be thread safe to support runtime
property update

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2708>
2022-07-02 20:40:37 +00:00
Seungha Yang 60e6be7068 d3d11convert: Add support for GstVideoOrientationMethod
Add flip/rotation support via GstVideoDirectionInterface

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2708>
2022-07-02 20:40:37 +00:00
Seungha Yang f549575ce8 d3d11converter: Add support for GstVideoOrientationMethod
Shader can handle rotation/flip with other conversions
at once in a single pipeline, and depending on device
capability, videoprocessor may support it too.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2708>
2022-07-02 20:40:37 +00:00
Tim-Philipp Müller 90090dc13b tests: udpsink: make test work in environments without IPv6
Part-fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/939

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2659>
2022-07-02 11:57:31 +00:00
Seungha Yang 5eeec16502 d3d11videosink: Use single GstD3D11Converter object
GstD3D11Converter supports videoprocessor and texture upload.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2697>
2022-07-02 05:40:47 +09:00
Seungha Yang 46a3394581 d3d11memory: Add private method for texture wrapped memory allocation
Unlike public method gst_d3d11_allocator_alloc_wrapped(), newly
added method by this commit will not calculate CPU accessible memory
size, since staging texture must be allocated to calculate the size.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2697>
2022-07-02 05:37:55 +09:00
Seungha Yang 3919491eb2 d3d11: Use library private header in plugin
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2697>
2022-07-02 05:37:55 +09:00
Seungha Yang 9709bcf3fe d3d11compositor: Use single GstD3D11Converter object
... and remove unnessary videoprocessor/upload/copy code

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2697>
2022-07-02 05:37:55 +09:00
Seungha Yang 993b9b36db d3d11convert: Add border-color property
Use user specified border-color instead of black color

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2697>
2022-07-02 05:37:55 +09:00
Seungha Yang 6a59dd95e8 d3d11convert: Use single GstD3D11Converter object
... and don't use GstD3D11VideoProcessor. Now GstD3D11Converter will
be able to convert using videoprocessor, and texture upload is also supported by
GstD3D11Converter. All the noisy code can be removed therefore.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2697>
2022-07-02 05:37:55 +09:00
Seungha Yang 91a732fe90 d3d11converter: Add support conversion using videoprocessor
* Add videoprocessor feature to d3d11converter, in order to unifiy
  conversion flow.
* Add convert_buffer() method to support automatic shader/videoprocessor
  selection. The method also supports texture upload if input memory
  cannot be used for conversion (e.g., system memory or so)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2697>
2022-07-02 05:37:55 +09:00
Seungha Yang fdbb9041a2 d3d11overlaycompositor: Objectify overlay render implementation
Be consistent with other implementations

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2697>
2022-07-02 05:37:27 +09:00
Seungha Yang b2d09de899 d3d11: Don't use const pointer to GstDxgiColorSpace
Instead, fill values of passed GstDxgiColorSpace struct

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2697>
2022-07-01 19:34:16 +00:00
Tim-Philipp Müller f19f579712 samiparse: clean up some GString usage
There's no need to re-assign the return value of
g_string_append_*() functions and such to the variable
holding the GString. These return values are just for
convenience so function calls can be chained. The actual
GString pointer won't change, it's not a GList after all.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2685>
2022-07-01 17:24:52 +00:00
Tim-Philipp Müller 270d23c8e0 samiparse: micro-optimise entity handling
Avoid relocations and hard-code entity string length
in the struct, since we basically get it for free here.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2685>
2022-07-01 17:24:52 +00:00
Tim-Philipp Müller 84a3b0ef87 samiparse: fix handling of self-closing tags
We would check the wrong string (rest of line rather than element)
for the / suffix of self-closing tags, which is not only wrong but
also has atrocious performance with certain strings like the garbled
nonsense clusterfuzz feeds us, which might cause discoverer to time
out when processing garbled SAMI files.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2685>
2022-07-01 17:24:52 +00:00
Jan Schmidt 79d8b435d7 Revert "glupload: Fix caps query with no filter"
This reverts commit 6f9ae5d758.

The _transform_caps() function can't tell the difference
between the caller wanting to know the output caps
for the current method, or all possible output caps. If
it includes caps for all possible methods, glupload can
end up negotiating and sending the wrong output caps
downstream.

Partially reverts !2687
Fixes #1310

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2699>
2022-07-02 00:05:53 +10:00
Sebastian Dröge 2aae64edb9 decklinkvideosink: Pass video frames directly to the Decklink SDK without copying
If the video frame is stored in PBO memory then we need to copy anyway as
it might be stored in CPU-accessible GPU memory that can't be accessed
from the Decklink driver.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2674>
2022-07-01 08:46:48 +00:00
Vincent Cheah Beng Keat 5ffaf2aa09 msdkmjpegdec: Add support for error report
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2401>
2022-07-01 06:29:30 +00:00
Sebastian Dröge d090e2c343 glvideomixer: Only consider property changes a geometry change if there as an actual change
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2669>
2022-07-01 05:41:57 +03:00
Sebastian Dröge 3a252f3d87 glvideomixer: Add crop-{left,right,top,bottom} pad properties for cropping inputs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2669>
2022-07-01 05:41:57 +03:00
Seungha Yang 30c8dbe032 nvencoder: Add support for dynamic GPU device selection
Adding nvautogpu{h264,h265}enc class which will accept upstream logical
GPU device object (GstCudaContext or GstD3D11Device) instead of
using pre-assigned GPU instance.

If upstream logical GPU device object is not NVENC compatible
(e.g., D3D11 device of non-NVIDIA GPU) or it's system memory,
then user specified "cuda-device-id" or "adapter-luid" property
will be used for GPU device selection.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2666>
2022-06-30 12:38:08 +00:00
Seungha Yang bcacfc7ced cuda: Protect gst_cuda_ensure_element_context() with lock
Serialize the order of context setup since it can be called
from multiple threads

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2666>
2022-06-30 12:38:08 +00:00
Seungha Yang ce82c0570e cuda: Add YUY2 and UYVY formats for GL interop
Those formats are not supported conversion formats by CUDA convert/scale elements
but would be useful for GL <-> CUDA interop use case.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2691>
2022-06-30 11:17:15 +00:00
Seungha Yang d9f08e17f1 cudadownload: Passthrough in case of CUDA -> SYSTEM
GstCudaMemory supports CPU access via CUDA pinned host memory already
and it would show faster memory transfer performance between
GPU and CPU than copying from/to normal system memory.
If downstream supports video meta, we can passthrough CUDA memory.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2690>
2022-06-30 10:45:45 +00:00
Sebastian Dröge a54eddad3a webrtcbin: Reject caps that are not valid for creating an SDP media.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2689>
2022-06-30 09:28:27 +00:00
Sebastian Dröge 3f71a467fc sdpmessage: Don't set SDP medias from caps without media/payload/clock-rate fields
Previously it would've silently failed reading the payload/clock-rate
and instead would've used some random value that happened to be on the
stack.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2689>
2022-06-30 09:28:27 +00:00
Jan Schmidt 6f9ae5d758 glupload: Fix caps query with no filter
If no filter caps are provided with a caps query, always
generate a full set of all caps from all upload methods,
not just the configured one. This is needed to handle
renegotiation when dealing with raw sysmem caps - as the upload
method might accept raw sysmem caps, but only the raw data
uploader adds those to the caps query.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2687>
2022-06-30 08:52:04 +00:00
Jan Schmidt de0e4b8fd6 Revert "glupload: allow system memory for dmabuf in transform_caps"
This reverts commit f3292dc156.

Only the raw data uploader should add sysmem caps to the
actual caps query, because we want them to be at the
lowest priority. If upstream does select to send raw
caps, then the correct upload method will still
be chosen because the accept_caps implementation
will accept them

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2687>
2022-06-30 08:52:04 +00:00
Jan Schmidt 342f02015b gl: Don't use the full transform_caps() method for reconfiguration check
When checking if we need to reconfigure when uploading, check
specifically the output caps of the current method will
result in compatible/incompatible caps, not the full set
of output caps from all upload methods.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2687>
2022-06-30 08:52:04 +00:00
Corentin Damman ae781610c8 cudaformat: add support for planar 4:2:2 YUV formats in CUDA D3D11 interop
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2269>
2022-06-30 07:30:09 +00:00
Corentin Damman 8678fc999a cudamemory: add support for planar 4:2:2 YUV formats
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2269>
2022-06-30 07:30:09 +00:00
Sebastian Dröge 7064404b1e video: Include new video-sei.h in video.h
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2688>
2022-06-30 08:42:43 +03:00
Sebastian Dröge de30de865c tracing: add hooks for gst_pad_chain() / gst_pad_chain_list()
This allows tracing buffers when they arrive in a pad instead of just
when they are pushed out of a pad.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2682>
2022-06-29 21:05:14 +00:00
fduncanh dfeb8198e4 v4l2videodec: replace multiple decoder bug warnings by a single warning
(warning due to incorrectly dropped frames at initial caps adjustment)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2517>
2022-06-29 19:50:15 +00:00
Benjamin Gaignard d3a01eccae v4l2codecs: enumerate all possible formats
Some decoder may also allow to (down) scale the decoded video.
Use VIDIOC_ENUM_FRAMESIZES iotcl to enumerate the possible output
formats resolutions.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2589>
2022-06-29 19:18:16 +00:00
Seungha Yang 85fe9fb61d nvcodec: Add cuda-device-id read-only property to stateless decoders
... and remove unnecessary intermediate subclass from class hierarchy

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2665>
2022-06-30 01:54:17 +09:00
Seungha Yang 1e11c05591 nvcodec: Add cuda-device-id read-only property to CUVID decoders
Similar to the other hardware decoder plugins, provides assigned
device id via property

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2665>
2022-06-30 01:45:20 +09:00
Jan Schmidt 0af4a53bc2 adaptivedemux2: Ignore stopped stream flow state
When calculating the combined stream flow state
for a period, don't consider stopped streams.

Fixes switching to the next period in DASH streams
with multiple video/audio/subtitle streams.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2684>
2022-06-29 16:35:26 +01:00
Jan Schmidt a369448b0c adaptivedemux2: Clean up stream parsebins on finalize
Remove the parsebin for a stream from the overall
bin when cleaning up the stream, to avoid
keeping around old ones when moving between periods

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2676>
2022-06-29 14:33:30 +00:00
Jan Schmidt 63d3ba4dfb adaptivedemux2: Fix memory leaks and use-after-free
Fix various small memory leaks, and an invalid
access to GstEvent after giving away the ref
via gst_pad_push_event()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2676>
2022-06-29 14:33:30 +00:00
Jan Schmidt 4b7622b377 hlsdemux2: Fix potential segfault
Fix a potential segfault if we receive a ISO-FF stream
with moof before moov.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2676>
2022-06-29 14:33:30 +00:00
Jan Schmidt b2944c36ca hlsdemux2: Fix memory leaks
Clean up various memory leaks

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2676>
2022-06-29 14:33:30 +00:00
Jan Schmidt 76e0333213 hlsdemux2: Free current_segment on finalize
Avoid a memory leak by making sure to release the
current segment on exit if non-NULL

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2676>
2022-06-29 14:33:30 +00:00
Tim-Philipp Müller 9272943bc7 coding style: allow declarations after statement
See https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1243/
and https://gitlab.freedesktop.org/gstreamer/gstreamer-project/-/issues/78

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2683>
2022-06-29 13:40:25 +00:00
Seungha Yang 38e142db9a d3d11convert: Add support for GstVideoCropMeta
Performs crop, scale, and color space conversion all in
a single render pipeline. Note that cropping related property is not
added in this element (which will make negotiation very complicated),
but user can configure videocrop element for crop meta to be attached
on each buffer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2678>
2022-06-29 09:43:10 +00:00
Seungha Yang 1043481247 d3d11videosink: Fix for force-aspect-ratio setting when rendering on shared texture
Set specified force-aspect-ratio value on window object
in case of shared texture rendering as well

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1304
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2671>
2022-06-29 09:04:33 +00:00
Seungha Yang 236378c9d5 mfvideoenc: Fix broken encoding when resolution is not an even number
Width and height values of 4:2:0 subsampled YUV format should be even number,
and if it's not the case, there should be padding which is not a contiguous memory layout.
Do copy input frames to MediaFoundation's memory in that case for now.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1165
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2661>
2022-06-29 08:26:45 +00:00
James Hilliard 4902076968 videorate: remove property-value quotes
Fixes warnings like:
Received a structure string that contains '="0.5"'. Reading as a gdouble value, rather than a string value. This is undesired behaviour, and with GStreamer 1.22  onward, this will be interpreted as a string value instead because it is wrapped in '"' quotes. If you want to guarantee this value is read as a string, before this change, use '=(string)"0.5"' instead. If you want to read in a gdouble value, leave its value unquoted.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2621>
2022-06-29 00:36:17 +00:00
Jan Schmidt 61e4f058ef adaptivedemux2: track: Fix buffering time calc before output
Use the lowest track input time as the output
time when calculating track buffering levels
before anything has been dequeued.

Fixes multi-period DASH not advancing to the
next period in some cases.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2650>
2022-06-28 18:34:31 +00:00
Jan Schmidt 16a04f7697 adaptivedemux2: track: Add period number to most debug statements
Store the period number the track belongs to, and
add it in various debug statements

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2650>
2022-06-28 18:34:31 +00:00
Jan Schmidt e1559d26d0 adaptivedemux2: stream: Don't take TRACKS_LOCK when sending EOS event
The stream tracks list can't change while we're
iterating it from the scheduling thread,
and the event handler immediately takes the
tracks lock, causing a deadlock.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2650>
2022-06-28 18:34:31 +00:00
Edward Hervey e9f8c7d33a hlsdemux2: Improve media playlist updates
* When dealing with rendition streams, we attempt to synchronize the media
  playlist against the variant stream. This helps with speeding up the correct
  initial fragment search and avoids issues when streams at activated at a much
  later time.
* Also add checks for variant stream existence before attempting to use them

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2679>
2022-06-28 17:59:24 +00:00
Edward Hervey 0a658840da hlsdemux2: Only seek on selected streams
When handling seeks, there is no need to seek on unselected streams. If they
later get activated they will be properly seek onto

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2679>
2022-06-28 17:59:24 +00:00
Edward Hervey 787dbfd4e4 tests: check: Update hlsdemux2 tests for playlist changes
We no longer do auto-magic fallbacks when synchronizing a disconnected
playlist. It is handled at a higher level.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2679>
2022-06-28 17:59:24 +00:00
Edward Hervey 34a7710762 hlsdemux2: Fix debug return statement
Due to latest commits res could have been NULL.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2679>
2022-06-28 17:59:24 +00:00
Edward Hervey 82bd65e711 hlsdemux2: No longer re-add segments from before the playlist
When updating playlists, there is a possibility that the playlists don't
perfectly align, but the last entry of the previous playlist is *just* before
the first entry of the new playlist.

In those cases, we still can transfer the timing information from one playlist
to another, but we do not want to return that segment as being the matching one.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2679>
2022-06-28 17:59:23 +00:00
Edward Hervey b9effe04e3 hlsdemux2: Use variant stream as support for synchronizing playlists
When matching playlists, there is a possibility that rendition streams will not
have been updated in time (for example because that stream started later, or
playback was paused). This would cause several playback failures and seeking
failures.

In order to still fall back on our feet, attempt to synchronize that rendition
playlist against the current variant playlist. This will attempt to match the
stream time using SN/DNS/PDT/...

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2679>
2022-06-28 17:59:23 +00:00
Edward Hervey 87ab729551 hlsdemux2: Detect synchronization loss
If we have been updating too slowly and have gone out of the current live
window, inform the baseclass accordingly.

This is different from the case where we have been updating quicker than what
the server provides.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2679>
2022-06-28 17:59:23 +00:00
Edward Hervey 9cdadf6d08 hlsdemux2: More improvement/fixes to position tracking
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2679>
2022-06-28 17:59:23 +00:00
Edward Hervey d88d7d5b55 adaptivedemux2: Handle loss of synchronization
Add a new custom GstFlowReturn so that subclasses can notify that they have lost
live synchronization.

When that happens, do a flushing seek back to the live position

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2679>
2022-06-28 17:59:23 +00:00
Edward Hervey 37b17ba0eb adaptivedemux2: Fix SNAP seek handling
* Since only flushing seeks are allowed, the "current" position is always the
  global output position (and not "some" stream current position).

* In terms of figuring out to which stream to "snap" to, we can send it to any
  selected stream. Removes the requirement of this function to a specific output
  pad.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2679>
2022-06-28 17:59:23 +00:00