platform/upstream/gstreamer.git
5 years agoUpdate docs
Tim-Philipp Müller [Tue, 26 Feb 2019 11:43:42 +0000 (11:43 +0000)]
Update docs

5 years agoUpdate translations
Tim-Philipp Müller [Tue, 26 Feb 2019 11:43:40 +0000 (11:43 +0000)]
Update translations

5 years agovideorate: Add max-duplication-time property
Vivia Nikolaidou [Tue, 19 Feb 2019 14:59:34 +0000 (16:59 +0200)]
videorate: Add max-duplication-time property

This will only duplicate buffers if the gap between two consecutive
buffers is up to fill-until nsec. If it's larger, it will only output
the new buffer and mark it as discont.

5 years agomeson: Remove outdated msvc-specific disabling code
Nirbheek Chauhan [Thu, 21 Feb 2019 13:48:18 +0000 (19:18 +0530)]
meson: Remove outdated msvc-specific disabling code

This was done ages ago when the meson build files were newly added
but now we do the appropriate disabling in Cerbero instead since this
does not apply to gst-build.

https://gitlab.freedesktop.org/gstreamer/cerbero/issues/121

5 years agotests: video: add basic sanity check of pstrides for formats
Tim-Philipp Müller [Wed, 20 Feb 2019 09:46:30 +0000 (09:46 +0000)]
tests: video: add basic sanity check of pstrides for formats

https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/merge_requests/117

5 years agovideo-format: Fix GBRA_10/12 alpha channel pixel strides
James Cowgill [Sat, 9 Feb 2019 17:21:13 +0000 (17:21 +0000)]
video-format: Fix GBRA_10/12 alpha channel pixel strides

These formats have 4 components, so they should also have 4 components
of pixel stride.

5 years agotests: use GPOINTER_TO_INT to avoid warnings with mingw
Victor Toso [Thu, 17 Jan 2019 14:38:40 +0000 (15:38 +0100)]
tests: use GPOINTER_TO_INT to avoid warnings with mingw

New casts to avoid the the warnings mentioned below. While at it, move
some existing casts (introduced at 61bc9091894062b9) to use
GPOINTER_TO_INT too.

[458/673] Compiling C object 'tests/check/7d01337@@libs_video@exe/libs_video.c.obj'.
../tests/check/libs/video.c: In function 'fourcc_get_size':
../tests/check/libs/video.c:160:10: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
   return (unsigned long) p->endptr;
          ^

In file included from ../tests/check/libs/video.c:32:
../tests/check/libs/video.c: In function 'test_video_formats':
../tests/check/libs/video.c:563:39: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
   fail_unless_equals_int (size, (unsigned long) paintinfo.endptr);
   ^

And more.

https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/merge_requests/94

5 years agotests: fix compiler warnings on Windows with mingw
Victor Toso [Thu, 17 Jan 2019 14:25:58 +0000 (15:25 +0100)]
tests: fix compiler warnings on Windows with mingw

With commit 3f184c3abc55, the gst_dir variable becomes unusable in
windows build. Moving it to linux scope to avoid warning:

    [433/673] Compiling C object 'tests/check/7d01337@@libs_profile@exe/libs_profile.c.obj'.
    ../tests/check/libs/profile.c: In function 'profile_suite':
    ../tests/check/libs/profile.c:688:10: warning: unused variable 'gst_dir' [-Wunused-variable]
       gchar *gst_dir;
             ^~~~~~~

Also fix a typo in the comment.

5 years agortspconnection: Fix GError set over the top of a previous GError
Kristofer Bjorkstrom [Mon, 18 Feb 2019 14:24:18 +0000 (15:24 +0100)]
rtspconnection: Fix GError set over the top of a previous GError

The function fill_bytes could sometimes return a value greater than zero
and in the same time set the GError.

Function read_bytes calls fill_bytes in a while loop. In the special
case above it would call fill_bytes with error already set.
Thus resulting in "GError set over the top of a previous GError".

Solved this by clearing GError when return value is greater than zero.
Actions are taken depending on error type by caller of read_bytes. Eg.
with EWOULDBLOCK gst_rtsp_source_dispatch_read will try to read the
missing bytes again (GST_RTSP_EINTR )

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

5 years agogl: eglimage: fix build on RPi by adding more fallback defines for EGL_*_EXT
Tim-Philipp Müller [Mon, 18 Feb 2019 13:28:49 +0000 (13:28 +0000)]
gl: eglimage: fix build on RPi by adding more fallback defines for EGL_*_EXT

5 years agotests: video: Test video format enum stability
Nicolas Dufresne [Sat, 17 Nov 2018 04:51:44 +0000 (23:51 -0500)]
tests: video: Test video format enum stability

