Commit graph

72 commits

Author SHA1 Message Date
Sebastian Dröge adf80ad1a7 rtphdrext: Return non-floating references from gst_rtp_header_extension_create_from_uri()
The header extension objects are never getting a parent object and using
floating references only complicates usage, especially via dynamic API
like signals.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1582>
2022-01-27 14:43:41 +00:00
Sebastian Dröge 2584cd90e3 rtphdrext: Use set_metadata() instead of set_static_metadata()
The latter needs a static string.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1583>
2022-01-27 14:27:16 +02:00
Mathieu Duponchelle 830d1595b9 VideoInfo, AudioInfo: fix usage with python bindings
* Expose an actual constructor from caps

* Error out in overrides for code that was using the "manual
  allocation" pattern which only worked by chance. Direct
  the script writer to the new_from_caps constructor instead.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-python/-/issues/47

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1571>
2022-01-27 08:36:46 +00:00
Vivia Nikolaidou 88e1b9081e audioaggregator: Return NOT_NEGOTIATED when the configuration is invalid
Otherwise we just end up outputting garbage.

https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/957

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1558>
2022-01-26 10:24:21 +00:00
Nirbheek Chauhan 95aa04c78f videoaggregator: Remove extra semicolon in macro usage
This is usually necessary to allow gst-indent to treat it as
a statement, but we do not run gst-indent on headers and we do not
have extra semicolons in other places that this macro is used in the
header. Fixes warnings when using the header:

