platform/upstream/gstreamer.git
5 years agortspconnection: Handle EOF on writev() after checking for all other error conditions
Sebastian Dröge [Fri, 30 Nov 2018 10:47:57 +0000 (12:47 +0200)]
rtspconnection: Handle EOF on writev() after checking for all other error conditions

Otherwise we would return EOF if nothing was written in any case, even
if this was actually a case of TIMEOUT or EWOULDBLOCK for example.

Thanks to Edward Hervey for debugging and finding this issue.

5 years agortspconnection: Fixes for corrupt RTP packets in dispatch_write()
Ognyan Tonchev [Wed, 24 Oct 2018 09:32:22 +0000 (11:32 +0200)]
rtspconnection: Fixes for corrupt RTP packets in dispatch_write()

Fixes 2 problems:

1) Number of unmapped memories does not always match number of mmaped ones in
dispatch_write().
2) When dispatch_write() is dispatched second time after an incomplete write,
already set offsets will not be taken into account, thus corrupt RTP data will
be sent.

5 years agortsp-connection: Make use of new GstRTSPMessage API for directly storing a body buffe...
Sebastian Dröge [Mon, 17 Sep 2018 14:03:45 +0000 (17:03 +0300)]
rtsp-connection: Make use of new GstRTSPMessage API for directly storing a body buffer and add API for writing multiple messages

By doing so we can send a whole GstBufferList and each memory in the
contained buffers without copying into a single memory area and with a
single writev() call. This improves performance considerably for
high-packet-rate streams.

This depends on https://gitlab.gnome.org/GNOME/glib/merge_requests/333
to be efficient, otherwise each chunk of memory is a separate write()
call.

https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/370

5 years agortsp-message: Add support for storing GstBuffers directly as body payload of messages
Sebastian Dröge [Fri, 17 Aug 2018 09:51:31 +0000 (12:51 +0300)]
rtsp-message: Add support for storing GstBuffers directly as body payload of messages

This makes it unnecessary for callers to first merge together all
memories, and it allows API like GstRTSPConnection to write them out
without first copying all memories together or using writev()-style API
to write multiple memories out in one go.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/370

5 years agovideo-anc: Fix glib version check for G_GNUC_CHECK_VERSION macro
Andrew Gall [Mon, 28 Jan 2019 14:16:06 +0000 (15:16 +0100)]
video-anc: Fix glib version check for G_GNUC_CHECK_VERSION macro

Fixes #544

5 years agotests: discoverer: Add async API test cases
Seungha Yang [Mon, 28 Jan 2019 04:54:43 +0000 (13:54 +0900)]
tests: discoverer: Add async API test cases

Add more test cases for async APIs such as gst_discoverer_{start,stop},
and gst_discoverer_discover_uri_async()

5 years agodiscoverer: Hold GSource object instead of source id
Seungha Yang [Mon, 28 Jan 2019 09:13:27 +0000 (18:13 +0900)]
discoverer: Hold GSource object instead of source id

g_source_remove() works only for a GSource which was attached
to default GMainContext, but the GSource might be attached to
custom context depending on how gst_discoverer_start() was called.

Whatever the attached context was, g_source_destroy() can clean it up.

5 years agoglcolorbalance: Copy caps in transform_internal_caps()
Sebastian Dröge [Thu, 24 Jan 2019 08:14:36 +0000 (10:14 +0200)]
glcolorbalance: Copy caps in transform_internal_caps()

We don't get ownership of the caps that are passed in, and doing so
causes crashes at a later time.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/546

5 years agomeson: opengl: fix enabled_gl_apis in pkg-config file
Tim-Philipp Müller [Tue, 22 Jan 2019 13:24:29 +0000 (13:24 +0000)]
meson: opengl: fix enabled_gl_apis in pkg-config file

Make consistent with what autotools puts into enabled_gl_apis
variable. Autotools puts 'gl' in there instead of 'opengl'.

This would cause problems when building -bad glmixers plugin
in meson against a -base that was built with autotools.

See https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/871

5 years agogstglwindow_x11: require a resize event at once after XResizeWindow
Haihao Xiang [Wed, 19 Dec 2018 02:59:09 +0000 (10:59 +0800)]
gstglwindow_x11: require a resize event at once after XResizeWindow

Otherwise surface_width/surface_height stored in GstGLWindowPrivate
isn't changed, sometimes an unnecessary reconfigure event is sent on
sinkpad, then result in upstream reconfiguring.

Example pipeline:

gst-launch-1.0 videotestsrc ! msdkvpp ! glimagesink