It is really easy to break the API and insert a new video format in the
middle of the enum instead of at the end. This minimal test should catch
the most obvious errors. Ideally, this test should be updated after new
format have been added, so that it won't allow further modification to
the enumeration API.

5 years agopbutils: add description for AV1 codec
Tim-Philipp Müller [Sat, 16 Feb 2019 15:29:57 +0000 (15:29 +0000)]
pbutils: add description for AV1 codec

Fixes #558

5 years agoglimagesink: Don't call set_property helper in get_property
Nicolas Dufresne [Fri, 15 Feb 2019 21:45:09 +0000 (16:45 -0500)]
glimagesink: Don't call set_property helper in get_property

5 years agowayland: Also dist the private header
Edward Hervey [Wed, 13 Feb 2019 10:59:10 +0000 (11:59 +0100)]
wayland: Also dist the private header

5 years agoeglimage: Add some more defines
Nicolas Dufresne [Mon, 11 Feb 2019 15:01:55 +0000 (10:01 -0500)]
eglimage: Add some more defines

This allow building on advertised version of libdrm drm_fourcc.h files.

Fixes #549

5 years agoRevert "fix issue"
Nicolas Dufresne [Mon, 11 Feb 2019 15:01:50 +0000 (10:01 -0500)]
Revert "fix issue"

This reverts commit 5e0c458e0ef544f1afae13c5eb047bc0826b011a.

5 years agofix issue
yanle.zhang [Mon, 11 Feb 2019 08:13:15 +0000 (16:13 +0800)]
fix issue
549."https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/549".

5 years agotools: device-monitor: Add support for modified devices
Thibault Saunier [Wed, 30 Jan 2019 13:49:37 +0000 (10:49 -0300)]
tools: device-monitor: Add support for modified devices

5 years agoglupload: Don't leak caps features
Seungha Yang [Fri, 8 Feb 2019 12:38:04 +0000 (21:38 +0900)]
glupload: Don't leak caps features

Create caps features when it is required.

5 years agogl/wayland: add support for XDG-shell
Niels De Graef [Fri, 14 Dec 2018 15:33:50 +0000 (16:33 +0100)]
gl/wayland: add support for XDG-shell

