Commit graph

6496 commits

Author SHA1 Message Date
Matthew Waters
7ee28e2e4b vulkan: don't require every element to have a display
Only sink elements really care about a valid display
2019-06-04 09:03:44 +00:00
Matthew Waters
eb0f7f3279 vulkan: remove unused X11 window system references
We use XCB instead
2019-06-04 09:03:44 +00:00
Matthew Waters
873add374a vulkan: remove unused layer enablement
This is possible now via the vulkan loader
2019-06-04 09:03:44 +00:00
Ali Yousuf
69e06ced7d webrtc: Fix log when adding stun server 2019-06-04 07:54:25 +00:00
Matthew Waters
95488812b2 webrtc: fix the location of signalling-state change notification
1. The spec indicates that the notification should occur near the end of
   'setting the description' processing
2. The current location with the drop of the lock could cause the 'check
   if negotiation is needed' logic to execute and become confused about
   the state of the webrtcbin's current local descriptions.
   In the bad case, the following assertions could be hit:
   g_assert (trans->mline < gst_sdp_message_medias_len (webrtc->current_local_description->sdp));
   g_assert (trans->mline < gst_sdp_message_medias_len (webrtc->current_remote_description->sdp));

Moving the signalling state change later in the set description task
means that checking for a renegotiation will early abort as the
signalling state is not STABLE before the session description and
transceivers have been updated.
2019-06-04 05:43:43 +00:00
Alex Ashley
a11f7ed924 dashdemux: include both Period start and presentationTimeOffset in segment start
The start of each segment is relative to the Period start, minus
the presentation time offset.

As specified in section 5.3.9.6 of the MPEG DASH specification:
    The value of the @t attribute minus the value of the
    @presentationTimeOffset specifies the MPD start time of
    the first Segment in the series.

dashdemux was not taking account of presentationTimeOffset and in
some methods was not taking into account the Period start time.
This commit modifies the segment->start value to always be
relative to the MPD start time (zero for VOD,
availabilityStartTime for live streams). This makes all uses of
the segment list consistent.

Fixes #841
2019-06-01 21:25:33 +00:00
Tim-Philipp Müller
7853700b50 meson: add more plugins to plugins list
Makes sure their path gets added to the uninstalled environment
and makes sure they get included in the docs.
2019-05-30 20:41:57 +02:00
Matthew Waters
f8911deccf webrtc: only set sctp ports if they are different
SCTPassociation will complain if we do that while running and resetting
is not something we support at the moment
2019-05-30 21:33:09 +10:00
Matthew Waters
979daea7f2 tests/webrtc: fix racy test with a prenegotiated data channel
If both data channels become ready simultaneously, then the two integer
read-add-update cycles can execute concurrently and only ever increment
once instead of the required twice.  Use an atomic add instead.
2019-05-30 21:33:09 +10:00
Matthew Waters
be011d2086 webrtc/dc: move some code from webrtcbin into the datachannel 2019-05-30 21:33:09 +10:00
Matthew Waters
a51db86ac4 webrtc: hold onto any unknown ICE candidates until the next SDP set
It is very possible for badly behaving signalling or peers to send
us ICE candidates before we receive an SDP.  While we had consideration
for that on the first set SDP, subsequent SDP's could result in
misconfigured ICE transports.  Expand the previous code to also take
into account reconfigurations.
2019-05-30 21:33:09 +10:00
Matthew Waters
177aa22bcd webrtc: Initial support for stream addition/removal
Limitations:
- No transport changes at all (ICE, DTLS)
- Codec changes are untested and probably don't work
- Stream removal doesn't remove transports (i.e. non-bundled transports
  will stay around until webrtcbin is shutdown)
