Commit graph

112906 commits

Author SHA1 Message Date
Doug Nazar
f52937d1ff clocksync: Fix providing system clock by default
clocksync defaults to sync=true so should advertise it by default.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/786>
2021-04-08 07:27:07 +00:00
Xavier Claessens
f38d2d3820 meson: Fix gstreamer-gl-prototypes-1.0.pc
This fix a warning because we were generating 2 pc files for gstgl
library. Also fix missing glesv2 in Requires.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1099>
2021-04-08 06:09:36 +00:00
Haihao Xiang
0193751ce8 libs: display: drm: don't fallback to default device if explicitly specified device can't load/init
Otherwise user will be misled that the specified device is using

This fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/issues/305

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/422>
2021-04-08 09:38:17 +08:00
Haihua Hu
e69d0151d2 jpeg2000parse: fix critical log when play one gray colorspace video
Need guess color space based on number of components when cannot
got it from sink caps

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1955>
2021-04-08 01:06:12 +00:00
Olivier Crête
0633bef05d ldacenc: Emit message on errors
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1875>
2021-04-08 00:38:47 +00:00
Olivier Crête
e041ff697d sbc: Return hard error on allocation or mapping error
Also post a message on the bus in these cases.wpe: Emit load-progress messages

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1875>
2021-04-08 00:38:47 +00:00
Raleigh Littles III
0b8b6f83ad Update short-cutting-the-pipeline.md to fix typo
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-docs/-/merge_requests/112>
2021-04-07 23:44:38 +00:00
Matej Knopp
e0623aa03a codec-utils: properly determine AAC Level
Table 1.10 – "Levels for the AAC Profile" only goes to 5 max channels
/ 7 max channel post amendmend, so I assume the number of channels
should not include LFE, otherwise there's no valid level for 5.1 resp.
7.1 (post amendmend)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/680>
2021-04-07 23:28:22 +00:00
Raleigh Littles III
d02846af8d Update gstreamer-tools.md to fix typo
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-docs/-/merge_requests/113>
2021-04-07 22:57:37 +00:00
Jose Quaresma
9f95805869 gstpluginloader: when env var is set do not fall through to system plugin scanner
If we set a custom GST_PLUGIN_SCANNER env var, then we probably want to use that and only that.

Falling through to the one installed on the system is problamatic in cross-compilation
environemnts, regardless of whether one pointed to by the env var succeeded or failed.

taken from:
http://cgit.openembedded.org/openembedded-core/commit/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch?id=0db7ba34ca41b107042306d13a6f0162885c123b

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/669>
2021-04-07 22:56:47 +00:00
Matthieu De Beule
f449a553a7 Tell programmers that set_volume uses linear scale (fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1439)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1722>
2021-04-07 22:54:37 +00:00
Jakub Adam
769df2c5d1 vpxenc: add colorspace information into VP9 bitstream
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/871>
2021-04-07 22:05:06 +00:00
Jan Alexander Steffens (heftig)
10b38146e8 gst-inspect: Allow overriding DEFAULT_LESS_OPTS with GST_LESS
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/777>
2021-04-07 22:01:14 +00:00
Olivier Crête
98bd83484c sbc/ldac: Don't use GST_CAPS_NONE to mean NULL
The GST_CAPS_NONE macro actually returns a instance of
a empty caps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1874>
2021-04-07 21:14:50 +00:00
Seungha Yang
50e116c4a7 codecs: vp9decoder: Allow decoding start with intra-only frame
As per spec "7.2 Uncompressed header semantics" and
"8.2 Frame order constraints", decoding can start with intra-only
frame. This commit is for fixing vp90-2-16-intra-only.webm
bitstream test failure.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2112>
2021-04-07 19:32:29 +00:00
Seungha Yang
6eb9856f59 codecs: vp9decoder: Pass GstVideoCodecFrame to duplicate_picture()
... and fix picture duplication logic for vavp9dec

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2112>
2021-04-07 19:32:29 +00:00
Seungha Yang
1f769839c0 codecs: vp9decoder: Port to GstVp9StatefulParser
Use newly implemented VP9 parser. Since new GstVp9FrameHeader
struct holds all the information of the stream, baseclass will not
pass parser object to new_sequence() method anymore.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2112>
2021-04-07 19:32:29 +00:00
Seungha Yang
c36190cbda codecparsers: Reimplement VP9 parser
Existing VP9 parser implementation doesn't provide information
required by other stateless decoding APIs (i.e., DXVA and NVDEC),
specifically loop filter and segmentation parameters might not exist
current frame. So parser needs to fill the information by using previously
parsed information.
We can update the gstvp9parser implementation so that it can provide
all information required by stateless decoding APIs with a huge API break,
or adding more ugly struct in it.
Instead doing as such, this commit introduce a new VP9 parser implementation.