[wl_shell] is officially [deprecated], so provide support for the
XDG-shell protocol should be provided by all desktop-like compositors.
(In case they don't, we can of course fall back to wl_shell).

Note that the [XML spec] is provided by the `wayland-protocols`
git repository, which is provided by the Wayland project.

[wl_shell]: https://people.freedesktop.org/~whot/wayland-doxygen/wayland/Client/group__iface__wl__shell.html
[deprecated]: https://github.com/wayland-project/wayland/commit/698dde195837f3d0844b2725ba4ea8ce9ee7518c
[XML spec]: https://github.com/wayland-project/wayland-protocols/blob/master/stable/xdg-shell/xdg-shell.xml

5 years agogl/wayland: extract code to create wl_shell_surface
Niels De Graef [Fri, 14 Dec 2018 13:54:24 +0000 (14:54 +0100)]
gl/wayland: extract code to create wl_shell_surface

This is just a cosmetic change that will make it easier to differentiate
between wl_shell and xdg_wm_base later.

5 years agogl/wayland: prefix shell(_surface) with wl_
Niels De Graef [Fri, 14 Dec 2018 13:28:26 +0000 (14:28 +0100)]
gl/wayland: prefix shell(_surface) with wl_

This will help us make the distinction later with xdg-shell and other
possible protocols that need to be supported.

5 years agomisc: Fix compiler warnings on Cerbero's MinGW
Nirbheek Chauhan [Tue, 5 Feb 2019 16:36:15 +0000 (22:06 +0530)]
misc: Fix compiler warnings on Cerbero's MinGW

rtpbasedepayload.c:126:5: error: unknown conversion type character 'z' in format [-Werror=format]
profile.c:688:10: error: unused variable 'gst_dir' [-Werror=unused-variable]

5 years agovideodecoder: remove useless code in negotiate_default_caps()
Guillaume Desmottes [Mon, 4 Feb 2019 10:48:25 +0000 (11:48 +0100)]
videodecoder: remove useless code in negotiate_default_caps()

gst_video_decoder_negotiate_default_caps() is meant to pick a default output
format when we need one earlier because of an incoming GAP.
It tries to use the input caps as a base if available and fallback to a default
format (I420 1280x720@30) for the missing fields.

But the framerate and pixel-aspect were not explicitly passed to
gst_video_decoder_set_output_state() which is solely relying on the input format
as reference to get the framerate anx pixel-aspect-ratio.
So there is no need to manually handling those two fields as
gst_video_decoder_set_output_state() will already use the ones from
upstream if available, and they will be ignored anyway if there are not.

This also prevent confusing debugging output where we claim to use a
specific framerate while actually none was set.

5 years agomeson: orc-test is not required
Nirbheek Chauhan [Thu, 31 Jan 2019 09:52:21 +0000 (15:22 +0530)]
meson: orc-test is not required

This is especially never available on iOS.

5 years agortspconnection: Fix uninitialized variable warning when compiling with pre-2.59.1...
Sebastian Dröge [Wed, 30 Jan 2019 12:32:50 +0000 (14:32 +0200)]
rtspconnection: Fix uninitialized variable warning when compiling with pre-2.59.1 GLib

gstrtspconnection.c: In function ‘writev_bytes’:
gstrtspconnection.c:1348:10: error: ‘res’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
   return res;
          ^

5 years agortspconnection: Fix broken build on GLib 2.59.0
Seungha Yang [Wed, 30 Jan 2019 11:41:13 +0000 (20:41 +0900)]
rtspconnection: Fix broken build on GLib 2.59.0

GPollableReturn enum was introduced after GLib 2.59.0 release.

5 years agomeson: Add support orc fallback
Seungha Yang [Tue, 29 Jan 2019 01:38:15 +0000 (10:38 +0900)]
meson: Add support orc fallback

Allow fallback to orc subproject if any.
Additionally 'dependencies' keyword is removed from find_library,
because it's invalid keyword for find_library.

5 years agotypefindfunctions: Add a function to typefind xges files
Thibault Saunier [Thu, 17 Jan 2019 21:04:11 +0000 (18:04 -0300)]
typefindfunctions: Add a function to typefind xges files

5 years agoaudioringbuffer: Fix wrong memcpy address when reordering channels
mrk501 [Sun, 27 Jan 2019 03:35:12 +0000 (12:35 +0900)]
audioringbuffer: Fix wrong memcpy address when reordering channels

When using multichannel audio data and being needed to reorder channels,
audio data is not copied correctly because destination address of
memcpy is wrong.

For example, the following command
$ gst-launch-1.0 pulsesrc ! audio/x-raw,channels=6,format=S16LE ! filesink location=test.raw
will reproduce this issue if there is 6-ch audio input device.

This commit fixes that.

The detailed process of this issue is as follows:
1. gst-launch-1.0 calls gst_pulsesrc_prepare (gst-plugins-good/ext/pulse/pulsesrc.c)

   1466 gst_pulsesrc_prepare (GstAudioSrc * asrc, GstAudioRingBufferSpec * spec)
   1467 {
   (skip...)
   1480   {
   1481     GstAudioRingBufferSpec s = *spec;
   1482     const pa_channel_map *m;
   1483
   1484     m = pa_stream_get_channel_map (pulsesrc->stream);
   1485     gst_pulse_channel_map_to_gst (m, &s);
   1486     gst_audio_ring_buffer_set_channel_positions (GST_AUDIO_BASE_SRC
   1487         (pulsesrc)->ringbuffer, s.info.position);
   1488   }

   In my environment, after line 1485 is processed, position of spec and s are
     spec->info.position[0] = 0
     spec->info.position[1] = 1
     spec->info.position[2] = 2
     spec->info.position[3] = 6
     spec->info.position[4] = 7
     spec->info.position[5] = 8

     s.info.position[0] = 0
     s.info.position[1] = 6
     s.info.position[2] = 2
     s.info.position[3] = 1
     s.info.position[4] = 7
     s.info.position[5] = 8

   The values of spec->info.positions equal
   GST_AUDIO_BASE_SRC(pulsesrc)->ringbuffer->spec->info.positions.

2. gst_audio_ring_buffer_set_channel_positions calls
   gst_audio_get_channel_reorder_map.

3. Arguments of gst_audio_get_channel_reorder_map are
    from = s.info.position
    to = GST_AUDIO_BASE_SRC(pulsesrc)->ringbuffer->spec->info.positions

   At the end of this function, reorder_map is set to
     reorder_map[0] = 0
     reorder_map[1] = 3
     reorder_map[2] = 2
     reorder_map[3] = 1
     reorder_map[4] = 4
     reorder_map[5] = 5

4. Go back to gst_audio_ring_buffer_set_channel_positions and
   2065       buf->need_reorder = TRUE;
   is processed.

5. Finally, in gst_audio_ring_buffer_read,

   1821     if (need_reorder) {
   (skip...)
   1829           memcpy (data + i * bpf + reorder_map[j] * bps, ptr + j * bps, bps);

   is processed and makes this issue.

5 years agortspconnection: Update to merged GOutputStream::writev() API
Sebastian Dröge [Thu, 24 Jan 2019 15:52:50 +0000 (17:52 +0200)]
rtspconnection: Update to merged GOutputStream::writev() API

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).