- Unified Plan SDP only. No Plan-B support.
2019-05-30 21:33:09 +10:00
Matthew Waters
033e55695f webrtcbin: expose the transceiver as a pad property 2019-05-30 21:33:09 +10:00
Matthew Waters
c3c4b07ad3 webrtc/transceiver: add a set_direction function
Matches the setDirection() from the W3C spec and allows changing the
transceiver direction at the next negotiation cycle.
2019-05-30 21:33:09 +10:00
Matthew Waters
6ad0edbe92 webrtc: track and log more rtpbin state
like bye's timeouts, validation, activation, etc
2019-05-30 21:33:09 +10:00
Matthew Waters
2df7da85fe webrtc: add support for intersecting inactive transceiver directions 2019-05-30 21:33:09 +10:00
Matthew Waters
5ea7031bd0 webrtc: mark remote/local-description as readonly 2019-05-30 21:32:06 +10:00
Matthew Waters
19b3d744d8 webrtc: don't reuse stopped transceivers at all 2019-05-30 21:26:46 +10:00
Matthew Waters
4d34fe7617 webrtc: also check for a null mid to signify an unassociated transceiver
We always give our transceivers an mline on creation so that check is
not useful by itself
2019-05-30 21:26:46 +10:00
Matthew Waters
00977f263a webrtc: only check sink pads for a 'sink pads have caps' check 2019-05-30 21:26:46 +10:00
Matthew Waters
bd92b2f7c4 webrtc: fix answer creation with multiple streams and similar caps 2019-05-30 21:26:46 +10:00
Philippe Normand
9595a7a721 webrtcbin: Expose current and pending local/remote description properties
They are already handled in the property getter and setter functions but were
not formally declared in the GObject class.
2019-05-30 10:35:58 +01:00
Mathieu Duponchelle
da6afdec9c doc: remove xml from comments 2019-05-29 22:58:08 +02:00
Adam Duskett
43eaf5ac4a ext/hls/meson.build: fix dependency logic
Currently, if one was to set -Dhls-crypto to either libgcrypt or openssl
instead of auto, the following lines would fail because hls_crypto_dep is not
yet set:

if not hls_crypto_dep.found() and ['auto', 'libgcrypt'].contains(hls_crypto)
if not hls_crypto_dep.found() and ['auto', 'openssl'].contains(hls_crypto)

Instead, change "if not hls_crypto_dep.found()" to "if not have_hls_crypto"
which fixes the error.
2019-05-29 18:33:02 +00:00
Nicolas Dufresne
f14206f2b3 waylandsink: Workaround gnome-shell bug
Use a timeout to limit that amount of time we wait after the compositor
for the initial configure event. Compositor are support to emit a
configure event before any wl_buffer can be attached. The problem is
that Weston strongly enforce this, while gnome-shell simply does not
emit such an event.
2019-05-26 17:49:29 +02:00
Haihua Hu
9d0ba0f27a wayland/wlbuffer: just return if used_by_compositor is true when attach
When buffer is used by compositor, we don't need attach it and hold one
more reference. Just check used_by_compositor, just return if it is true.
Assert error log is not need, this is normal behavior.
2019-05-22 09:14:03 +00:00
Philippe Normand
33c0c7c33d meson: Keep track of the aom plugin
Otherwise it doesn't appear in the GstPluginsPath.json and thus is not listed in
gst-build's uninstalled shell's $GST_PLUGIN_PATH.
2019-05-18 12:09:18 +01:00
Niels De Graef
7cd4064425 webrtc: Fix some signals' GIR annotations
This will lead to wrong bindings otherwise (and creates more correct
expectations for developers).
2019-05-17 15:28:54 +02:00
Jose Antonio Santos Cadenas
8a6f0a7e45 dtlsagent: Do not overwrite openssl locking callbacks 2019-05-14 07:36:15 +00:00
Thibault Saunier
47a49f3381 docs: Build documentation with hotdoc 2019-05-13 17:00:00 -04:00
Thibault Saunier
5a2b9357c9 Mark some properties as DOC_SHOW_DEFAULT 2019-05-13 11:36:32 -04:00
Thibault Saunier
7fe3f36ac8 Minor documentation fixes 2019-05-13 11:36:27 -04:00
Thibault Saunier
dce17521eb directfb: Fixup plugin name to match plugin filename
Has required by the new PLUGIN_DEFINE macro
2019-05-13 11:35:45 -04:00
Niklas Hambüchen
f2f715a265 meson: Fix missing GSM_HEADER_IN_SUBDIR logic
Until now, this hadn't been translated from autoconf yet.
2019-05-13 08:45:42 +00:00
Niklas Hambüchen
f089f2b896 meson: Fix typo in gsm header file name
This was wrong since commit c360ceea4d.

Also fix incorrect indentation (tab instead of spaces).

Found using hermetic builds with Nix:

    https://github.com/NixOS/nixpkgs/pull/54398#discussion_r280125735
2019-05-13 08:45:42 +00:00
Mark Nauwelaerts
dd3a25b473 srt: set cancellation in locked section
... to avoid race with wait which uses it with 'flushing' flag state semantics.
2019-05-11 22:38:46 +00:00
Mark Nauwelaerts
dbab2f9498 srt: avoid srtsrc segfault upon downward state change
... when it has not yet been connected to.

