Commit graph

7516 commits

Author SHA1 Message Date
Haihao Xiang
7ef84fb757 glimagesink: add support for Y410 format
Sample pipeline:
gst-launch-1.0 videotestsrc ! video/x-raw,format=Y410 ! glimagesink
2019-10-15 04:44:02 +00:00
Haihao Xiang
56de495f0e glcolorconvert: merge shaders for AYUV and VUYA formats
The shaders can be used for AYUV and varieties.
2019-10-15 04:44:01 +00:00
Tim-Philipp Müller
289d8e53e2 Remove autotools build system 2019-10-13 14:15:43 +01:00
Tim-Philipp Müller
50aeeec15b pbutils: add description for CineForm codec 2019-10-08 19:38:14 +01:00
Tim-Philipp Müller
0704cc01a7 riff: add mapping for CineForm codec
Makes CineForm-in-AVI work.
2019-10-08 19:38:05 +01:00
Thibault Saunier
8d32de0905 glupload: Add VideoMetas and GLSyncMeta to the raw uploaded buffers
This is done by reusing `gst_gl_memory_setup_buffer` avoiding to
duplicate code.

Without a VideoMeta, mapping those buffers lead to GstBuffer mapping the
buffer in system memory even when specifying the GL flags (through the
buffer merging mechanism) making the result totally broken.
2019-10-02 19:27:39 +00:00
Haihao Xiang
606ab04cd6 video-format: correct the pixel stride for Y410
The stride for Y410 is 4 bytes, not 0 byte
2019-09-30 14:26:14 +00:00
Axel Mårtensson
feb1e24347 audiosink: fix resuming after pause
For resuming after paused, gst_audio_sink_ring_buffer_start() needs to
be called to notify the ringbuffer to continue to play.
2019-09-27 05:34:57 +00:00
Philippe Renon
0dc1b6049e audiosink: expose more audioringbuffer vmethods to child sinks
The newly exposed vmethods are pause, resume, stop and clear_all.
The existing reset vmethod is deprecated.

The audio sink will fallback to calling reset if pause or stop
are not provided and will fallback to calling start if
resume is not provided. There is no default clear_all
implementation.
Existing audio sinks continue to work as before.

This change is useful for sinks that need to distinguish
between a pause and a stop (currently both are handled
by a reset) and is needed for https://bugzilla.gnome.org/show_bug.cgi?id=788362

https://bugzilla.gnome.org/show_bug.cgi?id=788361
2019-09-27 05:34:57 +00:00
Nirbheek Chauhan
6f7c9e43bc audio: Use LoadPackagedLibrary when building for UWP
Universal Windows Platform apps are not allowed to use LoadLibrary to
load arbitrary DLLs from the filesystem. They can only use
LoadPackagedLibrary to load DLLs that have been packaged with the app
as assets.

See also: https://gitlab.freedesktop.org/gstreamer/gstreamer/merge_requests/190
2019-09-24 15:17:39 +00:00
Matthew Waters
8ce2460ad5 build: fix debug output werror build with newer gcc
In file included from ../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/gst.h:55,
                 from ../gst-libs/gst/tag/tag.h:25,
                 from ../gst-libs/gst/tag/gsttageditingprivate.h:24,
                 from ../gst-libs/gst/tag/gsttageditingprivate.c:23:
../gst-libs/gst/tag/gsttageditingprivate.c: In function ‘__exif_tag_capturing_white_balance_to_exif_value’:
../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/gstinfo.h:645:5: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
  645 |     gst_debug_log ((cat), (level), __FILE__, GST_FUNCTION, __LINE__, \
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  646 |         (GObject *) (object), __VA_ARGS__);    \
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/gstinfo.h:1068:27: note: in expansion of macro ‘GST_CAT_LEVEL_LOG’
 1068 | #define GST_WARNING(...)  GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_WARNING, NULL, __VA_ARGS__)
      |                           ^~~~~~~~~~~~~~~~~
