Commit graph

25008 commits

Author SHA1 Message Date
Aaron Boxer
e3297be433 h264parse: buffer mismatch in map/unmap 2019-11-26 13:07:47 -05:00
Julien Isorce
2af672d00a msdkdec: log an error if leaking surfaces in finalize
The for loop in gst_msdkdec_handle_frame is error prone
about how it manages surfaces. Because sometimes it sets
the surface variable to NULL and sometimes it needs to free
it right away. So better to print an error if surfaces are
leaked to help with any change around the loop.
2019-11-25 17:14:20 +00:00
Jeffy Chen
2077061333 waylandsink: Commit the parent after creating subsurface
We should commit the parent to activate new subsurface, this is
documented in the protocol.

Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
2019-11-25 19:12:51 +08:00
Seungha Yang
ae76f9ab23 ttmlparse: Collect buffers until detecting complete xml document
Given buffer could be fragmented and we might need to
collect buffers until end tag is detected. And/or, a buffer
can consist of multiple ttml documents.

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/494
2019-11-22 18:31:10 +09:00
Aaron Boxer
348494fd34 msdk: query hardware when checking MFX availability
msdk plugin is not used for sofware encode/decode as there are better
solutions available. Also, with MFX_IMPL_AUTO_ANY, if software decode
is not supported, the plugin will still load, but will then fail when trying to
run the (autoplugged) pipeline. With MFX_IMPL_HARDWARE_ANY,
the plugin fails and a better software decoder is auto-plugged.
2019-11-22 05:18:42 +00:00
Aaron Boxer
2f1256ada7 msdk: query platform when opening session 2019-11-22 05:18:42 +00:00
Seungha Yang
0cf67c3be7 nvenc: Fix crash when nvenc was reused then freed without encoding
GstNvBaseEnc::n_bufs was set from the previous encoding session
but it wasn't cleared after stop. That might result to invalid memory
access at the next start (no encoded data) and then stop sequence.
Instead of defining a variable for array length, use GArray::len
directly to avoid such confusion.
2019-11-22 03:02:57 +00:00
Seungha Yang
aef414375a nvenc: Remove unused code path
refilling queue would not happen
2019-11-22 03:02:57 +00:00
Edward Hervey
706ec236ac webrtcdatachannels: Don't leak strings
They would leak in error cases

CID: 1455480
2019-11-21 16:38:53 +01:00
Edward Hervey
c026522084 webrtcbin: Fix memory leak
The structure is not used after this block

CID: 1455481
2019-11-21 16:25:21 +01:00
Thiago Santos
3c5e5f8b85 adaptivedemux: fix 'utc now' gdatetime creation
It broke after removal of usage of GTimeVal that was deprecated,
it requires seconds in this unix-based creation instead of microseconds.

The downside here is that it will create an extra object just to be
discarded in order to add the microsecond part to it.

It would end up segfaulting as it would return a NULL value
2019-11-20 22:16:15 +00:00
Jakub Adam
19391ae4c7 srtobject: allow passing SRT Stream ID in stream URI
Based on Stream ID, the application can accept or reject the connection,
select the desired data stream, or set an appropriate passphrase for the
connection. Example usage:

  srt://127.0.0.1:1234?streamid=mystream
2019-11-20 17:09:34 +00:00
Linus Svensson
8106fd1a64 curl: Require libcurl 7.55.0
CURLINFO_CONTENT_LENGTH_DOWNLOAD_T is available from libcurl version
7.55.0.
2019-11-20 11:34:15 +01:00
Julien Isorce
a7dc407041 msdkdec: fix surface leak in msdkdec_handle_frame
Can be reproduced with:
  videotestsrc ! x264enc key-int-max=$N ! \
  h264parse ! msdkh264dec ! fakesink sync=1

It happens with any gop size but the smaller is the distance N
between key frames, the quicker it is leaking.

Fixes #1023
2019-11-19 09:14:51 -08:00
Xavier Claessens
951bd01fbe dash: Fix typo in meson.build 2019-11-19 14:49:56 +00:00
Ederson de Souza
484a272306 avtpcvfdepay: Don't hide gst_pad_push return
avtpcvfdepay was effectively hiding any return from gst_pad_push, so no
errors or GST_FLOW_EOS would be propagated upstream.

Tests also added.
2019-11-19 13:35:00 +00:00
Ederson de Souza
c45c235b2a avtpcvfpay: Do not hide or modify gst_pad_push errors
Current code would change any non-ok return from gst_pad_push to
GST_FLOW_ERROR, thus hiding meaningful returns such as GST_FLOW_EOS.