5 years agoRevert "alsa: Implement a DeviceProvider"
Nicolas Dufresne [Fri, 18 Jan 2019 16:39:02 +0000 (11:39 -0500)]
Revert "alsa: Implement a DeviceProvider"

This reverts commit 69c3c31608ecebfadd9717e950d8c708988563e3.

All devices have the same name, they are duplicated with pulseaudio one
and the provided does not respond to HW being plugged/unplugged. I think
it's not ready for 1.16.

5 years agoalsa: Implement a DeviceProvider
Thibault Saunier [Fri, 31 Aug 2018 21:33:43 +0000 (18:33 -0300)]
alsa: Implement a DeviceProvider

Removing gstalsadeviceprobe.[ch] as it was a relique from the 0.10
century.

5 years agovideoaggregator: remove broken rate adjustment
George Kiagiadakis [Fri, 7 Dec 2018 16:07:42 +0000 (18:07 +0200)]
videoaggregator: remove broken rate adjustment

The start_time and end_time in this context have already
been adjusted for the input's rate by converting them to running
time above. What is needed afterwards is to compare these
with the output's start/stop running time, which also takes
into account the rate, so we are comparing equal things.

Multiplying these with the output's rate here is only breaking
this logic. In most cases the input and output rate is the same,
so this multiplication effectively reverses the rate adjustment
that happened while converting to running time, which is why
we see the video playing with the original rate in tests.

Fixes #541

5 years agoRelease 1.15.1
Tim-Philipp Müller [Thu, 17 Jan 2019 01:50:25 +0000 (01:50 +0000)]
Release 1.15.1

5 years agoUpdate docs
Tim-Philipp Müller [Thu, 17 Jan 2019 01:50:25 +0000 (01:50 +0000)]
Update docs

5 years agoUpdate translations
Tim-Philipp Müller [Thu, 17 Jan 2019 01:50:16 +0000 (01:50 +0000)]
Update translations

5 years agogl: Only unbind buffers/vertex attrib arrays if we can't directly bind the vertex...
Sebastian Dröge [Wed, 16 Jan 2019 12:09:18 +0000 (14:09 +0200)]
gl: Only unbind buffers/vertex attrib arrays if we can't directly bind the vertex array to 0

Binding the vertex array to 0 will unbind everything else already.

In the previous order older versions of the Intel GL driver caused
errors to be printed for every single call when disabling the vertex
attrib arrays after binding the vertex array to 0.

5 years agomeson: enable tests for orc code
Tim-Philipp Müller [Wed, 16 Jan 2019 00:37:48 +0000 (00:37 +0000)]
meson: enable tests for orc code

5 years agovideo-format: minor docs improvement
Tim-Philipp Müller [Wed, 16 Jan 2019 00:28:16 +0000 (00:28 +0000)]
video-format: minor docs improvement

5 years agosubparse: do not assert when failing to parse subrip timestamp
Jordan Petridis [Fri, 11 Jan 2019 15:43:03 +0000 (17:43 +0200)]
subparse: do not assert when failing to parse subrip timestamp

If a badly formatted was passed into `parse_subrip_time` it would
assert instead of exiting gracefully. This is problematic since
the input is provided by the user, and will trigger a crash.

https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/532

5 years agovideoscale: Add a test to verify stepped dimensions work
Jan Alexander Steffens (heftig) [Wed, 9 Jan 2019 13:39:11 +0000 (14:39 +0100)]
videoscale: Add a test to verify stepped dimensions work

5 years agovideoscale: Round when fixating to nearest ints to reduce error
Jan Alexander Steffens (heftig) [Wed, 9 Jan 2019 13:42:31 +0000 (14:42 +0100)]
videoscale: Round when fixating to nearest ints to reduce error

5 years agovideoscale: Choose the best dimensions for fixed PAR
Jan Alexander Steffens (heftig) [Wed, 9 Jan 2019 13:24:35 +0000 (14:24 +0100)]
videoscale: Choose the best dimensions for fixed PAR

We might not get an exact match for width or height if stepped ranges
are involved.

5 years agopbutils: Add audio, base and video library to Requires line in the pkg-config file
Sebastian Dröge [Mon, 14 Jan 2019 08:29:54 +0000 (10:29 +0200)]
pbutils: Add audio, base and video library to Requires line in the pkg-config file

We use all those libraries internally and include headers from them in
the public headers.

And add the tag library to Requires.private as we use it internally and
it would be needed when doing static linking.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/537

5 years agogl: Fix some type conversion warnings with MSVC
Seungha Yang [Sun, 30 Dec 2018 09:01:30 +0000 (18:01 +0900)]
gl: Fix some type conversion warnings with MSVC