../gst-libs/gst/tag/gsttageditingprivate.c:265:3: note: in expansion of macro ‘GST_WARNING’
  265 |   GST_WARNING ("Invalid white balance: %s", str);
      |   ^~~~~~~~~~~
../gst-libs/gst/tag/gsttageditingprivate.c:265:40: note: format string is defined here
  265 |   GST_WARNING ("Invalid white balance: %s", str);
      |                                        ^~

In file included from ../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/gst.h:55,
                 from ../gst-libs/gst/tag/tag.h:25,
                 from ../gst-libs/gst/tag/gstxmptag.c:39:
../gst-libs/gst/tag/gstxmptag.c: In function ‘deserialize_exif_gps_direction’:
../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/gstinfo.h:645:5: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
  645 |     gst_debug_log ((cat), (level), __FILE__, GST_FUNCTION, __LINE__, \
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  646 |         (GObject *) (object), __VA_ARGS__);    \
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/gstinfo.h:1068:27: note: in expansion of macro ‘GST_CAT_LEVEL_LOG’
 1068 | #define GST_WARNING(...)  GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_WARNING, NULL, __VA_ARGS__)
      |                           ^~~~~~~~~~~~~~~~~
../gst-libs/gst/tag/gstxmptag.c:818:5: note: in expansion of macro ‘GST_WARNING’
  818 |     GST_WARNING ("Missing %s tag", dirref_str);
      |     ^~~~~~~~~~~
../gst-libs/gst/tag/gstxmptag.c:818:27: note: format string is defined here
  818 |     GST_WARNING ("Missing %s tag", dirref_str);
      |                           ^~
In file included from ../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/gst.h:55,
                 from ../gst-libs/gst/tag/tag.h:25,
                 from ../gst-libs/gst/tag/gstxmptag.c:39:
../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/gstinfo.h:645:5: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
  645 |     gst_debug_log ((cat), (level), __FILE__, GST_FUNCTION, __LINE__, \
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  646 |         (GObject *) (object), __VA_ARGS__);    \
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/gstinfo.h:1068:27: note: in expansion of macro ‘GST_CAT_LEVEL_LOG’
 1068 | #define GST_WARNING(...)  GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_WARNING, NULL, __VA_ARGS__)
      |                           ^~~~~~~~~~~~~~~~~
../gst-libs/gst/tag/gstxmptag.c:814:5: note: in expansion of macro ‘GST_WARNING’
  814 |     GST_WARNING ("Missing %s tag", dir_str);
      |     ^~~~~~~~~~~
../gst-libs/gst/tag/gstxmptag.c:814:27: note: format string is defined here
  814 |     GST_WARNING ("Missing %s tag", dir_str);
      |                           ^~

In file included from ../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/gst.h:55,
                 from ../gst-libs/gst/gl/gstgl_fwd.h:24,
                 from ../gst-libs/gst/gl/gl.h:24,
                 from ../gst-libs/gst/gl/gstglsl.c:25:
../gst-libs/gst/gl/gstglsl.c: In function ‘gst_glsl_version_profile_from_string’:
../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/gstinfo.h:645:5: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
  645 |     gst_debug_log ((cat), (level), __FILE__, GST_FUNCTION, __LINE__, \
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  646 |         (GObject *) (object), __VA_ARGS__);    \
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/gstinfo.h:1068:27: note: in expansion of macro ‘GST_CAT_LEVEL_LOG’
 1068 | #define GST_WARNING(...)  GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_WARNING, NULL, __VA_ARGS__)
      |                           ^~~~~~~~~~~~~~~~~
../gst-libs/gst/gl/gstglsl.c:333:7: note: in expansion of macro ‘GST_WARNING’
  333 |       GST_WARNING ("Invalid preprocesser directive detected: %s", version_s);
      |       ^~~~~~~~~~~
../gst-libs/gst/gl/gstglsl.c:333:62: note: format string is defined here
  333 |       GST_WARNING ("Invalid preprocesser directive detected: %s", version_s);
      |                                                              ^~

