Commit graph

671 commits

Author SHA1 Message Date
Matthew Waters 8c35850f23 rtpbin: fix leak of pad when a fec encoder and aux sender a created
The ghost sink pad retrieved by rtpbin from the aux sender was not freed
when there was a previous element (fec encoder) in the chain.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1222>
2021-10-21 13:46:03 +00:00
Matthew Waters 9f79ab8b0b vulkan/swapper: add some debug logging for surface size and present modes
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1219>
2021-10-21 11:32:04 +00:00
Jan Alexander Steffens (heftig) be3c60eb1f interlace: Replace custom lock with object lock
The object lock is sufficient for the task of protecting against
object property data races.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1039>
2021-10-21 10:50:17 +00:00
Jan Alexander Steffens (heftig) 2bf6e2a20e interlace: Protect all properties with the lock
Avoid blatant data races here.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1039>
2021-10-21 10:50:17 +00:00
Jan Alexander Steffens (heftig) 683680f6e5 interlace: Reset src_fps_d together with src_fps_n
These fields belong together.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1039>
2021-10-21 10:50:17 +00:00
Jan Alexander Steffens (heftig) 342763a158 interlace: Clear stored_fields together with stored_frame
These fields belong together.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1039>
2021-10-21 10:50:17 +00:00
Jan Alexander Steffens (heftig) fcaf5b0f0b interlace: Reset after changing state to READY
Trying to reset before the pads have been deactivated races with the
streaming thread. There was also a buggy buffer clear leaving a dangling
`stored_frame` pointer around. Use `gst_interlace_reset` so this happens
properly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1039>
2021-10-21 10:50:17 +00:00
Mathieu Duponchelle 2f8030d98b nvh264enc: add constrained-baseline to the caps profiles
In practice, when baseline is requested from the encoder it
produces constrained baseline, and it is already reflected
in the profile-iop flags.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1213>
2021-10-21 09:06:08 +00:00
Seungha Yang 8b6c3e030b mediafoundation: Fix for UWP build
We don't support D3D11 interop for UWP because some APIs
(specifically MFTEnum2) are desktop application only.
However, the code for symbol loading is commonly used by both UWP and WIN32.
Just link GModule unconditionally which is UWP compatible, and simply don't
try to load any library/symbol dynamically when D3D11 interop is unavailable.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1216>
2021-10-21 05:11:40 +00:00
Tim-Philipp Müller 89ec0beeb5 docs: remove mms plugin from symbol index
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1211>
2021-10-20 17:05:34 +00:00
Tim-Philipp Müller 9a4651e387 mms: remove mmssrc plugin
Doubtful that anyone still needs that or there are even
any streams left out there.

MMS was deprecated in 2003 (in favour of RTSP) and support for
it was dropped with Microsoft Media Services 2008.

https://en.wikipedia.org/wiki/Microsoft_Media_Server
https://sdp.ppona.com/news2008.html

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1211>
2021-10-20 17:05:34 +00:00
Guillaume Desmottes 47445980a9 streamsynchronizer: set running time offset on events
It's cleaner and more generic than overriding the qos events.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1210>
2021-10-20 14:27:58 +00:00
Guillaume Desmottes 3ef2cacdd4 concat: fix qos event handling
We were shadowing the sinkpad variable resulting in:
- the QoS event to be send to all sink pads instead of the active one
- the pad to be leaked

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1208>
2021-10-20 13:39:03 +00:00
Tim-Philipp Müller e0f336c1b4 meson: va, msdk: simplify dep.get_variable() use
With recent Meson versions we can just write dep.get_variable('foo')
instead of dep.get_variable(pkgconfig: 'driverdir', internal: 'driverdir').

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1183>
2021-10-20 11:20:44 +00:00
Tim-Philipp Müller 081cada7cb meson: fix use of deprecated meson api external_program.path()
Just using .full_path() instead.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1183>
2021-10-20 11:20:44 +00:00
Tim-Philipp Müller 8dfab0b08c meson: update for meson.build_root() and .build_source() deprecation
-> use meson.project_build_root() or .global_build_root() instead.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1183>
2021-10-20 11:20:44 +00:00
Tim-Philipp Müller f1bb2c76c6 meson: update for dep.get_pkgconfig_variable() deprecation
... in favour of dep.get_variable('foo', ..) which in some
cases allows for further cleanups in future since we can
extract variables from pkg-config dependencies as well as
internal dependencies using this mechanism.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1183>
2021-10-20 11:20:44 +00:00
Tim-Philipp Müller 531aa4064a meson: clean up conditional paths after version bump
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1183>
2021-10-20 11:20:44 +00:00
Rafał Dzięgiel c016bed943 assrender: fix smooth scaling by disabling hinting
When ass hinting value is set to anything other than NONE,
subtitles cannot use smooth scaling, thus all animations will jitter.

The libass author warns about possibility of breaking some scripts when it is enabled,
so lets do what is recommended and disable it to get the smooth scaling working.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1201>
2021-10-20 09:57:43 +00:00
Thibault Saunier 95c1f67d69 discoverer: Set number to stream infos
The idea is that we can reference to streams using this unique number,
within the context of that discoverer info. That number should always
be usable to reference the streams for a specific stream.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/897>
2021-10-20 09:16:38 +00:00
Edward Hervey 879526b2e2 discoverer: Don't ref NULL taglist
Fixes warning introduced in 064f7bbbfa

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1200>
2021-10-20 09:47:29 +02:00
Edward Hervey b23148fa31 integration/ges: Ignore GstStream for validate tests
Requires the ges runner to be configured in such a way that the resulting
stream-id is consistent (and therefore can be checked)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1187>
2021-10-20 05:53:20 +00:00
Edward Hervey 08dc5d2961 stream: Set the object name to the stream id
Makes it more meaningful in debug logs (instead of streamNNNNN)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1187>
2021-10-20 05:53:20 +00:00
Tim-Philipp Müller c95a7ab1ca docs: remove mention of mms from docs and mmssrc from tutorials
Prerequisite for our removing it from the cerbero build, see
https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/760

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1199>
2021-10-20 00:40:22 +00:00
Olivier Crête 0dbe0e21fe rtphdrext-clientaudiolevel: Rename RFC 6464 element
Multiplying elements named after RFC numbers is confusing,
so let's give them meaningful names.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1125>
2021-10-20 00:03:09 +00:00
Seungha Yang 3e9800a513 subprojects: Update ogg and vorbis wraps
... to 1.3.5-2 and 1.3.7-2, respectively. Specifically to fix
ogg/vorbis plugin loading on Windows devenv environment.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1196>
2021-10-19 17:42:21 +00:00
Xavier Claessens 2a10311ef5 Revert "meson: Link to objects instea of static helper library"
This reverts commit b19de413b9.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1194>
2021-10-19 16:56:35 +00:00
Xavier Claessens eb072600a6 Revert "audio: Merge simd libs into the main one"
This reverts commit 4d3a200358.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1194>
2021-10-19 16:56:35 +00:00
Sebastian Dröge 7cb2dff830 video-overlay-composition: Fix constructor guard to actually allow NULL as parameter
And don't use a NULL rectangle later.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1195>
2021-10-19 14:13:24 +00:00
Matthew Waters d495154068 gl/eagl: fix eagl display creation
The GstGLDisplayType of the display was win32 instead of the required eagl.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1188>
2021-10-19 09:34:43 +00:00
Jan Schmidt 6cada5b064 qtdemux: Add support for wvtt (WebVTT) subtitles.
WebVTT in ISO MP4 is specified in ISO 14496-30,
and needed for DASH support. It's stored in an
mp4 specific format. To handle it compatibly,
the wvtt boxes are converted back into WebVTT text
and pushed as application/x-subtitle-vtt

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1182>
2021-10-19 08:56:58 +00:00
Jan Schmidt 41d6f47f2b isomp4: Split buffer process functions.
Split the different handling for closed captions, VobSub subpicture
and timed text samples into separate simplified process functions.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1182>
2021-10-19 08:56:58 +00:00
Jan Schmidt c47c6b4c2b isomp4: Use a function pointer for buffer splitting.
Swap the `need_process` boolean check on qtdemux streams
for a direct function pointer to the splitting function,
so we can stop adding extra cases to the single growing
`gst_qtdemux_process_buffer()` function.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1182>
2021-10-19 08:56:58 +00:00
Jan Alexander Steffens (heftig) df403df2ca srt: Plug leak of headers
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1040>
2021-10-19 07:19:41 +00:00
Matthew Waters 49af6a831d tests/rtp/payload: add test for shrinking extension data
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1146>
2021-10-19 03:26:57 +00:00
Matthew Waters b7d4d371f9 rtp: also support shrinking the extension data
Currently the extension data length specified in the RTP header would
say it was shorter then the data serialised to a packet. When
combining the resulting buffer, the underlying memory would still
contain the extra (now 0-filled) padding data.

