platform/upstream/gstreamer.git
5 years agortmp2sink: Add a check that meta isn't NULL before accessing
Vivia Nikolaidou [Tue, 12 Nov 2019 10:31:48 +0000 (12:31 +0200)]
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

5 years agokmssink: Do not drain if imported buffer are from KMS
Nicolas Dufresne [Fri, 8 Nov 2019 23:00:46 +0000 (18:00 -0500)]
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).

5 years agokmssink: Avoid drain on caps changes
Nicolas Dufresne [Fri, 8 Nov 2019 22:57:58 +0000 (17:57 -0500)]
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.

5 years agokmssink: Ensure we have an allocator before importing
Nicolas Dufresne [Fri, 8 Nov 2019 22:48:40 +0000 (17:48 -0500)]
kmssink: Ensure we have an allocator before importing

This fixes cases where the kms allocator API was called with a null
pointer.

5 years agovc1parse: Avoid division by zero assertion
Nicolas Dufresne [Sat, 13 Jul 2019 00:39:45 +0000 (20:39 -0400)]
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

5 years agovc1parser: Relax ASF Binding Byte validation
Nicolas Dufresne [Sun, 18 Feb 2018 00:38:22 +0000 (19:38 -0500)]
vc1parser: Relax ASF Binding Byte validation

According to the spec, the least significant bit is reserved and should
always we set to 1. Though, some wrong file has been found. Considering
how low important this reserved bit is, relax the validation.

Related to #660

5 years agovc1parser : fix a miswrite
Fuwei Tang [Mon, 11 Nov 2019 01:36:48 +0000 (09:36 +0800)]
vc1parser : fix a miswrite

5 years agovkhandle: expose a printf format specifier for a vulkan handle
Matthew Waters [Sun, 10 Nov 2019 23:50:58 +0000 (10:50 +1100)]
vkhandle: expose a printf format specifier for a vulkan handle

5 years agovkdescriptor: set the GError on the 'too many allocations' case
Matthew Waters [Sun, 10 Nov 2019 23:33:23 +0000 (10:33 +1100)]
vkdescriptor: set the GError on the 'too many allocations' case

5 years agovkswapper: add inherit support
Matthew Waters [Thu, 17 Oct 2019 12:25:14 +0000 (23:25 +1100)]
vkswapper: add inherit support

Used on android

5 years agovkswapper: output specific values when swapchain flags fail
Matthew Waters [Thu, 17 Oct 2019 11:27:44 +0000 (22:27 +1100)]
vkswapper: output specific values when swapchain flags fail

5 years agovulkan: add android WSI integration
Matthew Waters [Wed, 16 Oct 2019 06:17:51 +0000 (17:17 +1100)]
vulkan: add android WSI integration

5 years agovulkan: Fix build on ios
Nirbheek Chauhan [Sun, 10 Nov 2019 13:01:49 +0000 (18:31 +0530)]
vulkan: Fix build on ios

These little bits were missed during the refactor in
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/merge_requests/821

5 years agoamc: Change plugin name if it's built for Magic Leap
Xavier Claessens [Thu, 24 Oct 2019 19:27:42 +0000 (15:27 -0400)]
amc: Change plugin name if it's built for Magic Leap

5 years agoamc: Add MLSDK implementation
Xavier Claessens [Mon, 19 Nov 2018 18:40:35 +0000 (13:40 -0500)]
amc: Add MLSDK implementation

5 years agovulkan: Fix build on Windows
Seungha Yang [Fri, 8 Nov 2019 14:42:08 +0000 (23:42 +0900)]
vulkan: Fix build on Windows

gstvkwindow_win32.c(166): error C2065: 'msg_source': undeclared identifier

5 years agohlsdemux: Don't use deprecated SSL methods
Edward Hervey [Wed, 6 Nov 2019 14:07:44 +0000 (15:07 +0100)]
hlsdemux: Don't use deprecated SSL methods