What is different from existing one?
* All variables will follow the specification as much as possible:
  VP9 Bitstream & Decoding Process Specification - v0.6 31st March 2016
* Parser will fill all the required information for decoding frame
  to GstVp9FrameHeader struct. In case of old VP9 parser,
  user needs to read additional data from parser's member variables.
* GstVp9StatefulParser object struct is completely completely opaque

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2112>
2021-04-07 19:32:29 +00:00
Seungha Yang
771326a0fb codecs: vp9decoder: Don't check codec change with show_existing_frame
Show existing frame will zero frame_type value but it doesn't mean
it's keyframe.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2112>
2021-04-07 19:32:29 +00:00
Nicolas Dufresne
24eda30bd7 v4l2codecs: Fix holding of reference picture buffer
The picture buffer (V4L2 CAPTURE buffer) was being released immediatly
when the request was done. This was problematic since even after the
request is done, the picture buffer might still be used as a reference
and should not be reused for further decoding yet.

This change effectively bind the picture buffer lifetime to the request.
So that if the picture is never showned (decode only frame) or the request
queue is full before the buffer is displayed, the picture buffer will
remain alive.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2142>
2021-04-07 19:00:21 +00:00
Doug Nazar
81d4ccdc44 rtmp2: Use correct size of write macro for param2.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2146>
2021-04-07 07:48:57 -04:00
Víctor Manuel Jáquez Leal
7395057af3 va: filter: remove unsupported formats because driver's bugs
Add a way to filter out video formats from caps because of unresolved
bugs in drivers. In this case for media-driver (iHD) where some RGB32
formats are not handled correctly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2129>
2021-04-07 11:06:59 +00:00
Víctor Manuel Jáquez Leal
60db766a0d va: videoformats: Map more color formats.
Added Y212_LE, Y412_LE, P012_LE, Y444, RGB16, RGB and BGR10A2_LE in
the static map betwen VA and GStreamer color formats. This synchronize
the map used in gstremaer-vaapi and this plugin.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2129>
2021-04-07 11:06:59 +00:00
Víctor Manuel Jáquez Leal
d932dcf6be va: videoformats: Fix RGB32 mapping between VA and GStreamer.
Different VA drives might have different definitions for RGB32 color
formats because different bit interpretation. Sadly the specification
doesn't clarify these interpretations. So VA users have to figure out
what's the correct mapping with it's rendering color format
definition.

This patch aims to fix the static map structure after the
VAImageFormats are queried. There is another static map with the
different interpretations of the RGB32 formats, and compare them with
the given VAImageFormat, then with the GStreamer color format, update
the mapping table.

Finally, some RGB32 color formats were added.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2129>
2021-04-07 11:06:59 +00:00
Doug Nazar
dbff4c6f06 avtp: Fix log format macros
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2145>
2021-04-07 04:16:01 -04:00
Sebastian Dröge
defe732ae0 aggregator: Release pads' peeked buffer when removing the pad or finalizing it
The peeked buffer was always reset after calling ::aggregate() but under
no other circumstances. If a pad was removed after peeking and before
::aggregate() returned then the peeked buffer would be leaked.

