Commit graph

7478 commits

Author SHA1 Message Date
Wonchul Lee
ba9ef3c50e gldisplay: fix g-i warning 2019-07-23 09:10:17 +09:00
Guillaume Desmottes
509d4c31f0 video-format: add gst_video_format_info_component()
New API to find out which components are packed in a given plane.
Will prevent us from assuming a 1-1 mapping between planes and
components.
2019-07-19 15:47:02 +05:30
Mathieu Duponchelle
c854c270be basedepayload: do not create segment in onvif mode
basedepayload generates its own segment in a pretty unconventional
manner, relying on information in the caps such as npt-start or
npt-stop, usually set by rtspsrc.

In ONVIF mode, rtspsrc will generate the correct segment and this
logic in rtpbasedepayload will not be needed, this commit allows
rtspsrc to signal that through the caps.
2019-07-18 17:54:04 +02:00
Sebastian Dröge
1ec1123178 audioaggregator: Split getcaps() function into two
One for convert pads and one for normal sink pads.
2019-07-18 08:46:42 +03:00
Sebastian Dröge
5ebf6c2fac videoaggregator: We can only convert the format if a GstVideoAggregatorConvertPad is used
Otherwise assume that we can at least support any framerate.
2019-07-18 08:43:14 +03:00
Sebastian Dröge
0a21c28484 audioaggregator: Always take first configure pad's rate and downstream caps into account when calculating allow sink caps
While we can convert between all formats apart from the rate, we
actually need to make sure that we comply with a) the rate of the first
configured pad and b) also all the allowed rates from downstream.
2019-07-18 08:43:14 +03:00
Sebastian Dröge
7080d216a8 audioaggregator: If we don't have a GstAudioAggregatorConvertPad, don't assume that we can actually convert 2019-07-18 08:43:14 +03:00
Mathieu Duponchelle
bced52d2e8 audioaggregator: always use downstream's rate requirements
We were previously only fixating the rate in the getcaps
implementation when downstream was requiring a discrete value,
causing negotiation to fail when upstream was capable of rate
conversion, but not made aware that it had to occur.

Instead of fixating the rate, we can simply update our sink
template caps with whatever GValue the downstream caps are holding
as their rate field.

Allows negotiation to successfully complete with pipelines such as:

audiotestsrc ! audio/x-raw, rate=48000 ! audioresample ! audiomixer name=m ! \
audio/x-raw, rate={800, 1000} ! autoaudiosink \
audiotestsrc ! audio/x-raw, rate=44100 ! audioresample ! m.
2019-07-18 08:43:14 +03:00
Seungha Yang
7227feb5cd video-color: Enhance documentation of gst_video_colorimetry_to_string()
It could return null string. So need to clarify when it will be null.
2019-07-17 02:50:51 +09:00
Seungha Yang
6a4e2f4fc9 video-color: Add util functions for conversion from/to ISO/IEC 23001-8
... and also as known as ITU-T H.273.

The conversion has been handled per plugin for now. That causes
code duplication a lot also some plugins might not be updated with newly introduced
color{matrix,transfer,primaries} enum value(s).

Instead of handling it per plugin, centralized handling can remove such
code duplication and make plugins be up-to-dated.
2019-07-15 20:52:27 +09:00
Sebastian Dröge
1381e3e2be sdp: Add support for parsing the extmap attribute from caps and storing inside caps
The extmap attribute allows mapping RTP extension header IDs to
well-known RTP extension header specifications. See RFC8285 for details.

We store the extmap attribute either as string in the caps
  extmap-X=extensionname
where X is the integer extension header ID, or as 3-tuple of strings
  extmap-X=<direction,extensionname,extensionattributes>
where direction or extensionattributes are allowed to be the empty
string.

Both formats are allowed because usually only the extension name is
given and it's much simpler to handle in caps.
2019-07-13 12:18:15 +00:00
Dylan McCall
2e686b0dad gstgldisplay: Add public foreign_display property
We use this property in gst_gl_display_egl_from_gl_display, to set
foreign_display for the new GstGLDisplayEGL instance. This fixes a
problem where gst_gl_display_egl_finalize calls EglTerminate on a
pre-existing EGL connection.
2019-07-08 20:46:58 +00:00
Sumaid Syed
18351dcd24 tag: Add tags for acoustid id & acoustid fingerprint
Mapping followed: https://picard.musicbrainz.org/docs/mappings/