This would mean that parsing the resulting RTP packet would potentially
start with a number of 0-filled bytes which many RTP formats are not
expecting.

Such usage is found by e.g. RTP header extension when allocating the
maximum buffer (which may be larger than the written size) and shrinking
to the required size the data once all the rtp header extension data has
been written.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1146>
2021-10-19 03:26:57 +00:00
Jan Alexander Steffens (heftig) 320bc6362b mpegtsmux: Avoid crash when best pad gets flushed
The 'best' pad might receive a flush event between us picking it and us
popping the buffer. In this case, the buffer will be missing.

Similar to https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/711

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1042>
2021-10-19 01:46:19 +00:00
Tim-Philipp Müller bb19b5aa96 vorbisdec: don't emit g_warning() on malformed input data
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1009>
2021-10-19 00:12:25 +00:00
Tim-Philipp Müller 2a2d6f7efe theoradec: don't emit g_warning() on malformed input stream
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1009>
2021-10-19 00:12:25 +00:00
Tim-Philipp Müller 5660743bbf subparse: don't use g_warning() for malformed input
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1009>
2021-10-19 00:12:25 +00:00
Tim-Philipp Müller 817cb23b9c tools: Define G_LOG_DOMAIN for various tools as well
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1009>
2021-10-19 00:12:25 +00:00
Tim-Philipp Müller 3603d94080 rtsp-server: define G_LOG_DOMAIN
Fixes #634

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1009>
2021-10-19 00:12:25 +00:00
Tim-Philipp Müller be3b71d6c9 gst-plugins-bad: define G_LOG_DOMAIN for all libraries
Fixes #634

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1009>
2021-10-19 00:12:25 +00:00
Tim-Philipp Müller cf9be70946 gst-plugins-base: define G_LOG_DOMAIN for all libraries
Fixes #634

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1009>
2021-10-19 00:12:25 +00:00
Tim-Philipp Müller 16e7048d82 gstreamer: define G_LOG_DOMAIN for all libraries
And get rid of weird way the define was done for core.

Fixes #634

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1009>
2021-10-19 00:12:25 +00:00
Tim-Philipp Müller fbf02b6802 libs: check: handle criticals and warnings for new gstreamer log domains
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1009>
2021-10-19 00:12:25 +00:00
Antonio Ospite 7f001b6311 aes: specify the required OpenSSL version
The code in the aes elements assumes OpenSSL >= 1.1.0:

  - implicit library initialization;
  - version retrieved with OpenSSL_version(OPENSSL_VERSION);

and it fails to build with older versions.

Specify the required OpenSSL version explicitly in meson.build so that
the elements are excluded on older systems (e.g. Ubuntu 16.04) and the
rest of GStreamer can still build.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1067>
2021-10-18 23:25:50 +00:00
Mathieu Duponchelle c3d878e990 audio/video aggregator: make use of new aggregator inactive pad API
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/867>
2021-10-18 22:34:11 +00:00
Mathieu Duponchelle f829ed3313 aggregator: expose API for ignoring inactive pads
An inactive pad is a pad which, in live mode, hasn't yet received
a first buffer, but has been waited on at least once.

Exposing API to support this behaviour allows users of aggregator
subclasses to request pads, and not start pushing data on those
immediately, while avoiding systematic timeouts.

Subclasses must check in explicitly to this behavior, most likely
by exposing a user-facing property, and must check whether a pad
needs ignoring when aggregating. That is because by design,
aggregator subclasses don't get a list of "ready" pads, but instead
directly iterate element->sinkpads.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/867>
2021-10-18 22:34:11 +00:00
Tim-Philipp Müller 3809b9dca4 docs: tutorial 1: error out if an error occurred in Hello World tutorial
Very confusing if it just exits silently with exit code 0 on error.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1185>
2021-10-18 22:21:40 +00:00
Philippe Normand 064f7bbbfa discoverer: Advertise container-specific tags with a new API
Since commit a55dafe341, stream-scoped tags no
longer appeared as top-level tags, introducing a behaviour regression, specially
for MP3 files.

The `gst_discoverer_info_get_tags()` API now returns all tags detected for the
given media, as documented.

A new API is introduced to get container-specific tags,
`gst_discoverer_container_info_get_tags()`. The discoverer tool was adapted to
use it. `gst_discoverer_info_get_tags()` is now deprecated in favor of
`gst_discoverer_container_info_get_tags()` and
`gst_discoverer_stream_info_get_tags()`.

Fixes #759

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1107>
2021-10-18 20:08:35 +00:00
Víctor Manuel Jáquez Leal 5c6b641ae3 vadeinterlace: Accept ANY feature.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1024>
2021-10-18 19:14:15 +00:00
Víctor Manuel Jáquez Leal bf1b03e5cb vadeinterlace: Fixate interlace-mode and framerate accordingly.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1024>
2021-10-18 19:14:15 +00:00
Víctor Manuel Jáquez Leal 10e5db047a vapostproc: Accept ANY feature.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1024>
2021-10-18 19:14:15 +00:00
Víctor Manuel Jáquez Leal 7e53161ea5 vapostproc: Traverse caps features in gst_va_vpp_caps_remove_fields()
The previous code had a potential failure for multiple caps features. Now
each caps feature in each structure is reviewed, and if it has a supported
feature, the structure is processed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1024>
2021-10-18 19:14:15 +00:00
Víctor Manuel Jáquez Leal c00ad9e70c vapostproc: Refactor gst_va_vpp_complete_caps_features()
gst_va_vpp_complete_caps_features() now receives the @feature_name to
add and return if @caps doesn't provide it.

So, instead of two nested loops, now the function is a single loop,
traversing @caps to find if each structure already contains the requested
@features_name.

It's important to add missing caps features with @caps, in order to
not lost information.

The function caller does the external loop by calling per each
available caps feature.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1024>
2021-10-18 19:14:15 +00:00
Víctor Manuel Jáquez Leal d12991c979 vapostproc: Split caps transform in two phases.
In order to make more readable the caps transformation, the operation
was split in two phases:

1. Rangify the supported caps structures.
2. Add the missing (and supported) caps features.

Step 1 modified its logic, by copying any unrecognized structure.
It's a previous step required for allowing ANY caps feature as
passthrough.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1024>
2021-10-18 19:14:15 +00:00
Vivia Nikolaidou 6bf36f6e0f tsdemux: Change many GST_{DEBUG, LOG, etc} into _OBJECT
Log files with several demuxers running at once can otherwise get
confusing

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1096>
2021-10-18 18:34:04 +00:00
Vivia Nikolaidou 300e784a20 tsdemux: Issue GST_ELEMENT_WARNING for continuity errors
The application might want to make use of these.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1096>
2021-10-18 18:34:04 +00:00
Tim-Philipp Müller 0a25f22f1b meson: bump meson requirement to >= 0.59
For monorepo build and ugly/bad, for advanced feature
option API like get_option('xyz').required(..) which
we use in combination with the 'gpl' option.

For rest of modules for consistency (people will likely
use newer features based on the top-level requirement).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1084>
2021-10-18 18:03:19 +01:00
Tim-Philipp Müller d4bdbeaa0d meson: add 'gpl' option and only build plugins with (A)GPL deps if explicitly enabled
Require explicit opt-in to build plugins with (A)GPL dependencies.

Keep ugly/bad options on 'auto' for now so cerbero doesn't fail.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1084>
2021-10-18 18:03:19 +01:00
Vivia Nikolaidou 95eb8672a6 basetsmux: Support for caps changes
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/981>
2021-10-18 15:37:41 +00:00
Jan Alexander Steffens (heftig) a8ebf72627 basetsmux: Clean up gst_base_ts_mux_create_stream
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/981>
2021-10-18 15:37:40 +00:00
Vivia Nikolaidou 273e2a1db6 mpegtsbase: Search SCTE-35 DRF_ID_CUEI in multiple registration descriptors
There are streams in the wild that have to add a SCTE-35 trigger in
another e.g. GA94 stream. Most encoders would replace the GA94
descriptor ID with the CUEI one temporarily, but there are some that
will add two registration ID descriptors, one with GA94 and one with
CUEI.

Failing to parse the CUEI registration ID in that case would return
FALSE in _stream_is_private_section , therefore setting it as known PES
and pushing packets downstream instead of calling handle_psi.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/979>
2021-10-18 13:58:39 +00:00
Thibault Saunier 156f2543ca smartencoder: Force reencoding of vp9 for profiles can't support
If the input file is in a profile we won't be able to output (1 or 3 in BGR
format), simply reencode everything for now.