This can easily happen if pads are removed from the aggregator from a
pad probe downstream of the source pad but still in the source pad's
streaming thread.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/784>
2021-04-06 21:17:56 +03:00
Daniel Almeida
4373535bb5 v4l2codecs: gstv4l2decoder.c: Add missing include
Add missing include for sys/ioctl.h so that these warnings dissapear
when compiling:
../subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2decoder.c:179:9:
warning: implicit declaration of function ‘ioctl’
[-Wimplicit-function-declaration]

Signed-off-by: Daniel Almeida <daniel.almeida@collabora.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2140>
2021-04-06 17:34:18 +00:00
Sebastian Dröge
337481be32 curlsftpsink: Don't run GST_DEBUG_OBJECT() on a class struct
It's supposed to be a GObject.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2141>
2021-04-06 19:18:45 +03:00
Yinhang Liu
531ccf0594 msdkh265enc: add support for RGB 10bit format
The SDK can support A2RGB10 format [1], A2RGB10 format corresponds
to BGR10A2_LE format in gstreamer. A2RGB10 format only supports
low-power mode.

Example:
gst-launch-1.0 videotestsrc ! video/x-raw,format=BGR10A2_LE \
! msdkh265enc low-power=1 ! fakesink

[1] https://github.com/Intel-Media-SDK/MediaSDK/blob/master/doc/mediasdk-man.md#mfxframedata

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2126>
2021-04-06 14:29:42 +00:00
Wim Taymans
cefdd0d0f1 vulkan: provide a custom VK_DEFINE_NON_DISPATCHABLE_HANDLE
If the application did not define one yet, define our own
VK_DEFINE_NON_DISPATCHABLE_HANDLE that is independent of the
architecture.

Vulkan, by default, provides a define that depends on the architecture,
which causes the symbol type to be different. This causes an
architecture dependent .gir file, which then causes multilib
installation problems because the .gir files can't be shared.

Make it possible to override the format specifier and provide
a default one that is compatible with the default non dispatchable
handle.

Return VK_NULL_HANDLE from functions that return a non-dispatchable
handle.

Fixes #1566

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2130>
2021-04-06 12:32:57 +02:00
Andrey Moiseev
d5b6cc88f9 gst-env: Windows: Fix looking for cmd_or_ps.ps1 in the wrong directory
At the point of get_windows_shell() execution, the current directory
equals DEFAULT_BUILDDIR=./build. But cmd_or_ps.ps1 is in SCRIPTDIR=./
(repo root). Point subprocess.check_output() to the correct directory.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/238>
2021-04-06 02:51:07 -07:00
Binh Truong
a5e2883ff0 Fix build issue on MinGW64
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1094>
2021-04-04 21:18:59 +07:00
Víctor Manuel Jáquez Leal
2ba5854c6b va: postproc, filter: add disable-passthrough property
vapostproc tries to be in passthrough mode as much as possible. But
they might be situations where the user might force to process the
frames. For example, when upstream sets the crop meta and the user
wants VA do that cropping, rather than downstream.

For those situations this property will disable the passthrough mode,
if it's enabled.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2058>
2021-04-03 15:47:18 +02:00
Víctor Manuel Jáquez Leal
f4862f8298 va: postproc: enable cropping by crop meta
If incoming buffers have crop meta it's done by vapostproc, iif
vapostproc is not in passthrough mode and downstream doesn't handle
it.

This patch announces the crop meta API in proposed bufferpool, while
it stops filtering meta APIs, since it was only filter crop api.

Also if downstream supports crop and video metas, vapostporoc
announces both meta APIs in upstream bufferpool.

