Commit graph

7418 commits

Author SHA1 Message Date
Roman Shpuntov 31cb8500ee macOS gst-plugins-base/gl/cocoa: UI API called on a background thread: -[NSView removeFromSuperview]
The problem inside gstglwindow_cocoa.m, all UI operations must be called from main UI thread.

https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/568
Fixes #568
2019-03-20 18:44:12 +07:00
Wonchul Lee a75e47e815 appsrc: Fix docs typo
Fix typo empty-percent to min-percent
2019-03-16 14:57:56 +00:00
Antonio Ospite 1eb9c5b309 rtpbasepayload: print list size in log output instead of -1
It is weird to see "Preparing to push packet with size 4294967295" in
the logs, so print the list length in case of a buffer list.
2019-03-15 17:38:58 +01:00
Tobias Ronge f672277509 gstrtspconnection: Security loophole making heap overflow
The former code allowed an attacker to create a heap overflow by
sending a longer than allowed session id in a response and including a
semicolon to change the maximum length. With this change, the parser
will never go beyond 512 bytes.
2019-03-14 10:24:30 +01:00
Guillaume Desmottes 2e939afd73 video-color: add more color primaries formats
They correspond to index 10, 11, 12 and 22 from ITU-T H.273,
Table 2 – Interpretation of colour primaries (ColourPrimaries) value
2019-03-12 16:53:54 +01:00
Nirbheek Chauhan 045137d340 glwindow/win32: Don't use condition variables for message synchronization
Using a single condition variable for synchronization across all GL
messages is very slow on Windows and uses up to 20% CPU usage in some
workloads due to lock contention and false broadcasts.

Using per-message event handles reduces the CPU usage to negligible
amounts despite having to allocate a new event handle for each
message.
2019-03-12 03:21:57 +00:00
Nirbheek Chauhan 36ec18c230 glmemory: Disable GL timing queries when debugging
This can be very expensive in some workloads, taking up to 11% of the
total execution time.
2019-03-12 03:21:57 +00:00
Nirbheek Chauhan 21bc1040d4 glframebuffer: Don't do expensive checks with low gst debug levels
Framebuffer checks can be very expensive, taking up to 3-5% of the
total CPU consumed by the application.
2019-03-12 03:21:57 +00:00
Lucas Stach c71dd72b21 gl/wayland: fix glib mainloop integration
Implement the prepare and check functions according to the
documentation by returning TRUE when events should be dispatched
via the dispatch function.

As wl_display_read_events never blocks we can call it unconditionally
without looking at the poll status.