Once we add support for that case we can remove that code

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1062>
2021-10-18 10:11:08 -03:00
Thibault Saunier fec6270205 encoding-profile: ignore more fields when creating for discover info
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1062>
2021-10-18 10:11:08 -03:00
Thibault Saunier e9fdfade61 smartencoder: Always plug a vp9parse when encoding vp9
This way we know that all relevant fields about video format are
added and we avoid renegotiation issues.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1062>
2021-10-18 10:11:08 -03:00
Thibault Saunier 20f6af7e3c qtmux: Allow more fields changes renegotiating h264
And consider interlace-mode=progress as equivalent to the field not
being specified.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1062>
2021-10-18 10:10:24 -03:00
Thibault Saunier 32a88fe16f matroskamux: Ignore some fields when renegotiating
Those values are never used in the muxer so we should not fail the
negotiation if those are changing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1062>
2021-10-18 10:10:24 -03:00
Thibault Saunier 32d36d0e89 smartencoder: Fix renegotiating when reencoding parts of the stream with vpx
In the encoded streams we might not have all the information about the
raw video stream, but when reencoding they end up being specified, even
if those are default values.

As vp8 decoders always output frames in some YUV color space we can
ensure that when upstream doesn't specify any value in its caps we
use the default one which is what we end up doing when decoding/reencoding
anyway, so this way downstream (matroskamux in that case) doesn't need
to be able to renegotiate (which it doesn't).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1062>
2021-10-18 10:10:24 -03:00
Edward Hervey d9b1e1e99f tsdemux: Improve gap detection
We should also take into account whether data is currently pending when checking
for gap on streams. It could very well be that some streams have very low
bitrate (and spread out) data. For those we don't want to push out a gap event.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1179>
2021-10-18 11:23:25 +00:00
Edward Hervey 0ff569d408 tsdemux: Handle "negative" timestamps
This is only enabled in push time mode. Furthermore it's only enabled for now if
PCR is to be ignored.

The problem is dealing with streams where the initial PTS/DTS observation might
be greater than following ones (from other PID for example). Before this patch,
this would result in sending buffers without any timestamp which would cause a
wide variety of issues.

Instead, pad segment and buffer timestamps with an extra
value (packetizer->extra_shift, default to 2s), to ensure that we can get valid
timestamps on outgoing buffers (even if that means they are before the segment
start).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1179>
2021-10-18 11:23:25 +00:00
Edward Hervey 74e9d44db3 tsdemux: Handle streams with bogus PTS vs DTS
PTS and DTS should be within a reasonable distance of each other.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1179>
2021-10-18 11:23:25 +00:00
Edward Hervey 6efa9dc00e tsdemux: Handle PTS->TS at wraparound
This has been a FIXME for ages.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1179>
2021-10-18 11:23:25 +00:00
Rob Agar 66a24023c0 webrtcbin: fix prevention of webrtcbin deletion due to ref held by probe callback
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/810

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1150>
2021-10-18 10:42:12 +01:00
Seungha Yang be9cf6c9cd d3d11: d3d11{convert,scale}: Add add-borders property
Functionally identical to that of videoscale element.

When disabled, d3d11convert or d3d11scale element will scale
image without adding borders, meaning that display aspect ratio
will not be preserved.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1170>
2021-10-17 12:36:28 +00:00
Víctor Manuel Jáquez Leal ff0fae50af vapostproc: Add add-borders property to keep dar
Just as videoscale, it enables add-borders property (FALSE by default)
in vapostproc to add border, if necessary, to keep the display aspect
ratio from the original image.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1169>
2021-10-17 11:24:26 +00:00
Víctor Manuel Jáquez Leal 52c09778b7 vapostproc: Fix early fixation.
First copy missing fields and then fixate all remaining fields.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1169>
2021-10-17 11:24:26 +00:00
Tim-Philipp Müller e7c8b23b71 ofa: remove ofa audio fingerprinting plugin
I think the MusicIP database for this has been defunct for years,
so I can't imagine this plugin is particularly useful or still
used by anyone.

See https://musicbrainz.org/doc/Fingerprinting#PUID

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1153>
2021-10-17 10:17:00 +00:00
Seungha Yang 47a53f5063 meson: wasapi2,mediafoundation: Work around Windows SDK header issue
Some SDK headers are not standard compliant, so MSVC will
complain when such headers are in use with "/permissive-" compile
option. Use "/Zc:twoPhase-" to work around the issue as documented in
https://docs.microsoft.com/en-us/cpp/build/reference/permissive-standards-conformance?view=msvc-160#windows-header-issues

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1174>
2021-10-17 08:01:47 +00:00
Thibault Saunier e94e60c342 lame:meson: Avoid using fallback when we could use system install
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1176>
2021-10-17 01:59:35 -03:00
Tim-Philipp Müller 116bc128c1 subprojects: update vorbis wrap to 1.3.7 and add fallback url
The Windows CI runners complain about self-signed certificates
with the download.xiph.org urls.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1175>
2021-10-16 23:53:04 +01:00
Tim-Philipp Müller 8954d84025 subprojects: update ogg wrap to 1.3.5 and add fallback url
The windows ci runners complain about a self-signed certificate
with the download.xiph.org urls.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1175>
2021-10-16 23:51:18 +01:00
Thibault Saunier 12bd0f5907 validate:known_issues:rtsp: Mark error message on bus as known
See https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/814

And reindent file.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1171>
2021-10-16 11:43:13 -03:00
Thibault Saunier a75382eaff meson: Mark newly fdkaac/ogg/vorbis as allow fallback
This way when the dep is `auto` we will fallback if the system
dependency is not available.

And use https to get libvorbis

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1171>
2021-10-16 09:52:23 -03:00
Seungha Yang d0c86365d2 mediafoundation: Use GetProcAddress() for OS version dependent symbols
We are using some symbols which are not available on Windows 7,
specifically D3D11 interop related ones

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1167>
2021-10-16 18:07:06 +09:00
Víctor Manuel Jáquez Leal ee7af02c3e vapostproc: Transfer colorimetry at fixate if possible.
Taken from videoconvert element.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1110>
2021-10-16 05:17:19 +00:00
Thibault Saunier 08eac09c12 meson: Fix warning building GstGLEGL
We forgot to add the `GstGL` gir as a dependency which was properly
done for GstGLWayland and GstGLX11.

And document why we use a list for `all_libraries`

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1168>
2021-10-16 01:24:45 +00:00
Thibault Saunier f60af61bb7 meson: Support building lame as subproject
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1068>
2021-10-16 00:43:10 +00:00
Thibault Saunier cdf1e24121 meson: Add wrap for libvorbis and libogg
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1068>
2021-10-16 00:43:10 +00:00
Thibault Saunier d5da4b84f7 meson: Add wrap for fdkaac
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1068>
2021-10-16 00:43:10 +00:00
Thibault Saunier 81ab28e588 python:meson: Do not build plugin when statically built
It is not supported yet

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1093>
2021-10-15 20:27:35 -03:00
Thibault Saunier 4c8ebd5d73 python: Add an option to disable tests
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1093>
2021-10-15 20:27:35 -03:00
Thibault Saunier ba37e0aa2f ges:docs: Ignore GESImageSource as it is plain useless now
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1093>
2021-10-15 19:28:29 -03:00
Thibault Saunier 8b7b068d53 meson: Streamline the way we detect when to build documentation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1093>
2021-10-15 19:28:29 -03:00
Thibault Saunier 2fd461a032 validate:build: Disable static building validate tracer
It introduce duplication of symbols and we need to rework the way we implement it

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1093>
2021-10-15 19:27:30 -03:00
Thibault Saunier a7fd2762a6 ges:build: Disable python modules when statically building
Introspection fails otherwise

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1093>
2021-10-15 19:27:30 -03:00
Thibault Saunier 6e79932ad9 meson: List libraries and their corresponding gir definition
Introduces a `libraries` variable that contains all libraries in a
list with the following format:

``` meson
libraries = [
    [pkg_name, {
        'lib': library_object
        'gir': [ {full gir definition in a dict } ]
    ],
    ....
]
```

It therefore refactors the way we build the gir so that we can reuse the
same information to build them against 'gstreamer-full' in gst-build
when linking statically

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1093>
2021-10-15 19:27:30 -03:00
Thibault Saunier e2dd28a753 meson: Mark files as files()
Making it more robust and future proof

And fix issues that it creates

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1093>
2021-10-15 19:27:30 -03:00
Thibault Saunier 0e576127a5 bad:audio: Add generated files sources in declare_dependency
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1093>
2021-10-15 19:27:30 -03:00
Thibault Saunier 1babccfe50 python: Fix using overrides when not building PyGObject
Since 547570cd79 we do not always build
PyGObject and our development environment is broken when trying to use
GStreamer python when built against system PyGObject with the following
error importing Gst in there:

```
12345678** (gst-plugin-scanner:710617): CRITICAL **: 11:45:02.343: can't find gi.repository.Gst
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/gi/repository/__init__.py", line 23, in <module>
    from ..importer import DynamicImporter
  File "/usr/lib64/python3.9/site-packages/gi/importer.py", line 33, in <module>
    from .overrides import load_overrides
ImportError: cannot import name 'load_overrides' from 'gi.overrides' (/var/home/thiblahute/devel/gstreamer/gstreamer/subprojects/gst-editing-services/bindings/python/gi/overrides/__init__.py)
Factory Details:
```

The approach to fixing it is to implement override `gi` in
`gst-python/gi/` which we add to `PYTHONPATH`) and in there reset the
`gi` module to the right place and we get overrides from paths from
`_GI_OVERRIDES_PATH` we set in `gst-env.py` which points to all the
overrides that will be installed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1155>
2021-10-15 20:51:41 +00:00
Seungha Yang ba79339d56 mediafoundation: Fix various string constness handling
... with fixing typo (g_strup -> g_strdup)