Tests also added.
2019-11-19 13:35:00 +00:00
Ederson de Souza
b09bc36160 avtpcvfdepay: Tone down some log messages
Most of avtpcvfdepay messages are currently logged as warnings, which can
make some scenarios - such as receiving two AVTP streams on the same
pipeline - too verbose.

This patch tones those message down to INFO or DEBUG level - more in
sync with avtpaafdepay logging.
2019-11-19 13:35:00 +00:00
Marc Leeman
31861b095a rtpmanagerbad: allow setting multicast-iface
Allowing the UDP elements to bind on an interface is needed in more
complex networks where there are mutiple networks interfaces without
default gateway
2019-11-19 12:39:59 +00:00
Sebastian Dröge
c7393af0bf timecodestamper: Create LTC sink pad with the correct name according to the template
Should be "ltc_sink" and not just "ltc"
2019-11-19 12:21:30 +02:00
Vivia Nikolaidou
851682629e videoparsers: Disable gst_base_parse_set_infer_ts
From the documentation of gst_base_parse_set_infer_ts, it should be
disabled for non-audio data. Currently just disabling for all video
parsers that have reordered data: h264, h265, mpeg, mpeg4, vc1. Was
already disabled in h263.
2019-11-19 10:23:31 +02:00
Andrew Branson
397a9edb35 androidmedia: Add new effects and scene modes to Camera parameters 2019-11-19 07:54:16 +01:00
Andrew Branson
8de7b41015 photography: Add additional settings relevant to Android
Exposure mode property, extra colour tone values (aqua, emboss, sketch, neon), extra scene modes (backlight, flowers, AR, HDR).
Missing vmethods for exposure mode, analog gain, lens focus, colour temperature, min & max exposure time

Contribs by Mohammed Sameer <msameer@foolab.org>, Adam Pigg <adam@piggz.co.uk>
2019-11-18 23:10:04 +00:00
Kyrylo Polezhaiev
6af38c6ffe tsmux: Fix copying of buffer region 2019-11-18 07:31:33 +00:00
Aaron Boxer
842bd66bd8 d3dvideosink: use sink dimensions when calculating overlay scaling 2019-11-18 03:32:57 +00:00
Aaron Boxer
20f3f63540 d3dvideosink: use explicit system memory feature in overlay composition caps 2019-11-18 02:29:45 +00:00
Jochen Henneberg
3ecd8666d9 msdk: Fixes for meson include directory setup
In case of pkg-config we need to create the include directories object
from the path using include_directories(). For INTELMEDIASDKROOT or
MFX_HOME we need to add the alternate include path ./include/mfx as
Intel MediaSDK now puts the headers there.
2019-11-17 17:39:44 +00:00
Marc Leeman
1569c33f24 rtpmanagerbad: name the element children
As discussed with RIST, it is best to name the children of the elements
since these are now created at the element initialisation.
2019-11-17 16:00:19 +00:00
Alex Ashley
e9c68347f0 curlhttpsrc: add support for range GET
To allow curlhttpsrc to support DASH streams that use the on-demand
profile, it needs to support HTTP Range GETs. In GStreamer, the RANGE
is specified by issuing a GST_FORMAT_BYTES seek to set the start and
end of the range. curlhttpsrc needs to implement seek and set the
appropriate curl options to make it add the Range header to the
request.
2019-11-17 14:28:25 +00:00
Vivia Nikolaidou
413c6ec57b tsdemux: Always issue a DTS even when it's equal to PTS
Currently tsdemux timestamps only the PTS, and only issues the DTS if
it's different. In that case, parsers tend to estimate the next DTS
based on the previous DTS and the duration, which can accumulate
rounding errors.
2019-11-14 12:16:04 +00:00
Matthew Waters
9f4b043161 vulkan/queue: be sure to take a lock around command submission
This ensures that only one thread is submitting commands at a time as
required by the Vulkan specification.
2019-11-14 07:10:16 +00:00
Matthew Waters
c89f21388d vulkan/render: fix indent command comment typo 2019-11-14 07:10:16 +00:00
Seungha Yang
e52ed98197 d3d11window: Fix subclass procedure recursion
subclass window precedure should be cleared if it's no more used.

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1115
2019-11-14 01:26:09 +00:00
Matthew Waters
726261aa05 vulkan: NULL check destruction of vulkan resources
If the element fails to start up, any number of vulkan resources could
have not been created.
2019-11-13 22:27:59 +00:00
Matthew Waters
0c3eec57f2 vulkan: make new trash objects ref the fence
Avoids gst_vulkan_fence_ref at each call site of the trash object
creation
2019-11-13 22:27:59 +00:00
Matthew Waters
4e467e0082 vulkan/wayland: advertise the current surface size
Avoids vkswapper from creating a 0x0 output VkSurface and failing
2019-11-13 22:27:59 +00:00
Jan Schmidt
c94d50090b switchbin: Free path objects on finalize
Clean up path objects nicely when shutting down,
first by dropping pointers to elements during dispose,
and then by making sure to drop the ref to the path object
when finalizing the switch bin.

