Commit graph

6803 commits

Author SHA1 Message Date
Sebastian Dröge
74f2f733be plugins: Use gst_type_mark_as_plugin_api() for all non-element plugin types 2020-06-04 13:33:16 -04:00
Peter Workman
b98712c44a srtobject: continue polling or report error on failed receive
fixes #1277

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1260>
2020-06-03 09:31:42 +00:00
Jan Alexander Steffens (heftig)
a1bc9d4319 srt: Make logging regarding callers more useful
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1273>
2020-06-03 04:23:14 +00:00
Sebastian Dröge
b25d153c34 webrtc: Add GstWebRTCDataChannel to the library API
This makes it more discoverable for bindings and allows bindings to
generate static API for the signals and functions.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1313>
2020-06-02 21:04:37 +00:00
Ederson de Souza
bafdade207 avtp: Ensure that the avtp plugin is only built on Linux
It uses some Linux only features. This also prevents gst-build trying to
get libavtp on non-Linux environments.
2020-06-01 11:37:16 -07:00
Tim-Philipp Müller
00caf46e3f vulkan: fix use of assert() with older meson versions
Follow-up to !1307

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1308>
2020-05-28 22:50:00 +01:00
Tim-Philipp Müller
b75ad03313 vulkan: don't run tests or build lib if plugin isn't actually built
The unit tests only checked for vulkan_dep.found(), which can
be true if the libs are there but glslc was not found, in which
case the plugin wouldn't be built and the unit tests would fail
because of missing vulkan plugins.

Doesn't really make much sense to build the vulkan integration lib
either if we're not going to build the vulkan plugin, so just disable
both for now if glslc is not available.