Also, a condition variable is not a semaphore, so a lock/wait/unlock
sequence is inherently racy without any state checking.  So switch to
a different lock and check the intended state.
2019-05-11 22:38:46 +00:00
Mark Nauwelaerts
cc11a7f9d7 srt: initialize list access within locked region 2019-05-11 22:38:46 +00:00
Niels De Graef
ce92cb81a0 webrtc: Fix signals documentation
Some GIR annotations were incorrect or even missing. The former isn't
good for bindings, while the latter is especially annoying for signal
handlers, as that means your arguments will get the wrong names in the
rendered documentation.
2019-05-09 14:19:01 +02:00
Víctor Manuel Jáquez Leal
d2f6facbfb openh264enc: Fix compilation with openh264 v2.0
As OpenH264 increased its version to 2.0 the guard for structure
member is not valid.

This patch will fix the compilation with gst-build and openh264.
2019-05-08 12:02:50 +00:00
Thibault Saunier
3c8a916501 meson: Add support for the colormanagement plugin
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/965
2019-05-05 23:26:58 +00:00
Aaron Boxer
8d4ce1e853 ccextractor: copy input buffer flags to output buffer
GST_VIDEO_BUFFER_FLAG_INTERLACED and GST_VIDEO_BUFFER_FLAG_TFF
flags are needed when processing SCTE 20 closed captions for an interlaced
stream, when we need to convert back to analog, in which case we need to match
the caption to the top or bottom field
2019-05-02 15:46:15 +00:00
Seungha Yang
fbec447191 x265enc: Do not drop SEI nals from header
SEI message shouldn't be dropped since it contains various informal (or essential)
information.
2019-05-02 07:12:25 +00:00
Seungha Yang
538ae98ed2 x265enc: Add support mastering display info and content light level encoding
... if (x265 version >= 1.9) requirement is satisfied.

The SEI messages were supported since x265 version 1.8
but there was API change from version 1.9
(contentLightLevelInfo was renamed to maxCLL and maxFALL)
2019-05-02 07:12:25 +00:00
Fabio D'Urso
f53beb876c sctp: increase DEFAULT_NUMBER_OF_SCTP_STREAMS to 1024
This change makes it possible to create more than just 5 webrtc
data channels. The maximum number of data channels is exactly
DEFAULT_NUMBER_OF_SCTP_STREAMS / 2, therefore the limit is now
512.
2019-04-26 16:31:49 +02:00
Nicola Murino
49a2baebf5 opencv: allow compilation against 4.1.x 2019-04-23 09:06:13 +02:00
Mark Nauwelaerts
7aba64e19d srt: post error when failing to start
... as appropriate for a subsequent state change failure
2019-04-21 17:17:14 +02:00
Mark Nauwelaerts
6d9398e87f srt: downgrade regular message to log level 2019-04-21 16:47:30 +02:00
Dan Kegel
d3ec0645ab webrtcdsp/meson.build: don't forget to set c++11 mode 2019-04-13 21:46:35 -07:00
Sebastian Dröge
36d3891509 sctp: Create plugin with $(GST_PLUGIN_LDFLAGS)
Otherwise we don't create a plugin but a proper shared library with
version information, i.e. libgstsctp.so.0.0.0.
2019-04-12 07:24:08 +00:00
Andrey Konovalov
88bee1a322 waylandsink: make gst_wl_window_is_toplevel aware of XDG shell 2019-04-09 21:32:36 +03:00
Aaron Boxer
f3e7469094 ccextractor: document importance of pipeline order for this element 2019-04-09 11:28:33 -04:00
Aaron Boxer
c41617b9a2 cea708decoder: use correct mask for font style
First three bits are used for font style, so mask
should be 0111 rather than 011 (in binary)
2019-04-09 07:52:56 +00:00
Matthew Waters
2e442b801b vulkan: Add iOS window implementation 2019-04-08 09:26:20 +00:00
Matthew Waters
012d6b1d98 vulkan: Add Cocoa window implementation 2019-04-08 09:26:20 +00:00
Matthew Waters
b9be6b318e vulkan: make the debug extension optional
i.e. don't fail if it's not available
2019-04-08 09:26:20 +00:00
Tim-Philipp Müller
ab12a4cd0f assrender: fix seeking backwards
Use proper API to flush libass events when we do
a flushing seek, and also do it in FLUSH_STOP
rather than FLUSH_START, so we can be sure
streaming has stopped.

Fixes seeking back in time.

Something seems to have changed in libass that
renders the old manual way of flushing events
ineffective and libass then seems to ignore
timestamps that are older than the ones last
seen then if we do it the old way.

