Commit graph

3970 commits

Author SHA1 Message Date
Nicolas Dufresne 6b103061ec bad: Update doc cache for waylandsink changes
A new drm-device property has been added.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3801>
2023-03-14 21:50:57 +00:00
Colin Kinloch ed60843c1e wayladnsink: Add DRM Dumb allocator support
If the input is not a DMABuf, attempt to copy into a DRM Dumb
buffer and import it has a DMABuf. This will offload the
compositor from actually doing this copy (needed to handle SHM)
and may allow the software decoded stream to be rendered to
an HW layer, or even reach through some better accelerated
GL import path.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3801>
2023-03-14 21:50:57 +00:00
Colin Kinloch 755bd9143e wlvideobufferpool: Add DRM Dumb buffer support
This allow the wayland buffer pool to use a GstDRMDumbAllocator
if it has been configured to do so.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3801>
2023-03-14 21:50:57 +00:00
Nicolas Dufresne a961838b0a wlvideoformat: Fix sign issue for DRM fourcc
DRM fourcc ared defined as 32bit unsigned in, but the format helper was passing
an int, while using a unsigned int internally. This is a API/ABI break, but
the API is still unstable.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3801>
2023-03-14 21:50:57 +00:00
Nicolas Dufresne 6ce1b484fd wllinuxdmabuf: Handle video meta inside the importer
This allow simplifying the GstVideoInfo handling in the sinks. Instead
of having to update a video info for the import, the sink can simply pass the
video info associated with the caps and rely on the VideoMeta in the GstBuffer
to obtain the appropriate offset and stride.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3801>
2023-03-14 21:50:57 +00:00
Nicolas Dufresne 0961606942 gtkwaylandsink: Fix display/wl_window/pool leaks
These were leaked in the GTK implementation of the sink.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3801>
2023-03-14 21:50:57 +00:00
Nicolas Dufresne 965117b400 waylandsink: Refactor internal pool handling
This is to make it easier to support more then one allocators
including falling back from one to another.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3801>
2023-03-14 21:50:57 +00:00
Nicolas Dufresne 9084a960a5 waylandsink: Let the baseclass know when frames are dropped
This is using the new GST_BASE_SINK_FLOW_DROPPED return value.
With this change, fpsdisplaysink will properly report the
render and dropped rate.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3801>
2023-03-14 21:50:57 +00:00
Nicolas Dufresne 5c256cffa6 basesink: Add GST_BASE_SINK_FLOW_DROPPED return value
This new flow return value can be used in ::render virtual method
to signal that a frame is not being rendered.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3801>
2023-03-14 21:50:57 +00:00
Nicolas Dufresne 018fdf36b1 gtkwaylandsink: Force a redraw on resolution change
As we don't render into the widget directly, there is no "initial" draw
happening. As a side effect, the internal aspect ratio adapted display
width/height is never initialize leading to assertions when handling navigation
events.

  gst_video_center_rect: assertion 'src->h != 0' failed

Simply queue a redraw after setting the widget format in order to fix the issue.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3801>
2023-03-14 21:50:57 +00:00
Nicolas Dufresne 3ed0d34065 waylandsink: Stop modifying the display GstVideoInfo
The video_info is supposed to match the display dimentions, but as soon as we
get a padded video buffer, we modify it. This has side effect later on and
maybe cause bad frames.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3801>
2023-03-14 21:50:57 +00:00
Nicolas Dufresne beaff76dd0 gtkwaylandsink: Remove redefine of GST_CAPS_FEATURE_MEMORY_DMABUF
Instead just include the appropriate header file. There is no meson deps
modification as gstallocators_dep is already part of gstwayland_dep.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3801>
2023-03-14 21:50:57 +00:00
Nicolas Dufresne 37f2d2ac42 kmsallocator: Port to the new DRM Dumb Allocator
This ports the KMS allocator to use the DRM Dumb allocator from the allocators
library.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3801>
2023-03-14 21:50:57 +00:00
Nicolas Dufresne 7c7f2bb6df allocators: Add a DRM Dumb Allocator
This allow allocating memory from any DRM driver that supports this
method. It additionally allow exporting DMABuf. This allocator depends
on libdrm and will be stubbed if the dependency is missing. This is derived
from kmssink dumb allocator.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3801>
2023-03-14 21:50:57 +00:00
Arun Raghavan 82b892ba3e matroskamux: Set rate/channels in Opus template caps
For some reason these were missed, and if caps didn't have them, we would emit
an invalid Matroska file with a 0 value for Sampling Frequency or channels.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2354
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4151>
2023-03-14 11:09:08 -04:00
Arun Raghavan 0ed51294e0 rtpopusdepay: Assume 48 kHz if sprop-maxcapturerate is missing
This matches 7587, section 6.1:

>   sprop-maxcapturerate:  a hint about the maximum input sampling rate
>      [...]
>      bandwidths (Table 1).  By default, the sender is assumed to have
>      no limitations, i.e., 48000.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2354
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4151>
2023-03-14 11:09:08 -04:00
Sebastian Dröge fe580cacb8 androidmedia: Add support for AV1
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4156>
2023-03-14 11:26:30 +00:00
Thibault Saunier 734263617b validate: scenario: Allow scenario to define the pipeline state target
Some user might want to start executing actions from the start.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4164>
2023-03-14 05:46:14 +00:00
Alicia Boya García ac6a457614 stats: Adapt to new serialization of enums
GStreamer 1.18 changed the serialization of enums.

This patch updates gsttr-stats.py to handle the new format.

In absence of that, the script was failing like this:

```
Traceback (most recent call last):
  File "/home/ntrrgc/Apps/gstreamer/./subprojects/gst-devtools/tracer/gsttr-stats.py", line 224, in <module>
    runner.run()
  File "/home/ntrrgc/Apps/gstreamer/subprojects/gst-devtools/tracer/tracer/analysis_runner.py", line 42, in run
    self.handle_tracer_entry(event)
  File "/home/ntrrgc/Apps/gstreamer/subprojects/gst-devtools/tracer/tracer/analysis_runner.py", line 27,
  in handle_tracer_entry
    analyzer.handle_tracer_entry(event)
  File "/home/ntrrgc/Apps/gstreamer/./subprojects/gst-devtools/tracer/gsttr-stats.py", line 114, in handle_tracer_entry
    key = (_SCOPE_RELATED_TO[sv.values['related-to']] + ":" + str(s.values[sk]))
KeyError: 'thread'
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4155>
2023-03-14 04:39:14 +00:00
Alicia Boya García 85b6625150 cudaloader: Initialize logging category
gstcudaloader.cpp defines GST_DEBUG_CATEGORY (gst_cudaloader_debug);
but it wasn't initializing it anywhere.

This caused the following error to be logged by gst-plugin-scanner when
libcuda.so.1/nvcuda.dll couldn't be loaded, e.g. in systems without
CUDA:

(gst-plugin-scanner:39618): GStreamer-CRITICAL **: 14:40:22.346:
gst_debug_log_full_valist: assertion 'category != NULL' failed

This patch fixes the bug by initializing the category in
gst_cuda_load_library_once_func() before any logging occurs.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4154>
2023-03-14 03:07:50 +00:00
Alicia Boya García 136b2e0eae tracers: Document the 'log' tracer
This patch adds documentation to the 'log' tracer and amends the design
document of Tracers to replace a misleading example of the 'log' tracer
with a different example that uses tracer arguments with tracers that do
actually handle said arguments.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4153>
2023-03-14 01:35:14 +00:00
Nirbheek Chauhan 3b9ce6cb54 avfvideosrc: GL texture cache also supports YUY2 on macOS
BGRA gives black frames, and everything else fails to negotiate.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4134>
2023-03-14 00:00:24 +00:00
Nirbheek Chauhan a8ed817d30 avfvideosrc: Use frame duration instead of frame rate
These days you're can use minFrameDuration and maxFrameDuration which
are CMTime with fractional values. That way we don't need to convert
between double and fractions in a really weird way.

This fixes really odd fractional values exposed in caps, like:

2000000/76923, 1000000/37037, 5000000/178571, 10000000/344827, 10000000/333333

Which are actually just 26/1, 27/1, 28/1, 29/1, 30/1

We can also delete a lot of outdated code for iOS versions older than
7.0 by using newer APIs.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4134>
2023-03-14 00:00:24 +00:00
Carlos Falgueras García 76abb90477 gluploadelement: Delete unused types
`*GstGLUploadElementPrivate` is not defined or used anywhere.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4145>
2023-03-13 06:15:03 +00:00
Víctor Manuel Jáquez Leal 6c71654991 tests: add tests for GstVideoInfoDmaDrm
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4043>
2023-03-12 03:09:01 +00:00
He Junyan 67d0a911a5 video: add dma format and info helper functions
From the dmabuf.md[1], "drm-format" field in caps will replace the
traditional "format" field, so it needs to import some new helper
functions to support this.

1. https://gstreamer.freedesktop.org/documentation/additional/design/dmabuf.html

Co-authored-by: Yinhang Liu <yinhang.liu@intel.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4043>
2023-03-12 03:09:01 +00:00
Xavier Claessens 174132af8d gstallocator: Use the right allocator instance to free memory
In the case GST_ALLOCATOR_FLAG_CUSTOM_ALLOC is set, `copy` is allocated
by the default allocator and not mem->allocator.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4144>
2023-03-11 08:03:17 +00:00
Nirbheek Chauhan f3665ce800 gstvalue: Implement union for GstFractionRange
This fixes simplification of caps with GstFractionRange structures,
for example, this caps:

  video/x-raw, framerate=(fraction)5/1; video/x-raw, framerate=(fraction)[ 5/1, 30/1 ]

can now be simplified to:

  video/x-raw, framerate=(fraction)[ 5/1, 30/1 ]

instead of:

  video/x-raw, framerate=(fraction){ 5/1, [ 5/1, 30/1 ] }

And this:

  video/x-raw, framerate=(fraction)[ 2/1, 5/1 ]; video/x-raw, framerate=(fraction)[ 5/1, 30/1 ]

can be simplified to:

  video/x-raw, framerate=(fraction)[ 2/1, 30/1 ]

instead of

  video/x-raw, framerate=(fraction){ [ 2/1, 5/1 ], [ 5/1, 30/1 ] }

This fixes overly-complicated GL caps set by avfvideosrc on macOS and
iOS when capturing from a webcam.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4132>
2023-03-11 04:15:13 +00:00
Stéphane Cerveau f6b2b716b2 timeoverlay: add buffer-count mode
This mode would allow to display the buffer
number received by the timeoverlay element.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3827>
2023-03-10 16:00:53 +00:00
Seungha Yang 7624871b00 va: Update "device-path" property description for Windows
DRM does not make sense on Windows

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4114>
2023-03-10 13:57:47 +00:00
Seungha Yang 7bc6ba63b2 va: Add Windows specific element type/feature naming support
Adapter LUID will be changed per boot. Use different naming rule on Windows

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4114>
2023-03-10 13:57:47 +00:00
Seungha Yang c1946c0209 va: Add support for Win32 backend
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4114>
2023-03-10 13:57:47 +00:00
Seungha Yang 8fc77e5b3d va: Add Win32 backend GstVaDisplay implementation
... and disable derived image on Windows which does not seem to
work

Closes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1750
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4114>
2023-03-10 13:57:47 +00:00
Seungha Yang bc8db7bc3e va: Drop all GSlice bits
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4114>
2023-03-10 13:57:47 +00:00
Tim-Philipp Müller 99ee8af782 webrtc: fix g-i annotations for allow-none
'allow none' doesn't exist, and 'allow-none' is now deprecated.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4146>
2023-03-10 13:09:25 +00:00
Antonio Rojas 9835032727 zxing: add support for zxing-c++ 2.0
format is a C++ string in 2.0

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3693>
2023-03-10 09:33:35 +00:00
Matthew Waters a1bfd8668c vulkanoverlaycompositor: don't do a potential use after free
Removing a meta from a buffer means one doesn't have access to it
anymore.  Instead use the already reffed composition directly.

Fixes a use-after-free in the following pipeline:

... ! vulkanupload ! timeoverlay ! vulkanoverlaycompositor ! ...

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4143>
2023-03-10 16:54:46 +11:00
Matthew Waters df939fe332 cea708overlay: support multiple service blocks in the same dtvcc packet
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4137>
2023-03-10 02:09:56 +00:00
Itamar Marom b8730bc98e splitmuxsink: Fix docs support version
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4138>
2023-03-09 15:08:19 +02:00
Matthew Waters 22229d9546 cea708overlay: fix HCR interpretation
An unsigned counter with a for (i = end; i >= 0; i--), can be optimized to
infinite loop as an unsigned value will always be >= 0.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4133>
2023-03-09 14:38:13 +11:00
Seungha Yang ad30fb87c2 h264parse: Validate VUI framerate
A few streams contain invalid/wrong framerate in VUI. Do validate
it based on the spec and ignore invalid VUI framerate values.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1753
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4127>
2023-03-08 11:59:52 +00:00
Matthew Waters be72fbc334 cccombiner: fix output-padding=false for a cea608 field 1 only stream
If we have data that needs outputting but we have to output padding to
meet the alternating field requirements of cea608, then output that
padding anyway.

Also includes a test

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4124>
2023-03-08 11:11:05 +00:00
Mathieu Duponchelle 2eab37f231 ccconverter: implement field conversion of CEA 608 control codes
As specified in EIA/CEA-608-B section 8.4:

When closed captioning is used on line 21, field 2, it shall conform
to all of the applicable specifications and recommended practices as
defined for field 1 services with the following differences:

a) The non-printing character of the miscellaneous control-character pairs
  that fall in the range of 14h, 20h to 14h, 2Fh in field 1, shall be replaced
  with 15h, 20h to 15h, 2Fh when used in field 2.
b) The non-printing character of the miscellaneous control-character pairs
  that fall in the range of 1Ch, 20h to 1Ch, 2Fh in field 1, shall be replaced
  with 1Dh, 20h to 1Dh, 2Fh when used in field 2.

This means simply switching the "field" field in the caps isn't enough for
converting raw 608 from one field to another, some control codes also
need to be amended.

+ Adds simple test

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4126>
2023-03-08 10:13:59 +00:00
Edward Hervey b4cadf35bd uridecodebin3: Ensure atomic urisourcebin state change
When dynamically adding and synchronizing the state of urisourcebin, we need to
ensure that no-one else attempts to change the state in case of failures

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4125>
2023-03-08 09:29:57 +00:00
Matt Feury 224030ff0c rtspsrc: Consider "451: Parameter Not Understood" when handling broken control urls
similar to https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3854

it seems that some implementations return this when
the server does not implement URL handling correctly

this fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2334

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4123>
2023-03-07 10:32:32 -05:00
Seungha Yang b6e45d0de8 vavp8dec: Fix return type of decode_picture()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4113>
2023-03-06 13:39:20 +00:00
Seungha Yang c5ae00f58c vajpegdec: Hide gst_jpeg_decoder_get_type() symbol
It's not a public symbol yet

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4113>
2023-03-06 13:39:20 +00:00
Seungha Yang fbf143b0fd vabaseenc: Fix return type of encode_frame vfunc
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4113>
2023-03-06 13:39:19 +00:00
Seungha Yang 2f98234287 va: Fix struct empty initialization syntax
"struct Foo bar; bar = {};" is not a valid syntax. Also remove use
of __typeof__ which is GCC specific

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4113>
2023-03-06 13:39:19 +00:00
Seungha Yang 837d8d1b20 h265timestamper: Use gst_h265_parser_parse_decoder_config_record()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2759>
2023-03-06 12:50:41 +00:00