Fixes #1301

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1307>
2020-05-28 19:07:32 +01:00
Matthew Waters
67ae885d4c webrtc: handle an ice-lite remote offer
When the remote peer offers an ice-lite SDP, we need to configure our
ICE negotiation to be in controlling mode as the peer will not be.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1304>
2020-05-28 19:57:45 +10:00
Jan Schmidt
918ed75944 srt: Don't leak the connection_poll_id on close()
Attempting to reach an inactive SRT peer in caller mode
was leaking an fd every few seconds in the gst_srt_object_close()/open()
loop.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1293>
2020-05-24 10:47:59 +00:00
Thibault Saunier
5a2c358a2b pitch: Remove useless restriction on number of channel
It handles any number of channels just fine

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1292>
2020-05-22 18:18:28 -04:00
Stéphane Cerveau
3f16353d64 meson: add libopenjp2 fallback for openjpeg
As a wrap is now available in gst-build, the fallback
can be used.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1270>
2020-05-21 08:36:59 +00:00
Ederson de Souza
a754c67c05 avtp: Add libavtp fallback dependence
So that libavtp can be found if added as subproject on gst-build.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1271>
2020-05-21 00:14:08 +00:00
Mats Lindestam
bf004227ec gstcurlhttpsink: Set 'Expect: 100-continue'-header
In the upgrade of libcurl from 7.64.1 to 7.69.1 the
EXPECT_100_THRESHOLD has been increased from 1 Kb to 1 Mb
(see https://curl.haxx.se/mail/lib-2020-01/0050.html).
This caused the gstcurlhttpsink to not being able to rewind
and resend in the case, e.g. response '401 Unauthorized'.
Now the 'Expect: 100-continue'-header is explicitly set in
the gstcurlhttpsink.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1276>
2020-05-18 13:46:24 +02:00
J. Kim
4ccaa1ebbb srtobject: add streamid property
The stream id starts with '#!::' according to SRT Access Control[1],
but GstURI requires URI encoded string.This commit introduces additional
property to set the id by normal string.

[1] https://github.com/Haivision/srt/blob/master/docs/AccessControl.md
2020-05-13 14:13:48 +00:00
Nirbheek Chauhan
e3d5849225 meson: Pass native: false to add_languages()
This is needed for cross-compiling without a build machine compiler
available. The option was added in 0.54, but we only need this in
Cerbero and it doesn't affect older versions so it should be ok.
Will only cause a spurious warning.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1266>
2020-05-13 13:59:36 +05:30
Matthew Waters
6dae95d60f ccconverter: check fraction multiply for overflow
It should not happen and if it does, something went very wrong earlier

CID 1463350

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1262>
2020-05-12 16:06:32 +10:00
Matthew Waters
09cbe4cd03 ccconverter: tighten up a couple of NULL checks
CID 1463347
CID 1463346
CID 1463345

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1262>
2020-05-12 16:06:32 +10:00
Matthew Waters
ebc19d19bb ccconverter: fix unintialized read of mapped output info in error case
We only need to gst_buffer_unmap() if we have gst_buffer_map()ed.  In
most cases we can shorten the lenght of time we need to map the output
buffer.  Fix similar occurences elsewhere.

CID 1463349

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1262>
2020-05-12 16:06:32 +10:00
Matthew Waters
f077189809 ccconverter: fix uninitialized read in error case
CID 1463351

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1262>
2020-05-12 16:06:32 +10:00
Matthew Waters
12edc0d9b8 ccconverter: implement discont handling
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1116>
2020-05-11 12:30:31 +00:00
Matthew Waters
ba1558a7ab ccconverter: use a better padding byte sequence for writing cdp
0xf8 can be interpreted as cea608 data at the beginning of a cdp packet
as the cc_valid bit is not checked when cc_valid in (0b00 or 0b01).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1116>
2020-05-11 12:30:31 +00:00
Matthew Waters
7ed0bc539f ccconverter: split temporary storage into 3
Instead of storing the raw cc_data, store the 2 cea608 fields individually
as well as the ccp data.

Simply copying the input cc_data to the output cc_data violates a number of
requirements in the cea708 specification.  The most prominent being, that
cea608 triples must be placed at the beginning of each cdp.

We also need to comply with the framerate-dpendent limits for both the
cea608 and the ccp data which may involve splitting or merging some
cea608 data but not ccp data or vice versa.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1116>
2020-05-11 12:30:31 +00:00
Matthew Waters
3417a1709c ccconvert: compact input cc_data where possible
Skip over padding cc_data triples.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1116>
2020-05-11 12:30:31 +00:00
Matthew Waters
7d028af675 ccconverter: implement support for CDP framerate conversions
- Any format involving CDP is supported.
- Time codes (if present) are scaled as well.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1116>
2020-05-11 12:30:31 +00:00
Matthew Waters
75503017c2 ccconverter: introduce define for max cdp packet length
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1116>
2020-05-11 12:30:31 +00:00
Matthew Waters
44c874fd9e ccconverter: don't rely on external state in *_internal()
This allows using the _internal() variants for simply converting some
caption data without relying on any external state.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1116>
2020-05-11 12:30:31 +00:00
Matthew Waters
31a0bf367d ccconverter: cc_count limits are per framerate
Enforce this and add a test for cdp input being too large.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1116>
2020-05-11 12:30:31 +00:00
Matthew Waters
b25d75f201 ccconverter: refactor cdp id, fps, max_cc_count into a table
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1116>
2020-05-11 12:30:31 +00:00
Matthew Waters
afc120fa74 ccconverter: pivot to implementing generate_output
Will make a n-n buffer element much easier to implement.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1116>
2020-05-11 12:30:31 +00:00
Chris Ayoup
9937101e51 webrtc: move filtering properties to webrtcice
We want webrtcbin to only expose properties that are defined in JSEP, so
these additional properties should be moved out.  In order to access
them, the webrtcice instance is exposed from webrtcbin.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1223>
2020-05-11 05:30:59 +00:00
Chris Ayoup
ca754245e9 webrtc: allow setting local IP addresses
If a local IP address is specified, ICE gathering can be much faster
in environments where there are multiple IP addreses but only some are
usable (for example, if you are running docker on the machine).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1223>
2020-05-11 05:30:59 +00:00
Chris Ayoup
3fc8818824 webrtc: Allow toggling TCP and UDP candidates
Add some properties to allow TCP and UDP candidates to be toggled.  This
is useful in cases where someone is using this element in an environment
where it is known in advance whether a given transport will work or not
and will prevent wasting time generating and checking candidate pairs
that will not succeed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1223>
2020-05-11 05:30:59 +00:00
Sebastian Dröge
d6f6c51f3c spanplc: Don't segfault when retrieving the stats property without a spanplc context
For example when trying to get the property value in NULL state.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1258>
2020-05-10 08:44:09 +00:00
Sebastian Dröge
77784c7aba musepackdec: Don't fail all queries if no sample rate is known yet
The sample rate is only needed for the POSITION/DURATION queries and we
would otherwise fail important queries like the CAPS query.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/498

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1248>
2020-05-06 08:51:38 +00:00
Luka Blaskovic
4cf362e2df opencv: allow compilation against 4.3.x
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1235>
2020-05-06 06:49:08 +00:00
Matthew Waters
02c8e66ff1 webrtc: fix an off-by-one calculating low-threshold
We were not signalling low-threshold when the previous amount was at
exactly the low-threshold mark.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1247>
2020-05-06 15:49:58 +10:00
Matthew Waters
18de5f8f04 webrtc: remove debugging leftover
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1247>
2020-05-06 15:49:58 +10:00
Matthew Waters
50644f5718 webrtc: always reply to a promise
Otherwise, we defeat the purpose of a promise.

We were not replying when the state was closed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1240>
2020-05-06 02:53:27 +00:00
Matthew Waters
1f395e3ddb webrtc: name threads based on the element name
Makes debugging a busy loop possibly easier

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1240>
2020-05-06 02:53:27 +00:00
Matthew Waters
d552c6556c webrtc: correctly use the pad template
GstHarness uses this for releasing request pads correctly. Fixes
numerous leaks in the webrtc unit tests.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1240>
2020-05-06 02:53:27 +00:00
Matthew Waters
46176fbcc7 webrtc: Fix a couple of renegotiation races
When negotiating the SDP we should only connect the streams that are
actually mentioned in the SDP.  All other streams are not relevant at
this time and would likely be part of a future SDP update.  Fixes a
couple of the renegotiation webrtc unit tests.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1240>
2020-05-06 02:53:27 +00:00
Edward Hervey
75289d83a1 iqa: Fix all leaks in error path
CID #1456049
CID #1456080
CID #1456083

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1244>
2020-05-05 17:33:20 +00:00
Matthew Waters
3baf0d5dc4 sctp: enable usrsctp debug when supported
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1234>
2020-05-05 03:38:06 +00:00
Ederson de Souza
b68e47968b avtpsink: Log that AVTPDU transmission failure is due lateness
As ENOBUFS is not really clear about what is going on, let's check
socket error queue to see if packets are being dropped due being late.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1004>
2020-05-02 17:42:15 +00:00
Ederson de Souza
32281ddd33 avtpsink: Accept buffers that fall out of segment
Proper calculate running time for buffers that are out of current
segment and try to honor them.

A typical case is for AVTP packets coming from avtpcvfpay element, as
those may have DTS that falls out of segment (which is about PTS).

By using gst_segment_to_running_time_full(), avtpsink can properly
calculate when to transmit those buffers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1004>
2020-05-02 17:42:15 +00:00
Ederson de Souza
7edaeb3fae avtpcvfpay: Warn about timestamp issues on non-flushing seek
Seek events will cause new segments to be sent to avtpcvfpay, and for
flushing seeks, a pipeline running time reset. This running time
reset, which effectively changes pipeline base time, will cause
avtpcvfpay element to generate incorrect DTS for the initial set of
buffers sent after FLUSH_STOP.

This happens due the fact that base time change happens only when the
sink gets the first buffer after the FLUSH_STOP - so avtpcvfpay used
the wrong base time to do its calculations.

However, if the pipeline is paused before the seek, sink will update
base time when pipeline state goes to PLAYING again, before avtpcvfpay
gets the first buffers after the flush. Then avtpcvfpay element will be
able to normally calculate DTS for the outgoing packets.

This patch simply adds a warning message in case a flushing seek is
performed on a playing pipeline.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1004>
2020-05-02 17:42:15 +00:00
Ederson de Souza
12838af353 avtpcvfpay: Ensure NAL fragments are transmitted following stream specs
TSN streams are expected to send packets to the network in a well
defined "pace", which is arbitrarily defined for each stream. This pace
is defined by the "measurement interval" property of a stream.

When the AVTP CVF payloader element - avtpcvfpay - fragments a video
frame that is too big to be sent to the network, it currently defines
that all fragments should be transmitted at the same time (via DTS
property of GstBuffers generated, as sink will use those to time the
transmission of the AVTPDU). This doesn't comply with stream definition,
which also has a limit on how many packets can be sent on a given
measurement interval.

This patch solves that by spreading in time the DTS of the GstBuffers
containing the AVTPDUs. Two new properties, "measurement-interval" and
"max-interval-frames", added to avptcvfpay element so that it knows
stream measurement interval and how many AVTPDUs it can send on any of
them. More details on the method used to proper spread DTS/PTS according
to measurement interval can be found in a code commentary inside this patch.

Tests also added for the new property and behaviour.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1004>
2020-05-02 17:42:15 +00:00
Matthew Waters
b266652043 webrtcbin: also mark data channel transports as active
Fixes negotiation of a bundled sdp with only a data channel.

Without marking the transport as active, we would never unblock the
transportreceivebin and thus no data would ever reach us.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1231>
2020-05-01 03:13:46 +00:00
Matthew Waters
ce9b41f5d4 webrtcbin: fix bundle none case with remote offer bundling
If the remote is bundling, but we are not and remote is offering.
we cannot put the remote media sections into a bundled transport as that
is not how we are going to respond.

This specific failure case was that the remote ICE credentials were
never set on the ice stream and so ice connectivity would fail.

Technically, this whole bunde-policy=none handling should be removed
eventually when we implement bundle-policy=balanced.  Until such time,
we have this workaround.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1231>
2020-05-01 03:13:46 +00:00
Vedang Patel
e47fa2006f avtp: Introduce the CRF Check element
This commit introduces the AVTP Clock Reference Format (CRF) Checker
element. This element re-uses the GstAvtpCrfBase class introduced along
with the CRF Synchronizer element.

This element will typically be used along with the avtpsrc element to
ensure that the AVTP timestamp (and H264 timestamp in case of CVF-H264
packets) is "aligned" with the incoming CRF stream. Here, "aligned" means
that the timestamp value should be within 25% of the period of the media
clock recovered from the CRF stream.

The user can also set an option (drop-invalid) in order to drop any packet
whose timestamp is not within the thresholds of the incoming CRF stream.
2020-04-30 23:31:25 +00:00