Fixes #916
2019-04-06 15:19:07 +01:00
Tim-Philipp Müller
e52f33430d assrender: improve debug logging in video chain
Print video timestamps only once and enumerate text
buffers to make output more concise and nicer to read.
2019-04-06 14:33:45 +01:00
Tim-Philipp Müller
eb6a1cf07e assrender: use subtitle segment to calculate running time for text
Not the video segment. This just for correctness, shouldn't make
any difference in practice since we don't support external SSA yet.
2019-04-06 14:31:37 +01:00
Nicolas Dufresne
3fea1fa50b waylandsink: Wait for the surface to be configured
With latest XDG shell, we need to fait for the surface to have been
configured before we can attach a buffer to it. This is being enforce by
Weston with an error.

Fixes #933
2019-04-03 18:20:58 +00:00
Philippe Normand
2b218da805 wpesrc: Switch to WPEBackend-fdo 1.2.0 2019-03-30 14:02:50 +00:00
Tim-Philipp Müller
4c0fa970bc srtp: bump libsrtp requirement to 1.6.0
See !234
2019-03-29 12:09:52 +00:00
Philippe Normand
0b641a4953 wpe: Bump required version to WPEWebKit 2.24
Fixes #929
2019-03-28 18:27:28 +00:00
Ulf Olsson
b2d0795185 srtp: Add support for GCM (RFC 7714)
The GCM support in libsrtp have been there for a while and
it can be useful for some applications.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/913
2019-03-27 10:55:27 +00:00
Josep Torra
dbef8c43e8 closedcaption: fix build error in OSX
Fixes the following error.