Fixes valgrind checks in the unit test.
2019-11-13 10:15:32 +00:00
Jan Schmidt
24cfd608c6 switchbin: Add a basic unit-test
Test the basic function of a switchbin - that it correctly
selects between 2 processing paths based on caps
2019-11-13 10:15:32 +00:00
Jan Schmidt
ed63012d70 switchbin: Add current-path property
Returns the index of the currently selected processing
path, or MAX-UINT if none
2019-11-13 10:15:32 +00:00
Jan Schmidt
6d292c86e9 switchbin: Add docs
Add documentation clauses and enrol switchbin to generate
plugin docs
2019-11-13 10:15:32 +00:00
Jan Schmidt
e367258eef switchbin: Initial checkin
Add code from Stream Unlimited implementing a bin
which switches between different internal decoding/processing
chains based on input caps
2019-11-13 10:15:31 +00:00
Aaron Boxer
bfe2447a3b d3d11videosink: only destroy loop if external_win_id is false
Loop was created with this condition, so it should also be
destroyed under the same condition
2019-11-12 19:54:46 -06:00
Jan Schmidt
c0561fb916 meson: Fix plugin symbol export for C++ sources/plugins
The symbol visibility=hidden flag was only being applied to C
compilation, so plugins implemented in C++ would leak extra symbols
than the 2 _get_desc() and _register().

That also showed that the gst-libs opencv C++ lib was not marking
symbols for export correctly because the BUILDING_GST_OPENCV define
wasn't in the C++ args, so fix that too.
2019-11-12 13:00:42 +00:00
Jan Alexander Steffens (heftig)
346bca80af
rtmp2: Fix NULL check in gst_rtmp_meta_transform
Coverity rightly complains that checking a pointer for NULL after
dereferencing it is pointless.

Remove the check, and to be safe, assert that gst_buffer_add_meta
returns non-NULL.

CID 1455485
2019-11-12 12:20:34 +01:00
Jan Alexander Steffens (heftig)
f730f4a694
rtmp2: Check for missing GstRtmpMeta
The message buffers are created using `gst_rtmp_message_new` and thus
always contain a GstRtmpMeta. Add checks to appease Coverity's static
analysis.

CID 1455596
CID 1455384
2019-11-12 12:20:30 +01:00
Vivia Nikolaidou
8d7489a734 rtmp2sink: Add a check that meta isn't NULL before accessing
It really can't be NULL, this is just to convince coverity

CID 1455553
2019-11-12 12:36:38 +02:00
Nicolas Dufresne
80b599c81b kmssink: Do not drain if imported buffer are from KMS
This adds a check to avoid draining when the imported buffers are in
fact own by kmssink. This happens since we export our kms buffer as
DMABuf. They are not really imported back as we pre-fill the cache,
but uses the same format as if they were external. This fixes
performance issues seen with videocrop2-test (found in -good).
2019-11-11 22:20:28 +00:00
Nicolas Dufresne
8574154cc8 kmssink: Avoid drain on caps changes
Draining systematically on caps changes was a hack. Instead, properly
save the render information used to render last_render, and use that
information to drain. This fixes performance issues met with video crop
meta and per frame caps changes.
2019-11-11 22:20:28 +00:00
Nicolas Dufresne
a83e0036ea kmssink: Ensure we have an allocator before importing
This fixes cases where the kms allocator API was called with a null
pointer.
2019-11-11 22:20:28 +00:00
Nicolas Dufresne
44322b1dfc vc1parse: Avoid division by zero assertion
A framerate of 0/1 is valid, but we cannot calculate the frame duration
in this context. Simply protect against this case.

Related to #660
2019-11-11 16:23:18 -05:00