https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/612
2019-07-08 17:06:37 +05:30
Sumaid
8718458dc7 tag: Repair support for MusicBrainz IDs
Add missing release group ID and track ID
Mapping Followed:
https://picard.musicbrainz.org/docs/mappings/

https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/612
2019-07-08 16:31:34 +05:30
Marc Leeman
92137572c3 egl: wl_egl_window is not wl_proxy
It seems that eglCreatePlatformWindowSurfaceEXT is failing (with
EGL_BAD_ALLOC) because it thinks an EGL surface has already been created
for the wl_egl_window. The reason is that the "driver_private" field of
the wl_egl_window is getting clobbered by the function
wl_proxy_set_queue().

Since a wl_egl_window is not a wl_proxy, it shouldn't be passed to
wl_proxy_set_queue(). It just wraps a wl_surface (which is a wl_proxy).
And it looks like the queue for that surface is getting set earlier on
in the function anyway.

See https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/621#note_184582
2019-07-03 09:07:06 +00:00
Göran Jönsson
dcfa999e89 rtspconnection: data-offset increase not set 2019-06-28 07:22:17 +02:00
Göran Jönsson
35f2ea21e6 rtpsconnection: Fix number of n_vectors
Body_offset mean that so much data have been written.

Without this patch n_vectors somtimes  becomes one more than it should
and then there will be an vector that have a random size causing
writev_bytes to cause a "Bad address" error.
2019-06-27 13:18:06 +02:00
Nirbheek Chauhan
12d534bada video-color: Add compile-time assert for ColorimetryInfo enum
A comment is not sufficient because this will break when
cherry-picking or backporting commits.
2019-06-26 17:40:47 +05:30
Doug Nazar
fb842a3fdb audiodecoder: Fix leak on failed audio gaps
If we fail to process the gap event we need to unref the event or
we end up with a leak.
2019-06-26 03:51:03 -04:00
Philippe Normand
b233911684 glupload: Keep track of cached EGLImage texture format
This patch fixes the following critical warning:

CRITICAL **: 11:33:32.843: Unknown GL format 0x0 provided

It would happen during the setup of a second pipeline involving the DMABuf
uploader, typically with a v4l2src element. The warning was raised because the
uploader had a cached EGLImage already filled but the formats were not
synchronized accordingly.
2019-06-23 11:34:49 +01:00
Marco Felsch
197dcb9bf4 video-info: parse field-order for all interleaved formats
The "field-order" is related for all interlace_mode modes except the
"progressive" mode. So instead of or'ing each mode we can use the
already supported GST_VIDEO_INFO_IS_INTERLACED macro.
2019-06-18 09:44:44 +00:00
Haihao Xiang
6d0f796591 glimagesink: add support for P010 variants
This makes a pipeline below works:

little endian:
gst-launch-1.0 videotestsrc ! video/x-raw,format=P010_10LE ! glimagesink

big endian:
gst-launch-1.0 videotestsrc ! video/x-raw,format=P010_10BE ! glimagesink
2019-06-18 16:32:00 +08:00
Haihao Xiang
49f16489ab glcolorconvert: rename the NV12/NV12 shader to semi planar
This shader can be used for other semi planar formats, e.g. P010_10LE
2019-06-18 16:18:02 +08:00
Haihao Xiang
3f63295280 glimagesink: add support for BGR10A2_LE / RGB10A2_LE
This makes a pipeline below work:

gst-launch-1.0 videotestsrc ! video/x-raw,format={BGR10A2_LE, \
RGB10A2_LE} ! glimagesink
2019-06-18 02:58:16 +00:00
Haihao Xiang
d15a516037 glformat: removde dead break after return 2019-06-18 02:58:16 +00:00
Roman Sivriver
2b25862973 video-and: Fix buffer overflow detected by asan
gst_meta_api_type_register() assumes that the last tags element is null, but it wasn't