MSVC complained about implicit conversion between GstGLFormat* and guint*

5 years agoglsinkbin: validate property in internal sink
Víctor Manuel Jáquez Leal [Sat, 12 Jan 2019 11:27:27 +0000 (12:27 +0100)]
glsinkbin: validate property in internal sink

It might be the case that glgsinkbin would try to set a property to
its internal sink which doesn't exist in it, leading to a glib's
warning. For example, when playsink sets 'force-aspect-ratio' property
and glsinkbin has, as internal sink, appsink, which doesn't handle
that property.

The patch validates the incoming property to forward to internal sink
if it exists in the internal sink and both properties has the same
type.

5 years agovideo-converter: fix number of allocated lines
Wim Taymans [Fri, 11 Jan 2019 15:37:40 +0000 (16:37 +0100)]
video-converter: fix number of allocated lines

We make an allocator for temporary lines and then use this for all
the steps in the conversion that can do in-place processing.

Keep track of the number of lines each step needs and use this to
allocate the right number of lines.

Previously we would not always allocate enough lines and we would
end up with conversion errors as lines would be reused prematurely.

Fixes #350

5 years agocodec-utils: support extension audio object type and sample rate
Alex Ashley [Thu, 5 Jul 2018 12:45:14 +0000 (13:45 +0100)]
codec-utils: support extension audio object type and sample rate

ISO 14496-3 defines that audioObjectType 5 is a special case that
indicates SBR is present and that an additional field has to be
parsed to find the true audioObjectType.

There are two ways of signaling SBR within an AAC stream - implicit
and explicit (see [1] section 4.2). When explicit signaling is used,
the presence of SBR data is signaled by means of the SBR
audioObjectType in the AudioSpecificConfig data.

Normally the sample rate is specified by an index into a
table of common sample rates. However index 0x0f is a special case
that indicates that the next 24 bits contain the real sample rate.

[1] https://www.telosalliance.com/support/A-closer-look-into-MPEG-4-High-Efficiency-AAC

Fixes #39

5 years agoFix some typos in code comments
Tim-Philipp Müller [Fri, 11 Jan 2019 11:26:26 +0000 (11:26 +0000)]
Fix some typos in code comments

And don't use gtk-doc chunk markers for internal functions.

5 years agovideo: link to design docs in GstVideoFormat docs
Tim-Philipp Müller [Fri, 11 Jan 2019 11:24:50 +0000 (11:24 +0000)]
video: link to design docs in GstVideoFormat docs

Which is where the memory layout of the various pixel formats
is explained in detail.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/538

5 years agoaudiotestsrc: Improvements to the "ticks" wave
Carlos Rafael Giani [Sat, 29 Dec 2018 09:28:10 +0000 (11:28 +0200)]
audiotestsrc: Improvements to the "ticks" wave

(Initially discussed in
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/305)

The ticks waveform can be useful for audio synchronization diagnostics
and other cases where the time offset between waveforms is important.
However, in its current form, it is too limited, and has problems with
discontinuities, which result in severe artifacts when this waveform
is output by a DAC.

This patch fixes some discontinuities and considerably expand the ticks
waveform's flexibility. They also introduce the notion of a "marker tick";
every Nth tick can have a different amplitude (usually one that is larger
than the others). This is useful for combining frequent oscilloscope
triggering with large time offset detection. For example, without marker
ticks, the tick intervals must not be too small, otherwise the maximum time
offset that can be unambiguously detected is quite small (for example, if
the interval is 50ms, then no time offset larger than 25ms can be
unambiguously recognized). If the tick intervals are too far apart, then
no sudden changes can be clearly observed, since the oscilloscope is not
updated quickly enough. But with marker ticks, this is not an issue: If
there's for example a tick every 100 ms, then the oscilloscope can be
triggered every 100 ms. And, if every 20th tick is a marker tick, then
time offsets of up to 1 second can be discovered, even though the time
between ticks is 100 ms.

The patch also applies some minor cleanup to the audiotestsrc documentation.

5 years agogl: fix build with more recent versions of MinGW
Andoni Morales Alastruey [Fri, 4 Jan 2019 23:16:36 +0000 (00:16 +0100)]
gl: fix build with more recent versions of MinGW

5 years agodocs: add new interlaced video API to docs
Tim-Philipp Müller [Sun, 6 Jan 2019 16:32:34 +0000 (16:32 +0000)]
docs: add new interlaced video API to docs

5 years agoaudiometa: fix docs typo
Tim-Philipp Müller [Sun, 6 Jan 2019 00:48:56 +0000 (00:48 +0000)]
audiometa: fix docs typo