And instead use the fixed-size variants (which aren't deprecated)

5 years agobad: Avoid using deprecated API
Edward Hervey [Wed, 6 Nov 2019 13:36:11 +0000 (14:36 +0100)]
bad: Avoid using deprecated API

GTimeval is deprecated

5 years agomsdk: remove msdkvp8enc
Haihao Xiang [Thu, 7 Nov 2019 10:45:55 +0000 (18:45 +0800)]
msdk: remove msdkvp8enc

MediaSDK doesn't support vp8 encode which is not going to be
implemented [1], so remove msdkvp8enc from this plugin

[1]: https://github.com/Intel-Media-SDK/MediaSDK/issues/947

5 years agovulkan: remove the private struct from the public struct
Matthew Waters [Wed, 6 Nov 2019 15:41:10 +0000 (02:41 +1100)]
vulkan: remove the private struct from the public struct

Remove any references to CamelTypePrivate from the public CamelType
struct.  They can be accessed as needed using
camel_type_get_instance_private().

5 years agovulkan: implement proper descriptor set handling
Matthew Waters [Wed, 6 Nov 2019 11:19:42 +0000 (22:19 +1100)]
vulkan: implement proper descriptor set handling

The major functionality gain this provides is proper reference counting
for a descriptor set.  Overall this allows us to create descriptor sets
when they are needed (or reused from a cache) without violating any of
vulkan's object synchronisation requirements.

As there are a fixed number of sets available in a pool, the number of
descriptors in elements is currently hardcoded to 32.  This can be extended
in a future change to create pools on the fly if that limit is ever overrun.

5 years agovulkan/fence: add always-signalled fence type
Matthew Waters [Tue, 5 Nov 2019 22:34:36 +0000 (09:34 +1100)]
vulkan/fence: add always-signalled fence type

Allows a cleaner control flow when there is no fence available for use
with the trash list.  An always signalled fence type will always return
TRUE for gst_vulkan_fence_is_signalled.

5 years agovulkan: add handle type for arbitrary vulkan handles
Matthew Waters [Tue, 5 Nov 2019 22:29:51 +0000 (09:29 +1100)]
vulkan: add handle type for arbitrary vulkan handles

Serve two purposes:
1. refcounting of vulkan handles with associated destruction.  When
   combined with the trash list, the user can ensure destruction at
   the correct time according to the vulkan rules.
2. avoids polluting our API with 32-bit vs 64-bit integer/pointers
   differences as exposed through the vulkan API.  on 32-bit, vulkan
   non-dispatchable handles are 64-bit integers and on 64-bit, they
   are pointers.

5 years agovulkanviewconvert: fix typo of output image view name
Matthew Waters [Wed, 6 Nov 2019 11:09:02 +0000 (22:09 +1100)]
vulkanviewconvert: fix typo of output image view name

5 years agovulkan: fix non-dispatchable handles on 32-bit platforms
Matthew Waters [Wed, 16 Oct 2019 06:47:33 +0000 (17:47 +1100)]
vulkan: fix non-dispatchable handles on 32-bit platforms

non-dispatchable handles are 64-bit integers on 32-bit platforms

5 years agovulkan: use VK_NULL_HANDLE in more places
Matthew Waters [Wed, 16 Oct 2019 06:42:33 +0000 (17:42 +1100)]
vulkan: use VK_NULL_HANDLE in more places

Fixes compiler warnings on 32-bit platforms assigning a void * to a
64-bit integer value.

5 years agovulkan: use the provided VKAPI_ATTR for the debug callback
Matthew Waters [Wed, 16 Oct 2019 06:27:16 +0000 (17:27 +1100)]
vulkan: use the provided VKAPI_ATTR for the debug callback

Ensures that we get the calling convention correct for the platform we
are using.

5 years agovulkan: dump surface information
Matthew Waters [Sun, 3 Nov 2019 10:50:39 +0000 (21:50 +1100)]
vulkan: dump surface information

5 years agovulkan: print criticals/warnings for vulkan errors/warnings
Matthew Waters [Wed, 30 Oct 2019 08:33:25 +0000 (19:33 +1100)]
vulkan: print criticals/warnings for vulkan errors/warnings

Simplifies finding the erronous cases in using the Vulkan API
incorrectly.

5 years agovulkan/image: use the full video info for returning vulkan formats
Matthew Waters [Tue, 29 Oct 2019 13:57:55 +0000 (00:57 +1100)]
vulkan/image: use the full video info for returning vulkan formats

We may need some colorspace information for returning sRGB vs no sRGB.

5 years agotsdemux: Handle continuity mismatch in more cases
Edward Hervey [Wed, 6 Nov 2019 13:22:07 +0000 (14:22 +0100)]
tsdemux: Handle continuity mismatch in more cases

Packets of a given PID are meant to have sequential continuity counters
(modulo 16). If there are not sequential, this is the sign of a broken
stream, which we then consider as a discontinuity.

But if that new packet is a frame start (PUSI is true), then we can resume
from that packet without any damage.

5 years agovulkan: Fix build error when gstvulkan is not installed
Yeongjin Jeong [Fri, 1 Nov 2019 05:22:46 +0000 (14:22 +0900)]
vulkan: Fix build error when gstvulkan is not installed

The following build error occurs:

vkdeviceprovider.h:30:10: fatal error: gst/vulkan/vulkan.h: No such file or directory
  #include <gst/vulkan/vulkan.h>
           ^~~~~~~~~~~~~~~~~~~~~

5 years agodebugutils: clockselect, a pipeline that enables clock selection
Ederson de Souza [Wed, 23 Oct 2019 17:11:46 +0000 (10:11 -0700)]
debugutils: clockselect, a pipeline that enables clock selection

Sometimes, one wants to force a clock on some pipelines - for instance,
when testing TSN related pipelines, one usually uses GstPtpClock or
CLOCK_REALTIME (assuming system realtime clock is in sync with network
one). Until now, one needs to write an application for that - not
difficult, but quite boring if one just wants to test something. This
patch presents a new element to help that: clockselect.

clockselect is a pipeline with two properties to select a clock. One
property, "clock-id", enables one to choose between "monotonic",
"realtime", "ptp" or "default" clock - where default keeps pipeline
behaviour of choosing a clock based on its elements. The other property,
"ptp-domain" gives one the choice of which PTP domain should be used.

Some very simple tests also added for this new element.

5 years agoDon't pass default GLib marshallers for signals
Niels De Graef [Tue, 27 Aug 2019 05:59:27 +0000 (07:59 +0200)]
Don't pass default GLib marshallers for signals

By passing NULL to `g_signal_new` instead of a marshaller, GLib will
actually internally optimize the signal (if the marshaller is available
in GLib itself) by also setting the valist marshaller. This makes the
signal emission a bit more performant than the regular marshalling,
which still needs to box into `GValue` and call libffi in case of a
generic marshaller.

Note that for custom marshallers, one would use
`g_signal_set_va_marshaller()` with the valist marshaller instead.

5 years agosrt: split incoming buffer up into srt chunk
Justin Kim [Mon, 28 Oct 2019 04:42:15 +0000 (13:42 +0900)]
srt: split incoming buffer up into srt chunk

5 years agowasapi: minor cleanup
Ignacio Casal Quinteiro [Sat, 2 Nov 2019 15:29:02 +0000 (16:29 +0100)]
wasapi: minor cleanup

5 years agosdp: don't leak the ghost pad
Michael Olbrich [Tue, 27 Aug 2019 13:14:31 +0000 (15:14 +0200)]
sdp: don't leak the ghost pad

The peer is already gone when pad_removed_cb() called, so the ghost cannot
be removed. Use g_object_set_data() instead to remember the ghost pad.

Copied from similar code in GstRTPBin.

5 years agod3dvideosink: support OverlayComposition for GPU overlay compositing
Aaron Boxer [Tue, 22 Oct 2019 18:10:30 +0000 (14:10 -0400)]
d3dvideosink: support OverlayComposition for GPU overlay compositing

5 years agobasetsmux: allow null J2K profile
Aaron Boxer [Tue, 5 Nov 2019 01:42:19 +0000 (20:42 -0500)]
basetsmux: allow null J2K profile

Since we are not requiring that profile equals GST_JPEG2000_PARSE_PROFILE_BC_SINGLE,
(as the standard requires) we can allow profile to be null. We relax this condition because
OpenJPEG can't create broadcast profiles.

5 years agojpeg2000parse: fail caps negotiation if caps are NOT fixed
Aaron Boxer [Sun, 3 Nov 2019 10:56:12 +0000 (05:56 -0500)]
jpeg2000parse: fail caps negotiation if caps are NOT fixed

5 years agojpeg2000parse: use pre_push_frame to reset parser
Aaron Boxer [Thu, 8 Aug 2019 19:27:11 +0000 (15:27 -0400)]
jpeg2000parse: use pre_push_frame to reset parser

5 years agojpeg2000parse: parse_event: call base class at end
Aaron Boxer [Thu, 8 Aug 2019 19:26:22 +0000 (15:26 -0400)]
jpeg2000parse: parse_event: call base class at end

derived class should do it's work first before calling base

5 years agojpeg2000parse: do hard reset if gst_base_parse_finish_frame fails
Aaron Boxer [Tue, 6 Aug 2019 01:53:54 +0000 (21:53 -0400)]
jpeg2000parse: do hard reset if gst_base_parse_finish_frame fails

5 years agojpeg2000parse: initialize some variables to make valgrind happy
Aaron Boxer [Mon, 5 Aug 2019 21:15:57 +0000 (17:15 -0400)]
jpeg2000parse: initialize some variables to make valgrind happy

5 years agojpeg2000parse: add unit test
Aaron Boxer [Fri, 9 Aug 2019 13:29:22 +0000 (09:29 -0400)]
jpeg2000parse: add unit test

5 years agojpeg2000parse: use GST_INT in caps for profile
Aaron Boxer [Fri, 9 Aug 2019 13:28:53 +0000 (09:28 -0400)]
jpeg2000parse: use GST_INT in caps for profile

Negotiation failed with GST_UINT

5 years agojpeg2000parse: make explicit that codec_format is for src caps
Aaron Boxer [Mon, 5 Aug 2019 19:38:08 +0000 (15:38 -0400)]
jpeg2000parse: make explicit that codec_format is for src caps

5 years agojpeg2000parse: refactor
Aaron Boxer [Mon, 5 Aug 2019 19:24:49 +0000 (15:24 -0400)]
jpeg2000parse: refactor

1. only recalculate src codec format if sink caps change
2. use correct value for "jp2c" magic in J2C box ID
3. only parse J2K magic once, and store result
4. more sanity checks comparing caps to parsed codec

5 years agojpeg2000parse: set parsed to TRUE in src caps
Aaron Boxer [Mon, 5 Aug 2019 19:34:08 +0000 (15:34 -0400)]
jpeg2000parse: set parsed to TRUE in src caps

5 years agojpeg2000parse: only cache caps parameters when caps have in fact changed
Aaron Boxer [Mon, 5 Aug 2019 19:33:33 +0000 (15:33 -0400)]
jpeg2000parse: only cache caps parameters when caps have in fact changed

5 years agojpeg2000parse: fix typos in media format
Aaron Boxer [Mon, 5 Aug 2019 19:23:24 +0000 (15:23 -0400)]
jpeg2000parse: fix typos in media format

5 years agojpeg2000parse: add reset method
Aaron Boxer [Mon, 5 Aug 2019 19:19:12 +0000 (15:19 -0400)]
jpeg2000parse: add reset method

Also add three new struct members, currently unused.

5 years agodocumentation: fixed a heap o' typos
Aaron Boxer [Mon, 2 Sep 2019 19:08:44 +0000 (15:08 -0400)]
documentation: fixed a heap o' typos

5 years agoAdd files from gst-rtmp
Vivia Nikolaidou [Tue, 5 Nov 2019 13:52:55 +0000 (13:52 +0000)]
Add files from gst-rtmp

For master, without autotools.

5 years agoav1enc: Add tile-{columns,rows} properties
Wonchul Lee [Sun, 6 Oct 2019 13:46:52 +0000 (22:46 +0900)]
av1enc: Add tile-{columns,rows} properties

It provides to set tile-columns and tile-rows configurations. The av1
codec allows an input image frame be partitioned into separate vertical
or horizontal tile which can be encoded or decoded independently. It
helps to encode/decode parallel.

5 years agoav1enc: Enable row-mt by default
Wonchul Lee [Sun, 6 Oct 2019 08:20:12 +0000 (17:20 +0900)]
av1enc: Enable row-mt by default

Enabling row-mt property can help to increase cpu utilization and reduce
encoding speed, so set it to on by default.

5 years agocurlhttpsrc: Hook up libcurl logging message to gstreamer
Yeongjin Jeong [Tue, 23 Jul 2019 09:24:11 +0000 (18:24 +0900)]
curlhttpsrc: Hook up libcurl logging message to gstreamer

CURLOPT_DEBUGFUNCTION option replaces the standard debug function
used when CURLOPT_VERBOSE is in effect. This callback receives various debug information.

5 years agoristsrc: Apply BINDTODEVICE to socket created by udpsrc too
Olivier Crête [Fri, 20 Sep 2019 12:52:15 +0000 (14:52 +0200)]
ristsrc: Apply BINDTODEVICE to socket created by udpsrc too

5 years agoccconverter: Instead of erroring out on too big input drop additional data
Sebastian Dröge [Sun, 3 Nov 2019 08:54:40 +0000 (09:54 +0100)]
ccconverter: Instead of erroring out on too big input drop additional data

5 years agovtdec: fix leak of CMFormatDescription
Roman Shpuntov [Wed, 30 Oct 2019 07:56:41 +0000 (14:56 +0700)]
vtdec: fix leak of CMFormatDescription

There was consideration for replacing the CMFormatDescription used
on format changes in `set_format()` however on shutdown, we were
leaking the CMFormatDescription at the end of processing.

'https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1106'

5 years agoh265parse: Fix wrong NALU minimum length check
Yeongjin Jeong [Fri, 11 Oct 2019 19:04:59 +0000 (04:04 +0900)]
h265parse: Fix wrong NALU minimum length check

Fixes a problem where an EOS/EOB NALU placed at the end of
an AU is detected as an other AU and create a buffer that
does not have valid pts.

5 years agoh264parse: Fix wrong NALU minimum length check
Yeongjin Jeong [Fri, 11 Oct 2019 18:49:33 +0000 (03:49 +0900)]
h264parse: Fix wrong NALU minimum length check

Fixes a problem where an EOS/EOB NALU placed at the end of
an AU is detected as an other AU and create a buffer that
does not have valid pts.

5 years agoopenexr: Fix compilation with OpenEXR 2.4
Jan Alexander Steffens (heftig) [Sat, 2 Nov 2019 15:51:09 +0000 (16:51 +0100)]
openexr: Fix compilation with OpenEXR 2.4

It uses modern C++; adding -std=c++98 breaks the build.

5 years agovtdec: memory leaks bugfix
Roman Shpuntov [Thu, 31 Oct 2019 08:14:21 +0000 (15:14 +0700)]
vtdec: memory leaks bugfix

release 'videoDecoderSpecification' variable in 'gst_vtdec_create_session' function.
release 'extensions' variable in 'create_format_description_from_codec_data' function.

5 years agomsdkmjpegenc: convert UYVY to YUY2 instead of NV12
Haihao Xiang [Fri, 11 Oct 2019 06:48:11 +0000 (14:48 +0800)]
msdkmjpegenc: convert UYVY to YUY2 instead of NV12

Before this fix, the chroma subsampling of the output is 4:2:0. It is
4:2:2 with this fix, which is better for UYVY input

5 years agomsdkmjpegenc: don't need conversion for BGRA and YUY2
Haihao Xiang [Fri, 11 Oct 2019 05:05:33 +0000 (13:05 +0800)]
msdkmjpegenc: don't need conversion for BGRA and YUY2

jpeg encoder in MSDK can accept BGRA and YUY2 input.

5 years agomsdkenc: add need_conversion method
Haihao Xiang [Fri, 11 Oct 2019 04:50:02 +0000 (12:50 +0800)]
msdkenc: add need_conversion method

In future, a sub class of GstMsdkEncClass may decide a native format by
using this method, e.g. JPEG encoder may accept YUY2 input, however the
current implemation needs a conversion from YUY2 to NV12 before encoding.

In addtion, a sub class may choose a format for encoding if the input
format is not supported by MSDK, e.g. the current implemation does
UYVY->NV12 if the input format is UYVY. We may do UYVY->YUY2 for JPEG
encoder in future

5 years agomsdk: support for MFX_FOURCC_BGR4 frame allocation
Haihao Xiang [Wed, 9 Oct 2019 05:41:09 +0000 (13:41 +0800)]
msdk: support for MFX_FOURCC_BGR4 frame allocation

MFX_FOURCC_BGR4 is mapped to VA_FOURCC_ABGR and JPEG encoder needs a
MFX_FOURCC_BGR4 frame for internal usage when the input format is
MFX_FOURCC_RGB4

This is a preparation for supporting native formats of JPEG encoder

5 years agompegtsmux: Add SCTE-35 support
Edward Hervey [Thu, 26 Sep 2019 15:45:31 +0000 (17:45 +0200)]
mpegtsmux: Add SCTE-35 support

This adds two properties:
* scte-35-pid: If not 0, enables the SCTE-35 support for the current
  program. This will write the proper PMT and send SCTE-35 NULL
  commands (i.e. heartbeats) at a regular interval
* scte-35-null-interval: This specifies the interval at which the
  NULL commands should be sent

Sending SCTE-35 commands is done by creating the appropriate SCTE-35
GstMpegtsSection and then sending them on the muxer. See the
associated example

5 years agompegts: Add support for SCTE-35 sections
Edward Hervey [Thu, 26 Sep 2019 15:28:27 +0000 (17:28 +0200)]
mpegts: Add support for SCTE-35 sections

Not all commands are supported, but the most common ones are.
Both parsing and packetizing is supported

5 years agotsmux: Disable bluray-isms from PMT
Edward Hervey [Thu, 26 Sep 2019 15:43:57 +0000 (17:43 +0200)]
tsmux: Disable bluray-isms from PMT

We were unconditionally adding top-level descriptors in the PMT which
were only related to bluray support for PS3 (from 10 years ago).

These should be re-added conditionally

5 years agompegtspacketizer: Fix off-by-one error
Edward Hervey [Thu, 26 Sep 2019 15:13:30 +0000 (17:13 +0200)]
mpegtspacketizer: Fix off-by-one error

This went un-noticed for 6 years :( The issue is that for short
sections (without subtables and CRC), we would always fail when
checking whether we had enough data or not and then default to the
long section checking.

Use the long section checking would then cause interesting side-effects
for short sections (such as believing they were already seen and therefore
would be dropped/ignored).

5 years agomsdkdec: use decoder base class packetized flag
Víctor Manuel Jáquez Leal [Mon, 28 Oct 2019 12:28:28 +0000 (13:28 +0100)]
msdkdec: use decoder base class packetized flag

Instead of using a proxy of `is_packetized` flag this patch
replaces it with the accessor to that flag in decoder base class,
avoiding probable mismatches.

5 years agomsdkdec: add parse callback for non-packetized input
Haihao Xiang [Fri, 27 Sep 2019 02:50:18 +0000 (10:50 +0800)]
msdkdec: add parse callback for non-packetized input

commit 55c0d720 added the capability to handle non-packetized bitstream,
and there is a loop to handle multiple frames in a non-packetized buffer
in gst_msdkdec_handle_frame. However it is possible that a
non-packetized buffer still contains valid data but there is no long any
pending unfinished frame. Currently gst_video_decoder_decode_frame is
invoked to send a new frame with new input data, the situaltion is
repeated till an EOS is received. An application has to exit when
receiving an EOS, however there is still valid data in a
non-packetezied input buffer, hence some frames are dropped.

This fix adds a parse callback for non-packeteized input, a new frame
will be sent to the subclass as soon as the input buffer has valid data

This fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/665

5 years agoccextractor: Remove unused set/get_property() functions
Sebastian Dröge [Mon, 28 Oct 2019 09:25:15 +0000 (11:25 +0200)]
ccextractor: Remove unused set/get_property() functions

5 years agoccextractor: Always forward all sticky events to the caption pad
Sebastian Dröge [Mon, 28 Oct 2019 09:22:06 +0000 (11:22 +0200)]
ccextractor: Always forward all sticky events to the caption pad

And only update the caps and stream-start event accordingly. This
ensures that we'll always forward sticky events that arrive after the
caption pad was created, and especially updates to existing sticky
events like the segment event.

Also create a proper stream id based on the upstream stream id for the
stream-start event, and make sure that all the sticky events we know are
already on the caption pad at the time it is added to the element.

5 years agovulkanimage: move fence creation earlier
Matthew Waters [Sun, 27 Oct 2019 15:27:04 +0000 (02:27 +1100)]
vulkanimage: move fence creation earlier

Fixes a critical:

GStreamer-CRITICAL **: 02:26:34.698: gst_mini_object_ref: assertion 'mini_object != NULL' failed

5 years agovulkan: change to clamp to edge rather than clamp to border
Matthew Waters [Sun, 27 Oct 2019 15:18:18 +0000 (02:18 +1100)]
vulkan: change to clamp to edge rather than clamp to border

clamp-to-border will return the border color which is typically black,
white or transparent.  When linear filtering the edge pixels will
typeically be combined with the border color which is not typically what
we want.  Especially when color converting, this removes a green box
around the edge when converting YUV->RGB.

5 years agomsdkh265enc: Add support for tiled encoding
Haihao Xiang [Thu, 24 Oct 2019 07:26:33 +0000 (15:26 +0800)]
msdkh265enc: Add support for tiled encoding

Add num-tile-rows and num-tile-cols properties to set the number of rows
and columns

5 years agosrtpenc: also insert ssrc(s) from rtp buffers
Julien Isorce [Thu, 24 Oct 2019 23:42:23 +0000 (16:42 -0700)]
srtpenc: also insert ssrc(s) from rtp buffers

This fixes a regression from commit "srtp: Support libsrtp2"
e9aa11720071f8a1d22b336395e66dd8cbca0c00 where an internal
set of ssrc(s) was added because the libsrtp v2 keeps its
internal streams as private. But the change prevented that
ssrc(s) that not in the caps from being added to the stats.
This patch ensures that all ssrc(s) are inserted to this set
instead of only inserting those from the caps.

5 years agomsdk: support P010_10LE in DMABuf mode for VP9/HEVC encoding
Haihao Xiang [Fri, 18 Oct 2019 04:26:26 +0000 (12:26 +0800)]
msdk: support P010_10LE in DMABuf mode for VP9/HEVC encoding

5 years agoandroidmedia: Make sure that the first member of GstAmcSurfaceTextureJNI is correct
Cheng-Chang Wu [Thu, 24 Oct 2019 11:10:30 +0000 (19:10 +0800)]
androidmedia: Make sure that the first member of GstAmcSurfaceTextureJNI is correct

It's a subclass of GstAmcSurfaceTexture so should have that as first
struct member or otherwise it won't work.

Fixes #1105

5 years agoandroidmedia: Call JNI method with the actual Java object instead of our wrapper...
Cheng-Chang Wu [Thu, 24 Oct 2019 11:14:58 +0000 (19:14 +0800)]
androidmedia: Call JNI method with the actual Java object instead of our wrapper struct

Fixes #1105

5 years agoopencv: Don't error when unable to detect OpenCV data dir
Jan Alexander Steffens (heftig) [Thu, 24 Oct 2019 13:40:25 +0000 (15:40 +0200)]
opencv: Don't error when unable to detect OpenCV data dir

Instead, mark OpenCV as not found. We error out later if OpenCV was
explicitly enabled.

5 years agomsdkvpp: add support Y410 and Y210 formats
Haihao Xiang [Fri, 11 Oct 2019 15:54:55 +0000 (23:54 +0800)]
msdkvpp: add support Y410 and Y210 formats

And clean up some macros

5 years agomsdkvpp: allow cropping via properties
U. Artie Eoff [Wed, 16 Oct 2019 18:59:32 +0000 (11:59 -0700)]
msdkvpp: allow cropping via properties

Add crop-left, crop-right, crop-top and crop-bottom
properties to msdkvpp and apply to input surface at
vpp transform run-time.

Implements #1097

5 years agowpe: Get rid of un-necessary frameComplete dispatchs
Philippe Normand [Tue, 22 Oct 2019 17:33:18 +0000 (18:33 +0100)]
wpe: Get rid of un-necessary frameComplete dispatchs

frameComplete() should be called only if there's a new commited frame.

5 years agowpe: Run frameComplete outside of images mutex scope
Philippe Normand [Sat, 19 Oct 2019 11:48:55 +0000 (12:48 +0100)]
wpe: Run frameComplete outside of images mutex scope

If the mutex is locked while running frameComplete there is a potential deadlock
bound to happen when we get a new exported images from the backend.

Fixes #1101

5 years agotimecodestamper: Add properties to time out cached upstream/LTC timecodes after a...
Sebastian Dröge [Wed, 23 Oct 2019 13:47:43 +0000 (16:47 +0300)]
timecodestamper: Add properties to time out cached upstream/LTC timecodes after a while

By default we never time them out and simply continue couting up with
each frame forever.

5 years agotimecodestamper: Add new auto-resync boolean property
Sebastian Dröge [Wed, 23 Oct 2019 12:03:09 +0000 (15:03 +0300)]
timecodestamper: Add new auto-resync boolean property

This allows selecting whether we continue updating our last known
upstream timecode whenever a new one arrives or instead only keep the
last known one and from there on count up.

5 years agotimecodestamper: Add last-known-or-zero mode
Sebastian Dröge [Wed, 23 Oct 2019 11:31:16 +0000 (14:31 +0300)]
timecodestamper: Add last-known-or-zero mode

This uses the last known upstream timecode (counted up per frame), or
otherwise zero if none was known.

The normal last-known timestamp uses the internal timecode as fallback
if no upstream timecode was ever known.

5 years agotimecodestamper: Don't initialize upstream timecode with zero if none was seen
Sebastian Dröge [Wed, 23 Oct 2019 11:29:06 +0000 (14:29 +0300)]
timecodestamper: Don't initialize upstream timecode with zero if none was seen

Instead keep it unset and use the internal timecode wherever needed as
fallback.

5 years agotimecodestamper: Update set-tc property documentation with latest version of reality
Sebastian Dröge [Wed, 23 Oct 2019 11:28:24 +0000 (14:28 +0300)]
timecodestamper: Update set-tc property documentation with latest version of reality

5 years agopnmdec: Return early on ::finish() if we have no actual data to parse
Sebastian Dröge [Tue, 22 Oct 2019 06:30:34 +0000 (09:30 +0300)]
pnmdec: Return early on ::finish() if we have no actual data to parse

Otherwise we'd be working with a NULL buffer and cause various critical
warnings along the way.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1104

5 years agolv2: fix build without the debug system
Jordan Petridis [Tue, 24 Sep 2019 05:55:07 +0000 (08:55 +0300)]
lv2: fix build without the debug system

```
FAILED: subprojects/gst-plugins-bad/ext/lv2/b8a2ebe@@gstlv2@sha/gstlv2utils.c.o
../subprojects/gst-plugins-bad/ext/lv2/gstlv2utils.c: In function 'lv2_log_printf':
../subprojects/gst-plugins-bad/ext/lv2/gstlv2utils.c:50:3: error: attempt to use poisoned "gst_debug_log_valist"
   50 |   gst_debug_log_valist (lv2_debug, GST_LEVEL_INFO, "", "", 0, NULL, fmt, ap);
      |   ^
../subprojects/gst-plugins-bad/ext/lv2/gstlv2utils.c:50:25: error: 'lv2_debug' undeclared (first use in this function); did you mean 'g_debug'?
   50 |   gst_debug_log_valist (lv2_debug, GST_LEVEL_INFO, "", "", 0, NULL, fmt, ap);
      |                         ^~~~~~~~~
      |                         g_debug
```

5 years agocamerabin2: preview: remove redundant property setting on appsink
Ratchanan Srirattanamet [Thu, 29 Aug 2019 14:20:37 +0000 (21:20 +0700)]
camerabin2: preview: remove redundant property setting on appsink

Commit 8a56a7de6d5f2cf70dbe6efbd7c8ed74600c8565 (camerabin2: preview:
Appsink doesn't need to sync) add a line that set the "sync" property on
the appsink. However, the author seems to forget that there's another
property setting on appsink a few lines below.

It's very likely that the added line is required because the original
line doesn't take effect (maybe because it's too late). But for whatever
reason, the original line is now redundant. So, I remove it in this
commit.

5 years agomeson: use gir_init_section in GstTranscoder
Alistair Buxton [Sat, 19 Oct 2019 12:52:54 +0000 (13:52 +0100)]
meson: use gir_init_section in GstTranscoder

GstTranscoder adds extra_args for gir which call gst_init() during
introspection. These extra arguments are the same as the standard
ones defined in the top level meson.build as "git_init_section",
However, the top level definition also ensures an empty plugin
repository is used.

Because GstTranscoder does not use the standard args, plugins get
loaded when it is introspected. Since some of the plugins fail
without specific hardware, this causes #1100.

This patch makes it use gir_init_section.

Fixes #1100.

5 years agomeson: build gir even when cross-compiling if introspection was enabled explicitly
Tim-Philipp Müller [Thu, 17 Oct 2019 23:39:12 +0000 (00:39 +0100)]
meson: build gir even when cross-compiling if introspection was enabled explicitly

This can be made to work in certain circumstances when
cross-compiling, so default to not building g-i stuff
when cross-compiling, but allow it if introspection was
enabled explicitly via -Dintrospection=enabled.

See gstreamer/gstreamer#454 and gstreamer/gstreamer#381.

5 years agowpesrc: Implement load-bytes action signal
Philippe Normand [Tue, 24 Sep 2019 23:57:54 +0000 (16:57 -0700)]
wpesrc: Implement load-bytes action signal

5 years agowpe: Rewrite wpesrc as a glbasesrc subclass
Philippe Normand [Wed, 7 Aug 2019 16:07:21 +0000 (17:07 +0100)]
wpe: Rewrite wpesrc as a glbasesrc subclass

And since it no longer allocates memories itself, this fixes issues with
fakevideosink. A lot of code previously copied from gltestsrc is no longer
needed thanks to the glbasesrc super-class.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1046