Constness needs to be explicit in C++ world otherwise compiler
would complain about that.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1164>
2021-10-15 23:38:48 +09:00
Veronika Kremneva 1fdcbae677 gstreamer/gst/gstconfig.h.in: Add support for ARC64 architecture
Signed-off-by: Veronika Kremneva <kremneva@synopsys.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1161>
2021-10-15 10:22:56 +00:00
Rob Agar f48c8f4d17 missing transceiver unref in WebRTC renegotiation example
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1160>
2021-10-15 10:03:46 +01:00
He Junyan 18f97d703d Docs: Fix a typo for Intel's vaapi driver name.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1151>
2021-10-15 07:57:37 +00:00
Thibault Saunier a1dc45b654 wraps:ffmpeg: Move to 4.4
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1156>
2021-10-15 02:32:40 +00:00
Mengkejiergeli Ba b57df4cfd1 tests:va: Fix null ptr dereference in multi-vpp
Dereference the pointer err before null check, which raised a null
pointer dereference issue by Coverity. Modify it to do the null check
of err first, then dereference it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1143>
2021-10-15 00:45:45 +00:00
Mengkejiergeli Ba 4a6cc431d2 va: Fix null ptr dereference for vadeocder
Making a null check in gst_va_decode_picture_free () indicates pic->buffers or pic->slices
can be null, then in _destroy_buffers () the pointers are dereferenced, which is detected
as dereference after null check by Coverity. Thus, modify the code to do null check in
_detroy_buffers ().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1143>
2021-10-15 00:45:44 +00:00
Xavier Claessens d477c9e903 Pin all wrap files to closest tag or commit sha1
Tracking branches, especially master, can cause regressions at any time.
We should try to use as much stable release tags as possible in the
future.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1152>
2021-10-14 22:34:49 +00:00
Vivia Nikolaidou 23bf9f75b6 tsdemux: Handle delayed seek events
Store the event in case it cannot be processed immediately and process
it after the first segment has been produced.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/980>
2021-10-14 21:45:00 +00:00
Vivia Nikolaidou 5800ffea0f tsdemux: Protect demux->segment_event with a mutex
Would otherwise cause weird issues when processing a delayed seek event

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/980>
2021-10-14 21:45:00 +00:00
Piotrek Brzeziński a102444c90 video-converter: Fix v210->I420 last line conversion
Last line would not be converted correctly if height was an odd number.
Fixed by accounting for data type (8bit vs. 16bit) differences between
respective packing and unpacking functions.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/973>
2021-10-14 21:03:58 +00:00
Piotrek Brzeziński 33ccabd206 video-format: Clean up v210 packing code
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/973>
2021-10-14 21:03:58 +00:00
Piotrek Brzeziński 35a7b19381 video-converter: Add fast paths from I420/YV12, UYVY, Y42B and YUY2 to v210
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/973>
2021-10-14 21:03:58 +00:00
Nicolas Dufresne da464bde5f codecs: h264: Fix wrong type of ret variable
This ret is not a GstFlowReturn. This broke v4l2 decoder which does not
implement new_picture() virtual function.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1154>
2021-10-14 20:12:03 +00:00
Seungha Yang b3710aa68d d3d11: Rename screen capture element
Old name "desktopdup" may confuse users. Now it's renamed to
"screencapture"

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1136>
2021-10-14 15:15:56 +00:00
Thibault Saunier 9a183e45d4 validate:launcher: Reindent utils.py
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1121>
2021-10-14 12:59:29 +00:00
Thibault Saunier 004a83f82a validate:launcher: Check if the running MR will close a referenced issue
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1121>
2021-10-14 12:59:29 +00:00
Thibault Saunier 42501adc4c ci: Check for closed bugs for unit tests too
And add FIXMEs for test that should have been reenabled but haven't,
we will reenable them when CI is stable enough!

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1121>
2021-10-14 12:59:29 +00:00
Thibault Saunier 968ecbba54 tests: Move all unit tests issues to the GStreamer monorepo
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1121>
2021-10-14 12:59:29 +00:00
Thibault Saunier 2dacd33e9e transcoder: Set state back to NULL after run() finishes
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1063>
2021-10-14 12:04:45 +00:00
Thibault Saunier 07908ccead transcoder: Use full path for includes in 'gsttranscoder.h'
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1063>
2021-10-14 12:04:45 +00:00
Mengkejiergeli Ba 8f678c95d6 va:display: Don't close an fd with negative value
Cannot pass negative parameter to close() and thus no need to apply
close() when fd < 0.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1131>
2021-10-14 11:12:41 +00:00
Mengkejiergeli Ba 5e7aa06257 va: Fix error handling for decoder
Need to check if va decoder is closed successfully.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1131>
2021-10-14 11:12:41 +00:00
Mengkejiergeli Ba 2eaba0cefa va: Fix error handling for base transform
Need to check the returned value of gst_buffer_pool_set_active() when
setting the active status of buffer pool.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1131>
2021-10-14 11:12:41 +00:00
Matthew Waters ee1255079b gl/dmabuf: add some debug logging about why things may fail to be uploaded
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1145>
2021-10-14 07:41:44 +00:00
Matthew Waters 42597181e2 playbin2/3: autoplug/caps: don't expand caps to ANY
Retrieving the pad template caps from a ghost pad returns ANY which when
merged with any other caps will return ANY.  ANY is not very specific
and may cause suboptimal code paths in e.g. decoders that assume the
lowest common denominator when presented with ANY caps.

Fixes negotiating dma-buf with vaapidecodebin between glupload in the
video sink element.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1144>
2021-10-14 17:04:26 +11:00
Thibault Saunier 0a781424e6 meson:avtp: Error out if sock_txtime is not present and avtp is enabled
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1142>
2021-10-14 01:01:54 +00:00
Thibault Saunier 287814a83d Revert "tests: Blacklist some tests that recently failed"
This reverts commit 9f13ee5b0e as
it was merge as part of the bigger CI gardening MR
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1113

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1139>
2021-10-13 20:34:42 +00:00
Philippe Normand 8b553d5b32 soup-stub: Gate G_URI_FLAGS_SCHEME_NORMALIZE behind glib version check
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1138>
2021-10-13 19:24:02 +00:00
Thibault Saunier 7a25a4ce02 ges:test: Document some GES failures
Namely races in:
 * check.gst-editing-services.edit_while_seeked_with_stop_it
 * check.gst-editing-services.check_layer_activness_gaps_it

See https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/803
and https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/804

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1130>
2021-10-13 18:01:38 +00:00
Thibault Saunier 19c0921179 ges:tests: Create shorter assets to avoid timeouts
And use a simple GStreamer pipeline as testsrcbin with GstTranscoder
doesn't let us easily set the framerate of the source and we end up
having videorate dropping frames leading to the rendered file having
an unprecise duration.