gstccconverter.c:677:7: error: variable 'len' is used uninitialized whenever 'if' condition is false
      [-Werror,-Wsometimes-uninitialized]
  if (flags & 0x40) {
      ^~~~~~~~~~~~
gstccconverter.c:698:10: note: uninitialized use occurs here
  return len;
         ^~~
gstccconverter.c:677:3: note: remove the 'if' if its condition is always true
  if (flags & 0x40) {
  ^~~~~~~~~~~~~~~~~~
gstccconverter.c:572:12: note: initialize the variable 'len' to silence this warning
  guint len;
           ^
            = 0
2019-03-25 18:28:55 +01:00
Josep Torra
e73280782c closedcaption: fix build error in OSX
Fixes the following error by commenting an unused block.

./misc.h:503:11: error: 'strlcpy' macro redefined [-Werror,-Wmacro-redefined]
2019-03-25 18:28:55 +01:00
Tim-Philipp Müller
054dc5282d vulkan: fix some compiler warnings in gnu89 mode
for loop variable initialization and conflicting types for i.
2019-03-22 23:39:04 +00:00
Tim-Philipp Müller
d6bae53e6b openh264: fix build with gstreamer debug system disabled
See https://gitlab.freedesktop.org/gstreamer/gst-ci/merge_requests/89
2019-03-21 11:45:08 +00:00
Ilya Smelykh
33b587de1d rtmpsrc: fix buffer leak on read error or EOS 2019-03-20 19:45:12 +07:00
Philippe Normand
6c228eef59 wpesrc: Register backend activity states 2019-03-20 10:14:51 +00:00
Philippe Normand
22b94a7a84 wpesrc: Always log loaded URI 2019-03-20 10:14:51 +00:00
Philippe Normand
451074a7e0 wpesrc: Implement webview background configuration support 2019-03-20 10:14:51 +00:00
Jan Alexander Steffens (heftig)
deb2f11fe2
srtpdec: Lower severity of srtp_err_status_replay_fail
AFAIU this happens when encountering retransmissions. Don't print a
warning for these packets.
2019-03-19 16:04:07 +01:00
Jan Alexander Steffens (heftig)
8ef4d01f60
srtpdec: Simplify code flow handling status_key_expired
Ensures a balanced UNLOCK -> LOCK.
2019-03-19 15:50:45 +01:00
Jan Alexander Steffens (heftig)
24b0e3e55f
srtpdec: Simplify checking the unprotect error
Introduce an err label to jump to. Avoid logging two warnings per
failure.
2019-03-19 13:47:41 +01:00
Jan Alexander Steffens (heftig)
34eaeb17f2
srtpdec: Simplify locking in gst_srtp_dec_decode_buffer
Don't drop the lock on filter just to unmap the buffer (or log a
message).
2019-03-19 13:47:41 +01:00
Xabier Rodriguez Calvar
7c136bbb5e mssdemux: fix protection data double free
For not being duplicated here it was being freed when the manifest was
being destroyed and a second time when the buffer was being destroyed.
2019-03-18 15:23:07 +01:00
Mathieu Duponchelle
a2779ef366 webrtcbin: fix pt selection for FEC and RTX when BUNDLE
When we offer bundled media, payload types must be unique
across all bundled media, as they will be multiplexed in the
same session.
2019-03-15 18:37:51 +01:00
Andreas Frisch
2f907b7e2d
srtp: Spell 'mechanisms' right 2019-03-15 10:57:17 +01:00
Mathieu Duponchelle
17343aa3be cccombiner: improve behaviour on timeout
Prior to this, cccombiner stopped consuming video buffers when
data wasn't arriving on its caption pad. In a live situation,
when aggregator is timing out we should still output whatever
video buffers are present, even if no caption buffers can be
aggregated with them.
2019-03-13 13:50:29 +01:00
Mathieu Duponchelle
08858d753c webrtcbin: add get-transceiver signal
get-transceivers is not introspectable, and a method to get a
transceiver by index is convenient.
2019-03-12 21:04:48 +00:00
Jan Alexander Steffens (heftig)
dc0e95acab webrtcbin: Filter transport stream stats by ssrc
Since the addition of BUNDLE support, the pads and the transceivers
share a single transport stream. When getting stats from the stream,
filter by the ssrc of the current pad to avoid merging the stats for
different pads.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/889
2019-03-12 01:40:59 +00:00
Jan Alexander Steffens (heftig)
926ff109b9 webrtcbin: Syntax cleanup 2019-03-12 01:40:59 +00:00
Nirbheek Chauhan
4430fa0e3e closedcaption: Fix build with Visual Studio
../ext/closedcaption/io-sim.c(440): error C2065: 'M_PI': undeclared identifier
../ext/closedcaption/io-sim.c(442): error C2065: 'M_LN2': undeclared identifier
2019-03-11 15:02:53 +05:30
Tim-Philipp Müller
8ee9a94c4d assrender: fix some leaks
g_slist_remove_*() removes the list node without freeing it.
2019-03-08 23:49:49 +00:00
Tim-Philipp Müller
ecb7049d7e vulkan: fix some leaks
Fix vk_instance leak when state change fails like in
generic/states unit test.
2019-03-08 01:18:39 +00:00
Tim-Philipp Müller
c930c42aa8 teletextdec: fix some string leaks 2019-03-08 01:18:39 +00:00
Tim-Philipp Müller
679fa2d200 srt: fix uri and string leaks
And simplify property getter to avoid unnecessary copy.
2019-03-08 01:18:39 +00:00
Tim-Philipp Müller
92e5c5a85a closedcaption: cea708decoder: fix some memory leaks 2019-03-08 01:18:39 +00:00
Tim-Philipp Müller
6dad8b7c78 closedcaption: fix leak in line21 decoder
Destroy old decoder instance when shutting down the
element, and also in case the input format changes.

Fix harness/pipeline leak in unit test.
2019-03-08 01:18:39 +00:00
Jan Alexander Steffens (heftig)
10e6f6b6cb
fluidsynth: Avoid Wincompatible-pointer-types with 2.0.4
In 2.0.4, the message parameter has "const char*" type. Add a cast to
avoid a warning with older fluidsynth.
2019-03-07 10:17:30 +01:00
Mathieu Duponchelle
919cd44f47 line21dec: general cleanup
This ports over the review comments made on line21enc in !217
2019-03-06 11:29:20 +01:00
Mathieu Duponchelle
156865541f closedcaption: add line21 encoder
This element acts as a counterpart of line21encoder.

Also adds a simple test validating each element using the
other.
2019-03-06 11:29:20 +01:00
Mathieu Duponchelle
fa8134ed11 Check in vbi encoder 2019-03-06 10:32:43 +01:00
Niels De Graef
67bb17e4fa waylandsink: Implement XDG-shell stable support
[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.

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

[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-03-04 10:58:54 +00:00
Niels De Graef
c461f22bef waylandsink: prefix wl_shell-specific variables with wl_ 2019-03-04 10:58:54 +00:00
Mathieu Duponchelle
74d281fbc2 cccombiner: implement update_src_caps
It is necessary to implement this vmethod, as when the src pad
is marked as reconfigure, the base class will reset to src caps,
and the default update_src_caps simply queries the caps allowed
downstream without taking into account the caps set by
gst_aggregator_set_src_caps.
2019-02-28 17:03:33 +00:00
Sebastian Dröge
d45604d9eb hlssink2: Add property for disabling sending of force-keyunit events 2019-02-27 21:01:34 +00:00
Aaron Boxer
b9f070f796 srtobject: check for null local address to avoid SIGSEV 2019-02-24 10:50:14 -05:00
Mathieu Duponchelle
daaa1c3aa8 ccconverter: fix typo in framerate 2019-02-21 23:51:39 +01:00