This simplifies the implementation and gets rid of a race where the
mainloop could get blocked due to nobody actually reading the events
from the wayland connection.
2019-03-11 13:54:16 +01:00
Mathieu Duponchelle a35d500eae videoaggregator: fix buffer skipping with pad offsets
The ->skip_buffer implementation in videoaggregator replicates
the behaviour of the aggregate method to determine whether a
buffer can be skipped
(https://bugzilla.gnome.org/show_bug.cgi?id=781928).

This fixes a typo that made it so the start time of the buffer
was calculated against the output segment, not the segment of
the relevant sinkpad, which caused buffers to be skipped when
for example a sinkpad had received a segment which base had
been modified by a pad offset somewhere along the way.

This simply makes the calculation of the buffer start time
identical to the calculation in aggregate()
2019-03-08 07:40:25 +00:00
Matthew Waters 6a37bf9bb9 gl: Don't restore the viewport on function exit
Doing so involves retrieving the current viewport from OpenGL which as
with any glGet operation, is expensive.

This means that the various sinks need to reset the viewport on draw.

In the process, fix resizing on cocoa.
2019-03-08 17:49:05 +11:00
Thibault Saunier 7bcd72f5b6 Revert "Revert "discoverer: Serialize/load "next" StreamInfo in GVariants""
This reverts commit 747f5a75c3.

This was never meant to be reverted in the first place but sliped in
during developement
2019-03-07 19:52:44 -03:00
Thibault Saunier 747f5a75c3 Revert "discoverer: Serialize/load "next" StreamInfo in GVariants"
This reverts commit 6ca357f5b67590c694a95013f5eb5fdd04cf46a9.
2019-03-07 20:59:29 +00:00
Thibault Saunier 19c86b4494 discoverer: Remove padding from private headers 2019-03-07 20:59:29 +00:00
Thibault Saunier c8eee6f0c6 dicoverer: Do not add container infos to the stream list
They are not added on actual discovery

See https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/398
2019-03-07 20:59:29 +00:00
Thibault Saunier 4014995d0c discoverer: Serialize/load "next" StreamInfo in GVariants
See https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/398
2019-03-07 20:59:29 +00:00
Thibault Saunier 54920276b0 discoverer: Implement GstDiscovererInfo caching
This uses the gst_discoverer_info_from/to_variant API and saves
the variants on disc (in the user data cache dir) allowing much
faster retrieval of the information after the cache has been built.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/398
2019-03-07 20:59:29 +00:00
Olivier Crête 6a8c15f3bd video-aggregator: Sync property values to output timestamp
The properties need to be change at every output frame based on the output
time because they may change even though the input frame is not changing.
2019-03-07 14:43:06 -05:00
Matthew Waters 4e13980e10 gl: fix a few other leaks when not getting to PAUSED 2019-03-07 02:01:09 +11:00
Matthew Waters 86aa568383 glcolorconvert: Ensure we free the internal convert object
If we only ever make it to READY, transform_caps can create an
internal convert object that will never be freed by basetransform's
stop vmethod (PAUSED->READY).
2019-03-06 23:32:18 +11:00
Tim-Philipp Müller d58b7cf75c gl: .gitignore generated wayland xdg shell files 2019-03-06 10:49:48 +00:00
Tim-Philipp Müller 81ccfdd6fd video: fix pipeline leak in gst_video_convert_sample_async() 2019-03-06 10:04:48 +00:00
Matthew Waters 13fc711eca gloverlaycompositor: Also free the texcoord GL buffer
Fix a typo that was attempting to free the position GL buffer twice
(without any consequences as there was a if (buffer) check)

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/561
2019-03-06 01:08:04 +00:00
Tim-Philipp Müller 8d1122013b audiodecoder: add _finish_subframe() method
This allows us to output audio samples without discarding
any input frames, which is useful for some formats/codecs
(e.g. the MonkeysAudio decoder implementation in ffmpeg
which will might return e.g. 16 output buffers for an
input buffer for certain files).

In the past decoder implementations just concatenated
the returned audio buffers until a full frame had been
decoded, but that's no longer possible to do efficiently
when the decoder returns audio samples in non-interleaved
layout.

Allowing subframes to be output before the entire input
frame is decoded can also be useful to decrease startup
latency/delay.

https://gitlab.freedesktop.org/gstreamer/gst-libav/issues/49
2019-03-05 19:49:13 +00:00
Marc Leeman 2e5f5e67ce rtp: add H265 to lookup for media info 2019-03-05 14:33:17 +01:00
Nicolas Dufresne 3f3719da41 videooverlay: Fix render-rectangle range
The range was set to -1 to MAXINT, but the x,y value can be negative.
Relax the restriction so that we can now have negative coordinates.
2019-03-04 17:05:04 -05:00
Matthew Waters 55bcdcf01a gl: actually use the highp specifier
675415bf2e contained a typo that incorrectly
used the mediump specifier instead of highp.
2019-02-28 23:39:21 +11:00
Matthew Waters 675415bf2e gl: try to use highp precision where supported
The use of mediump as a specifier in GLSL shaders will have limited
resolution and when used as texture coordinates may become inaccurate
over texture sizes of 1024.
2019-02-28 17:26:32 +11:00
James Cowgill 8f51fba8b5 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.
2019-02-20 09:40:24 +00:00
Kristofer Bjorkstrom 4bc906e87e 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
2019-02-18 16:12:58 +00:00
Tim-Philipp Müller 0cdb3aa9b3 gl: eglimage: fix build on RPi by adding more fallback defines for EGL_*_EXT 2019-02-18 13:52:43 +00:00
Tim-Philipp Müller 79365f9b41 pbutils: add description for AV1 codec
Fixes #558
2019-02-16 15:29:57 +00:00
Edward Hervey dc2bc38b1e wayland: Also dist the private header 2019-02-13 11:59:10 +01:00
Nicolas Dufresne 77d7cfea10 eglimage: Add some more defines
This allow building on advertised version of libdrm drm_fourcc.h files.

Fixes #549
2019-02-11 10:01:55 -05:00
Nicolas Dufresne 837173c0f0 Revert "fix issue"
This reverts commit 5e0c458e0e.
2019-02-11 10:01:50 -05:00
yanle.zhang 5e0c458e0e fix issue
549."https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/549".
2019-02-11 16:13:15 +08:00
Seungha Yang 3152cbb46e glupload: Don't leak caps features
Create caps features when it is required.
2019-02-08 21:43:43 +09:00
Niels De Graef 17899dc9b6 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]: 698dde1958
[XML spec]: https://github.com/wayland-project/wayland-protocols/blob/master/stable/xdg-shell/xdg-shell.xml
2019-02-06 22:45:28 +00:00
Niels De Graef b52cf2f7d1 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.
2019-02-06 22:45:28 +00:00
Niels De Graef 808e712767 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.
2019-02-06 22:45:28 +00:00
Guillaume Desmottes f5a1164590 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.
2019-02-04 11:53:03 +01:00
Sebastian Dröge 05f0fe79a2 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;
          ^