==17422==ERROR: AddressSanitizer: global-buffer-overflow on address 0x7f4e2a67c998 at pc 0x7f4e2a0c92ac bp 0x7ffcc41f80b0 sp 0x7ffcc41f80a0
READ of size 8 at 0x7f4e2a67c998 thread T0
    #0 0x7f4e2a0c92ab in gst_meta_api_type_register ../subprojects/gstreamer/gst/gstmeta.c:94
    #1 0x7f4e2a5582c3 in gst_video_afd_meta_api_get_type ../subprojects/gst-plugins-base/gst-libs/gst/video/video-anc.c:1146
    #2 0x404c7c in invoke_get_type (/home/ubuntu/gst-build/build/tmp-introspect5gv1rovo/GstVideo-1.0+0x404c7c)
    #3 0x406b5c in dump_irepository (/home/ubuntu/gst-build/build/tmp-introspect5gv1rovo/GstVideo-1.0+0x406b5c)
    #4 0x407089 in main (/home/ubuntu/gst-build/build/tmp-introspect5gv1rovo/GstVideo-1.0+0x407089)
    #5 0x7f4e295b4b6a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x26b6a)
    #6 0x404479 in _start (/home/ubuntu/gst-build/build/tmp-introspect5gv1rovo/GstVideo-1.0+0x404479)

0x7f4e2a67c998 is located 40 bytes to the left of global variable 'tags' defined in '../subprojects/gst-plugins-base/gst-libs/gst/video/video-anc.c:1232:25' (0x7f4e2a67c9c0) of size 24
0x7f4e2a67c998 is located 0 bytes to the right of global variable 'tags' defined in '../subprojects/gst-plugins-base/gst-libs/gst/video/video-anc.c:1141:25' (0x7f4e2a67c980) of size 24
SUMMARY: AddressSanitizer: global-buffer-overflow ../subprojects/gstreamer/gst/gstmeta.c:94 in gst_meta_api_type_register
2019-06-17 22:03:34 -04:00
Seungha Yang
3f0e1f937d codec-utils: Add parsing H265 range extensions profiles
Add support all h265 profiles defined by ITU-T H.264 (02/2018) revision
2019-06-15 17:17:36 -04:00
Wonchul Lee
7883663e26 appsrc: Fix typo in documentation 2019-06-15 14:33:32 +09:00
Wonchul Lee
afcfb22f83 videodecoder: Fix typo in documentation 2019-06-15 10:44:48 +09:00
Adrian Negreanu
96363a3425 glcontext_egl: check if eglChooseConfig has a matching config
The specs recommends to also check the num_config parameter.
2019-06-14 12:59:03 +03:00
Stian Selnes
eaade96409 rtpbasedepayload: Add max-reorder property
Add max-reorder property to make the old hard coded reordering limit of
100 configurable. It's particularly useful in some scenarios to set
max-reorder=0 to disable the behavior that the depayloader will drop
packets.

Note that although the default value is 100, the default limit has
increased with one because of the changed if-test. This was done to
allow the max-reorder value to be more intuitive. See tests.
2019-06-13 19:41:11 +03:00
Matthew Waters
6a399b95a8 glcontext: add a couple of preconditions of invalid usage 2019-06-13 07:08:06 +00:00
Víctor Manuel Jáquez Leal
634ff541d0 gl: detect possible GL version prefix
Instead of checking if the requested GL API is GLES2 (because ANY can
be set) the string is matched with the GLES2 prefix, and if so, then
the string is offset.
2019-06-12 20:42:34 +02:00
Havard Graff
f7408f9418 rtpbasepayload: don't use GINT_TO_POINTER with GType
GType can (and will) be 64bit. GINT_TO_POINTER is not.
This will result in the api-type checked for being a different one than
it actually is...
2019-06-12 12:38:26 +00:00
Havard Graff
2e342a16ce rtpbasedepayload: don't consider existing GstRTPSourceMeta
The meta should always be generated based on what is present in the
rtp-header.
2019-06-12 12:38:26 +00:00
Marc Leeman
a83859aaee gstrtppayloads: add vp8/vp9/opus encoding-name
Adding these encoding names allows easy lookup of the caps based on the
encoding-name.
2019-06-12 12:32:33 +00:00
Eike Hein
303f927d70 rtspconnection: Start CSeq at 1
RFC 7826 recommends (but does not require) starting at 0,
but at least one known server implementation fails to copy
request sequence numbers <1 into responses due to an
incorrect null check.