```
In file included from gstreamer/subprojects/gst-plugins-base/gst-libs/gst/video/video.h:185,
                 from XYZ:9001:
gstreamer/subprojects/gst-plugins-base/gst-libs/gst/video/gstvideoaggregator.h:206:78: warning: ISO C does not allow extra ‘;’ outside of a function [-Wpedantic]
  206 | G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVideoAggregatorConvertPad, gst_object_unref);
      |                                                                              ^
gstreamer/subprojects/gst-plugins-base/gst-libs/gst/video/gstvideoaggregator.h:214:181: warning: ISO C does not allow extra ‘;’ outside of a function [-Wpedantic]
  214 | G_DECLARE_DERIVABLE_TYPE (GstVideoAggregatorParallelConvertPad, gst_video_aggregator_parallel_convert_pad, GST, VIDEO_AGGREGATOR_PARALLEL_CONVERT_PAD, GstVideoAggregatorConvertPad);
      |                                                                                                                                                                                     ^
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1572>
2022-01-26 11:12:34 +05:30
Seungha Yang fe870b706d video-converter: Fix for broken gamma remap with high bitdepth YUV output
Scale down the matrix before calculating RGB -> YUV matrix
otherwise offset values will be wrong

Fixing pipeline
videotestsrc ! video/x-raw,format=ARGB ! videoconvert gamma-mode=remap ! \
  video/x-raw,format=P010_10LE,colorimetry="bt2020"

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1432>
2022-01-24 10:59:38 +00:00
Sebastian Dröge 64085c20b4 videodecoder: Fix property description for new properties
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1556>
2022-01-23 13:38:37 +02:00
Seungha Yang a1da81bee6 Revert "videodecoder: Forward hdr-format info downstream"
This reverts commit 9b852181d8.

It's leftover commit which should've been reverted as a part of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1148

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1475>
2022-01-20 15:51:13 +00:00
Tomasz Andrzejak 5fb769e95d Add FEC SDP message test
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1527>
2022-01-19 16:05:11 +00:00
Tomasz Andrzejak 95f5538fa4 sdpmessage: fix mapping single char fmtp params
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1527>
2022-01-19 16:05:11 +00:00
Sebastian Dröge 8dfe70d17f codec-utils: Mark various string return values as nullable
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1539>
2022-01-19 11:05:26 +02:00
Tim-Philipp Müller b53ea86ab0 rtphdrext: increase GstRTPHeaderExtensionClass padding to LARGE
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/748#note_1223253

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1537>
2022-01-19 05:41:40 +00:00
Philippe Normand 62b8caa6ab pbutils: Define one debug category per module
Follow-up of https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1505

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1526>
2022-01-18 18:19:46 +00:00
Seungha Yang a13309be4a videoaggregator: Don't pass GAP buffer to prepare_frame_start()
Likewise we do check the same condition in prepare_frames_finish(),
ignore GAP buffer (zero size with GST_BUFFER_FLAG_GAP flag) without
any further processing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1498>
2022-01-13 21:29:15 +00:00
Philippe Normand 6a3f2f0ba6 pbutils: Simplify h264_caps_structure_get_profile_flags_level a bit
Refactoring, removing one level of indentation from the function.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1505>
2022-01-13 17:15:36 +00:00
Philippe Normand 074c5d85cb pbutils: H.265 support for gst_codec_utils_caps_get_mime_codec()
The codec_data caps payload is parsed and a MIME codec string is generated
according to the ISO/IEC 14496-15 specification.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1505>
2022-01-13 17:15:36 +00:00
Philippe Normand 1c8f7c32aa pbutils: Add a pbutils debug category
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1505>
2022-01-13 17:15:36 +00:00
Jordan Petridis 86a62d94ed gstglutils: introspection annotations fixups
* gst_gl_ensure_element_data: specify the type for the element arg

* gst_gl_handle_set_context: correctly annotate the display and
gl_ctx as just (out) instead of (inout)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1501>
2022-01-12 12:11:47 +00:00
Sebastian Dröge 79ce12416f codec-utils: Use nullable annotation instead of allow-none for various Opus functions
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1506>
2022-01-12 10:19:45 +00:00
Sebastian Dröge e667c95674 codec-utils: Annotate out parameters for Opus functions as (optional)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1506>
2022-01-12 10:19:45 +00:00
Sebastian Dröge 6de587593a codec-utils: Add missing annotations to gst_codec_utils_h264_get_profile_flags_level()
And fix some minor typos.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1506>
2022-01-12 10:19:45 +00:00
Nirbheek Chauhan 945fd11907 audio: Add logging that was useful in figuring out the last commit
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1461>
2022-01-08 05:15:30 +00:00
Nirbheek Chauhan 554a2a5145 audio-converter: Fix resampling when there's nothing to output
Sometimes we can't output anything because we don't have enough
incoming frames. In that case, the resampler was trying to call
do_quantize() and do_resample() in a loop forever because there would
never be samples to output (so chain->samples would always be NULL).

Fix this by not calling chain->make_func() in a loop -- seems
completely unnecessary since calling it over and over won't change
anything if the make_func() can't output samples.

Also add some checks for the input and / or output being NULL when
doing conversion or quantization. This will happen when we have
nothing to output.

We can't bail early, because we need resampler->samples_avail to be
updated in gst_audio_resampler_resample(), so we must call that and
no-op everything along the way.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1461>
2022-01-08 05:15:30 +00:00
Seungha Yang 11791f7ce5 video-info: Don't assume colorimetry of UHD resolution as BT.2020
BT.2020 color primaries are designed to cover much wider range of
CIE chromaticity than BT.709, and also it's used for both SDR and HDR
contents. So, the incorrect assumption (i.e., BT.709 as a BT.2020)
is risky and resulting image color tends to be visually very wrong.
Unless there's obvious clue, don't consider color space of high resolution
video stream as BT.2020

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1445>
2021-12-16 12:22:27 +00:00
Thibault Saunier 9ac502c21d sdp: Handle level-asymmetry-allowed for H264 streams
The ["level-asymmetry-allowed"] field states that the peer wants the
profile specified in the "profile-level-id" fields but doesn't care
about the level. To express this in GStreamer caps term, we add a
"profile" field in the caps, which reuses the usual "profile" semantics
for H.264 streams and, and remove "profile-level-id" and
"level-asymmetry-allowed" fields.

["level-asymmetry-allowed"]: https://www.iana.org/assignments/media-types/video/H264

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1410>
2021-12-12 10:59:00 -03:00
Nirbheek Chauhan 5d3009b7f8 audio-resampler: Fix segfault when we can't output any frames
Sometimes the resampler has enough space to store all the incoming
samples without outputting anything. When this happens,
gst_audio_resampler_get_out_frames() returns 0.

In that case, the resampler should consume samples and just return.
Otherwise, we get a segfault when gst_audio_resampler_resample() tries
to resample into a NULL 'out' pointer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1343>
2021-11-12 16:12:27 +00:00
Tim-Philipp Müller 972615cf22 docs: fix unnecessary ampersand, < and > escaping in code blocks
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1340>
2021-11-12 11:39:19 +00:00
Jiri Uncovsky 9abac91c96 glcontext/egl: add missing unref
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1328>
2021-11-10 15:27:45 +00:00
Guillaume Desmottes 9b809d4cc3 appsrc: log when segment changes
We were logging when it does not change but not when it does, which is
confusing when reading logs.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1327>
2021-11-09 16:19:05 +00:00
Matthias Clasen ffa363edf7 egl: handle configless contexts
With EGL_KHR_no_config_context, EGL contexts may just not
have an EGLConfig to give you. Deal with it.

Fixes: #858
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1289>
2021-11-02 18:00:41 +00:00
Sebastian Dröge 577cdcafe0 video: Fix order of new video formats
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1282>
2021-10-31 06:38:36 +00:00
Sebastian Dröge ee18b8c0c0 base: Fix some annotations
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1281>
2021-10-30 15:50:30 +03:00
Piotrek Brzeziński 428b4104b0 video-format: Add support for ARGB64 LE/BE and similar variants
Co-authored-by: Sebastian Dröge <sebastian@centricular.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1247>
2021-10-29 14:57:58 +00:00
Matthew Waters d4c96bf923 gl/egl: install required egl.h header
Fixes build against using the gir.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1227>
2021-10-22 17:56:41 +11: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
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
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
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
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
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
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
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 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 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
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