Finally, the meta is removed from the buffer if the crop is enabled.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2058>
2021-04-03 15:47:18 +02:00
Víctor Manuel Jáquez Leal
c88abb9291 va: filter: add gst_va_filter_enable_cropping ()
This will toggle the cropping operation in the filter

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2058>
2021-04-03 15:47:18 +02:00
Víctor Manuel Jáquez Leal
c770469a8a va: filter, vpp: add and use GstVaSample struct
This new struct describes the input and output GstBuffers to
post-process, including VA flags. It also contains the VASurfaceID and
VARectangle, but those are private, completed inside GstVaFilter.

It is used for pass arguments to gst_va_filter_convert_surface() function.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2058>
2021-04-03 15:47:18 +02:00
Víctor Manuel Jáquez Leal
b2a4e066ab va: postproc: Use allocation caps when creating sink pool.
When an input buffer needs to be copied into a VA memory, it's
required to create a buffer pool. This patch uses the
propose_allocation() caps to instantiate the allocator and pool,
instead of the negotiated caps, which rather represents the resolution
to display.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2058>
2021-04-03 15:47:18 +02:00
Jakub Adam
50c32a8963 rtpbuffer: make sure header extension buffer is initialized
Based upon valgrind finding:

Conditional jump or move depends on uninitialised value(s)
   at 0x4AFF589: read_rtp_header_extensions (gstrtpbasedepayload.c:1197)
   by 0x4AFF9E5: gst_rtp_base_depayload_set_headers
(gstrtpbasedepayload.c:1298)
   by 0x4AFFEE0: gst_rtp_base_depayload_do_push
(gstrtpbasedepayload.c:1413)
   by 0x4AFFF53: gst_rtp_base_depayload_push
(gstrtpbasedepayload.c:1448)
   by 0x4AFDEBA: gst_rtp_base_depayload_handle_buffer
(gstrtpbasedepayload.c:801)
   by 0x4AFE41E: gst_rtp_base_depayload_chain_list
(gstrtpbasedepayload.c:899)
   by 0x48F262C: gst_pad_chain_data_unchecked (gstpad.c:4414)
   by 0x48F3333: gst_pad_push_data (gstpad.c:4655)
   by 0x48F3DF8: gst_pad_push_list (gstpad.c:4814)
   by 0x4AFAD87: gst_rtp_base_payload_push_list