5 years agotests: Enable more tests on Windows
Seungha Yang [Sun, 30 Dec 2018 09:49:52 +0000 (18:49 +0900)]
tests: Enable more tests on Windows

Enable libs_rtp, libs_video and elements_compositor

5 years agotests: compositor: Drop needless unistd.h
Seungha Yang [Sun, 30 Dec 2018 11:10:58 +0000 (20:10 +0900)]
tests: compositor: Drop needless unistd.h

5 years agortcpbuffer: Remove invalid sanity check
Seungha Yang [Sun, 30 Dec 2018 10:49:56 +0000 (19:49 +0900)]
rtcpbuffer: Remove invalid sanity check

Checking the address distance between given begin/end sequence
doesn't make sense. They are output params.

This is to fix weird failure of libs_rtp on Windows

5 years agortcpbuffer: fix typo
Tim-Philipp Müller [Sun, 30 Dec 2018 18:05:18 +0000 (18:05 +0000)]
rtcpbuffer: fix typo

5 years agortcpbuffer: fix function guards with side effects
Tim-Philipp Müller [Sun, 30 Dec 2018 17:26:04 +0000 (17:26 +0000)]
rtcpbuffer: fix function guards with side effects

Code in g_return_*() must not have side effects, as it
might be compiled out if -DG_DISABLE_CHECKS is used, in
which case we would read garbage off the stack.

5 years agogl: build gl mixer elements, moved from -base
Tim-Philipp Müller [Thu, 27 Dec 2018 16:35:00 +0000 (17:35 +0100)]
gl: build gl mixer elements, moved from -base

5 years agocompositor: add to build after move from -bad
Tim-Philipp Müller [Thu, 27 Dec 2018 12:34:29 +0000 (13:34 +0100)]
compositor: add to build after move from -bad

This replaces videomixer.

Fixes #138

5 years agovideo: build GstVideoAggregator which was moved from -bad
Tim-Philipp Müller [Wed, 26 Dec 2018 17:02:42 +0000 (18:02 +0100)]
video: build GstVideoAggregator which was moved from -bad

5 years agoMove GstVideoAggregator, compositor and OpenGL mixers from -bad
Tim-Philipp Müller [Fri, 28 Dec 2018 11:15:39 +0000 (12:15 +0100)]
Move GstVideoAggregator, compositor and OpenGL mixers from -bad

Merge branch 'videoaggregator-compositor-glmixers-move'

Fixes #137 and #138.

5 years agotypefindfunctions: Extend MCC typefinder to also cover version 2.0
Sebastian Dröge [Thu, 27 Dec 2018 09:41:54 +0000 (11:41 +0200)]
typefindfunctions: Extend MCC typefinder to also cover version 2.0

Both versions are basically the same, but version 2.0 also allows
60000/1001 as framerate and allows to specify the field and line number
for each payload.

Put the major version into the caps so that elements can limit via caps
negotiation which versions they can support.

5 years agoexamples/gl/gtk: Fix build on macOS
Philippe Normand [Thu, 27 Dec 2018 13:55:28 +0000 (14:55 +0100)]
examples/gl/gtk: Fix build on macOS

The gdkquartz.h include pulls into Apple Obj-C frameworks so the compiler needs
to handle the gstgtkhelper library as such.

Fixes #518

5 years agoexamples/gl: Cocoa example Meson build definitions
Philippe Normand [Sun, 23 Dec 2018 19:27:27 +0000 (20:27 +0100)]
examples/gl: Cocoa example Meson build definitions

5 years agotypefind: Add SCC and MCC files support
Jordan Petridis [Wed, 19 Dec 2018 13:18:41 +0000 (15:18 +0200)]
typefind: Add SCC and MCC files support

5 years agovideotimecode: Set the DROP_FRAME flag when parsing timecodes with a ,/; from a string
Sebastian Dröge [Mon, 17 Dec 2018 17:41:26 +0000 (19:41 +0200)]
videotimecode: Set the DROP_FRAME flag when parsing timecodes with a ,/; from a string

And also add a test for parsing a few valid and invalid timecodes

5 years agovideotimecode: Allow serializing invalid timecodes
Sebastian Dröge [Fri, 14 Dec 2018 19:24:27 +0000 (21:24 +0200)]
videotimecode: Allow serializing invalid timecodes

5 years agovideotimecode: Allow deserializing invalid timecodes
Sebastian Dröge [Fri, 14 Dec 2018 19:18:34 +0000 (21:18 +0200)]
videotimecode: Allow deserializing invalid timecodes