2019-01-30 13:04:12 +00:00
Seungha Yang a86fc3da46 rtspconnection: Fix broken build on GLib 2.59.0
GPollableReturn enum was introduced after GLib 2.59.0 release.
2019-01-30 12:29:01 +00:00
mrk501 361835979e 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.
2019-01-29 14:49:19 +00:00
Sebastian Dröge 3a0e7fb8f4 rtspconnection: Update to merged GOutputStream::writev() API 2019-01-29 14:17:29 +02:00
Sebastian Dröge 8a54cc3b16 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.
2019-01-29 14:17:23 +02:00
Ognyan Tonchev 87a9f2b92c 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.
2019-01-29 14:17:23 +02:00
Sebastian Dröge f90dac8d48 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
2019-01-29 14:17:23 +02:00
Sebastian Dröge b3c0d8b89b 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
2019-01-29 14:17:23 +02:00
Andrew Gall 3a9148b334 video-anc: Fix glib version check for G_GNUC_CHECK_VERSION macro
Fixes #544
2019-01-29 13:58:43 +02:00
Seungha Yang b32b59ce76 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.
2019-01-28 18:53:39 +09:00
Tim-Philipp Müller 6330eb0cb3 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
2019-01-22 13:35:38 +00:00
Haihao Xiang 7874c74cfb 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
2019-01-21 01:27:15 +00:00
George Kiagiadakis 358ed9f9b4 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
2019-01-18 11:33:33 +01:00
Sebastian Dröge acc098a736 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.
2019-01-16 14:09:18 +02:00
Tim-Philipp Müller 37b56c9735 video-format: minor docs improvement 2019-01-16 00:28:16 +00:00
Seungha Yang e48b8033e3 gl: Fix some type conversion warnings with MSVC
MSVC complained about implicit conversion between GstGLFormat* and guint*
2019-01-14 01:48:34 +00:00
Wim Taymans a6552ee02e 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
2019-01-11 11:47:51 -05:00
Alex Ashley 5767d65321 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
2019-01-11 17:41:15 +05:30
Tim-Philipp Müller 5dc33afbcc 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
2019-01-11 11:24:50 +00:00
Tim-Philipp Müller 4c06e9e6eb audiometa: fix docs typo 2019-01-06 00:48:56 +00:00
Seungha Yang c389dbf332 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
2018-12-30 23:25:14 +00:00
Tim-Philipp Müller 83806dc4e1 rtcpbuffer: fix typo 2018-12-30 18:06:58 +00:00
Tim-Philipp Müller 44b18ea2b6 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.
2018-12-30 17:28:38 +00:00
Tim-Philipp Müller a9cf6f238f video: build GstVideoAggregator which was moved from -bad 2018-12-28 12:16:12 +01:00
Tim-Philipp Müller f11571f398 Move GstVideoAggregator, compositor and OpenGL mixers from -bad
Merge branch 'videoaggregator-compositor-glmixers-move'