This should fix races with `check.gst-editing-services.pythontests.pyunittest.python.test_assets.TestTimeline.test_reload_asset`

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1130>
2021-10-13 18:01:38 +00:00
Thibault Saunier fbee6c8b23 validate:launcher: Avoid spamming terminal when inspecting unit tests
And redirect GStreamer logs when necessary

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1130>
2021-10-13 18:01:38 +00:00
Thibault Saunier 34d05cd876 validate:launcher: Run validate unit tests as GstValidate tests
So we have all the features and we can properly document known issue
for them

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1130>
2021-10-13 18:01:38 +00:00
Seungha Yang 4dd0c6ce44 codecparsers: {h264,h265}parser: Fix typo around SEI nalu generator
Fix to create correct SEI nalu when the size of payloadType and/or
payloadType is larger than 255 (0xff)

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1601
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1106>
2021-10-13 17:21:52 +00:00
Stéphane Cerveau 7256ddb74a rebase-branch-from-old: few improvments
- Enhance the documentation
- Allow to revert cherry-pick
- coding style

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1094>
2021-10-13 17:03:09 +00:00
Seungha Yang 551239c618 validate: flow: Fix for line-ending mismatch issue on Windows
Unlike POSIX system, Windows distinguishes "w" and "wb" and when
a file is opened with text mode, OS will translate \n into \r\n.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1092>
2021-10-13 16:21:52 +00:00
Víctor Manuel Jáquez Leal a2aa2cda42 vapostproc: Negotiate interlaced.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1109>
2021-10-13 14:59:09 +00:00
Víctor Manuel Jáquez Leal 60be3dbd2a vapostproc: Copy missing fields at fixate.
When caps negotiation implies a caps feature change, some fields might
get lost. This patch brings them back from input caps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1109>
2021-10-13 14:59:09 +00:00
Víctor Manuel Jáquez Leal 5ae1072c2f vapostproc: Simplify size fixate.
gst_va_vpp_fixate_size() returned the fixated caps, but that is not
needed since `othercaps` are modified inline.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1109>
2021-10-13 14:59:09 +00:00
Víctor Manuel Jáquez Leal b53446ddc9 vapostproc: Simplify fixate.
The first approach to fixate was simply a copy&paste of both
videoconvert and videoscale, trying to keep their logic as isolated
as possible. But that brought duplicated and sparse logic.

This patch merge both approaches simplifying the fixate operation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1109>
2021-10-13 14:59:09 +00:00
Víctor Manuel Jáquez Leal 1642c3fc96 va: filter, deinterlace, vpp: Add gst_va_buffer_get_surface_flags().
Add a helper function to get, from GstVideoInfo and GstBuffers flags,
the VA interlace surface flags. This is used currently by vainterlace
element, but it will be used in vapostproc too if it can process
interlaced frames.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1109>
2021-10-13 14:59:09 +00:00
Thibault Saunier 9f13ee5b0e tests: Blacklist some tests that recently failed
See:
    - https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/739
    - https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/740

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/927>
2021-10-13 12:37:08 +00:00
Bastien Nocera e1271c0d9c gtkglsink: Avoid assertion when applying "auto" rotation method
Guard against the orientation not coming from an inexistant tag, nor
from the application (rotation set to "auto") which caused an assertion.

When the application requests the auto rotation method, make sure it is
resolved to a rotation that's applicable.

ERROR:gstreamer/subprojects/gst-plugins-good/ext/gtk/gtkgstglwidget.c:745:gtk_gst_gl_widget_set_rotate_method: code should not be reached

Fixes: 103ceb853a
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1134>
2021-10-13 09:16:32 +00:00
Philippe Normand c3455def2e soup: Runtime compatibility support for libsoup2 and libsoup3
The src and sink elements no longer link against libsoup. It is now loaded at
runtime. If any version is resident already, it is used. Otherwise we first try
to load libsoup3 and if it's not found we fallback to libsoup2.

For the unit-tests, we now build one version of the test unit file per libsoup
version found. So if both libsoup2 and libsoup3 are available on the host, the
CI will cover them both.

Based on initial patch by Daniel Kolesa <dkolesa@igalia.com> and
Patrick Griffis <pgriffis@igalia.com>.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1044>
2021-10-13 08:32:25 +00:00
Seungha Yang 0a94da9611 examples: playback-test: Fix for UI resize scenario on Windows
Application needs to notify videosink element of video widget resize
via gst_video_overlay_set_render_rectangle() since WM_SIZE event
wouldn't be notified.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1115>
2021-10-13 07:04:08 +00:00
Olivier Crête 4d3a200358 audio: Merge simd libs into the main one
Actually extract the .o objects from the convience libraries and put
them into the main one. Without this, they will just be referenced by
the .pc file, but it will be unusable because they are not installed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1122>
2021-10-13 01:28:16 +00:00
Nirbheek Chauhan d9449b1d81 meson: Remove duplicate definition of 'examples' option
This is a hard error starting with Meson 0.60.0rc1, due to
https://github.com/mesonbuild/meson/pull/9184#issuecomment-941603358

The upstream change might get reverted before release, but we should
of course fix this regardless.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1127>
2021-10-12 22:54:56 +00:00
Olivier Crête c272d0bfcd rtopuspay: Set marker bit inside RTP packet too
At the end of a talk spurt, not only set the marker flag on the
GstBuffer, but also set the bit inside the RTP header as recommended
by the RFC.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1124>
2021-10-12 17:18:19 -04:00
Bastien Nocera 9e5b6830cd gtksink: Fetch the default "widget" value in the docs
There's really no interesting "widget" value that could be shown in the
docs, so use the GST_PARAM_DOC_SHOW_DEFAULT flag to avoid showing
another value.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1088>
2021-10-12 20:27:34 +00:00
Bastien Nocera b0d4996380 gtksink: Avoid errors fetching widget property
Avoid errors when fetching the "widget" property and GTK initialisation
fails, such as when running in a non-graphical environment.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1088>
2021-10-12 20:27:34 +00:00
Olivier Crête 941c0e81dd gtksink: Return reference to GtkWidget in the acquire function
This should ensure thread safety.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1088>
2021-10-12 20:27:34 +00:00
Olivier Crête 103ceb853a gtkglsink: Add rotate-method property
This mostly just takes code out of glimagesink and applies it here.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1088>
2021-10-12 20:27:34 +00:00
Olivier Crête fdd7f9be23 glutils: Export affine transformation functions for gtkglsink
Also remove duplicated copy of those functions from the gl plugin

With contributions from Bastien Nocera

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1088>
2021-10-12 20:27:34 +00:00
Olivier Crête 9b75628101 glvideoflip: Replace GstVideoFlipMethod -> GstVideoOrientationMethod
It's the same enum, just drop the renamed copy. But keep the registered
GEnum as it is part of the API.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1088>
2021-10-12 20:27:34 +00:00
Olivier Crête b4ca5f386a glvideoflip: Use the API to parse the image orientation
This will reduce the code duplication a little.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1088>
2021-10-12 20:27:34 +00:00
Olivier Crête d191e27aca glimagesink: Use the API to parse the image orientation
This will reduce the code duplication a little.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1088>
2021-10-12 20:27:34 +00:00
Olivier Crête c898ffceeb video: Add API to parse the image orientation from a GstTagList
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1088>
2021-10-12 20:27:34 +00:00
Olivier Crête a51509c6e7 glimagesink: Replace GstGLRotateMethod with GstVideoOrientationMethod
It's the same enum, just drop the renamed copy. But keep the registered
GEnum as it is part of the API.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1088>
2021-10-12 20:27:34 +00:00
Olivier Crête ad495089cb video: Put nicer documentation in GstVideoOrientationMethod
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1088>
2021-10-12 20:27:34 +00:00
Sebastian Dröge 2d4491e195 splitmuxsink: Don't assert on the input side if no GOP is available when shutting down
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1119>
2021-10-12 19:34:16 +00:00
Thibault Saunier 4eb355ea13 tests: Mark check.gstreamer.gst_gstbin.test_watch_for_state_change flaky
See https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/778

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1113>
2021-10-12 16:59:16 +00:00
Thibault Saunier 673c6c59d7 ges:tests: Mark check.gst-plugins-base.validate.giosrc.read-growing-file as flaky
See https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/776

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1113>
2021-10-12 16:59:16 +00:00
Thibault Saunier c10aaa07b0 ges:tests: Mark ges 'check_edit_in_frames_with_framerate_mistmatch as flaky
See https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/775

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1113>
2021-10-12 16:59:16 +00:00
Thibault Saunier 2d4ba75732 tests:webrtcbin: Make known flaky webrtcbin as such
See https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/773

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1113>
2021-10-12 16:59:16 +00:00
Thibault Saunier 7dfaac92fa validate:launcher: Do not dump on failure test we will retry
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1113>
2021-10-12 16:59:16 +00:00
Thibault Saunier d8e8d98ff9 tests: aggregator: Take TIMEOUT_FACTOR env var into account
This env var is set in the CI so we grow the timeout as required
(when running in valgrind for example).