Timecode strings don't contain a framerate and that has to be provided
first separately before it can be converted into a valid timecode.

5 years agovideotimecode: Don't consider 0/1 a valid framerate for timecodes
Sebastian Dröge [Fri, 14 Dec 2018 19:04:36 +0000 (21:04 +0200)]
videotimecode: Don't consider 0/1 a valid framerate for timecodes

It breaks all the calculations. While it can make sense during
initialization, there's very little API that can be called with such
timecodes without ending up with wrong results.

5 years agovideotimecode: Remove various unneeded checks
Sebastian Dröge [Fri, 14 Dec 2018 19:00:03 +0000 (21:00 +0200)]
videotimecode: Remove various unneeded checks

5 years agovideotimecode: Fix handling of timecodes without daily jam in gst_video_time_code_to_...
Sebastian Dröge [Fri, 14 Dec 2018 18:59:11 +0000 (20:59 +0200)]
videotimecode: Fix handling of timecodes without daily jam in gst_video_time_code_to_date_time()

So that it behaves according to documentation.

5 years agovideotimecode: Various documentation and annotation fixes
Sebastian Dröge [Fri, 14 Dec 2018 18:58:40 +0000 (20:58 +0200)]
videotimecode: Various documentation and annotation fixes

5 years agovideotimecode: Add some more guards for function parameters
Sebastian Dröge [Fri, 14 Dec 2018 16:10:23 +0000 (18:10 +0200)]
videotimecode: Add some more guards for function parameters

5 years agovideotimecode: Add API for initializing from a GDateTime with validation
Sebastian Dröge [Fri, 14 Dec 2018 15:56:45 +0000 (17:56 +0200)]
videotimecode: Add API for initializing from a GDateTime with validation

The old API would only assert or return an invalid timecode, the new API
returns a boolean or NULL. We can't change the existing API
unfortunately but can at least deprecate it.

5 years agovideotimecode: We only support 30000/1001 and 60000/1001 as drop-frame framerates
Sebastian Dröge [Fri, 14 Dec 2018 12:13:18 +0000 (14:13 +0200)]
videotimecode: We only support 30000/1001 and 60000/1001 as drop-frame framerates

24000/1001 is *not* a drop-frame framerate.

5 years agovideotimecode: Fix division by zero in timecode validation function
Sebastian Dröge [Fri, 14 Dec 2018 11:56:28 +0000 (13:56 +0200)]
videotimecode: Fix division by zero in timecode validation function

And add some comments about what exactly we're testing in the
non-trivial cases.

5 years agovideo: Add deprecation macros
Sebastian Dröge [Fri, 14 Dec 2018 11:43:22 +0000 (13:43 +0200)]
video: Add deprecation macros

5 years agotests: Disable some tests for Windows
Seungha Yang [Fri, 7 Dec 2018 12:02:45 +0000 (21:02 +0900)]
tests: Disable some tests for Windows

Disable some tests which are unstable on windows or need fix

5 years agotests: Use OS-specific seperator for whitelist
Seungha Yang [Fri, 7 Dec 2018 11:35:37 +0000 (20:35 +0900)]
tests: Use OS-specific seperator for whitelist

... instead of hardcoded ':', since G_SEARCHPATH_SEPARATOR_S
varies depending on OS (e.g., ':' for *nix and ';' for Windows).
Note that, when the seperator is not specified explicitly, Meson
will use ';' for Windows and ':' for *nix respectively.

5 years agomeson: Use join_paths() instead of '/'
Seungha Yang [Fri, 7 Dec 2018 11:30:23 +0000 (20:30 +0900)]
meson: Use join_paths() instead of '/'

Let Meson decide correct seperator such as '\' for Windows and
'/' for others

5 years agotests: Enable testing on Windows
Seungha Yang [Fri, 7 Dec 2018 11:10:10 +0000 (20:10 +0900)]
tests: Enable testing on Windows

5 years agoaudio-converter: add API to determine passthrough mode
Mathieu Duponchelle [Mon, 17 Dec 2018 12:33:56 +0000 (13:33 +0100)]
audio-converter: add API to determine passthrough mode

audioconvert's passthrough status can no longer be determined
strictly from input / output caps equality, as a mix-matrix can
now be specified.

We now call gst_base_transform_set_passthrough dynamically, based
on the return from the new gst_audio_converter_is_passthrough()
API, which takes the mix matrix into account.

5 years agoaudioconvert: disable passthrough_on_same_caps
Mathieu Duponchelle [Sun, 16 Dec 2018 20:19:18 +0000 (21:19 +0100)]
audioconvert: disable passthrough_on_same_caps

