Commit graph

19953 commits

Author SHA1 Message Date
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
Nirbheek Chauhan
4d5d7bf1c0 meson: Don't generate doc cache when no plugins are enabled
Fixes gst-build with -Dauto-features=disabled
2019-07-17 19:12:49 +05:30
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
7327214bce tests: video: Add test conversion between colorimetry and ISO/IEC 23001-8 values
Test forward/backword conversion of color{matrix,transfer,primaries}.
2019-07-15 20:55:34 +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
Thibault Saunier
6d49814932 Revert "typefind: Hold off making suggestions too early for MPEG based formats"
This reverts commit 36319169d0
2019-07-10 21:57:13 +00:00
Thomas Bluemel
36319169d0 typefind: Hold off making suggestions too early for MPEG based formats
By suggesting possible detection too early, it's possible that
the wrong format is detected. Hold off making suggestions until one
of the following conditions is met:
* Probability > GST_TYPE_FIND_LIKELY
* At least MPEG_MIN_PROBE_LENGTH bytes have been examined
* EOS, in which case the best guess wins

Fixes #628
2019-07-09 20:34:01 -06:00
Seungha Yang
8f125fb4d9 examples: win32-videooverlay: Fix C2440 build error
Follow WNDPROC define to avoid implicit type conversion.
2019-07-10 01:34:13 +09: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
Seungha Yang
3a53ec066b examples: Add a video overlay example for WIN32 videosink elements
User can set the target WIN32 video element via "videosink" command line
option. Default is glimagesink.
2019-07-08 17:32:37 +09:00
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
Seungha Yang
0b44ac28b7 gst-play: Handle "space" key event correctly on Windows
The key name string given by GetKeyNameText() can have uppercase letter.
2019-06-30 13:10:50 +09: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
Tim-Philipp Müller
ff0f659ca5 compositor: fix compiler warning due to c99-ism 2019-06-24 09:44:29 +00: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
Song Bing
3aa1437ae4 playsink: Set ts-offset to text sink.
Find right text sink to set the ts-offset.
2019-06-18 06:14:28 +00: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
3dc9f772ec tests: pbutils: Add test parsing H265 profiles 2019-06-15 17:17:36 -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
Håvard Graff
2572f4d7c5 meson.build: use join_paths() on prefix
So that "/" are correct on Windows.
2019-06-14 15:47:49 +00: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
Nirbheek Chauhan
abd80b6561 compositor: Copy frames as-is when possible
The blend functions for alpha formats need to do more work than just
doing a memcpy, so we can do a memcpy when we know that a blend is not
actually needed.

1080p AYUV ! compositor background=transparent ! fakesink - 56% faster

Specifically, when we don't draw the background and the first pad we
draw completely covers the output frame, we can just copy it as-is.
The rest of the pads (if any) will get composited on top normally.
2019-06-14 02:50:51 +05:30
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
Nirbheek Chauhan
bb1650cfda compositor: Sprinkle some const in prototypes
These helper functions don't edit the rectangles passed in.
2019-06-13 20:31:50 +05:30
Nirbheek Chauhan
ba4484c6a0 compositor: Skip background if transparent and obscured
If the background is transparent and obscured by a pad that may or may
not have alpha, we can still skip drawing it entirely

AYUV 1080p ! compositor background=transparent ! fakesink - 75% faster
2019-06-13 20:31:50 +05:30
Nirbheek Chauhan
ba20aec539 compositor: Skip the background when not visible
We don't need to waste time drawing the background when one of the
pads completely covers the output and there's no alpha on the pad or
in the video format. Speedups:

I420 1080p ! compositor ! fakesink - 72% faster
I420 1080p ! compositor background=black ! fakesink - 45% faster
2019-06-13 20:31:50 +05:30
Nirbheek Chauhan
65615a841d compositor: Don't log per-frame under GST_INFO 2019-06-13 20:31:50 +05:30
Nirbheek Chauhan
ecec30c1ca compositor: Factor-out rectangle-obscuring check
We're going to use this for checking if one of the pads obscures the
background.
2019-06-13 20:31:50 +05:30
Nirbheek Chauhan
a3462a2c6d compositor: Add some comments, remove outdated ones 2019-06-13 20:31:50 +05:30
Nirbheek Chauhan
cf3287dba4 compositor: Remove unused function argument 2019-06-13 20:31:50 +05:30
Matthew Waters
7ff2cfa977 tests/gl-launch-lines: gltestsrc works on gles2/opengl3 now
There's no need to feature gate the gltestsrc pipelines anymore
2019-06-13 09:37:37 +00:00
Matthew Waters
f31b83bc86 glvideomixer: perform _get_highest_precision on the GL thread
gst_gl_shader_string_get_highest_precision needs to make an OpenGL call
so execution outside the OpenGL thread and context results in undefined
behaviour.
2019-06-13 09:37:37 +00:00