The server known to exhibit this behavior is the Parrot
Streaming Server, serving video from their UAV devices.
A fix has been submitted upstream as well:
https://github.com/Parrot-Developers/librtsp/pull/2

The Parrot developers are known to have tested with LibVLC.
In WireShark debugging, LibVLC appears to start with a CSeq
of 2, which is likely why this bug went unnoticed.

This reverts 487595a7d6, which set this to 0 citing the
RFC. The switch to 0 was thus a recent one; it's therefore
possible server implementors relied on the previous
GStreamer client behavior in their tests as well.

Fixes #624.
2019-06-12 16:21:41 +09:00
Haihua Hu
2ea98270b4 viv-fb: fix build break for GST_GL_API
Need include config.h in gstglwindow_viv_fb_egl.c
2019-06-11 18:55:00 +08:00
Thibault Saunier
e0ebd29a17 discoverer: Plug some leaks in the cache loading path 2019-06-07 22:44:31 -04:00
Mathieu Duponchelle
d6847fe04d discoverer: unref "next" variant when parsing from variant 2019-06-05 20:51:47 +00:00
Fernando Herrrera
80547d9437 wayland: set the event queue also for the xdg_wm_base object 2019-06-05 13:27:56 +01:00
Niels De Graef
93daa1435a Use G_DEFINE_AUTOPTR_CLEANUP_FUNC unconditionally
Since we started depending on GLib 2.44, we can be sure this macro is
defined (it will be a no-op on compilers that don't support it). For
plugins we should just start using `G_DECLARE_FINAL_TYPE` which means we
no longer need the macro there, but for most types in base/gst-libs we
don't want to break ABI, which means it's better to just keep it like it
is (and use the `#ifdef` instead).
2019-06-04 20:31:09 -04:00
Daniel Klamt
394ad27507 Added GI annotation for gstvideoaffinetransformationmeta apply_matrix
The problem is that Gobject Introspections does not understand the const
gfloat matrix[16] as an matrix but as an array of gfloasts but as just
one gfloat.

To fix this i added the annotation to the parameter
descriptions.
2019-06-02 16:42:57 +00:00
Mathieu Duponchelle
d98835fdef doc: remove xml from comments 2019-05-30 01:12:59 +02:00
Arun Raghavan
326940f89a video-color: Deal with NULL colorimetry while converting from string
This came up in the case where v4l2 sets caps with colorimetry=NULL, and
then tries to parse back the colorimetry, causing a crash in
gst_video_get_colorimetry() because of g_str_equal(). We fix this by
making sure the only caller of the function never calls it with a null
colorimetry string.
2019-05-24 16:37:14 +02:00
Arun Raghavan
aa759d4204 video-color: Fix unknown colorimetry checking
Also drop some deadcode #defines.
2019-05-24 16:35:08 +02:00
Seungha Yang
59007d848a video-color: Add ARIB STD-B67 transfer chracteristic function
It's known also as Rec. ITU-R BT.2100-1 hybrid log-gamma (HLG) used for
both SDR and HDR rendering.
2019-05-24 09:30:40 +00:00
Seungha Yang
f7af199b4c video-color: Add SMPTE ST 2084 support and BT 2100 colorimetry
SMPTE ST 2084 transfer characteristics (a.k.a ITU-R BT.2100-1 perceptual quantization, PQ)
is used for various HDR standard.
With ST 2084, we can represent BT 2100 (Rec. 2100). BT 2100 defines
various aspect of HDR such as resolution, transfer functions, matrix, primaries
and etc. It uses BT2020 color space (primaries and matrix) with PQ or HLG
transfer functions.
2019-05-24 09:30:40 +00:00
Seungha Yang
9d2f9d16a1 video-color: Define bt2020-10 transfer characteristics for clarity
bt707, bt2020-10, and bt2020-12 transfer characteristics are functionally
identical but have their own unique values by specification.
2019-05-24 09:30:40 +00:00
Matthew Waters
51f2d05ff6 gl/docs: add to new docs system 2019-05-21 01:49:48 +00:00