Now that audioconvert exposes a mix-matrix property, input and
output caps may be equal, but the mix-matrix still needs to be
applied.

Fixes #521

5 years agovideo-converter: Remove unused variable/calculation
Edward Hervey [Mon, 17 Dec 2018 08:21:57 +0000 (09:21 +0100)]
video-converter: Remove unused variable/calculation

Since the refactoring in cdd86d025a7c2e1c00e7a86731168793e6104276
calculating the stride was no longer needed in setup_scale.

5 years agovideodecoder: Remove dead assignment
Edward Hervey [Mon, 17 Dec 2018 08:10:36 +0000 (09:10 +0100)]
videodecoder: Remove dead assignment

structure is never used afterwards

5 years agosdpmessage: Remove dead assignment
Edward Hervey [Mon, 17 Dec 2018 08:07:26 +0000 (09:07 +0100)]
sdpmessage: Remove dead assignment

p is overridden before being used (as the for() loop iterator)

5 years agosdpmessage: Remove dead assignment
Edward Hervey [Mon, 17 Dec 2018 08:03:36 +0000 (09:03 +0100)]
sdpmessage: Remove dead assignment

The presence of `key-mgmt` attribute will set the mikey appropriately.
We therefore don't need to check the return value (which will
be overwritten afterwards).

5 years agortspconnection: Properly exit infinite loop
Edward Hervey [Mon, 17 Dec 2018 07:58:21 +0000 (08:58 +0100)]
rtspconnection: Properly exit infinite loop

In the unlikeliness the builder state is invalid, exit the
top-level while(TRUE) loop.

5 years agoaudiobasesink: Remove dead assignment
Edward Hervey [Mon, 17 Dec 2018 07:50:44 +0000 (08:50 +0100)]
audiobasesink: Remove dead assignment

out_samples is set and used in the 'no_align' block.
Dead assignment since 3e312e6e162638d8e07f0edb3859980dabb089da

5 years agocodec-utils: Don't leak bytewriter data
Edward Hervey [Sun, 16 Dec 2018 10:14:47 +0000 (11:14 +0100)]
codec-utils: Don't leak bytewriter data

In error cases, don't forget to reset it.

5 years agortp: fix g-i warnings
Tim-Philipp Müller [Sun, 16 Dec 2018 23:15:57 +0000 (23:15 +0000)]
rtp: fix g-i warnings

Use same variable name in function declaration as in function
definition and gtk-doc/g-i blurb.

5 years agovideo-anc: Add API for converting GstVideoCaptionType from/to GstCaps
Sebastian Dröge [Tue, 11 Dec 2018 12:10:36 +0000 (14:10 +0200)]
video-anc: Add API for converting GstVideoCaptionType from/to GstCaps

5 years agovideo-anc: Replace GST_VIDEO_CAPTION_TYPE_CEA608_IN_CEA708_RAW with CEA608_S334_1A
Sebastian Dröge [Mon, 10 Dec 2018 13:55:49 +0000 (15:55 +0200)]
video-anc: Replace GST_VIDEO_CAPTION_TYPE_CEA608_IN_CEA708_RAW with CEA608_S334_1A

CEA608_IN_CEA708_RAW is the same format as CEA708_RAW. It's only
difference is that it must contain only CEA608 and a format like this
does not exist in practice. In practice every element that handles raw
cc_data triplets must check each triplet for their actual content and
handle them accordingly.

For CC-only streams a parser could signal the existence of CEA608 and/or
CEA708 inside the caps but for metas this can only potentially be
signalled via the ALLOCATION query for negotiation purposes.

A separate format for this is not very useful and instead it should be a
format qualifier.

CEA608_S334_1A is the format defined by SMPTE S334-1 Annex A and which
is used for transferring CEA608 over SDI instead of CEA708 CDP packets.

5 years agogl/wayland: destroy wl_shell instance at finalize
Niels De Graef [Fri, 14 Dec 2018 13:07:47 +0000 (14:07 +0100)]
gl/wayland: destroy wl_shell instance at finalize

5 years agotests: examples: gl: gtk: Disabled on MacOS X
Justin Kim [Fri, 14 Dec 2018 03:04:43 +0000 (12:04 +0900)]
tests: examples: gl: gtk: Disabled on MacOS X

It fails to build on MacOS X. This example should be disabled
until fixed.

Issue: #518

5 years agoexamples: gl: generic: recordgraphic: Use gst/gl/gstglfuncs.h
Justin Kim [Fri, 14 Dec 2018 03:03:07 +0000 (12:03 +0900)]
examples: gl: generic: recordgraphic: Use gst/gl/gstglfuncs.h