In function ‘print_stream_info’,
    inlined from ‘print_topology’ at ../tools/gst-discoverer.c:352:3:
../tools/gst-discoverer.c:316:3: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
  316 |   g_print ("%*s%s: %s\n", 2 * GPOINTER_TO_INT (depth), " ",
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  317 |       gst_discoverer_stream_info_get_stream_type_nick (info), desc);
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2019-09-23 17:59:12 +10:00
Haihao Xiang
14ce1ccdd2 glimagesink: Fix VUYA in memory:DMABuf
Sample pipeline:
gst-launch-1.0 videotestsrc ! msdkvpp ! \
video/x-raw\(memory:DMABuf\),format=VUYA ! glimagesink
2019-09-16 15:46:47 +08:00
Seungha Yang
e5d06b24b7 egldevice: Fix undeclared type build error
Not all eglext.h defines EGLDeviceEXT type. That's implementation and
egl extension version dependent.
2019-09-12 13:32:07 +00:00
Doug Nazar
0c955c16ce audio-resampler: Update NEON to handle remainders not multiples of 4
If the remainder is not evenly divisable by 4, we'd miss the check
for zero and continue the loop until crashing. Change the branch
to take into account negatives as well.

This more closely matches the SSE loop.
2019-09-02 23:25:39 -04:00
Thibault Saunier
909baa2360 Pass the code through codespell 2019-08-30 13:05:36 +00:00
Matthew Waters
fc539f6162 glwindow/cocoa: silence unused-variable warning
We are using ARC to cleanup after ourselves.

../gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m:159:20: error: unused variable 'queue' [-Werror,-Wunused-variable]
  dispatch_queue_t queue = (__bridge_transfer dispatch_queue_t) window->priv->gl_queue;
                   ^
2019-08-30 13:00:14 +10:00
Matthew Waters
bff6e9a749 glcontext/egl: fallback to WINDOW_BIT if PBUFFER_BIT fails
There are some drivers that do not advertise any PBUFFER EGLConfig's.
2019-08-29 00:31:26 +00:00
Jonas Larsson
94984e13a9 eglimage: Fix memory leak
Also free the GstEGLImage struct allocated by g_new0.

Fixes #661
2019-08-28 11:24:01 -07:00
Mathieu Duponchelle
4ccc7a51d1 {audio,video}aggregator: define autoptr cleanup functions 2019-08-28 14:52:22 +00:00
Hou Qi
b65d1c6de9 audiodecoder: fix ctitical info assertion 'GST_IS_CAPS (dec->priv->ctx.caps)' failed
Matroskademux will send gap event when lag of video and audio is over 3 seconds.
audiodecoder needs to handle gap event and set default output caps.
Only audio info is set, while output caps is ignored. This cause the assertion failed.

Need to fill output caps in gst_audio_decoder_negotiate_default_caps() with
negotiated caps to avoid critical info printed when check it later.
2019-08-28 00:59:56 +00:00
Nirbheek Chauhan
564ab3031b gstgl: Add a new window type for WinRT
This is needed for using GstGL with ANGLE as the GLES implementation
in Universal Windows Platform apps that use the Windows Runtime
(WinRT) instead of Win32, which is deprecated and not allowed in
Windows Store apps.

This has been tested with Servo on the Microsoft HoloLens 2, and seems
to work quite well.
2019-08-28 02:25:11 +05:30
Mathieu Duponchelle
97426fd52e encoding-target: fix SECTION comment syntax
See https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/658
2019-08-27 14:25:34 +00:00
Niels De Graef
0314b482f3 Don't pass default GLib marshallers for signals
By passing NULL to `g_signal_new` instead of a marshaller, GLib will
actually internally optimize the signal (if the marshaller is available
in GLib itself) by also setting the valist marshaller. This makes the
signal emission a bit more performant than the regular marshalling,
which still needs to box into `GValue` and call libffi in case of a
generic marshaller.