Trying to avoid hitting wrong timeout in valgrind job like in:
https://gitlab.freedesktop.org/tpm/gstreamer/-/jobs/14009456

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1113>
2021-10-12 16:59:16 +00:00
Thibault Saunier 47afe6db28 tests: Blacklist tests that are currently producing many CI failures
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1113>
2021-10-12 16:59:16 +00:00
Thibault Saunier 23dbfdf70d validate:launcher: Allow more flexible handling of flaky tests
And retry twice flaky tests

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1113>
2021-10-12 16:59:16 +00:00
Thibault Saunier ff8d8bbc97 validate:launcher: Fix progress reporting with --n-runs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1113>
2021-10-12 16:59:16 +00:00
Thibault Saunier 6860240bee validate:tests: Mark rtsp tests as generally flaky
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1113>
2021-10-12 16:59:16 +00:00
Thibault Saunier c525273185 ges:tests: Mark nested timelines as generally flaky
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1113>
2021-10-12 16:59:16 +00:00
Thibault Saunier 4762b138b6 validate:launcher: Support retry on failure when using --n-runs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1113>
2021-10-12 16:59:16 +00:00
Thibault Saunier f2efd3b133 validate:launcher: Fix potential invalid index access
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1113>
2021-10-12 16:59:16 +00:00
Thibault Saunier b084abad79 validate:launcher: Fix adding logs to xunit
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1113>
2021-10-12 16:59:16 +00:00
Tim-Philipp Müller 078f7874fd gst-play: pick up minus and plus also from navigation events
Makes it easier to test playback rate changes with the video
window being in focus.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/928>
2021-10-12 11:19:22 +00:00
Nirbheek Chauhan e24e366952 libsoup: Bump to 2.74 to fix gssapi build failure on macOS
See: https://gitlab.gnome.org/GNOME/libsoup/-/merge_requests/255

We also need to disable sysprof by default because it only builds on
native Linux. If someone really wants it, they can enable the option
on the command-line by passing -Dlibsoup:sysprof=enabled

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1114>
2021-10-12 12:22:31 +05:30
Mengkejiergeli Ba 40d559adcf msdkenc: fix vp9enc initialization fail
MediaSDK does not support to handle extbuff with id
MFX_EXTBUFF_VIDEO_SIGNAL_INFO for mjpegenc and vp9enc. Hence, need to
exclude mjpeg and vp9 when passing color properties to MediaSDK during
msdkenc initialization.

Fix issue: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/764

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1101>
2021-10-12 03:45:41 +00:00
Seungha Yang 1bf237e767 examples: d3d11: Add a desktop capture example
... with d3d11 desktop capture device provider

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1103>
2021-10-11 15:21:26 +00:00
Seungha Yang 4b85704b88 d3d11: Add device provider for d3d11desktopdupsrc
... and add support for multi-GPU/multi-monitor

By using newly added "monitor-handle" property, user can specify a
monitor to be captured via HMONITOR handle.

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1673
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1103>
2021-10-11 15:21:26 +00:00
Stéphane Cerveau 2200a3dbcd ttml: fix log init
The log system should be init before calling a log

Fix regression after:

https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2038

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1112>
2021-10-11 15:23:08 +02:00
Stéphane Cerveau 01fa95d34a move-mrs-script: add url option
You can give as option:

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/960>
2021-10-10 19:50:10 +00:00
Víctor Manuel Jáquez Leal 1cfae69bc9 tests: va: Add VA buffer copy tests.
It should only work for raw buffers, but fails on dmabuf since it
should have a drm modifier.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1023>
2021-10-10 17:03:29 +00:00
Víctor Manuel Jáquez Leal 35575e7b11 va: allocator: dmabuf: Use GstVaSurfaceCopy, if possible.
If dmabuf-based buffer to copy contains only one memory, and there are
memories available in the allocator's pool, it's possible a fast
memory copy using GstVaSurfaceCopy, regardless the drm modifier.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1023>
2021-10-10 17:03:29 +00:00
Víctor Manuel Jáquez Leal cf751d54a9 va: allocator: Use GstVaSurfaceCopy.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1023>
2021-10-10 17:03:29 +00:00
Víctor Manuel Jáquez Leal ffa2522fc0 va: Add GstVaSurfaceCopy class.
This new class is a helper for fast/tricky copy of surfaces. First it
tries to copy using the function vaCopy in libva 1.12. If it fails, or
it's not available, a GstVaFilter is tried to be instantiated with the
allocator's parameters, and if succeed, it's used for copying the
source surface.

This is required for dmabuf surfaces with drm modifier.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1023>
2021-10-10 17:03:29 +00:00
Víctor Manuel Jáquez Leal f1e2eb4f1e va: filter: Enable to pass VASurfaceID in GstVaSample.
Initially GstVaSample processed its GstBuffer member to get the
VASurfaceID. But it might cases where we already have the VASurfaceID
to process by the filter.

This patch enables the possibility to pass the surfaces rather than
the buffers. In order to validate the surfaces a function to check
surfaces were added.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1023>
2021-10-10 17:03:29 +00:00
Víctor Manuel Jáquez Leal 14156f8270 va: Split VA memory handling in different files.
Take out the VA memory wrappers from gstvallocator.c to an external
file exposing the functions.

This is going to be needed for the copy helper object.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1023>
2021-10-10 17:03:29 +00:00
Víctor Manuel Jáquez Leal 1be43e76cc va: allocator: Add missing header file.
Added stdint.h because uintptr_t is used.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1023>
2021-10-10 17:03:29 +00:00
Víctor Manuel Jáquez Leal 2947bd6ef1 va: display: Add gst_va_display_has_vpp()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1023>
2021-10-10 17:03:29 +00:00
Benjamin Gaignard 7e9e17ebbe v4l2codecs: Align v4l2-controls header with kernel 5.15-rc3
Update v4l2-controls to be aligned with kernel 5.15-rc3.
Fix VP8 decoder to use the correct field name.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1081>
2021-10-10 15:50:57 +00:00
Jan Schmidt 71c3141672 uridecodebin3/urisourcebin: Reusability fixes
Improvements to uridecodebin3 and urisourcebin so that they are
reusable across a PAUSED->READY->PAUSED transition.

Disconnect and release decodebin3 request pads when urisourcebin
removes src pads.

In urisourcebin, make sure to remove src pads that are exposed
directly (raw pads and static typefind srcpads) when
cleaning up.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1100>
2021-10-10 11:55:19 +00:00
Jan Schmidt e06ac494b8 playbin3: Always register 'playbin3' element.
If the USE_PLAYBIN3=1 env var is set, we want to replace
playbin with playbin3, but separate to that, we always
want to register the 'playbin3' element so that applications
which explicitly use playbin3 work regardless of the env var.

This fixes `USE_PLAYBIN3=1 gst-validate-launcher`, for example.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1102>
2021-10-10 07:28:17 +00:00
Seungha Yang 0d96e43c91 mediafoundation: mfvideoenc: Use DXGI adapter LUID
Make use of new DXGI adapter LUID based device context sharing.
Note that we were using DXGI adapter LUID to open MFT already.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1098>
2021-10-10 03:23:58 +09:00
Seungha Yang 5707e487cf d3d11: d3d11decoder: Use DXGI adapter LUID
... instead of index of DXGI adapter.

The order of IDXGIAdapter1 enumerated via IDXGIFactory1::EnumAdapters1
can be varying even there's no rebooting in case that GPU preference order
is updated by user (for example, it can be done by using NVIDIA Control Panel
in case of multi-GPU laptop system) and eGPU is another possible case.

So, for an element which requires fixed target GPU requirement,
index based device enumeration is unreliable.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1098>
2021-10-10 03:23:58 +09:00
Seungha Yang 98b82ef286 d3d11: d3d11utils: Add support for DXGI Adapter LUID based D3D11 device context sharing
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1098>
2021-10-10 03:23:58 +09:00
Seungha Yang 5ac7a21ef0 d3d11: d3d11device: Add gst_d3d11_device_new_{for_adapter_luid,wrapped}
* gst_d3d11_device_new_for_adapter_luid()
  Used for creating D3D11 device for a DXGI adapter (i.e., GPU)
  corresponding to a LUID (Locally Unique Identifier).
  This method can be useful for interop with other APIs such as
  Direct3D12, MediaFoundation, CUDA, etc.
* gst_d3d11_device_new_wrapped()
  Allows creating a new GstD3D11Device object by using already
  configured ID3D11Device. This is conceptually equivalent to
  gst_gl_context_new_wrapped()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1098>
2021-10-10 03:23:53 +09:00
Seungha Yang d8eff2623d d3d11: d3d11device: Remove "allow-tearing" property
Plugin can query DXGI_FEATURE_PRESENT_ALLOW_TEARING without d3d11device
help

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1098>
2021-10-10 01:01:44 +09:00
Sebastian Dröge 3011fa7ddd webrtcbin: Use the same promise reply structure name everywhere
This was an inconsistent mix of different names in the past. The name
has no meaning at all so let's set all to "application/x-gst-promise".

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1099>
2021-10-09 11:45:46 +03:00
Jan Schmidt 33ad1cdc5e playbin3: Avoid group deactivation deadlock.
Change locking around group deactivation to avoid deadlocks
when shutting down exactly as a buffering message arrives.

The PLAYBIN3_LOCK now protects the active field of the
source group. Everything else is still protected by the
source-group-lock.