Fixes #137 and #138.
2018-12-28 12:15:39 +01:00
Sebastian Dröge acd7010576 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
2018-12-19 23:11:24 +00:00
Sebastian Dröge 571e0abd8a videotimecode: Allow serializing invalid timecodes 2018-12-19 23:11:24 +00:00
Sebastian Dröge be516c2fbd 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.
2018-12-19 23:11:24 +00:00
Sebastian Dröge 615fa4790f 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.
2018-12-19 23:11:24 +00:00
Sebastian Dröge 6aa8936eee videotimecode: Remove various unneeded checks 2018-12-19 23:11:24 +00:00
Sebastian Dröge 905dcce61b videotimecode: Fix handling of timecodes without daily jam in gst_video_time_code_to_date_time()
So that it behaves according to documentation.
2018-12-19 23:11:24 +00:00
Sebastian Dröge 17cc4beaa1 videotimecode: Various documentation and annotation fixes 2018-12-19 23:11:24 +00:00
Sebastian Dröge df14532b0f videotimecode: Add some more guards for function parameters 2018-12-19 23:11:24 +00:00
Sebastian Dröge c02d3b03c2 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.
2018-12-19 23:11:24 +00:00
Sebastian Dröge ac6ae25b53 videotimecode: We only support 30000/1001 and 60000/1001 as drop-frame framerates
24000/1001 is *not* a drop-frame framerate.
2018-12-19 23:11:24 +00:00
Sebastian Dröge ef63c44f41 videotimecode: Fix division by zero in timecode validation function
And add some comments about what exactly we're testing in the
non-trivial cases.
2018-12-19 23:11:24 +00:00
Sebastian Dröge fbcbbd363b video: Add deprecation macros 2018-12-19 23:11:24 +00:00
Mathieu Duponchelle 1edb2c4242 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.
2018-12-17 14:23:49 +00:00
Edward Hervey bb6b518506 video-converter: Remove unused variable/calculation
Since the refactoring in cdd86d025a
calculating the stride was no longer needed in setup_scale.
2018-12-17 12:21:01 +01:00
Edward Hervey 3519b39131 videodecoder: Remove dead assignment
structure is never used afterwards
2018-12-17 12:21:01 +01:00
Edward Hervey 66ad2c3d40 sdpmessage: Remove dead assignment
p is overridden before being used (as the for() loop iterator)
2018-12-17 12:21:01 +01:00
Edward Hervey f4c9267265 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).
2018-12-17 12:21:01 +01:00
Edward Hervey 962df52fef rtspconnection: Properly exit infinite loop
In the unlikeliness the builder state is invalid, exit the
top-level while(TRUE) loop.
2018-12-17 12:21:01 +01:00
Edward Hervey d42294114f audiobasesink: Remove dead assignment
out_samples is set and used in the 'no_align' block.
Dead assignment since 3e312e6e16
2018-12-17 12:21:01 +01:00
Edward Hervey f9176b8288 codec-utils: Don't leak bytewriter data
In error cases, don't forget to reset it.
2018-12-17 09:27:25 +01:00
Tim-Philipp Müller aa910c3cb7 rtp: fix g-i warnings
Use same variable name in function declaration as in function
definition and gtk-doc/g-i blurb.
2018-12-16 23:15:57 +00:00
Sebastian Dröge fd1a31ee11 video-anc: Add API for converting GstVideoCaptionType from/to GstCaps 2018-12-15 21:31:14 +00:00
Sebastian Dröge 1eb3a20617 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.
2018-12-15 21:31:14 +00:00
Niels De Graef 3ce6bf65c7 gl/wayland: destroy wl_shell instance at finalize 2018-12-14 14:15:59 +01:00
Justin Kim c961dc9f8f 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
2018-12-14 12:02:36 +09:00
Olivier Crête 01a25d81c1 rtcpbuffer: Validate the length of RTCP packets 2018-12-13 14:01:06 -05:00
Justin Kim 5303e2c32b 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
2018-12-13 14:01:06 -05:00
Philipp Zabel 18c9babef9 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.
2018-12-13 15:52:13 +01:00
Matthew Waters cfae8bd6c1 glmemory: normalize the internal format we pass into glTex* functions
Passing unsized formats sometimes breaks on embedded platforms

Take 2 at 694e30f858,
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/merge_requests/49
2018-12-13 00:10:10 +11:00
Matthew Waters 56ff61eac4 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 694e30f858.
2018-12-13 00:09:59 +11:00
Sebastian Dröge f441b5216e 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.
2018-12-07 19:23:49 +02:00
Per Forlin 76aa92be51 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
2018-12-07 11:36:11 +00:00
Nicolas Dufresne f7d5dff921 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.
2018-12-05 13:41:11 +00:00
Nicolas Dufresne 46b503d674 gl: window-gbm: Remove unused private class member
The display class member is not used, not set and rather
confusing.
2018-12-05 13:41:11 +00:00