(gstrtpbasepayload.c:1978)
   by 0x72B3154: gst_rtp_vp8_pay_handle_buffer (gstrtpvp8pay.c:672)
   by 0x4AF7031: gst_rtp_base_payload_chain (gstrtpbasepayload.c:868)
 Uninitialised value was created by a heap allocation
   at 0x483C77F: malloc (in
/usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
   by 0x4B8BA78: g_malloc (gmem.c:106)
   by 0x4BA3A9D: g_slice_alloc (gslice.c:1069)
   by 0x488D777: _sysmem_new_block (gstallocator.c:413)
   by 0x488DB28: default_alloc (gstallocator.c:512)
   by 0x488D3E8: gst_allocator_alloc (gstallocator.c:310)
   by 0x4AE97E3: gst_rtp_buffer_set_extension_data (gstrtpbuffer.c:856)
   by 0x4AF9EC6: set_headers (gstrtpbasepayload.c:1757)
   by 0x489FE4D: gst_buffer_list_foreach (gstbufferlist.c:287)
   by 0x4AFA87A: gst_rtp_base_payload_prepare_push
(gstrtpbasepayload.c:1915)
   by 0x4AFAD06: gst_rtp_base_payload_push_list
(gstrtpbasepayload.c:1970)
   by 0x72B3154: gst_rtp_vp8_pay_handle_buffer (gstrtpvp8pay.c:672)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1075>
2021-04-03 09:39:02 +00:00
Mathieu Duponchelle
ff3cce38b6 line21dec: relax caps requirements
Instead of requiring interlaced video, simply skip CC detection
when the input is progressive.

This allows placing line21decoder unconditionally in pipelines,
without having to worry about whether the input stream will be
interlaced, or even worse interlacing just in case!

+ update doc cache

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1885>
2021-04-03 00:42:15 +00:00
Mathieu Duponchelle
42586dd536 line21dec: expose mode property
That new property can be used to control whether and how
detected CC meta should be inserted in the list of existing
CC meta on the input frame (if there was any).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1885>
2021-04-03 00:42:14 +00:00
Mathieu Duponchelle
c915cb923e line21dec: expose ntsc-only property
When this is set, the element only tries to detect CC when the
height is 525 or 486 (NTSC resolutions). The height is already
checked.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1885>
2021-04-03 00:42:14 +00:00
Víctor Manuel Jáquez Leal
893aa67710 va: allocator: Use derived images only if not mapped for reading.
Derived images are direct maps to surfaces bits, but in Intel Gen7 to
Gen9, that memory is not cachable, thus reading can be very slow (it
might produce timeout is tests such as fluster).

This patch tries first to define if derived images are possible, and
later use them only if mapping is not for reading.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2128>
2021-04-02 17:39:01 +02:00
Víctor Manuel Jáquez Leal
f987cd8df9 va: caps: Add image formats in raw caps only for non-iHD.
This plugin, for decoders more concretely, assumes that a VA config
can do certain color conversions when mapping frames onto CPU's
memory.

This assumption was valid for i965 and Gallium drivers which generates
valid outputs in bitstreams testers (v.gr. fluster). Nonetheless, iHD,
even when it generates acceptable rendered frames, output's MD5 of
tests weren't valid.

This patch append the image formats, for color conversion when mapping
to memory, for non-iHD drivers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2128>
2021-04-02 17:18:10 +02:00
Chris White
abd99b8818 typefind: use new gst_type_find_suggest_empty_simple()
gst_type_find_suggest_simple() now requires a NULL terminator.
Use the new, simpler API for no-parameter calls.

https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/774#note_861492

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1092>
2021-04-01 21:44:10 -04:00
Chris White
96b10c158f caps: Add gst_caps_features_new_single()
For use with a single feature now that gst_caps_features_new() is
G_GNUC_NULL_TERMINATED.

https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/774#note_855357

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/774>
2021-04-01 20:55:13 -04:00
Chris White
7954eaaf25 typefind: add gst_type_find_suggest_empty_simple()
For cases where you only need a media type and no other fields.

https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/774#note_848664

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/774>
2021-04-01 20:55:09 -04:00
Chris White
a38d06cb1c gst: Add missing G_GNUC_NULL_TERMINATED markers
Functions that require NULL as their last vararg are marked so the
compiler can warn on missing NULL.

Also, document the NULL terminator for gst_make_element_message_details()
and gst_tracer_record_new().

https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/669

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/774>
2021-04-01 20:53:26 -04:00
Seungha Yang
5acd08f4c1 d3d11: Fix for UYVY/VYUY format rendering
Don't assume that non-native DXGI formats support RTV and/or SRV.
We are mapping UYVY and VYUY formats to DXGI_FORMAT_R8G8_B8G8_UNORM
which doesn't support render target view

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2133>
2021-04-01 16:07:33 +09:00
Hou Qi
a75cfa522d v4l2object: Use default colorimetry if that in caps is unknown
Some streams have unknown colorimetry in caps, but v4l2object sets
default values for each primaries. It will cause check colorimetry
fail when do gst_v4l2_video_colorimetry_matches().

To fix this, need to keep the unknown colorimetry in caps same as
the default value set by v4l2object.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/923>
2021-04-01 08:50:05 +08:00
Pieter Willem Jordaan
c899d0a52c systemclock: Fix deadlock on clock_nanosleep
Always use the monotonic clock's diff and end time for clock_nanosleep to have predictable behaviour even with other clock types.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/779>
2021-03-31 21:16:36 +02:00