https://gitlab.freedesktop.org/gstreamer/gst-build/issues/11

5 years agogl/meson: Add OpenGL dependency by OSX way
Justin Kim [Fri, 14 Dec 2018 03:02:36 +0000 (12:02 +0900)]
gl/meson: Add OpenGL dependency by OSX way

Otherwise, it fails to link with the message below:

```
ld: can't map file, errno=22 file '...'
```
https://gitlab.freedesktop.org/gstreamer/gst-build/issues/13

5 years agortcpbuffer: Validate the length of RTCP packets
Olivier Crête [Thu, 13 Dec 2018 16:20:03 +0000 (11:20 -0500)]
rtcpbuffer: Validate the length of RTCP packets

5 years agortcpbuffer: add support XR packet parsing
Justin Kim [Wed, 1 Nov 2017 01:54:06 +0000 (10:54 +0900)]
rtcpbuffer: add support XR packet parsing

According to RFC3611, the extended report blocks in XR packet can
have variable length. To visit each block, the iterator should look
into block header. Once XR type is extracted, users can parse the
detailed information by given functions.

Loss/Duplicate RLE
The Loss RLE and the Duplicate RLE have same format so
they can share parsers. For unit test, randomly generated
pseudo packet is used.

Packet Receipt Times
The packet receipt times report block has a list of receipt
times which are in [begin_seq, end_seq).

Receiver Reference Time paser for XR packet
The receiver reference time has ntptime which is 64 bit type.

DLRR
The DLRR report block consists of sub-blocks which has ssrc, last RR,
and delay since last RR. The number of sub-blocks should be calculated
from block length.

Statistics Summary
The Statistics Summary report block provides fixed length
information.

VoIP Metrics
VoIP Metrics consists of several metrics even though they are in
a report block. Data retrieving functions are added per metrics.

https://bugzilla.gnome.org/show_bug.cgi?id=789822

5 years agoglupload: dmabuf: use out_info to create allocation params for non-direct dmabuf...
Philipp Zabel [Wed, 12 Dec 2018 14:48:09 +0000 (15:48 +0100)]
glupload: dmabuf: use out_info to create allocation params for non-direct dmabuf uploads as well

Non-direct dmabuf uploads, just as direct dmabuf uploads, create EGL
images and thus GL textures of the same width as the imported image.
The input dmabuf line stride is not relevant to the resulting texture
in both cases.

This fixes the case where non-direct uploads of input dmabufs with line
stride larger than the width will for example cause glcolorconvert to
sample only the left part (width * bytes per pixel / stride) of the
image, causing a horizontally stretched and cropped output image.

5 years agoglmemory: normalize the internal format we pass into glTex* functions
Matthew Waters [Wed, 12 Dec 2018 12:25:58 +0000 (23:25 +1100)]
glmemory: normalize the internal format we pass into glTex* functions

Passing unsized formats sometimes breaks on embedded platforms

Take 2 at 694e30f858ebddae8c39cf934ff1b21ba7aa08e7,
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/merge_requests/49

5 years agoRevert "glformat: return sized formats in from_video_info"
Matthew Waters [Wed, 12 Dec 2018 12:14:56 +0000 (23:14 +1100)]
Revert "glformat: return sized formats in from_video_info"

This broke videotestsrc ! video/x-raw,format=NV12 ! glimagesink on
the desktop

Reverts: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/merge_requests/49
This reverts commit 694e30f858ebddae8c39cf934ff1b21ba7aa08e7.

5 years agovideo-overlay-composition: Optimize premultiplication/unpremultiplication loops
Sebastian Dröge [Fri, 7 Dec 2018 17:13:59 +0000 (19:13 +0200)]
video-overlay-composition: Optimize premultiplication/unpremultiplication loops

Pull in video frame fields into local variables. Without this the
compiler must assume that they could've changed on every use and read
them from memory again.

This reduces the inner loop from 6 memory reads per pixels to 4, and the
number of writes stays at 3.

5 years agortspconnection: Replace Auth header instead of append
Per Forlin [Fri, 30 Nov 2018 12:37:26 +0000 (13:37 +0100)]
rtspconnection: Replace Auth header instead of append

gst_rtsp_connection_send() adds the Authorization header to the request.
If this function is being called multiple times with the same request
it will add one more Authorization header every time.

To fix to this issue do not append a new Authorization header on
top of an existing ones. Remove any existing Authorization headers first
and then add the new one.

Fixes gst-plugins-good#425

5 years agooggmux: Fix a maybe-uninitialized warning
Jan Alexander Steffens (heftig) [Wed, 5 Dec 2018 09:35:33 +0000 (10:35 +0100)]
oggmux: Fix a maybe-uninitialized warning