Note that for custom marshallers, one would use
`g_signal_set_va_marshaller()` with the valist marshaller instead.
2019-08-27 07:31:57 +02:00
Seungha Yang
5f70adf667 gl/egl/display: Add support EGLDevice display type
Simple addition for supporting EXT_platform_device typed display.
It's a kind of special display type (part of EGL specification)
which has no window at all.
To use EGLDevice explicitly, set environment "GST_GL_WINDOW=egl-device"

See also https://www.khronos.org/registry/EGL/extensions/EXT/EGL_EXT_platform_device.txt
2019-08-21 05:19:46 +00:00
Seungha Yang
7a378ba3ab glwindow: Introduce new vfunc for querying output surface availability
Only dummy window will return FALSE for now.
2019-08-21 05:19:46 +00:00
Seungha Yang
0bfb862329 video-hdr: Update documentation
* Fix typo
s/nunormalized/normalized/g

* Update GstVideoMasteringDisplayInfo description
Each values are not array.

* Add missing newline between arguments description and
detailed comment.
2019-08-20 21:16:24 +09:00
Philippe Normand
8d122f21ad gl: New pushsrc-based glbasesrc base class
The gltestsrc element was refactored to inherit from this base class which
handles the GL context. The sub-class only needs to implement the gl_start,
gl_stop and fill_gl_memory vfuncs, along with properly advertizing the GL APIs
it supports through the supported_gl_api GstGLBaseSrc class attribute.
2019-08-20 09:51:05 +01:00
Sebastian Dröge
8478aa7aed video-frame: Take TFF flag from the video info if it was set in there
The caps and thus the video info have preference. If the field order is
set in there then it applies to all frames.

This works around issues where the tff field order is only set in the
caps but not additionally in the buffer flags.
2019-08-16 09:00:28 +00:00
Mathieu Duponchelle
f65145371b audioaggregator: add missing Since tag 2019-08-12 19:11:06 +02:00
Xavier Claessens
1b089ab065 glcolorconvert: Fix external-oes shader
The #extention must come before 'precision highp float;'.

Closes: #650
2019-08-12 15:52:17 +00:00
Seungha Yang
8936886192 video-hdr: Fix document typo
Fix missing document update. GstVideoContentLightMeta was changed to
GstVideoContentLightLevel during code review.
2019-08-12 22:47:33 +09:00
Tim-Philipp Müller
81dd81b739 video-color: keep UNKNOWN colorimetry define automatically up-to-date
Follow-up to !310 and helps with backport commits like !360
2019-08-11 14:16:51 +01:00
Seungha Yang
fe9c38244f gl: Add support for P016 format
All implementation for P010_10LE/BE can be reused.
2019-08-08 11:46:16 +09:00
Seungha Yang
c28721d89f video: Add P016 LE/BE formats
Add semi-planar 4:2:0 16 bits format.
2019-08-07 21:54:07 +00:00
Seungha Yang
90cf991337 video: Add Y444_16LE and Y444_16BE formats
Add 16 bits planar 4:4:4 YUV formats.
2019-08-07 12:10:47 +00:00
Sebastian Dröge
2bba48c9b5 video-anc: Fix ADF detection when trying to extract data from vanc
Previously we were checking offset 1 twice, but the second check
should've been for offset 2.
2019-08-07 13:01:07 +03:00
Jan Schmidt
dd966c437f exiftag: Don't output rational numbers with denominator = 0 2019-07-30 04:01:55 +10:00
Lucas Stach
7b8fc744f1 gl/wayland: fix wayland event source burning CPU
Commit c71dd72b "gl/wayland: fix glib mainloop integration" was overeager
in removing the poll result test from the check function. This caused
dispatch to be called even if no new events are available on the
Wayland connection, which in turn would wake up the glib mainloop,
causing effectively a tight loop without ever blocking on the poll.

Fixes #603
2019-07-26 08:48:05 +01:00
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