Also properly protect group switching operations with
the PLAYBIN3_LOCK everywhere.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1049>
2021-10-08 15:49:41 +00:00
Vivia Nikolaidou 1fa1b18a24 chopmydata: Fix FIXMEs in gst_element_class_set_static_metadata
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1097>
2021-10-08 16:20:10 +03:00
Stéphane Cerveau 08f924b491 FAQ: add mention to downstream cherry-pick
Give an help to cherry-pick an upstream patch to
downstream repository (old stable version)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1095>
2021-10-08 14:34:00 +02:00
Seungha Yang 7286c8e302 d3d11: d3d11desktopdupsrc: Add support for non-D3D11 downstream element
By this commit, application doesn't need to configure d3d11download
element for software pipeline which will make things simpler

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1082>
2021-10-08 16:13:46 +09:00
Thibault Saunier b590511146 validate:scenario: Allow waiting signal searching for element factory
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1064>
2021-10-07 15:05:53 +00:00
Marek Vasut e6d83d8f96 jpegdec: Support libjpeg-turbo colorspace conversion
The libjpeg-turbo has a built-in support for performing colorspace
conversion. The performance of this conversion is much better than
doing the same separately using videoconvert. Implement support for
this conversion to RGBx/xRGB/BGRx/xBGR formats. Other formats can
be easily added later.

- The decoding of various pixel formats can be tested and compared to
  non-libjpeg-turbo decoding as follows:
  for gfmt in {RGB,BGR}{,x} x{RGB,BGR} ; do
      echo "$gfmt"
      gst-launch-1.0 -q \
          videotestsrc pattern=colors ! \
          video/x-raw,format=${gfmt} ! \
          fakesink dump=true | \
	  head -n 200 | tail -n 1
      gst-launch-1.0 -q --gst-plugin-path=build/ext/jpeg/ \
          videotestsrc pattern=colors ! \
          video/x-raw,format=${gfmt} ! \
	  jpegenc ! \
	  jpegdec ! \
	  video/x-raw,format=${gfmt} ! \
	  fakesink dump=true | \
	  head -n 200 | tail -n 1
      done
  Result looks as follows, i.e. comparable:
  RGB
  00000c70 (0x7f7736fbdd10): 05 33 19 05 33 26 05 33 33 05 33 40 05 33 4c 05  .3..3&.33.3@.3L.
  00000c70 (0x7f389e8f7d10): 05 32 17 04 32 22 04 32 31 04 32 3e 04 32 4a 04  .2..2".21.2>.2J.
  RGBx
  00000c70 (0x7f79efd0ad10): cc 07 22 ff d9 07 22 ff e6 07 22 ff f3 07 22 ff  .."..."..."...".
  00000c70 (0x7fb6989f3d10): cd 06 22 00 d9 06 22 00 e6 06 22 00 f4 06 22 00  .."..."..."...".
  BGR
  00000c70 (0x7fa0a6c42d10): 05 0c 33 05 19 33 05 26 33 05 33 33 05 40 33 05  ..3..3.&3.33.@3.
  00000c70 (0x7fc74165fd10): 05 08 32 04 17 32 04 22 32 04 31 32 04 3e 32 04  ..2..2."2.12.>2.
  BGRx
  00000c70 (0x7fbf399f1d10): 22 07 cc ff 22 07 d9 ff 22 07 e6 ff 22 07 f3 ff  "..."..."..."...
  00000c70 (0x7f50e3d1cd10): 22 06 cd 00 22 06 d9 00 22 06 e6 00 22 06 f4 00  "..."..."..."...
  xRGB
  00000c70 (0x7f0b950a2d10): ff cc 07 22 ff d9 07 22 ff e6 07 22 ff f3 07 22  ..."..."..."..."
  00000c70 (0x7f4416b8dd10): 00 cd 06 22 00 d9 06 22 00 e6 06 22 00 f4 06 22  ..."..."..."..."
  xBGR
  00000c70 (0x7f237d74dd10): ff 22 07 cc ff 22 07 d9 ff 22 07 e6 ff 22 07 f3  ."..."..."..."..
  00000c70 (0x7f095547dd10): 00 22 06 cd 00 22 06 d9 00 22 06 e6 00 22 06 f4  ."..."..."..."..
                             ^^          ^^          ^^          ^^
  Notice how the alpha channel is set to arbitrary value in case of the
  libjpeg-turbo decoding into RGBx/BGRx/xRGB/xBGR pixel formats. This is
  documented in libjpeg-turbo README.md as follows:
    "
    When using the RGBX, BGRX, XBGR, and XRGB colorspaces during decompression, the
    X byte is undefined, and in order to ensure the best performance, libjpeg-turbo
    can set that byte to whatever value it wishes.
    "

- The interlaced num_fields=2 mjpeg stream can be generated and
  tested as follows (this does require mjpegtools):
  $ gst-launch-1.0 videotestsrc num-buffers=10 ! jpegenc ! multifilesink location=in%04d.jpg
  $ jpeg2yuv -f 25 -I t -L 0 -j in%04d.jpg | yuv2lav -f avi -o result.avi
  ...
  $ gst-launch-1.0 --gst-plugin-path=build/ext/jpeg/ filesrc location=result.avi ! \
       avidemux ! jpegdec ! video/x-raw,format=RGBx ! videoconvert ! autovideosink

Signed-off-by: Marek Vasut <marex@denx.de>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1091>
2021-10-07 12:40:29 +00:00
Sebastian Dröge 14d636b224 rtsp-media: Unprepare suspended medias too
Previously suspended medias immediately reached the UNPREPARED state
without going through the media's unprepare() vfunc. This didn't allow
the media subclass to do any additional cleanup, and for example the
shutdown-eos property of GstRTSPMedia was ignored.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1090>
2021-10-07 11:16:39 +00:00
Seungha Yang 314901a208 tests: gstmeta: Fix failure on Windows
Windows doesn't support fork so every test will be performed in
one process. So the test_meta_custom_transform() is being
failed because "test-custom" custom meta is being used/defined in
another test test_meta_custom() as well.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1086>
2021-10-07 07:43:27 +00:00
Seungha Yang 88437a9c9b codecs: Use GST_VIDEO_DECODER_ERROR() only for decoding error case
The GST_VIDEO_DECODER_ERROR() should be used only for robust/error-resilient
decoding purpose. Any other error codes such as not-negotiated or flushing
should be returned without modified for upstream to be able to handle
it immediately. (for example, application might want to try other
decoder element on not-negotiated)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1070>
2021-10-07 06:48:46 +00:00
Seungha Yang e31b797c05 codecs: h264decoder: Update for remaining gboolean to GstFlowReturn port
Fix for spurious/spammy warning and wrong function return type

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1085>
2021-10-07 06:07:29 +00:00
Sebastian Dröge e9d551b45c rtsp-media: Only unprepare a media if it was not already unpreparing anyway
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1083>
2021-10-07 05:28:19 +00:00
Nirbheek Chauhan f0c3eefefc meson: Fix gst-launch build on UWP
The APIs we need from WinMM for higher timer resolution are only
available for non-UWP apps. The winmm library itself is still
available, so we need to disable the check.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/890>
2021-10-07 04:43:34 +00:00
Nirbheek Chauhan be607d7cca meson: Fix build with -Dopenjpeg=disabled
tests/check/meson.build uses the openjpeg_dep variable
unconditionally, and the subdir_done() is useless anyway, since the
plugin is only built if openjpeg_dep.found() is true. Fixes:

..\tests\check\meson.build:23:0: ERROR: Unknown variable "openjpeg_dep".

In particular, this fixes the build on UWP since we disable openjpeg
explicitly in Cerbero when building for UWP.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1069>
2021-10-07 03:22:25 +00:00
Guillaume Desmottes de05bb3da2 bad: gs: update README
- add one missing dep
- change install path to match monorepo
- fix current dirs

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1008>
2021-10-06 21:35:08 +00:00
Ognyan Tonchev 7ba665995f rtsp-client: make sure sessmedia will not get freed while used
handle_*_request() functions were all retrieving the session media from
the session by calling gst_rtsp_session_get_media () which is a transfer-none
call. If a session timeout happens at that time, the session media may get freed
making the pointer invalid..

Fixes #757

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1053>
2021-10-06 19:42:43 +00:00
Thibault Saunier ce76a286ed validate:launcher: Sync asset only when passing --sync
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1020>
2021-10-06 17:00:54 +00:00
Víctor Manuel Jáquez Leal 01cfc1ee7e va: Use macro rather than VAMemory feature string.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1061>
2021-10-06 07:19:50 +00:00
Xavier Claessens cf912f6d15 ci: Fix gst-indent path
It used to be downloaded into PATH, but we can now instead run it from
git. Also move it to top source dir instead of gstreamer subproject.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/931>
2021-10-05 23:44:03 +03:00
Sebastian Dröge 55222db66e rtsp-media: Also mark receive-only (RECORD) medias as prepared when unsuspending
Previously the status was only changed for other medias.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1058>
2021-10-05 16:40:07 +00:00
Tim-Philipp Müller c53bdeacf5 docs: update "Building from Source using Meson" for mono repo
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1052>
2021-10-05 13:13:31 +00:00
Sebastian Dröge 4316be6571 splitmuxsink: Keep track of the pending input GOPs in a queue
This cleans up input GOP handling and makes it possible to handle more
than 2 pending GOPs, which could happen before if keyframes are arriving
with too short of a distance between them.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1005>
2021-10-05 12:35:19 +00:00
Sebastian Dröge ae8ceb801c splitmuxsink: Handle frame reordering due to B frames better
Instead of assuming that the PTS of a keyframe is the lowest PTS of a
GOP, wait until the DTS has passed this PTS and take the minimum PTS up
to that point. That way the minimum PTS of a GOP can be determined, at
least for closed GOP streams. Open GOP streams still can't be handled
properly.