Arch Linux, GCC 8.2.1+20181127, CFLAGS='-Og -g3'

5 years agotypefind: Fix a maybe-uninitialized warning
Jan Alexander Steffens (heftig) [Wed, 5 Dec 2018 09:35:33 +0000 (10:35 +0100)]
typefind: Fix a maybe-uninitialized warning

Arch Linux, GCC 8.2.1+20181127, CFLAGS='-Og -g3'

5 years agoAutomatic update of common submodule
Thibault Saunier [Wed, 5 Dec 2018 20:24:06 +0000 (17:24 -0300)]
Automatic update of common submodule

From cd1dee0 to 59cb678

5 years agogldeinterlace: Indentation fix
Nicolas Dufresne [Wed, 5 Dec 2018 17:11:25 +0000 (12:11 -0500)]
gldeinterlace: Indentation fix

5 years agogl: window-gbm: Restore CRTC on close
Nicolas Dufresne [Sun, 2 Dec 2018 01:45:31 +0000 (20:45 -0500)]
gl: window-gbm: Restore CRTC on close

This simply try and restore the state of the CRTC when the window
is closed. This is a bit cosmetic, but it allow resuming fbcon
when we exit.

5 years agogl: window-gbm: Remove unused private class member
Nicolas Dufresne [Sun, 2 Dec 2018 01:41:10 +0000 (20:41 -0500)]
gl: window-gbm: Remove unused private class member

The display class member is not used, not set and rather
confusing.

5 years agogl: window-gbm: Remove unneeded extra function
Nicolas Dufresne [Sun, 2 Dec 2018 01:30:16 +0000 (20:30 -0500)]
gl: window-gbm: Remove unneeded extra function

The cleanup function was only called in _close() which was only
calling that function. This indirection didn't make much sense.

5 years agovideo: add Y410 pixel format.
Wangfei [Fri, 23 Nov 2018 06:40:27 +0000 (14:40 +0800)]
video: add Y410 pixel format.

This pixel format is packed format with 4:4:4 sample. And 10
available bits of Y/U/V and 2 available bits of alpha stored
in 4 Bytes.

Format defined in:
https://docs.microsoft.com/en-us/windows/desktop/medfound/10-bit-and-16-bit-yuv-video-formats

5 years agogl/gbm: Add GST_GL_GBM_DRM_CONNECTOR environment variable
Carlos Rafael Giani [Wed, 3 Oct 2018 22:27:42 +0000 (00:27 +0200)]
gl/gbm: Add GST_GL_GBM_DRM_CONNECTOR environment variable

If multiple DRM connectors are connected, currently the first one is
picked. Improve this by adding an environment variable that allows for
choosing a connector by name. The connector name has been made so they
are compatible with modetest/modeprint DRM utilities.

Related to #490

5 years agogl/gbm: Improve logging output
Carlos Rafael Giani [Wed, 3 Oct 2018 22:22:02 +0000 (00:22 +0200)]
gl/gbm: Improve logging output

* List all connectors, modes, and encoders, even after picking one
* Add missing DRM_MODE_CONNECTOR_DPI string for logging and improve
  existing strings
* Make sure the names matches modetest/modeprint from DRM utilities

Related to #490

5 years agovideo: convertframe: Shut down pipeline asynchronously via the thread pool
Sebastian Dröge [Fri, 30 Nov 2018 10:40:19 +0000 (12:40 +0200)]
video: convertframe: Shut down pipeline asynchronously via the thread pool

If we use the main loop it might happen that the caller (e.g. our unit
test) already shut down the loop once the result was received and in
that case the pipeline would never ever be shut down (and our unit test
would hang).

5 years agovideo: Split the success and error convert_frame_async() test into two tests
Sebastian Dröge [Fri, 30 Nov 2018 10:39:43 +0000 (12:39 +0200)]
video: Split the success and error convert_frame_async() test into two tests

To make it more obvious which of the two is actually failing.

5 years agoaudio-convert: Fix endianness conversion function init
Marouen Ghodhbane [Thu, 29 Nov 2018 11:55:28 +0000 (12:55 +0100)]
audio-convert: Fix endianness conversion function init

Endianness conversion should be based on the sample width instead of the
sample depth.

Fixes #510

5 years agoglformat: return sized formats in from_video_info
Matthew Waters [Fri, 30 Nov 2018 06:50:14 +0000 (17:50 +1100)]
glformat: return sized formats in from_video_info

Fixes green output on e.g. Android when converting between YUV->RGBA