By knowing the minimum PTS of each GOP, keyframes can be requested at
the correct time relative to the GOP (and thus fragment) start and
fragment overflow calculations can calculate the correct durations of
the GOPs.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1005>
2021-10-05 12:35:19 +00:00
Sebastian Dröge f83ed50c20 splitmuxsink: Reset timecodes when resetting the sink
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1005>
2021-10-05 12:35:19 +00:00
Sebastian Dröge ed6823ad67 splitmuxsink: Use GST_CLOCK_STIME_NONE instead of 0 to initialize max out running time
Otherwise streams with only DTS would misbehave while it is negative.

For outputting everything immediately at EOS, use G_MAXINT64 instead
which is bigger-or-equal to any other running time.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1005>
2021-10-05 12:35:19 +00:00
Sebastian Dröge eed843eea0 splitmuxsink: Only update max in/out running time if it's actually bigger
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1005>
2021-10-05 12:35:19 +00:00
Sebastian Dröge 68683d15c4 splitmuxsink: Only count keyframes for the reference context, consistently
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1005>
2021-10-05 12:35:19 +00:00
Robert Rosengren 62077b9d05 docs/running: Describe GST_REGISTRY_MODE
Change-Id: I45e9fe90137d4a8306c3a5e4f636fa43425b978f
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/825>
2021-10-05 10:49:27 +00:00
Robert Rosengren 69b3b1d6bf registrybinary: registry file mode via GST_REGISTRY_MODE
In an embedded system where all services run as seperate users it is
useful to have the gstreamer registry readable by all so it can be
re-used, in similar manner as a host system where one user have seperate
applications running but all share same registry.

To make this possible introducing GST_REGISTRY_MODE for adjusting the
changing mode of the registry binary when finishing up with the
temporary file (which has restricted access).

Fixes: #692
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/825>
2021-10-05 10:49:27 +00:00
Jan Alexander Steffens (heftig) 0596da1966 mpegtsparse: Don't assert the packet_size when filling for EOS
If the packetizer got reset for any reason (failure to find PCR?) then
the packet_size can be zero here even though we already enqueued some
packets.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1038>
2021-10-05 09:38:27 +00:00
Ludvig Rappe b099ba649e pbutils: Remove sample entry code "raw"
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1045>
2021-10-05 09:00:23 +00:00
Jan Alexander Steffens (heftig) 5aa825d004 multiqueue: Fix query unref race on flush
If the query has already been destroyed at this point, GST_IS_QUERY will
read garbage, can return false and we will try to unref it again.
Instead, make note of whether the item is a query when we dequeue it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1029>
2021-10-05 06:36:48 +00:00
Seungha Yang 7c557c2d65 codecs: mpeg2decoder: Use GstFlowReturn everywhere
boolean return value is not sufficient for representing the reason
of error in most cases. For instance, any errors around new_sequence()
would mean negotiation error, not just *ERROR*.
And some subclasses will allocate buffer/memory/surface on new_picture()
but it could be failed because of expected error, likely flushing

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

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1019>
2021-10-04 20:56:46 +00:00
Seungha Yang 05496df0d1 closedcaption: Fix broken debug function macros with MSVC build
warning C4003: not enough arguments for function-like macro invocation 'warning'

G_STMT_END macro is extended to the below form with MSVC
__pragma(warning(push)) \
__pragma(warning(disable:4127)) \
while(0) \
__pragma(warning(pop))

So MSVC preprocessor will extend it further to
__pragma(VBI_CAT_LEVEL_LOG(push)) ...

Should rename warning() debug macro function therefore.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1018>
2021-10-04 23:03:20 +09:00
Seungha Yang 90e5e0efea mpegtsmux: basetsmux: Don't try to return value from void function
gstbasetsmux.c(1508): warning C4098: 'free_splice': 'void' function returning a value

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1018>
2021-10-04 13:37:09 +00:00
Víctor Manuel Jáquez Leal 2e6cd5c2e4 va: Make libgudev dependency optional.
libgudev is a problematic dependency, particularly in sandboxed
environments, such as flatpak.

This patch implements a way to get the available VA devices using
brute-forced traverse of /dev/drm/renderD* directory. Thus usable in
those sandboxed environments.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1027>
2021-10-04 10:19:36 +00:00
Víctor Manuel Jáquez Leal e699aaeb16 va: meson: Move back libgudev dependency to plugin.
When move the libgstva, libgudev dependency was moved as part of the
library, though it's not use by the library but the plugin. This patch
moves back libgudev dependency to the plugin.

Also HAVE_LIBDRM is move to the library which is the one who use it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1027>
2021-10-04 10:19:36 +00:00
Seungha Yang da7f4e0a69 nvcodec: nvh264sldec: Add support for interlaced stream
Implement missing interlaced stream support

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1026>
2021-10-04 08:04:00 +00:00
Seungha Yang ce8965b75b nvcodec: nvh264sldec: Consider additional render delay DPB pictures
At least additional 4 pictures are required

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1026>
2021-10-04 08:04:00 +00:00
Seungha Yang 613d380b97 nvcodec: nvvp9sldec: Fix for VP9 profile2 decoding
Fix for output video format to be selected correctly

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1026>
2021-10-04 08:04:00 +00:00
Seungha Yang baf252b48b msdk: meson: Fix build on Windows
subprojects\gst-plugins-bad\sys\msdk\meson.build:160:2: ERROR: Unknown variable "libva_dep".

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1022>
2021-10-04 07:14:33 +00:00
Seungha Yang 6a756b9f46 d3d11: d3d11vp9dec: Fix use_prev_in_find_mv_refs value setting
"last_show_frame" should be updated based on
GstVp9FrameHeader::show_frame, not show_existing_frame

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1021>
2021-10-03 02:25:50 +09:00
Seungha Yang 571aad3980 codecs: {vp8,vp9}decoder: Drain on new_sequence()
Decoder should drain queued frame (if any) and empty DPB before
starting new sequence.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/987>
2021-10-02 12:11:48 +00:00
Seungha Yang 834d6f4031 nvcodec: nv{vp8,vp9}sldec: Implement get_preferred_output_delay()
Equivalent to that of nvh264sldec. Use render delay in case of non-live
pipeline for the better throughput performance.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/987>
2021-10-02 12:11:48 +00:00
Seungha Yang aab3ea2736 codecs: {vp8,vp9}decoder: Cleanup drain code
Make them consistent with h26x decoder baseclass

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/987>
2021-10-02 12:11:48 +00:00
Seungha Yang 9f4ea145e0 codecs: vp8decoder: Fix typo
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/987>
2021-10-02 12:11:48 +00:00
Seungha Yang c6ec7f3ea4 codecs: vp9decoder: add support for render delay
Some decoding APIs support delayed output for performance reasons.
One example would be to request decoding for multiple frames and
then query for the oldest frame in the output queue.

This also increases throughput for transcoding and improves seek
performance when supported by the underlying backend.

Introduce support in the vp9 base class, so that backends that
support render delays can actually implement it.

Co-authored by Seungha Yang <seungha@centricular.com>

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/987>
2021-10-02 12:11:48 +00:00
Seungha Yang 505c794748 codecs: vp9decoder: Fix class struct documentation
s/GstVp9Decoder/GstVp9DecoderClass

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/987>
2021-10-02 12:11:48 +00:00
Thibault Saunier a2964eb1ad ges:uri-asset: Ignore streams with no ID
Since 0d95d9258b we respect the asset stream-id in `GESUriSource` so
we can not work with unknown or broken stream ID in the assets.

We just ignore them, warning about it and we should fix that in
demuxer so they don't expose pad without providing a stream id for them.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1001>
2021-10-02 10:44:26 +00:00
Stéphane Cerveau 84b357dd5f typefindfunctions: differentiate h265 from h264
in some cases, the algo gives the same probability
to h264 and h265 for h26x stream resulting in a h265
stream detected as a h264.
if sps/pps/vps detected, increase the probabilty.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/957>
2021-10-02 10:03:21 +00:00