Commit graph

7161 commits

Author SHA1 Message Date
Jan Schmidt
0c72a41767 gstdtlsrtpenc: Add rtp-sync property
Add an rtp-sync property which synchronises RTP streams
to the pipeline clock before passing them to funnel for
merging with RTCP.

https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1212
2020-02-27 12:30:32 +00:00
Nirbheek Chauhan
a06ddd182d dash: Don't use sscanf + glib format modifiers
We do not have a way to know the format modifiers to use with string
functions provided by the system. `G_GUINT64_FORMAT` and other string
modifiers only work for glib string formatting functions. We cannot
use them for string functions provided by the stdlib. See:
https://developer.gnome.org/glib/stable/glib-Basic-Types.html#glib-Basic-Types.description

F.ex.
```
 ../ext/dash/gstxmlhelper.c: In function 'gst_xml_helper_get_prop_unsigned_integer_64':
../ext/dash/gstxmlhelper.c:473:40: error: unknown conversion type character 'l' in format [-Werror=format=]
     if (sscanf ((gchar *) prop_string, "%" G_GUINT64_FORMAT,
                                        ^~~
In file included from /builds/nirbheek/cerbero/cerbero-build/dist/windows_x86/include/glib-2.0/glib/gtypes.h:32,
                 from /builds/nirbheek/cerbero/cerbero-build/dist/windows_x86/include/glib-2.0/glib/galloca.h:32,
                 from /builds/nirbheek/cerbero/cerbero-build/dist/windows_x86/include/glib-2.0/glib.h:30,
                 from /builds/nirbheek/cerbero/cerbero-build/dist/windows_x86/include/gstreamer-1.0/gst/gst.h:27,
                 from ../ext/dash/gstxmlhelper.h:26,
                 from ../ext/dash/gstxmlhelper.c:22:
/builds/nirbheek/cerbero/cerbero-build/dist/windows_x86/lib/glib-2.0/include/glibconfig.h:69:28: note: format string is defined here
 #define G_GUINT64_FORMAT "llu"
                            ^
../ext/dash/gstxmlhelper.c:473:40: error: too many arguments for format [-Werror=format-extra-args]
     if (sscanf ((gchar *) prop_string, "%" G_GUINT64_FORMAT,
                                        ^~~
```

In the process, we're also following the DASH MPD spec more closely
now, which specifies that ranges must follow RFC 2616 section 14.35.1:
https://tools.ietf.org/html/rfc2616#page-138
2020-02-27 09:42:33 +00:00
Sebastian Dröge
cc8b90967b dtls: Set a random serial number and issuer/subject in the self-signed certificates
This is also what Chrome and Firefox are doing, citing privacy concerns.
Also putting OpenWebRTC from Sweden as issuer/subject is rather
confusing.
2020-02-27 08:27:19 +00:00
Jan Schmidt
499be261cd webrtc: Configure transportsendbin latency internally
Add latency configuration logic to transportsendbin to
isolate it from the overall pipeline latency. That means that
it configures minimum latency internally based on the
latency query, and sends a latency event upstream that
matches.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1209
2020-02-21 13:42:05 +11:00
Jan Schmidt
96a407334d webrtc: Merge ICE candidates to local descriptions
When emitting ICE candidates, also merge them to the local and
pending description so they show up in the SDP if those are
retrieved from the current-local-description and
pending-local-description properties.

https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/676
2020-02-17 14:23:56 +00:00
Sebastian Dröge
f156ee1da4 webrtcbin: Block the source pads before dtlssrtpdec inside transportreceivebin
Otherwise dropped sticky events are not actually re-sent on the next
opportunity and we can end up with data-flow before stream-start/segment
events.
2020-02-12 16:54:42 +00:00
Sebastian Dröge
26a6b17593 sctp: Take some socket configurations from Firefox's datachannel code
- Do not send ABORTs for unexpected packets are as response to INIT
- Enable interleaving of messages of different streams
- Configure 1MB send and receive buffer for the socket
- Enable SCTP_SEND_FAILED_EVENT and SCTP_PARTIAL_DELIVERY_EVENT events
- Set SCTP_REUSE_PORT configuration
- Set SCTP_EXPLICIT_EOR and the corresponding send flag. We probably
  want to split packets to a maximum size later and only set the flag
  on the last packet. Firefox uses 0x4000 as maximum size here.
- Enable SCTP_ENABLE_CHANGE_ASSOC_REQ
- Disable PMTUD and set an maximum initial MTU of 1200
2020-02-12 16:11:15 +00:00
Sebastian Dröge
c497370254 sctp: Start connection synchronously when starting the association
Calling bind() only sets up some data structures and calling connect()
only produces one packet before it returns. That packet is stored in a
queue that is asynchronously forwarded by the encoder's source pad loop,
so not much is happening there either. Especially no waiting is
happening here and no forwarding of data to other elements.

This fixes a race condition during connection setup: the connection
would immediately fail if we pass a packet from the peer to the socket
before bind() and connect() have returned.

This can't happen anymore as bind() and connect() have returned already
before both elements reach the PAUSED state, and in webrtcbin there is
an additional blocking pad probe before the decoder that does not let
any data pass through before that anyway.
2020-02-12 16:11:15 +00:00
Sebastian Dröge
4c5c6e68c6 sctp: Switch back to a non-recursive mutex and don't hold it while calling any usrsctp functions
The library is thread-safe by itself and potentially calls back into our
code, not only from the same thread but also from other threads. This
can easily lead to deadlocks if we try to hold our mutex on both sides.
2020-02-12 16:11:15 +00:00
Philippe Normand
9ac798ae5e wpe: Add software rendering support support
Starting from WPEBackend-FDO 1.6.x, software rendering support is available.
This features allows wpesrc to be used on machines without GPU, and/or for
testing purpose. To enable it, set the `LIBGL_ALWAYS_SOFTWARE=true` environment
variable and make sure `video/x-raw, format=BGRA` caps are negotiated by the
wpesrc element.
2020-02-11 16:47:53 +00:00
Jan Alexander Steffens (heftig)
e2cefdd6ff fluiddec: Move logging init into plugin_init
This is a nicer place to keep it. We also initialize it before touching
the drivers.

https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/merge_requests/1026
2020-02-11 12:10:50 +00:00
Jan Alexander Steffens (heftig)
9aa12399a8 fluiddec: Keep fluidsynth from probing audio drivers
It might cause problems and we don't need the drivers anyway. This also
avoids a bunch of stderr spam from the drivers.

https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/merge_requests/1026
2020-02-11 12:10:50 +00:00
Jan Alexander Steffens (heftig)
c35e80dc0e fluiddec: Avoid deprecated fluid_synth_set_sample_rate
This function is used to change the rate at runtime, which has issues:
https://github.com/FluidSynth/fluidsynth/issues/585

Use the settings key instead (which already defaults to 44100, but I did
test other rates).

https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/merge_requests/1026
2020-02-11 12:10:50 +00:00
Sebastian Dröge
4ffa6350e8 webrtc: In all blocking pad probes except for sink pads also handle serialized events
Otherwise it can happen that e.g. the stream-start event is tried to be
sent as part of pushing the first buffer. Downstream might not be in
PAUSED/PLAYING yet, so the event is rejected with GST_FLOW_FLUSHING and
because it's an event would not cause the blocking pad probe to trigger
first. This would then return GST_FLOW_FLUSHING for the buffer and shut
down all of upstream.

To solve this we return GST_PAD_PROBE_DROP for all events. In case of
sticky events they would be resent again later once we unblocked after
blocking on the buffer and everything works fine.

Don't handle events specifically in sink pad blocking pad probes as here
downstream is not linked yet and we are actually waiting for the
following CAPS event before unblocking can happen.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1172
2020-02-11 00:49:51 +00:00
Sebastian Dröge
c16d4d2c33 webrtcbin: Add a blocking pad probe for the receivebin -> sctpdec connection
Without this it might happen that received data from the DTLS transport
is already passed to sctpdec before its state was set to PLAYING. This
would cause the data to be dropped, GST_FLOW_FLUSHING to be returned and
the whole DTLS transport to shut down.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1172
among other things.
2020-02-11 00:49:51 +00:00
Sebastian Dröge
f8fa71da27 webrtcbin/transportreceivebin: Use actual pad blocks instead of an additional GCond for blocking pads
Using a GCond can easily lead to deadlocks and only duplicates the
waiting code from gstpad.c in the best case.

In this case it actually could lead to a deadlock if both RTP and RTCP
were waiting. Only one of them would be woken up because g_cond_signal()
was used instead of g_cond_broadcast().
2020-02-11 00:49:51 +00:00
Sebastian Dröge
1ecb27f221 webrtc/transportsendbin: Clean up pad probe removal
We already have a helper function for this so just use it instead of
duplicating it.
2020-02-11 00:49:51 +00:00
Ederson de Souza
916966606b avtp: Build with clang
Minor non-conformity on AVTP code made it not compile with clang.
2020-02-07 21:53:57 +00:00
Ederson de Souza
f1976e0de5 avtp: Plug several leaks
After finally running tests with valgrind enabled, some leaks were found
- both on code and on tests themselves. This patch plugs them all!
2020-02-07 21:53:57 +00:00
Ludvig Rappe
2d585f2b0b gstcurlhttpsink: Update HTTP header for curl 7.66
Change how content-length is set for HTTP POST headers, letting curl set
the header (given the content-length) instead of manually writing it.
This enables curl to know the content-length of the data.
In curl 7.66, if curl does not know the content-length (e.g. when
manually writing the header) curl will use Transfer-Encoding: chunked,
which might not be desired.
2020-02-07 13:24:53 +00:00
Tim-Philipp Müller
dbb0e71e70 ladspa: only multiply bounded rate properties by sample rate
We don't want to accidentally multiply G_MAXFLOAT or -GMAXFLOAT
with the sample rate.
2020-02-06 10:15:12 +00:00
Tim-Philipp Müller
ffd3e189de ladspa: fix unbounded integer properties
Use a double instead of a plain float for intermediary
property values, so we have enough bits to store INT_MAX
and it doesn't get rounded and wrapped to -1 when cast
back to a 32-bit integer.

Fixes criticals like

  g_param_spec_int: assertion 'default_value >= minimum && default_value <= maximum' failed

when loading LADSPA plugins from the Linux Studio Plugins
Project (http://lsp-plug.in) in GStreamer.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1194
2020-02-06 10:15:12 +00:00
Andre Guedes
352bf28a35 avtpsink: Implement synchronization mechanism
The avtpsink element is expected to transmit AVTPDUs at specific times,
according to GstBuffer timestamps. Currently, the transmission time is
controlled in software via the rendering synchronization mechanism
provided by GstBaseSink class. However, that mechanism may not cope with
some AVB use-cases such as Class A streams, where AVTPDUs are expected
to be transmitted at every 125 us. Thus, this patch introduces avtpsink
own mechanism which leverages the socket transmission scheduling
infrastructure introduced in Linux kernel 4.19.  When supported by the
NIC, the transmission scheduling is offloaded to the hardware, improving
transmission time accuracy considerably.

To illustrate that, a before-after experiment was carried out. The
experimental setup consisted in 2 PCs with Intel i210 card connected
back-to-back running an up-to-date Archlinux with kernel 5.3.1. In one
host gst-launch-1.0 was used to generate a 2-minute Class A stream while
the other host captured the packets. The metric under evaluation is the
transmission interval and it is measured by checking the 'time_delta'
information from ethernet frames captured at the receiving side.

The table below shows the outcome for a 48 kHz, 16-bit sample, stereo
audio stream. The unit is nanoseconds.

       |   Mean |   Stdev |     Min |     Max |   Range |
-------+--------+---------+---------+---------+---------+
Before | 125000 │    2401 │  110056 │  288432 │  178376 |
After  | 125000 │      18 │  124943 │  125055 │     112 |

Before this patch, the transmission interval mean is equal to the
optimal value (Class A stream -> 125 us interval), and it is kept the
same after the patch.  The dispersion measurements, however, had
improved considerably, meaning the system is now consistently
transmitting AVTPDUs at the correct time.

Finally, the socket transmission scheduling infrastructure requires the
system clock to be synchronized with PTP clock so this patches modifies
the AVTP plugin documentation to cover how to achieve that.
2020-02-05 22:28:12 +00:00
Andre Guedes
4f0dc8cf58 avtpsink: Prepare code to new synchronization mechanism
This patch refactors gst_avtp_sink_start() by moving all socket
initialization code to its own function. This change prepares the code
to the next patch which will introduce avtpsink's own rendering
synchronization mechanism.
2020-02-05 22:28:12 +00:00
Andre Guedes
cd03c48f88 avtpsink: Remove SOCK_NONBLOCK from avtpsink
Current avtpsink code opens the AF_PACKET socket with SOCK_NONBLOCK
option. However, we actually want sendto() to block in case there isn't
available space in socket buffer.
2020-02-05 22:28:12 +00:00
Andre Guedes
e74c807633 avtp: Refactor if_index code
This patch refactors both avtpsink and avtpsrc code so we use the
if_nametoindex() helper instead of building a request and issuing an
ioctl to get the if_index.
2020-02-05 22:28:12 +00:00
Stéphane Cerveau
4b72e8cad5 fdkaacdec: add support for mpegversion=2
Fix for #1199
2020-02-04 07:52:22 +00:00
Mathieu Duponchelle
f8eef0aba0 webrtcbin: fix blocking of receive bin
The receive bin should block buffers from reaching dtlsdec before
the dtls connection has started.

While there was code to block its sinkpads until receive_state
was different from BLOCK, nothing was ever setting it to BLOCK
in the first place. This commit corrects this by setting the
initial state to BLOCK, directly in the constructor.

In addition, now that blocking is effective, we want to only
block buffers and buffer lists, as that's what might trigger
errors, we want to still let events and queries go through,
not doing so causes immediate deadlocks when linking the
bin.
2020-02-01 01:46:57 +01:00
Sebastian Dröge
af32ca45fa sctpassociation: Add missing return to prevent double unlock 2020-01-31 08:55:10 +02:00
Sebastian Dröge
e6c6b5ea29 sctpenc: Report errors when sending out data and the association is in error or disconnected state 2020-01-31 08:55:10 +02:00
Sebastian Dröge
6d22e80f30 sctp: Clean up association state handling and go into error/disconnected state in more circumstances 2020-01-31 08:55:10 +02:00
Sebastian Dröge
8612da865e sctpassociation: Use GStreamer logging system instead of g_warning() and g_log() 2020-01-31 08:55:10 +02:00
Sebastian Dröge
ddcfde36fa sctp: Add more logging to the encoder/decoder elements on data processing
And convert g_warning()s into normal log output instead.
2020-01-31 08:55:10 +02:00
Sebastian Dröge
db16265d86 sctpenc: Correctly log/handle errors and handle short writes 2020-01-31 08:55:10 +02:00
Sebastian Dröge
e9df80b235 sctp: Constify buffers in callbacks and functions
And free data with the correct free() function in the receive callback
by passing it to gst_buffer_new_wrapped_full() instead of
gst_buffer_new_wrapped().
2020-01-31 08:54:49 +02:00
Sebastian Dröge
fa0a233fa7 sctp: Make receive/packetout callbacks thread-safe 2020-01-30 16:07:48 +02:00
Sebastian Dröge
bff33f3b21 sctp: Add logging and missing cleanup on errors when creating pads 2020-01-30 16:00:33 +02:00
Sebastian Dröge
16ec86faf0 sctpenc: Use g_signal_emit() instead of g_signal_emit_by_name()
We have all the required information around so make use of it.
2020-01-30 15:59:12 +02:00
Sebastian Dröge
90e9f12880 sctpenc: Propagate downstream flow errors upstream
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1180
2020-01-30 15:58:30 +02:00
Sebastian Dröge
1f9c1aa489 sctpdec: Use a flow combiner for the source pad flow returns and propagate errors upstream
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1180
2020-01-30 15:56:36 +02:00
Guillermo Rodríguez
62ac77e620 waylandsink: Clear window when pipeline is stopped
When a pipeline is stopped (actually when the waylandsink element
state changes from PAUSED to READY) the video surface is cleared, but
the opaque black surface behind is not. Fix this by actually clearing
both surfaces.
2020-01-28 13:22:36 +01:00
Sebastian Dröge
0478e2dc1a ccconverter: Fill remainder of the cc_data in CDP packets with empty packets
Instead of filling it completely with zeroes. Filling with zeroes is
considered invalid by various CC implementations.
2020-01-24 09:26:28 +00:00
Mathieu Duponchelle
7cc185bd86 webrtcbin: connect rtp funnel after updating ptmaps
We need the streams' pt maps updated before requesting pads
on rtpbin, because this is what will trigger the requesting
of FEC encoders, and our handler for this request looks for
the payload types in the relevant stream's pt map.

Fixes #1187
2020-01-21 11:17:38 +00:00
Sebastian Dröge
0c39068c89 webrtcbin: Start datachannel SCTP elements only after the DTLS connection is established
Otherwise we would start sending data to the DTLS connection before, and
the DTLS elements consider this an error.

Also RFC 8261 mentions:
  o A DTLS connection MUST be established before an SCTP association can
    be set up.
2020-01-19 11:16:34 +00:00
Sebastian Dröge
2798a80ebe webrtcbin: Add handling of unspecified peer-connection-state situation
For us it can happen that the DTLS transports are still in the process
of connecting while the ICE transport is already completed. This
situation is not specified in the spec but conceptually that means it is
still in the process of connecting.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/758
2020-01-19 11:16:34 +00:00
Sebastian Dröge
4b73322333 webrtcbin: Return the old state if we ended up being in an unspecified situation
Previously we would've returned NEW, which is usually more wrong.
2020-01-19 11:16:34 +00:00
Sebastian Dröge
22869356db webrtcbin: Fix transitions for the peer connection state
They're now mapping exactly to what
  https://www.w3.org/TR/webrtc/#rtcpeerconnectionstate-enum
actually specifies.

Related to https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/758
2020-01-19 11:16:34 +00:00
Sebastian Dröge
41175f4ebe webrtcbin: Fix transitions for the connection state
They're now mapping exactly to what
  https://www.w3.org/TR/webrtc/#dom-rtciceconnectionstate
actually specifies.

Related to https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/758
2020-01-19 11:16:34 +00:00
Sebastian Dröge
7fcfb6c6c5 dtls: Keep track of the connection state and signal it through all the layers
This allows the application to keep track of the underlying DTLS
connection state and act accordingly.
2020-01-19 11:16:34 +00:00
Sebastian Dröge
d66aa872ca dtls: Handle errors/close_notify at all steps and propagate through the layers properly
Previously we simply logged errors but never reported them to elements
or even to the user. Fatal errors are now properly reported.

Additionally proper connection closing is implemented based on EOS:
- dtlsenc: EOS will cause close_notify to be sent to the peer and only
           if the peer also sent back close_notify we will forward the
           EOS event.
- dtlsdec: EOS will be forwarded normally, this only means that the
           unterlying transport was closed. On receiving a DTLS packet
           containing close_notify, return EOS and send EOS downstream.
2020-01-19 11:16:34 +00:00
Sebastian Dröge
a132138f1c dtls: Propagate write errors backwards through dtlsenc/dtlsconnection 2020-01-19 11:16:34 +00:00
Sebastian Dröge
ee55dac8d4 dtls: Use a plain function pointer instead of a GClosure for the send callback
There's not point in using GClosure and going through all the
GValue/libffi infrastructure for each DTLS packet.
2020-01-19 11:16:34 +00:00
Sebastian Dröge
47ce34d32c webrtcbin: Don't consider transceivers without mid as inactive during ICE gathering state updates
We don't have any mid before parsing the SDP, which happens after we
handled the SDP answer and that usually happens long after ICE candidate
gathering is finished.

Without this all transceivers are considered inactive and as such ICE
gathering is for active transceiver was considered complete from the
very beginning.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1126
2020-01-19 10:47:59 +00:00
Sebastian Dröge
de0f803d56 webrtcbin: Don't consider RTP receivers stopped
We don't support stopping RTP receivers currently so let's not consider
them all stopped all the time. This fixes some of the ICE/DTLS state
change handling and specifically fixes the ICE gathering state.

Previously the ICE gathering state was immediately going from NEW to
COMPLETE because it considered all transceivers stopped and as such all
activate transceivers were finished gathering ICE candidates.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1126
2020-01-19 10:47:59 +00:00
Sebastian Dröge
57c982a1dd webrtcbin: Improve logging related to ICE/DTLS state changes 2020-01-19 10:47:59 +00:00
Jan Schmidt
8e87fe42ad WebRTC: Support non-trickle ICE candidates in the SDP
Add any ICE candidates from the SDP before adding pending
trickle ICE candidates to support non-trickle peers

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/678
2020-01-13 02:30:44 +11:00
Shinya Saito
58b1f41f99 waylandsink: Fix xdg_shell fullscreen mode
xdg_shell fullscreen mode doesn't work for committing
xdg_surface without configure acknowledgement.

In addition, we can't set different surface setting from
acknowledged config in this mode.
2020-01-10 18:22:57 +00:00
Seungha Yang
4fc3aa6ef4 hls: Check nettle version to ensure AES128 support
AES128 support was added since nettle version 3.0

../subprojects/gst-plugins-bad/ext/hls/gsthlsdemux.h:110:10: error: field ‘ctx’ has incomplete type
   struct CBC_CTX (struct aes128_ctx, AES_BLOCK_SIZE) aes_ctx;
2020-01-10 16:03:48 +09:00
Sebastian Dröge
04c5a550ad webrtc: Unmap all non-binary buffers received via the datachannel
Previously they were only unmapped in case of binary data, causing all
of them to be leaked.
2020-01-07 21:15:20 +00:00
Stéphane Cerveau
db06f8e9da zbar: remove useless conditional on passthrough
seen that passthrough is never set for this element, no need
to allow to remove the 'transform' call
2020-01-07 17:24:50 +00:00
Stéphane Cerveau
e8fb7fc046 zxing: initial plugin revision
Status:
- scan QR code with low resolution
- Scan barcode with high resolution
2020-01-07 17:24:50 +00:00
Seungha Yang
6d09b2039d dash: Remove spurious condition check and remove unused debug category
Note that uppercase debug category names are used for
core modules and should be redefined in lowercase for plugins if necessary.
2020-01-07 04:11:27 +00:00
Stéphane Cerveau
982072ce1d dashsink: Add new sink to produce DASH content
Add static or dynamic mpd with:
- baseURL
- period
- adaptation_set
- representaton
- SegmentList
- SegmentURL
- SegmentTemplate

Support multiple audio and video streams.
Pass conformance test with DashIF.org
2020-01-03 20:50:27 +00:00
Stéphane Cerveau
1238a32bfd gstxmlhelper: fix xmlOutputBufferFlush ignored ret
fix CID #1456553
2020-01-03 20:50:27 +00:00
Stéphane Cerveau
d1b3b19088 dash: add set/get property for nodes
Add a way to set/get properties for given nodes:

- root
- baseurl
- representation
2020-01-03 20:50:27 +00:00
Stéphane Cerveau
ac74b042ec dash: Generate an XML content from object.
Add mpd node base class to provide
xml generation facilities for child
objects.
2020-01-03 20:50:27 +00:00
Seungha Yang
b8ef3801bc vulkansink: Fix null pointer exception
context query might happen before creating swapper.
2020-01-03 08:45:12 +00:00
Sebastian Dröge
66775f3e72 hlssink2: Add signals for allowing custom playlist/fragment handling
Instead of always going through the file system API we allow the
application to modify the behaviour. For the playlist itself and
fragments, the application can provide a GOutputStream. In addition the
sink notifies the application whenever a fragment can be deleted.
2019-12-31 13:23:17 +00:00
Stéphane Cerveau
add7878e14 bad: use of g_value_dup_string
Use helper method to get string from GValue.
2019-12-30 14:13:03 +00:00
Sebastian Dröge
e59962850a dtlsenc: Don't warn on GST_FLOW_FLUSHING or GST_FLOW_EOS
Only warn if pushing a buffer returns an actual error to not pollute
logs with confusing warnings.
2019-12-30 11:09:46 +00:00
Nicola Murino
a2cfd93891 opencv: allow compilation against 4.2.x 2019-12-26 22:43:35 +01:00
Aaron Boxer
cd0c07e899 openjpegenc: add support for sub-frame encoding
Following the standard for low latency JPEG 2000 encoding
https://www.itu.int/rec/dologin_pub.asp?lang=e&id=T-REC-H.222.0-200701-S!Amd1!PDF-E&type=items
we divide the image into stripes of a specified height, and encode
each stripe as a self-contained JPEG 2000 image. This MR is based on
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/merge_requests/429
2019-12-22 02:54:00 +00:00
Yeongjin Jeong
663aeb2131 svthevcenc: Add new SVT-HEVC encoder element
The SVT-HEVC (Scalable Video Technology[0] for HEVC) Encoder is an
open source video coding technology[1] that is highly optimized for
Intel Xeon Scalable processors and Intel Xeon D processors.

[0] https://01.org/svt
[1] https://github.com/OpenVisualCloud/SVT-HEVC
2019-12-20 15:43:55 +00:00
Francisco Javier Velázquez-García (francisv)
c7fe1e8164 gstsrtsink: Add wait-for-connection property to srtsink
Add `wait-for-connection` property to `srtsink` element.  This
property allows the element to process packets even when no clients
are connected.
2019-12-19 19:46:47 +00:00
Olivier Crête
fad9096647 Revert "ccextractor: support new CEA 608 formats"
This reverts commit 80dd7b2d3d.
2019-12-17 16:43:54 -05:00
Aaron Boxer
80dd7b2d3d ccextractor: support new CEA 608 formats 2019-12-17 18:26:35 +00:00
Wonchul Lee
8e79e53c6e wlvideoformat: clean up video formats
It cleans up videoFormat by combining the wl_shm_formats and
drm_formats into a single table that represents the same format.
In addition, it adds NV61 format to the waylandsink.
2019-12-17 17:12:03 +00:00
Stéphane Cerveau
6bc0e9527e remove various useless linefeed in logs 2019-12-11 10:51:29 +01:00
Olivier Crête
411bde315c srtp: Remove %z as it doesn't work on Windows 2019-12-09 15:41:13 -05:00
Stéphane Cerveau
1711369526 openh264enc: keep the headers
be able to resend the headers on demand after a key-unit request
2019-12-06 08:35:00 +00:00
Stéphane Cerveau
c28e7d928d dash: move parser nodes/types to separated files
Rename GstMpdClient to GstMPDClient and use GObject model.

Move nodes to file from gstmpdparser.c:
- GstMPDRootNode
- GstMPDBaseURLNode
- GstMPDUTCTimingNode
- GstMPDMetricsNode
- GstMPDMetricsRangeNode
- GstMPDSNode
- GstMPDSegmentTimelineNode
- GstSegmentTemplateNode
- GstMPDSegmentURLNode
- GstMPDSegmentListNode
- GstMPDPeriodNode
- GstMPDRepresentationNode
- GstMPDsubRepresentationNode
- GstMPDAdaptationSetNode
- GstMPDContentComponentNode
- GstMPDSubsetNode
- GstMPDProgramInformationNode

Move types to gstmpdhelper from gstmpdparser.c:

- GstURLType
- GstDescriptorType
- GstSegmentBaseType
- GstMPDMultSegmentBaseType
- GstMPDRepresentationBaseType

Cleanup naming when possible.
2019-12-05 09:06:37 +00:00
Stéphane Cerveau
86b251b7d1 dash: split mpdparser, mpdclient and xmlhelper
provide a separate namespace for mpd helper
for xml parsing and the real mpd parsing.
2019-12-05 09:06:37 +00:00
Matthew Waters
c3685bafa4 vulkanviewconvert: clear the cached uniforms on caps change
Caps changes can change the output/input layout which needs to be
reflected in the input uniforms to the shader.
2019-12-05 03:21:21 +00:00
Matthew Waters
81d1e16b6b vulkan: move fullscreenquad object to library
It's useful and extensible enough to be used by us and other elements
2019-12-04 07:20:27 +00:00
Nirbheek Chauhan
f3e4aa1a18 openexr: Fix check for when to pass -std=c++98
commit 6adfb120ab added this flag to fix
builds with `-Werror`, and afterwards it was changed to use a version
check when newer versions of openexr moved over to C++11.

However, some distros have backported patches to older openexr
versions which make it require C++11, which makes the version check
incorrect and causes an error because we passed `-Werror -std=c++98`.

Instead, directly check when usage of the header requires `-std=c++98`
with `-Werror` and override the `cpp_std` setting on the target.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1117
2019-12-02 08:53:59 +00:00
Matthew Waters
24d096597b vulkan: implement caching and reuse of a couple of vulkan resources
Includes a new GstVulkanHandlePool base class for pooling different
resources togther.  The descriptor cache object is ported to
GstVulkanHandlePool with the exact same functionality.

A new GstVulkanFenceCache is also implemented for caching fences
which is used internally by GstVulkanDevice for creating or reusing
fences.

The existing GstVulkanTrashFenceList object now caches trash objects.
2019-11-28 23:27:21 +00:00
Matthew Waters
f810147709 vulkancolorconvert: disable YUY2 conversion
It doesn't work and never seemed to
2019-11-28 23:27:21 +00:00
Matthew Waters
615022ad93 vulkan: split vkfullscreenrender into two
Part 1 is a base class (vkvideofilter) that handles instance, device,
queue retrieval and holding that has been moved to the library
Part 2 is a fullscreenrenderquad that is still in the plugin that
performs all of the previous vulkan-specific functionality.
2019-11-28 23:27:21 +00:00
Matthew Waters
756d52ef15 vulkan/upload: allocate from the correct pool
Only relevant when upstream does not use our provided pool.
2019-11-28 23:27:21 +00:00
Matthew Waters
4f3051fd2d vulkan: add a couple of missing fence unrefs 2019-11-28 23:27:21 +00:00
Matthew Waters
a3454edeb2 vulkan/colorconvert: zero out sampler create struct 2019-11-28 23:27:21 +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
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
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
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
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
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
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
Edward Hervey
b55f380b20 hlsdemux: Don't use deprecated SSL methods
And instead use the fixed-size variants (which aren't deprecated)
2019-11-08 10:43:08 +00:00
Edward Hervey
7bceb6c3ff bad: Avoid using deprecated API
GTimeval is deprecated
2019-11-08 10:43:08 +00:00
Matthew Waters
32b3387ae6 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.
2019-11-07 20:01:57 +00:00
Matthew Waters
1c89096b4f 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.
2019-11-07 20:01:57 +00:00
Matthew Waters
66244e9342 vulkanviewconvert: fix typo of output image view name 2019-11-07 20:01:57 +00:00
Matthew Waters
7a1bb3001a vulkan: use VK_NULL_HANDLE in more places
Fixes compiler warnings on 32-bit platforms assigning a void * to a
64-bit integer value.
2019-11-07 20:01:57 +00:00
Matthew Waters
475a2b0acd vulkan/image: use the full video info for returning vulkan formats
We may need some colorspace information for returning sRGB vs no sRGB.
2019-11-07 20:01:57 +00:00
Yeongjin Jeong
56333073a9 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>
           ^~~~~~~~~~~~~~~~~~~~~
2019-11-07 03:31:19 +00:00
Niels De Graef
d8f61515d8 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.
2019-11-06 14:27:46 +00:00
Justin Kim
e6847b6d29 srt: split incoming buffer up into srt chunk 2019-11-06 13:14:26 +00:00
Aaron Boxer
6d3429af34 documentation: fixed a heap o' typos 2019-11-05 09:11:25 -05:00
Wonchul Lee
5320bb9085 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.
2019-11-05 00:10:26 +00:00
Wonchul Lee
fc93b2669d 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.
2019-11-05 00:10:26 +00:00
Yeongjin Jeong
a7ec30dc94 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.
2019-11-04 23:14:02 +00:00
Sebastian Dröge
f6b4e24f72 ccconverter: Instead of erroring out on too big input drop additional data 2019-11-04 13:43:25 +00:00
Jan Alexander Steffens (heftig)
5dd3e35fb5 openexr: Fix compilation with OpenEXR 2.4
It uses modern C++; adding -std=c++98 breaks the build.
2019-11-02 22:08:55 +00:00
Sebastian Dröge
d8372736c6 ccextractor: Remove unused set/get_property() functions 2019-10-28 13:40:16 +02:00
Sebastian Dröge
8aca7f2056 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.
2019-10-28 13:40:16 +02:00
Matthew Waters
ecca6cbfd2 vulkanimage: move fence creation earlier
Fixes a critical:

GStreamer-CRITICAL **: 02:26:34.698: gst_mini_object_ref: assertion 'mini_object != NULL' failed
2019-10-28 07:22:45 +00:00
Matthew Waters
103112725c 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.
2019-10-28 07:22:45 +00:00
Julien Isorce
2b9c7bff45 srtpenc: also insert ssrc(s) from rtp buffers
This fixes a regression from commit "srtp: Support libsrtp2"
e9aa117200 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.
2019-10-25 12:04:50 -07:00
Jan Alexander Steffens (heftig)
912214e34f 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.
2019-10-25 11:47:15 +00:00
Philippe Normand
b905501c55 wpe: Get rid of un-necessary frameComplete dispatchs
frameComplete() should be called only if there's a new commited frame.
2019-10-24 09:41:10 +00:00
Philippe Normand
0f03e33b03 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
2019-10-24 09:41:10 +00:00
Jordan Petridis
8969f02fd5 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
```
2019-10-22 13:44:04 +00:00
Philippe Normand
a40476914d wpesrc: Implement load-bytes action signal 2019-10-17 08:15:44 +00:00
Philippe Normand
d7778e6a7c 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
2019-10-17 08:15:44 +00:00
Tim-Philipp Müller
f218ec2794 Remove autotools build system 2019-10-14 13:54:27 +01:00
Mathieu Duponchelle
75f47ee5e4 ext: add libmicrodns-based mdns device provider
The provider for now only detects and handles rtsp devices, but
more protocols should be easy to add.
2019-10-08 12:28:01 +00:00
Seungha Yang
2c394df69d hlssink2: Respect requested max-files property for decision on removing old fragments from disk
hlssink2 defined "max-files" property to decide the maximum number
of fragments which should be stored in disk. But we've not used
the property. Instead, the size has been maintained by "playlist-length".
Since "max-files" and "playlist-length" have different meaning,
the decision should be done by "max-files" property.

For example, an user might want expose only 3 fragments via playlist
but might want to keep more files than 3 in disk.
2019-10-07 14:29:57 +09:00
Matthew Waters
84718775a2 ass: avoid infinite unref loop with bad data
A classic case of not updating the next item to iterate after deleting
it from the singly linked list.

Only ever hit with a text buffer with GST_CLOCK_TIME_NONE for either the
timestamp or duration.
2019-10-07 00:07:36 +11:00
Seungha Yang
d763aeee4b hlssink,hlssink2: Ensure writing ENDLIST tag at the end
hlssink* elements could be finalized without EOS event, and in that case
the final playlist might not include the EXT-X-ENDLIST tag.
Since missing ENDLIST tag means it's live stream, but we did't intend it,
hlssink* elements should put the tag at the end.
2019-10-01 17:16:05 +09:00
olivier.crete@collabora.com
fd9dfb9d0c wayland: Add more DRM formats
Add DRM format equivalents that we were missing compared
to our caps.
2019-09-27 19:52:25 +00:00
olivier.crete@collabora.com
b393b650ab wayland: Drop big-endian version of the DRM formats
They were a big in some big-endian implementations
2019-09-27 19:52:25 +00:00
Fabian Greffrath
296e17e3f1 fluidsynth: add sf3 to soundfont search path
In Debian, soundfonts in SF3 format (i.e. the same as SF2 format but
with Ogg/Vorbis-compressed samples) are installed into
/usr/share/sounds/sf3. Soundfonts in SF3 format are supported since
FluidSynth 1.1.7 (released in Feb 2018).
2019-09-26 07:41:31 +00:00
Matthew Waters
34ff895040 vulkan: remove VkImageView from the memory
There can be multiple views per image for different subresource ranges
or planes in multi-planer images.
2019-09-25 11:11:02 +00:00
Matthew Waters
452bb72292 vkbuffer: remove buffer view from the memory
It's only really useful for texture buffers which we currently do not
use.
2019-09-25 11:11:02 +00:00
Matthew Waters
82e86573b8 vulkan: implement command buffer reuse
Using a similar design for reference counting as
GstBuffer/GstBufferPool.
2019-09-19 02:01:35 +00:00
Matthew Waters
2af2402880 vulkan: add device provider implementation 2019-09-17 13:02:44 +10:00
Matthew Waters
66ed62b794 vulkansink: attempt a context query for a device 2019-09-17 13:02:44 +10:00
Matthew Waters
5f76c84feb vulkan: split physical device from logical device 2019-09-17 13:02:44 +10:00
Matthew Waters
407dab607f vulkan: only pass the device/instance/display in to *_handle_*() functions
We don't need to change the pointer value in these functions.
2019-09-17 13:02:43 +10:00
Matthew Waters
523f4e4b50 webrtc/stats: redo considering internal sources
Internal sources seem to be rtp streams we are sending whereas
non-internal sources are the rtp streams we are receiving. Redo the
statistics with that in mind.
2019-09-12 01:06:41 +00:00
Mark Nauwelaerts
2f920a90bb wayland: gracefully handle unknown formats 2019-09-09 17:07:30 +00:00
Wonchul Lee
fbcbf36fe3 av1enc: change cpu-used range upto 5
The speed 6, 7 and 8 has been removed because it's not yet tuned
correctly.
https://aomedia.googlesource.com/aom/+/7ffbf92030baf6886c2486574cca16d60499bbb8
2019-09-06 13:41:35 +00:00
Jeffy Chen
b8946d06c7 Revert "waylandsink: Don't create throwaway empty regions"
This reverts commit 68fa80e831.

Some wayland servers, especially weston, only expect empty input
region as a request to disable input.

Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
2019-09-03 13:27:12 +00:00
Sam Gigliotti
90d939ea36 webrtcbin: Fixed memory leak in gstwebrtcstats
The function _get_stats_from_ice_transport returns a string which must be
freed by the caller. However, _get_stats_from_dtls_transport was ignoring
the return value from this function, resulting in a leak.

Ran this with valgrind. Before this fix there was a leak of 40 bytes each
time this was called. After there was no leak.
2019-08-30 15:55:35 +00:00
Yeongjin Jeong
8bc5144020 vulkan: Don't dereference null pointer when printing error
When printing error message because the function failed, the GError variable
may not be used and it can be NULL.
2019-08-29 11:19:37 +00:00
Matthew Waters
d9248560e4 vulkancolorconvert: explicitly initalize swizzle arrays
Fixes uninitialized access of the indexed values larger than
the number of planes in the video format.
2019-08-28 10:34:39 +00:00
Matthew Waters
278039be06 mpeg2enc: fix werror build with clang
/usr/include/mjpegtools/mpeg2enc/ontheflyratectlpass1.hh:1:9: error: '_ONTHEFLYRATECTLPASS1_HH' is used as a header guard here, followed by #define of a different macro [-Werror,-Wheader-guard]
#ifndef _ONTHEFLYRATECTLPASS1_HH
        ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/mjpegtools/mpeg2enc/ontheflyratectlpass1.hh:2:9: note: '_ONTHELFYRATECTLPASS1_HH' is defined here; did you mean '_ONTHEFLYRATECTLPASS1_HH'?
#define _ONTHELFYRATECTLPASS1_HH
        ^~~~~~~~~~~~~~~~~~~~~~~~
        _ONTHEFLYRATECTLPASS1_HH
In file included from ../subprojects/gst-plugins-bad/ext/mpeg2enc/gstmpeg2encoder.cc:31:
/usr/include/mjpegtools/mpeg2enc/ontheflyratectlpass2.hh:1:9: error: '_ONTHEFLYRATECTLPASS2_HH' is used as a header guard here, followed by #define of a different macro [-Werror,-Wheader-guard]
#ifndef _ONTHEFLYRATECTLPASS2_HH
        ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/mjpegtools/mpeg2enc/ontheflyratectlpass2.hh:2:9: note: '_ONTHELFYRATECTLPASS2_HH' is defined here; did you mean '_ONTHEFLYRATECTLPASS2_HH'?
#define _ONTHELFYRATECTLPASS2_HH
        ^~~~~~~~~~~~~~~~~~~~~~~~
        _ONTHEFLYRATECTLPASS2_HH

/usr/include/mjpegtools/mpeg2enc/encoderparams.hh:82:1: error: struct 'RateCtl' was previously declared as a class; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Werror,-Wmismatched-tags]
struct RateCtl;
^
/usr/include/mjpegtools/mpeg2enc/ratectl.hh:50:7: note: previous use is here
class RateCtl
      ^
/usr/include/mjpegtools/mpeg2enc/encoderparams.hh:82:1: note: did you mean class here?
struct RateCtl;
^~~~~~
class
2019-08-28 02:47:18 +00:00
Matthew Waters
3cb01699d4 av1enc: fix werror build with clang
../subprojects/gst-plugins-bad/ext/aom/gstav1enc.c:415:34: warning: implicit conversion from enumeration type 'GstAV1EncEndUsageMode' to different enumeration type 'enum aom_rc_mode' [-Wenum-conversion]
  av1enc->aom_cfg.rc_end_usage = DEFAULT_END_USAGE;
                               ~ ^~~~~~~~~~~~~~~~~
../subprojects/gst-plugins-bad/ext/aom/gstav1enc.c:162:41: note: expanded from macro 'DEFAULT_END_USAGE'
#define DEFAULT_END_USAGE               GST_AV1_ENC_END_USAGE_VBR
                                        ^~~~~~~~~~~~~~~~~~~~~~~~~
2019-08-28 02:47:18 +00:00
Olivier Crête
fa842f2156 srt: Set latency property on SRT socket 2019-08-27 22:31:50 +00:00
Olivier Crête
177f1f95e1 srt: Add sender side statistics 2019-08-27 22:31:50 +00:00
Olivier Crête
54dc0b5579 srtobject: Remove pointless GMainLoop
Just use srt's blocking epoll function and fix locking while we're at it.
2019-08-27 22:31:50 +00:00
Shinya Saito
e4c4f193f2 waylandsink: Fix return type of prototype of show_frame() 2019-08-26 11:54:45 +09:00
Mathieu Duponchelle
42adb02a10 docstrings: port ulinks to markdown links 2019-08-23 20:14:12 +02:00
Matthew Waters
833c596bc5 vulkan/fullscreenrender: free the attachment descriptions
Fixes a memory leak of the attachment descriptions we receive from the
subclass.
2019-08-22 14:57:02 +10:00
Matthew Waters
837cdd598a vulkanviewconvert: perform a renegotiation on multiview mode/flag property changes
Otherwise changing the output* properties have no effect until someone else
performs a renegotiation.
2019-08-22 11:51:01 +10:00
Matthew Waters
e5d574534c shaders/view-convert: remove some debugging colours
Fixes left and right output modes.
2019-08-22 11:50:51 +10:00
Seungha Yang
15c10618a2 hlsdemux: Post error message if hlsdemux could not start decryption
_decrypt_start() failure will lead to decryption failure eventually
but catching it earlier if possible. The decrpytion start failure means
that the hls plugin was built without crypto library or crypto library
does not want to accept given key and IV.
2019-08-21 23:47:45 +09:00
Seungha Yang
98b303498a hls: Make crypto dependency optional when hls-crypto is auto
crypto libraries are not required for hlssink and hlssink2.
Also, hlsdemux with nonencrypted stream can work without crpyto.

Make an error only when users set "hls-crpyto" with non-auto option explicitly,
but no crpyto library was found.
2019-08-21 22:55:50 +09:00
Thomas Coldrick
8e8d4acf69 ext/wayland: Define libdrm_dep in meson.build 2019-08-20 14:56:48 +00:00
Nirbheek Chauhan
70a90f0e5e sctp: Fix crash on free() when using the MSVC binaries
On Windows, if libusrsctp and gstreamer are built with different
C runtimes (CRT), we cannot free memory allocated inside libusrsctp
with the `free()` function from gstreamer's CRT.

`usrsctp_freedumpbuffer()` simply calls `free()`, but because of the
way DLLs work on Windows, it will always call the free function from
the correct CRT.
2019-08-20 14:33:41 +05:30
Mathieu Duponchelle
fef8c8f7b5 iqa: fix leak of map_meta.data 2019-08-16 13:23:55 +00:00
Sebastian Dröge
92dd72b7ee cccombiner: Make use of new GstAggregator::negotiate()
Simplifies the caps handling code considerably here and removes some
spurious negotiation.
2019-08-14 17:37:59 +00:00
Doug Nazar
52f736c233 pitch: Fix race between putSamples() and setting soundtouch parameters
The various soundtouch set*() functions may cause buffer (re)allocations
which interferes with inputting the audio data.
2019-08-14 15:32:24 +00:00
David Gunzinger
e2e86658f2 webrtc: fix type of max-retransmits, make it work 2019-08-13 12:17:13 +02:00
Seungha Yang
b49724fdb6 x265enc: Enhance profile setting with fixing infinite loop condition
Don't fixate profile caps which will choose the first profile from list.
Instead, store all profiles allowed by peer and try them until x265 can
accept one of them.
2019-08-09 06:36:06 +00:00
Seungha Yang
de6f296d00 x265enc: Fix deadlock on profile setting failure
Don't miss unlock before returning
2019-08-09 06:36:06 +00:00
Seungha Yang
85c0a1e85b x265enc: Add support more 8/10/12 bits 4:2:0, 4:2:2 and 4:4:4 profiles
... with multi-library interface support. Depending on bit depth support of
the linked library, run-time api switch can be made via multi-library interface.

See more detail about libx265 multi-library interface
https://x265.readthedocs.io/en/default/api.html#multi-library-interface
2019-08-07 00:20:31 +03:00
Sebastian Dröge
28b0be4036 rtptransceiver: Remove direction setter and vfunc and replace it by a property
It was changed from a function to a property in the latest WebRTC spec.
2019-08-06 12:22:21 +00:00
Yeongjin Jeong
8f2c53f6f5 x265enc: Specify max CU size depending on input resolution
x265 does not allow user to configure a picture size smaller than
at least one CU size, and maxCUSize must be 16, 32, or 64.
Therefore, the CU size must be set according to the input resolution,
and the input resolution can not be less than 16.
2019-07-31 18:13:28 +09:00
Ederson de Souza
416afd5fa9 avtp: CVF - fix error message
The error is about *not* being able to map a buffer.
2019-07-30 11:34:31 -07:00
Ederson de Souza
f9a16731d1 avtp: CVF - Do not infinite loop trying to fragment zero sized NAL unit
Zero sized NAL-units should not happen, but if they do, do not infinite
loop. Added also a unit test for this case.
2019-07-30 11:34:31 -07:00
Jakub Adam
831b124976 webrtcbin: Support data channel SDP offers from Chrome
When negotiating a data channel, Chrome as recent as 75 still uses SDP
based on version 05 of the SCTP SDP draft, for example:

 m=application 9 DTLS/SCTP 5000
 a=sctpmap:5000 webrtc-datachannel 1024

Implement support for parsing SCTP port out of SDP message with sctpmap
attribute. Fixes data channel negotiation with Chrome browser.
2019-07-29 22:04:08 +00:00
Aaron Boxer
2c1244331f openjpegdec: enable multi-threaded decode 2019-07-29 15:18:34 -04:00
Aaron Boxer
1402ed8984 openjpegdec: check return value when setting up decoder 2019-07-29 14:48:39 -04:00
Charlie Turner
659d76a633 adaptivedemux: remove some deadlocks using webkitwebsrc.
WebKit's websrc depends on the main-thread for download completion
rendezvous. This exposed a number of deadlocks in adaptivedemux due to
it holding the MANIFEST_LOCK during network requests, and also needing
to hold it to change_state and resolve queries, which frequently occur
during these download windows.

Make demux->running MT-safe so that it can be accessed without using the
MANIFEST_LOCK. In case a source is downloading and requires a MT-thread
notification for completion of the fragment download, a state change
during this download window will deadlock unless we cancel the downloads
and ensure they are not restarted before we finish the state-change.

Also make demux->priv->have_manifest MT-safe. A duration query happening
in the window described above can deadlock for the same reason. Other
src queries (like SEEKING) that happen in this window also could
deadlock, but I haven't hit this scenario.

Increase granularity of API_LOCK'ing in change_state as well. We need to
cancel downloads before trying to take this lock, since sink events
(EOS) will hold it before starting a fragment download.
2019-07-29 13:19:41 +01:00
Ilya Smelykh
e898f1565d webrtcbin: fix GInetAddress leak 2019-07-29 15:55:36 +07:00
Aaron Boxer
8af8e73573 openjpeg: remove support for OpenJPEG 1.5
Also require OpenJPEG version >= 2.2
2019-07-28 17:03:13 -04:00
Wonchul Lee
1ddd13da24 av1enc: enable row-mt property conditionally
The row based multi threading control was introduced after 1.0.0 version
of libaom released. It adds a guard to check the relevant control
definition declared. It fixes #1025
2019-07-27 08:15:33 +00:00
Sebastian Dröge
060e72e370 Revert "dtls: fix generated cert dtls agent leak"
This reverts commit e5585b1bde
2019-07-26 06:35:53 +00:00
Ilya Smelykh
e5585b1bde dtls: fix generated cert dtls agent leak
The generated certificate dtls agent was refed two times on the first call.
2019-07-25 20:03:02 +07:00
Ilya Smelykh
aa0dea09d6 dtls: fix dtls connection object leak 2019-07-25 10:21:29 +00:00
Xavier Claessens
71d9e33085 dash: Fallback to libxml2 subproject 2019-07-24 14:38:08 -04:00
Sebastian Dröge
67ccaf904d av1enc: Also set AV1E_SET_ROW_MT from the property value when initializing the encoder
Previously it was only set if the property was changed after the encoder
was initialized.
2019-07-22 12:23:51 +03:00
Wonchul Lee
783048309f av1enc: Add threads and row-mt properties
Add threads related property that setting a number of threads to encode
av1 codec and row-mt configuration.
2019-07-22 11:23:47 +03:00
Wonchul Lee
5c5888a1aa av1enc: Release lock when failing to initialize
Add to missing unlock when failing to initialize encoder.
2019-07-22 11:23:47 +03:00
Sebastian Dröge
942445b0ac Revert "av1enc: Release lock when failing to initialize"
This reverts commit 7de6b5d481.

It was accidentally squashed together from the MR instead of keeping the
individual commits.
2019-07-22 11:23:22 +03:00
Wonchul Lee
7de6b5d481 av1enc: Release lock when failing to initialize
Add to missing unlock when failing to initialize encoder.
2019-07-22 06:59:48 +00:00
Seungha Yang
d6680b35b4 x265enc: Specify colorimetry related VUI parameters
Set the colorimetry config for the information to be embedded in encodec bitstream.
2019-07-17 22:46:58 +09:00
Mathieu Duponchelle
b42d98ca19 webrtcdatachannel: inherit directly from GObject
There's no reason for it to inherit from GstObject apart from
locking, which is easily replaced, and inheriting from
GInitiallyUnowned made introspection awkward and needlessly
complicated.
2019-07-16 21:35:47 +00:00
Sebastian Dröge
dad6e51165 cccombiner: Proxy POSITION/DURATION/URI/CAPS/ALLOCATION queries between video sinkpad and source pad
We pass-through the video as is, only putting a GstMeta on it from the
caption sinkpad.

This fixes negotation problems caused by not passing through caps
queries in both directions.

Also handle CAPS/ACCEPT_CAPS queries directly for the caption pad
instead of proxying.
2019-07-09 14:11:34 +00:00
Seungha Yang
6b6bb6b203 vulkan: Fix incompatible type build warning
Make declare/define a function consistent.
Note that GstBaseTransform::set_caps should return gboolean

Compiling C object subprojects/gst-plugins-bad/ext/vulkan/f3f9d6b@@gstvulkan@sha/vkviewconvert.c.obj.
../subprojects/gst-plugins-bad/ext/vulkan/vkviewconvert.c(644):
  warning C4133: '=': incompatible types - from 'GstFlowReturn (__cdecl *)(GstBaseTransform *,GstCaps *,GstCaps *)'
  to 'gboolean (__cdecl *)(GstBaseTransform *,GstCaps *,GstCaps *)'
2019-07-09 01:42:58 +00:00
Olivier Crête
15f2cdd750 srt: Remove msg-size property
Remove the now unused property
2019-07-08 16:00:51 -04:00
Olivier Crête
42fa4cb2ad srtsrc: Receive one frame per gstbuffer
Don't aggregate the received data, just receive it one packet at a
time. So it keeps the packetization boundaries
2019-07-08 16:00:51 -04:00
Nicolas Dufresne
1acd9c726a srt: Fix listener crash if no URI is specified 2019-07-08 13:52:48 -04:00
Nicolas Dufresne
b06f7824e1 srt: Use macro instead of duplicating a default value 2019-07-08 13:52:48 -04:00
Nicolas Dufresne
e5b6622546 srt: Fix confusing typo in FIXME comment
SRT does not support IPv6, but the comment said IPv4 which was the
opposite of the following code.
2019-07-08 13:52:48 -04:00
Sebastian Dröge
329b2d3a6a webrtcbin: Don't assert if an SDP media can't be converted to caps
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1008
2019-07-08 07:18:41 +00:00
Matthew Waters
014642e188 vulkan: add view converter element 2019-07-05 15:04:28 +10:00
Matthew Waters
6ebaf7276e vulkan: fix output framebuffer creation size
We don't scale when color converting so there is no impact.
2019-07-05 10:47:45 +10:00
Jan Schmidt
8899a471e3 h264parse lib: Remove the SPS parse_vui_params flag
The SPS parsing functions take a parse_vui_param flag
to skip VUI parsing, but there's no indication in the output
SPS struct that the VUI was skipped.

The only caller that ever passed FALSE seems to be the
important gst_h264_parser_parse_nal() function, meaning - so the
cached SPS were always silently invalid. That needs changing
anyway, meaning noone ever passes FALSE.

I don't see any use for saving a few microseconds in
order to silently produce garbage, and since this is still
unstable API, let's remove the parse_vui_param.
2019-07-05 00:17:59 +10:00
Matthew Waters
69af8a9360 vulkan: move swapper object to the gstvulkan library
Allows other sinks and/or user code to display to a VkSurface
2019-07-04 14:18:15 +10:00
Matthew Waters
b5256d94fc vulkan: move trash list to library 2019-07-04 14:18:15 +10:00
Matthew Waters
cef839533e webrtcbin: use the latest self-generated SDP as the basis for renegotiations
Fixes multiple errors when a webrtcbin renegotiation can switch between the
offerer and the answerer.
2019-07-03 23:44:15 +00:00
Ederson de Souza
f18fab0eb1 avtp: Update documentation 2019-07-03 09:59:35 -07:00
Ederson de Souza
5592ab1769 docs: Add AVTP elements documentation 2019-07-03 09:59:35 -07:00
Ederson de Souza
45624661ba avtp: Add fragmented packets handling to CVF depayloader
This patch adds to the CVF depayloader the capability to regroup H.264
fragmented FU-A packets.

After all packets are regrouped, they are added to the "stash" of H.264
NAL units that will be sent as soon as an AVTP packet with M bit set is
found (usually, the last fragment).

Unrecognized fragments (such as first fragment seen, but with no Start
bit set) are discarded - and any NAL units on the "stash" are sent
downstream, as if a SEQNUM discontinuty happened.
2019-07-03 09:59:35 -07:00
Ederson de Souza
45d2f5a779 avtp: Introduce AVTP CVF depayloader element
This patch introduces the AVTP Compressed Video Format (CVF) depayloader
specified in IEEE 1722-2016 section 8. Currently, this depayloader only
supports H.264 encapsulation described in section 8.5.

Is also worth noting that only single NAL units are handled: aggregated
and fragmented payloads are not handled.

As stated in AVTP CVF payloader patch, AVTP timestamp is used to define
outgoing buffer DTS, while the H264_TIMESTAMP defines outgoing buffer
PTS.

When an AVTP packet is received, the extracted H.264 NAL unit is added to
a "stash" (the out_buffer) of H.264 NAL units. This "stash" is pushed
downstream as single buffer (with NAL units aggregated according to format
used on GStreamer, based on ISO/IEC 14496-15) as soon as we get the AVTP
packet with M bit set.

This patch groups NAL units using a fixed NAL size lenght, sent downstream
on the `codec_data` capability.

The "stash" of NAL units can be prematurely sent downstream if a
discontinuity (a missing SEQNUM) happens.

This patch reuses the infra provided by gstavtpbasedepayload.c.
2019-07-03 09:59:35 -07:00
Ederson de Souza
b056297eea avtp: Add fragmentation feature to CVF payloader
Based on `mtu` property, the CVF payloader is now capable of properly
fragmenting H.264 NAL units that are bigger than MTU in several AVTP
packets.

AVTP spec defines two methods for fragmenting H.264 packets, but this
patch only generates non-interleaved FU-A fragments.

Usually, only the last NAL unit from a group of NAL units in a single
buffer will be big enough to be fragmented. Nevertheless, only the last
AVTP packet sent for a group of NAL units will have the M bit set (this
means that the AVTP packet for the last fragment will only have the M
bit set if there's no more NAL units in the group).
2019-07-03 09:59:35 -07:00
Ederson de Souza
3b4f3a0b3f avtp: Introduce AVTP CVF payloader element
This patch introduces the AVTP Compressed Video Format (CVF) payloader
specified in IEEE 1722-2016 section 8. Currently, this payload only
supports H.264 encapsulation described in section 8.5.

Is also worth noting that only single NAL units are encapsulated: no
aggregation or fragmentation is performed by the payloader.

An interesting characteristic of CVF H.264 spec is that it defines an
H264_TIMESTAMP, in addition to the AVTP timestamp. The later is
translated to the GST_BUFFER_DTS while the former is translated to the
GST_BUFFER_PTS. From AVTP CVF H.264 spec, it is clear that the AVTP
timestamp is related to the decoding order, while the H264_TIMESTAMP is
an ancillary information to the H.264 decoder.

Upon receiving a buffer containing a group of NAL units, the avtpcvfpay
element will extract each NAL unit and payload them into individual AVTP
packets. The last AVTP packet generated for a group of NAL units will
have the M bit set, so the depayloader is able to properly regroup them.

The exact format of the buffer of NAL units is described on the
'codec_data' capability, which is parsed by the avtpcvfpay, in the same
way done in rtph264pay.

This patch reuses the infra provided by gstavtpbasepayload.c.
2019-07-03 09:59:35 -07:00
Andre Guedes
5abe516c6c avtp: Introduce AVTP source element
This patch introduces the avtpsrc element which implements a typical
network source. The avtpsrc element receives AVTPDUs encapsulated into
Ethernet frames and push them downstream in the GStreamer pipeline.
Implementation if pretty straightforward since the burden is implemented
by GstPushSrc class.

Likewise the avtpsink element, applications that utilize this element
must have CAP_NET_RAW capability since it is required by Linux to open
sockets from AF_PACKET domain.
2019-07-03 09:59:35 -07:00
Andre Guedes
37550226d8 avtp: Introduce AVTP sink element
This patch introduces the avtpsink elements which implements a typical
network sink. Implementation is pretty straightforward since the burden
is implemented by GstBaseSink class.

The avtpsink element defines three new properties: 1) network interface
from where AVTPDU should be transmitted, 2) destination MAC address
(usually a multicast address), and 3) socket priority (SO_PRIORITY).

Socket setup and teardown are done in start/stop virtual methods while
AVTPDU transmission is carried out by render(). AVTPDUs are encapsulated
into Ethernet frames and transmitted to the network via AF_PACKET socket
domain.  Linux requires CAP_NET_RAW capability in order to open an
AF_PACKET socket so the application that utilize this element must have
it. For further info about AF_PACKET socket domain see packet(7).

Finally, AVTPDUs are expected to be transmitted at specific times -
according to the GstBuffer presentation timestamp - so the 'sync'
property from GstBaseSink is set to TRUE by default.
2019-07-03 09:59:35 -07:00
Andre Guedes
6477884a56 avtp: Introduce AAF depayloader element
This patch introduces the AAF depayloader element, the counterpart from
the AAF payloader. As expected, this element inputs AVTPDUs and outputs
audio raw data and supports AAF PCM encapsulation only.

The AAF depayloader srcpad produces a fixed format that is encoded
within the AVTPDU. Once the first AVTPDU is received by the element, the
audio features e.g. sample format, rate, number of channels, are decoded
and the srcpad caps are set accordingly. Also, at this point, the
element pushes a SEGMENT event downstream defining the segment according
to the AVTP presentation time.

All AVTP depayloaders will share some common code. For that reason, this
patch introduces the GstAvtpBaseDepayload abstract class that implements
common depayloader functionalities. AAF-specific functionalities are
implemented in the derived class GstAvtpAafDepay.
2019-07-03 09:59:35 -07:00
Andre Guedes
1e985f02f4 avtp: Introduce AAF payloader element
This patch introduces the AVTP Audio Format (AAF) payloader element from
the AVTP plugin. The element inputs audio raw data and outputs AVTP
packets (aka AVTPDUs), implementing a typical protocol payloader element
from GStreamer.

AAF is one of the available formats to transport audio data in an AVTP
system. AAF is specified in IEEE 1722-2016 section 7 and provides two
encapsulation mode: PCM and AES3. This patch implements PCM
encapsulation mode only.

The AAF payloader working mechanism consists of building the AAF header,
prepending it to the GstBuffer received on the sink pad, and pushing the
buffer downstream. Payloader parameters such as stream ID, maximum
transit time, time uncertainty, and timestamping mode are passed via
element properties. AAF doesn't support all possible sample format and
sampling rate values so the sink pad caps template from the payloader is
a subset of audio/x-raw. Additionally, this patch implements only
"normal" timestamping mode from AAF. "Sparse" mode should be implemented
in future.

Upcoming patches will introduce other AVTP payloader elements that will
have some common code. For that reason, this patch introduces the
GstAvtpBasePayload abstract class that implements common payloader
functionalities, and the GstAvtpAafPay class that extends the
GstAvtpBasePayload class, implementing AAF-specific functionalities.

The AAF payloader element is most likely to be used with the AVTP sink
element (to be introduced by a later patch) but it could also be used
with UDP sink element to implement AVTP over UDP as described in IEEE
1722-2016 Annex J.

This element was inspired by RTP payloader elements.
2019-07-03 09:59:35 -07:00
Andre Guedes
eaeab383bb avtp: AVTP plugin bootstrap code
This patch introduces the bootstrap code from the AVTP plugin (plugin
definition and init) as well as the build system files. Upcoming patches
will introduce payloaders, source and sink elements provided by the AVTP
plugin. These elements can be utilized by a GStreamer pipeline to
implement TSN audio/video applications.

Regarding the plugin build system files, both autotools and meson files
are introduced. The AVTP plugin is landed in ext/ since it has an
external dependency on libavtp, an opensource AVTP packetization
library. For further information about libavtp check [1].

[1] https://github.com/AVnu/libavtp
2019-07-03 09:59:35 -07:00
Juan Navarro
d289608a99 dtlsagent: Clear the certificate upon finalize
Cleaning this up was likely just forgotten
2019-06-25 20:37:57 +02:00
Juan Navarro
8317112883 dtlsdec: Avoid duplicate ref when passing certificate property
The agent itself will take a ref on the property setter, so we'll be
left with two references to the certificate object, when actually there
should be only one
2019-06-25 20:37:38 +02:00
Philippe Normand
3811d13269 wpe: Port for WPEWebKit 2.25.x
When WPEBackend-fdo >= 1.3.0 is detected, the threaded view now relies on the
wpe_fdo_egl_exported_image API instead of the EGLImageKHR-based API which is
going to be deprecated in 2.26. The GLib sources created by the view now use the
default priority as well, the custom priority is no longer required.
2019-06-25 10:16:25 +00:00
Matthew Waters
ec9ea06591 vkswapper: support rescaling to the output size 2019-06-24 16:23:29 +10:00
Matthew Waters
35325fdffb vksink: Don't take vulkan buffer's as input 2019-06-24 16:23:29 +10:00
Philippe Normand
36de11520e webrtc: Fix data-channel send-string doc 2019-06-23 17:03:32 +01:00
Matthew Waters
dcff70d6bf vulkan: remove unused downsample AYUV shader 2019-06-20 05:44:47 +00:00
Mathieu Duponchelle
9023ac1c95 webrtcbin: fix DTLS when receivebin is set to DROP
Regression introduced by b4bdcf15b7

This commit prevents the handshake from reaching dtlsdec when
the receive state of the receive bin is set to DROP (for example
when transceivers are sendonly).

This preserves the intent of the commit, by blocking the bin
at its sinks until the receive state is no longer BLOCK, but
makes sure the handshake still goes through, by only dropping
data at the src pads, as was the case before.
2019-06-19 18:04:14 +00:00
Matthew Waters
d43fea06c5 vkcolorconvert: add support for RGB<->NV12 2019-06-20 01:41:56 +10:00
Matthew Waters
0cb416db11 vkbuffermemory: report requested size of the memory
Rather than using Vulkan's much larger aligned sizes. Fixes multi-planer
video with the GstVideoFrame API.
2019-06-20 01:41:56 +10:00
Matthew Waters
2180fbb498 vulkancolorconvert: support RGB <-> AYUV/YUY2/UYVY 2019-06-20 01:41:56 +10:00
Matthew Waters
dbf60a1738 vktrash: add mini_object_unref destroy function 2019-06-20 01:41:56 +10:00
Matthew Waters
b93de8b0d8 vkfullscreenrender: create descriptor sets later
The desciptor sets may be dependant on the caps
2019-06-20 01:41:56 +10:00
Matthew Waters
2e34dd891d vulkan/shaders: change glslc compilation args based on configurations
Add depfile support so that modifying an #included glsl snippet
rebuilds all the dependant shaders.
2019-06-20 01:41:56 +10:00
Matthew Waters
5363b30f6c vulkan: add a color conversion element
Currently converts between all 4-component RGBA/RGBx formats.
2019-06-20 01:41:56 +10:00
Matthew Waters
31728880fe vkupload: Also implement copying non vulkan memory into vulkan buffers
The only way we can upload things is through our memory so any
non-vulkan memory that appears must be copied into our memory.
2019-06-20 01:41:56 +10:00
Matthew Waters
3fef510c48 vulkan: add download element
Currently only downloads images into a host-visible buffer and
synchronises immediately.
2019-06-20 01:41:56 +10:00
Matthew Waters
dc0c9dea7f vulkan/identity: Split out most rendering code to a base class
A simple base class that renders a 2d fullscreen quad parallel to the
screen surface inside the view frustum.
2019-06-20 01:41:56 +10:00
Matthew Waters
773e914f48 vkupload: fix a structure sType 2019-06-20 01:41:56 +10:00
Matthew Waters
db617a98ad vksink: Retrieve vulkan queue earlier
Allows using the swapper's queue over upstream's queue.  The swapper
will check for the necessary presentation support that upstream may not
consider.
2019-06-20 01:41:56 +10:00
Sebastian Dröge
5ed27c12cc zbar: Include running-time, stream-time and duration in the messages
The timestamp/PTS alone is meaningless without the segment and usually
applications care about the running-time or stream-time.

This also keeps the messages in sync with the spectrum and level
elements.
2019-06-19 13:31:39 +03:00
Seungha Yang
e779160434 tests: Enable hls m3u8 unit test with meson build 2019-06-18 07:14:28 +00:00
Seungha Yang
48657bf846 hlsdemux: Set fragment header uri if exists
To allow downloading fragment hearder, set its uri if there is
available "Media Initialization" parsed from EXT-X-MAP tag

https://bugzilla.gnome.org/show_bug.cgi?id=776928
2019-06-18 07:14:28 +00:00
Seungha Yang
f9dc67c372 hls: m3u8: Parsing EXT-X-MAP tag to store initialization data
EXT-X-MAP tag informs media initialization data,
such as moov box in ISOBMFF case and PAT/PMT for MPEG TS stream.

https://bugzilla.gnome.org/show_bug.cgi?id=776928
2019-06-18 07:14:28 +00:00
Seungha Yang
b45dd51fb1 hlsdemux: Do not clear/advance fragment by finished header downloading
Header data must be forwarded to downstream, but if demux does not finish
to finding type (e.g., ts, mp4 and etc), this header data can be cleared
by _stream_clear_pending_data(). Moreover, although demux finish downloading
header data, still it has fragment date to be downloaded, fragment sequence
shouldn't be advanced yet at that moment.

https://bugzilla.gnome.org/show_bug.cgi?id=776928
2019-06-18 07:14:28 +00:00
Philippe Normand
5105bc8041 wpe: Fix build with -Werror enabled
Including gl.h from WPEThreadedView.h leads to GST_LEVEL_DEFAULT detected as
redefined. The proposed fix is to include config.h from the CPP implementation
file and disable gl.h inclusion in the header, by using forward declarations.
2019-06-05 12:47:16 +01:00
Matthew Waters
f33310df56 vkupload: remove debugging error log 2019-06-04 09:03:44 +00:00
Matthew Waters
ac09f88eb9 vulkan: implement the correct memory barriers necessary
Vulkan validation layers are finally silent!
2019-06-04 09:03:44 +00:00
Matthew Waters
1230a6c723 vulkan: remove uneeded buffer inheritence information
buffer inheritence informationi is only required for secondary command
buffers which we are not creating
2019-06-04 09:03:44 +00:00
Matthew Waters
9593e4e8bb vulkan: add a new image copying element
Copies using the graphics pipeline, an input image and renders to an
output image.
2019-06-04 09:03:44 +00:00
Matthew Waters
80cbbb319d vkupload: add raw->vulkanimage uploader 2019-06-04 09:03:44 +00:00
Matthew Waters
ca38c2f25e vktrash: add more destruction of vulkan types 2019-06-04 09:03:44 +00:00
Matthew Waters
d61e771c37 vulkan: use c99 designated initializers where possible
Makes the code much easier to read and allows removing our terrible
macros for structure initialization.
2019-06-04 09:03:44 +00:00
Matthew Waters
b02493091b vkswapper: support displaying memory:VulkanImage 2019-06-04 09:03:44 +00:00
Matthew Waters
673d775df0 vkupload: implement buffer to image uploader 2019-06-04 09:03:44 +00:00
Matthew Waters
f351f3a759 vulkansink: Respond to queue queries 2019-06-04 09:03:44 +00:00
Matthew Waters
32d217a9df vulkan: add a command pool object for tracking 2019-06-04 09:03:44 +00:00
Matthew Waters
2d0cab20c0 vkswapper: don't output duplicate formats 2019-06-04 09:03:44 +00:00
Matthew Waters
25dd3b32e5 vulkan: make a gstvulkan library out of the existing API 2019-06-04 09:03:44 +00:00
Matthew Waters
8def3b3743 vkbufferpool: Fix multiplaner allocations
Use the plane width/height and the sizes required by vulkan

Fixes allocation of:
videotestsrc ! video/x-raw,format=I420 ! vulkanupload ! fakesink
2019-06-04 09:03:44 +00:00
Matthew Waters
268dfcaad9 vk*memory: explicitly error out for driver NPOT alignment 2019-06-04 09:03:44 +00:00
Matthew Waters
0526310a95 vulkan/image: initialize the requirements struct before using it 2019-06-04 09:03:44 +00:00
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
Alex Ashley
dbe0a8cbc3 curlhttpsrc: set BUFFER_OFFSET when creating GstBuffer
To make curlhttpsrc behave more like souphttpsrc, set the
BUFFER_OFFSET in its output buffers to match the segment
start. This means that in a HTTP RANGE request, the BUFFER_OFFSET
will match the value in the RANGE request.
2019-02-19 17:55:13 +00:00
Alex Ashley
2d806477d0 curlhttpsrc: export same HTTP error status as souphttpsrc
To make it closer to a drop-in replacement for souphttpsrc,
expose the same gst_error_message_with_details as souphttpsrc,
so that applications can received the HTTP status code and reason
when an error occurs.
2019-02-19 17:55:12 +00:00
Alex Ashley
c2fe4e58ad curlhttpsrc: fix various leaks and thread safety issues
curlhttpsrc uses a single thread running the
gst_curl_http_src_curl_multi_loop() function to handle receiving
data and messages from libcurl. Each instance of curlhttpsrc adds
an entry into a queue in GstCurlHttpSrcMultiTaskContext and waits
for the multi_loop to perform the HTTP request.

Valgrind has shown up race conditions and memory leaks:
1. gst_curl_http_src_change_state() does not wait for the multi_loop
   to complete before going to the NULL state, which means that
   an instance of GstCurlHttpSrc can be released while
   gst_curl_http_src_curl_multi_loop() still has a reference to it.
2. if multiple elements try to be removed from the queue at once,
   only the last one is deleted.
3. source->caps is leaked
4. curl multi_handle is leaked
5. leak of curl_handle if URI not set
6. leak of http_headers when reusing element
7. null pointer dereference in negotiate caps
8. double-free of the default user-agent string
9. leak of multi_task_context.task

This commit changes the logic so that each element has a connection
status, which is used by the multi_loop to decide when to remove an
element from its queue. An instance of curlhttpsrc will not enter
the NULL state until its reference has been removed from the queue.

When shutting down the curl multi loop, the memory allocated from the
call to curl_multi_init() is now released.

When gstadaptivedemux uses a URI source element, it will re-use
it for multiple requests, moving it between READY and PLAYING
between each request. curlhttpsrc was leaking the http_headers
structure in this use case.

The gst_curl_http_src_negotiate_caps() function extracts the
"response-headers" field from the http_headers, but did not check
that this field might be NULL.

If the user-agent property is set, the global user-agent string
was freed. This caused a double-free error if the user-agent is
ever set a second time during the execution of the process.

There are situations within curlhttpsrc where the code needs
both the global multi_task_context mutex and the per-element
buffer_mutex. To avoid deadlocks, it is vital that the order in
which these are requested is always the same. This commit modifies
the locking order to always be in the order:
 1. multi_task_context.task_rec_mutex
 2. buffer_mutex

Fixes #876
2019-02-19 17:55:12 +00:00
Nirbheek Chauhan
81fd48bcb5 closedcaption: Use portable variadic macro syntax
args... is not understood by MSVC:

error C2010: '.': unexpected in macro parameter list
2019-02-15 23:50:11 +05:30
Nirbheek Chauhan
a4323638b3 closedcaption: Port plugin to MSVC
pthread is not portable, so we can't use a pthread mutex use GMutex
instead.
2019-02-15 23:39:35 +05:30
Daniel Stone
68fa80e831 waylandsink: Don't create throwaway empty regions
Instead of creating a region, adding nothing to it, setting that as the
input region and destroying the region, you can instead just pass NULL
to wl_surface_set_input_region for the same effect.

Fixes #702
2019-02-15 12:03:48 +00:00
Matthew Waters
2a1176973a webrtc: fix rtx + bundle
If bundle was used in combination with rtx, only the bundled transport
stream would have correctly configured rtx parameters.

Iterate over the payloads upfront in the bundled case to ensure the
correct payload mapping is set for the RTX elements.
2019-02-15 08:19:51 +00:00
Edward Hervey
06b18defc7 dtls: Don't abort on non-fatal issues
OpenSSL will take care of returning valid context if there are
only non-fatal issues. Don't abort in those cases and instead just
print out the issues

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/811
2019-02-13 17:48:46 +00:00
Jan Alexander Steffens (heftig)
3bc9bd2b99
fdkaacenc: Fix draining with libfdk-aac v2.0.0
This release requires all buffer descriptor pointers to be valid, even
when we provide zero input buffers.
2019-02-13 16:12:03 +01:00
Sebastian Dröge
8006979109 ccconverter: Don't output empty buffers 2019-02-12 14:38:40 +02:00
Justin Kim
e8fd000af0 srt: re-enable passphrase
With refactoring, supporting passphrase was removed accidently.
This commit re-enables srt encryption and validates 'passphrase'
by checking the return value of 'srt_setsockopt'.

fix: #694
2019-02-11 23:40:02 +00:00
Seungha Yang
f1d5f1faab openh264dec: Fix build with msvc
Fix following build error
../subprojects/gst-plugins-bad/ext/openh264/gstopenh264dec.cpp(76): error C2121:

Note that msvc usually complains #if inside macro
2019-02-11 21:21:52 +09:00
Nirbheek Chauhan
fffb2aa12f misc: Fix warnings on Cerbero MinGW
gstladspa.c:360:5: error: zero-length ms_printf format string [-Werror=format-zero-length]

vad_private.c:108:3: error: this decimal constant is unsigned only in ISO C90 [-Werror]

gstdecklinkvideosink.cpp:478:32: error: comparison between 'BMDTimecodeFormat {aka enum _BMDTimecodeFormat}' and 'enum GstDecklinkTimecodeFormat' [-Werror=enum-compare]

win/DeckLinkAPI_i.c:72:8: error: extra tokens at end of #endif directive [-Werror]

win/DeckLinkAPIDispatch.cpp:35:10: error: unused variable 'res' [-Werror=unused-variable]

gstwasapiutil.c:733:3: error: format '%x' expects argument of type 'unsigned int', but argument 8 has type 'DWORD' [-Werror=format]
gstwasapiutil.c:733:3: error: format '%x' expects argument of type 'unsigned int', but argument 9 has type 'guint64' [-Werror=format]

kshelpers.c:446:3: error: missing braces around initializer [-Werror=missing-braces]
kshelpers.c:446:3: error: (near initialization for 'known_property_sets[0].guid.Data4') [-Werror=missing-braces]
2019-02-06 00:10:28 +05:30
Nicola Murino
1a96759a34 opencv cameraundistort: use G_GNUC_UNUSED for better portability 2019-02-02 18:34:10 +00:00
Nicola Murino
06d1b751ad opencv: remove deprecated headers
are not needed anymore
2019-02-02 18:34:10 +00:00
Nicola Murino
26cabf9b1f opencv: port to c++ 2019-02-02 18:34:10 +00:00
Jan Schmidt
19382f1e91 openh264: Conditionally support the main and high profiles
openh264 added main/high profile support upstream after the 1.8.0
release, so detect a version higher than that and support main/high
stream input
2019-01-30 14:53:02 +11:00
Jan Schmidt
40de7e5b98 openh264: Use DecodeFrameNoDelay() API instead of DecodeFrame2
Replace legacy usage of DecodeFrame2 API in favour of the
recommended DecodeFrameNoDelay()

This fixes problems with DecodeFrame2() not (currently) returning
all frames in main/high streams with B-frames, and reduces latency -
previously openh264 would not return a decoded frame until the next
call to DecodeFrame2(). DecodeFrameNoDelay() returns them immediately.
2019-01-30 14:53:02 +11:00
Jan Schmidt
278cd35695 openh264dec: Hook up openh264 messages to GStreamer logging
Use the OpenH264 callback to pass Openh264 internal warning/error
messages through the GStreamer logging framework
2019-01-30 14:53:02 +11:00
Jan Schmidt
d4594c5c75 openh264dec: Handle B frame decoding
Support out-of-order decoding in OpenH264 by tracking
our internal frame reference in the OpenH264 timestamp
field.

Drain any pending frames at EOS.
2019-01-30 14:53:02 +11:00
Jan Schmidt
e75e637531 Add OpenH264 version check macro 2019-01-30 14:43:22 +11:00
Jan Schmidt
984b150e65 openh264dec: Fix up EOS handling
If the last frame(s) produce errors, then we need to drop them
or else we spin forever failing to decode a frame and thinking
it'll get better if we wait for more data that's never coming.
2019-01-30 03:00:49 +11:00
Yeongjin Jeong
52e4a20b4e fdkaacdec: Fix build for fdkaac < 0.1.4
The fdkaac decoder supports 6.1 / 7.1 channels with downmixer
since v0.1.4. Old versions can use AAC_PCM_OUTPUT_CHANNELS
instead of AAC_PCM_MAX_OUTPUT_CHANNELS.

Fixes #873
2019-01-25 15:50:31 -05:00
Mathieu Duponchelle
85c75bb23b webrtc: expose ice-transport-policy property
This is the equivalent of iceTransportPolicy in the RTCConfiguration
dictionary.

Only two values are implemented:

* all: default behaviour
* relay: only gather relay candidates

The third member of the iceTransportPolicy enum, "public", is
obsolete.
2019-01-23 22:47:51 +00:00
Olivier Crête
73c6530d40 srt: Accepts URIs without host to go into listener mode
Just setting a URI without a hostname should directly go into listener mode.
2019-01-23 19:14:30 +00:00
Olivier Crête
5fee3a87c1 srt: Fix GClosure usage
One needs to set a marshaller as well as use the object setter when
setting objects.
2019-01-23 19:14:30 +00:00
Philippe Normand
c34cd8c5e0 wpesrc: Plug WPE's exportable leak 2019-01-22 11:52:30 +00:00
Philippe Normand
c357e12118 wpe: Add autotools build support 2019-01-22 11:13:13 +00:00
Justin Kim
dc28105220 srt: Use default host and port if uri doesn't provide 2019-01-22 18:26:01 +09:00
Justin Kim
2bb907eb9c srt: Enable logs for srtobject 2019-01-22 12:44:07 +09:00
Justin Kim
f63643fcbf srt: Fix property names
Property name and its enum should match.
2019-01-22 12:42:47 +09:00
Justin Kim
b8610e72de srt: Fix a regression crash
Even in case that srt is working as a caller mode, uri can have no
hostname or ip address.

fix: #874
2019-01-22 11:35:03 +09:00
Tim-Philipp Müller
dd4359d296 srt: dist enums header 2019-01-16 13:48:51 +00:00
Jan Alexander Steffens (heftig)
7a01e9a8cb
srt: Fix autotools build
0a350c610d broke the build by only
building enum types with meson. It also removed gstsrt.c from the list
of sources, causing the plugin to fail to load.

squash! srt: Fix autotools build
2019-01-14 16:01:40 +01:00
Jan Alexander Steffens (heftig)
484291b1b4
srt: Fix GCC function type error
gstsrtobject.c: In function ‘gst_srt_object_close’:
gstsrtobject.c:1036:7: error: function called through a non-compatible type [-Werror]
       (GDestroyNotify) g_closure_unref);
/usr/include/glib-2.0/glib/gmem.h:121:8: note: in definition of macro ‘g_clear_pointer’
       (destroy) (_ptr);                                                        \
        ^~~~~~~
gstsrtobject.c:1038:7: error: function called through a non-compatible type [-Werror]
       (GDestroyNotify) g_closure_unref);
/usr/include/glib-2.0/glib/gmem.h:121:8: note: in definition of macro ‘g_clear_pointer’
       (destroy) (_ptr);                                                        \
        ^~~~~~~

Arch Linux
gcc 8.2.1 20181127
glib 2.58.2
2019-01-14 14:48:50 +01:00
Justin Kim
0a350c610d srt: Integrate server and client element into one
We have srt{client,server}{src,sink} elements in accordance to the
norm of the connection oriented protocols. However, SRT connection
mode can be changed by uri parameters so it requires an integrated
element to handle the parameters.

fix: #740
2019-01-09 19:44:02 +00:00
Tim-Philipp Müller
9eb7f7cbc7 webrtc: include stdlib.h for atoi()
Fixes #857
2018-12-31 12:09:42 +00:00
Tim-Philipp Müller
88683e5a1e Remove openglmixers plugin, moved to -base
Merged into the existing opengl plugin in -base.
2018-12-28 13:48:29 +01:00
Tim-Philipp Müller
b9e15fddb1 Remove GstVideoAggregator, moved into libgstvideo in -base
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/137
2018-12-26 19:06:33 +01:00
Tim-Philipp Müller
ae194e99d9 opencv: fix disting of new header files
Fixes distcheck.
2018-12-25 16:58:40 +01:00
Justin Kim
2faa08ff28 openal: Fix AL header path for Mac OS X
OpenAL.framework doesn't provide 'alext.h'.
Thus, openal is enabled only if the dependency
is set by pkg-config.

fixes: #852
2018-12-25 00:42:31 +09:00
Matthew Waters
b4bdcf15b7 webrtc/receive-bin: block pads before dtlssrtpdec:
Fixes SSL errors in fast-start scenarios and whenever media stream may
be received before an answer is set.
2018-12-19 00:44:06 +00:00
Matthew Waters
26a5cbddbb webrtcbin: only change the receive state after setting the dtls-client
Doing so before will cause SSL errors with fast-start implementations
like Chrome or if media data arrives before an answer.
2018-12-19 00:44:06 +00:00
Matthew Waters
0a3f662ed6 webrtc: A couple of documentation fixes
set-*-description only takes the combined GstWebRTCSessionDescription
object
2018-12-19 00:44:06 +00:00
Sebastian Dröge
39381643c8 closedcaption: Add ccconverter element that can convert between different types of Closed Caption formats 2018-12-19 00:19:39 +02:00
Tim-Philipp Müller
da7cf85e3c meson: fix opencv=disabled case if opencv is available on the system
ext/opencv/meson.build:103:2: ERROR:  Unknown variable "gstopencv_dep".
2018-12-17 18:58:52 +00:00
Tim-Philipp Müller
a26cce1833 meson: wildmidi detection fixes
Need at least 0.4.2 apparently.

ext/wildmidi/meson.build:11:2: ERROR:  String '' cannot be converted to int
2018-12-17 17:11:00 +00:00
Jonathan Karlsson
d49bc71f00 curlhttpsink: free content type before assigning it
Not doing this would result in a memory leak.
2018-12-17 15:56:08 +00:00
Jonathan Karlsson
e8ec1c0143 curlbasesink: cleanup transfer immediately when done 2018-12-17 14:24:07 +00:00
Jan Alexander Steffens (heftig)
f964fb38b6 fdkaac: Syntax tweaks to increase readability
Mostly move some assignments out of conditionals that gst-indent
completely destroys.
2018-12-17 12:39:13 +00:00
Jan Alexander Steffens (heftig)
c5a17000b6 fdkaacdec: Enable 8-channel playback
The decoder seems to default to 6 channels max, downmixing 7.1 to 5.1.
Disable the channel limit to expose all channels to GStreamer.

In addition, none of the standard configurations use ACT_SIDE channels.
The rear channels of the 7.1 configuration have to be taken from
ACT_BACK. See the table in aacenc_lib.h, reproduced here:

----------------------------------------------------------------------------------------
 ChannelMode           | ChCfg | Height | front_El      | side_El  | back_El  | lfe_El
-----------------------+-------+--------+---------------+----------+----------+---------
MODE_1                 |     1 | NORM   | SCE           |          |          |
MODE_2                 |     2 | NORM   | CPE           |          |          |
MODE_1_2               |     3 | NORM   | SCE, CPE      |          |          |
MODE_1_2_1             |     4 | NORM   | SCE, CPE      |          | SCE      |
MODE_1_2_2             |     5 | NORM   | SCE, CPE      |          | CPE      |
MODE_1_2_2_1           |     6 | NORM   | SCE, CPE      |          | CPE      | LFE
MODE_1_2_2_2_1         |     7 | NORM   | SCE, CPE, CPE |          | CPE      | LFE
MODE_6_1               |    11 | NORM   | SCE, CPE      |          | CPE, SCE | LFE
MODE_7_1_BACK          |    12 | NORM   | SCE, CPE      |          | CPE, CPE | LFE
-----------------------+-------+--------+---------------+----------+----------+---------
MODE_7_1_TOP_FRONT     |    14 | NORM   | SCE, CPE      |          | CPE      | LFE
                       |       | TOP    | CPE           |          |          |
-----------------------+-------+--------+---------------+----------+----------+---------
MODE_7_1_REAR_SURROUND |     0 | NORM   | SCE, CPE      |          | CPE, CPE | LFE
MODE_7_1_FRONT_CENTER  |     0 | NORM   | SCE, CPE, CPE |          | CPE      | LFE
----------------------------------------------------------------------------------------
- NORM: Normal Height Layer.     - TOP: Top Height Layer.  - BTM: Bottom Height Layer.
- SCE: Single Channel Element.   - CPE: Channel Pair.      - LFE: Low Frequency Element.

Restores 8 channels to
https://www2.iis.fraunhofer.de/AAC/7.1auditionOutLeader_v2_rtb.mp4
2018-12-17 12:39:13 +00:00
Jan Alexander Steffens (heftig)
4ec3f2f193 fdkaacenc: Add support for v2.0.0 and its configurations
These are MPEG-standard configurations so should be checked first,
before the PCE clones added by v0.1.4.
2018-12-17 12:39:13 +00:00
Jan Alexander Steffens (heftig)
bc3c5ea7b1 fdkaacenc: Add support for MPEG configuration 7 2018-12-17 12:39:13 +00:00
Jan Alexander Steffens (heftig)
3a9f5a76e8 fdkaacenc: Add a description of each configuration 2018-12-17 12:39:13 +00:00
Jan Alexander Steffens (heftig)
383fe6f81d fdkaacenc: Prefer REAR for surround channels
We (currently?) prefer to use the REAR positions for what MPEG calls
"surround" channels.
2018-12-17 12:39:13 +00:00
Tim-Philipp Müller
d3f174f77f Remove daala plugin
Not so useful now that all effort is focused on AV1 instead.
Was only ever enabled with --enable-experimental anyway.

Fixes #848
2018-12-17 12:03:09 +00:00
Sebastian Dröge
38be1fb2db meson: Add libsinc to the CFLAGS
Otherwise gst-i18n-plugin.h can't be found.
2018-12-17 12:30:27 +02:00
Tim-Philipp Müller
2e6510b9e2 meson: build openni2 plugin 2018-12-17 09:12:53 +00:00
Tim-Philipp Müller
094478d248 meson: build openmpt plugin 2018-12-17 09:12:53 +00:00
Tim-Philipp Müller
79d8855d87 meson: build openexr plugin 2018-12-17 09:12:53 +00:00
Tim-Philipp Müller
c23a1dc2b6 meson: build openal plugin 2018-12-17 09:12:53 +00:00
Tim-Philipp Müller
dd529d0f5d meson: build sndfile plugin 2018-12-17 09:12:53 +00:00
Tim-Philipp Müller
0be8a5f8f4 meson: build voamrwbenc plugin 2018-12-17 09:12:53 +00:00
Tim-Philipp Müller
986f6cac45 meson: build teletext plugin 2018-12-17 09:12:53 +00:00
Tim-Philipp Müller
cbf746782b meson: build modplug plugin 2018-12-17 09:12:53 +00:00
Tim-Philipp Müller
4130b08776 meson: build wildmidi plugin 2018-12-17 09:12:53 +00:00
Tim-Philipp Müller
56c65afff4 meson: build dc1394 plugin 2018-12-17 09:12:53 +00:00
Tim-Philipp Müller
d7b7f2a9a5 meson: build ofa plugin 2018-12-17 09:12:53 +00:00
Tim-Philipp Müller
7c69abd918 meson: build gme plugin 2018-12-17 09:12:53 +00:00
Tim-Philipp Müller
ee7e3f7bc7 Remove spc plugin
Replaced by gme plugin. Fixes #467
2018-12-16 23:35:58 +00:00
Sebastian Dröge
aa72783b95 closedcaption: Use new API for converting GstVideoCaptionType from/to GstCaps 2018-12-15 21:31:28 +00:00
Sebastian Dröge
48f48cc4ba closedcaption: Replace GST_VIDEO_CAPTION_TYPE_CEA608_IN_CEA708_RAW with CEA608_S334_1A
As a side-effect we can now actually store the line offset in the
line21dec element, and have to perform fewer transformations in the
decklink elements (which were also buggy as they assumed a single byte
triplet per meta).
2018-12-15 21:31:28 +00:00
Sebastian Dröge
f9e4ed99b0 line21dec: If CCs are not found at the previous line, reset and search from the beginning again 2018-12-15 21:31:28 +00:00
Sebastian Dröge
36ba1e80b6 line21dec: Don't read more lines than the height of the frame 2018-12-15 21:31:28 +00:00
Wonchul Lee
2ae381e2a3 waylandsink: Avoid race condition on multi-threaded client
When waylandsink is used on some other thread than the main wayland
client thread, the waylandsink implementation is vulnerable to a

condition related to registry and surface events which handled in
seperated event queue.

The race that may happen is that after a proxy is created, but
before the queue is set, events meant to be emitted via the yet to

set queue may already have been queued on the wrong queue.

Wayland 1.11 introduced new API that allows creating a proxy
wrappper which can help to avoid this race condition.
2018-12-13 17:20:04 +00:00
Sebastian Dröge
98b2c705c4 ccextractor: Copy over timecode meta from the input buffers to the outgoing caption buffers
Formats like SCC and MCC work based on timecodes so ideally we pass
through the timecodes when writing them.
2018-12-06 16:06:05 +00:00
Sebastian Dröge
f0571a94fb ccextractor: Include framerate in the closedcaption caps
It depends on the framerate how many cc_data byte pairs are allowed per
frame, and the framerate is also needed for converting into the CDP or
MCC format as the framerate is part of the header metadata.
2018-12-06 16:06:05 +00:00
Patricia Muscalu
e0adbee49a curlbasesink: Rename curl transfer thread
Some systems restrict the length of thread names to 16 bytes.

https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/838
2018-12-06 15:36:47 +00:00
Philippe Normand
5b8935bc77 wpe: Add a source element acting as a Web Browser based on WebKit WPE
The wpe element is used to produce a video texture representing a web page
rendered off-screen by WPE. This element can be used to overlay HTML on top of
another video stream for instance.
2018-12-06 12:38:52 +00:00
Jonathan Karlsson
b025736899 curlhttpsink: Enable content type changes
Makes it possible to change content type without having to
reinitialize the element, typically after reset.

https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/merge_requests/41
2018-12-06 09:08:59 +00:00
Jan Alexander Steffens (heftig)
19d34f6b5e fdkaacdec: Use WAV channel mapping instead of interleave setting
The latter is going away in libfdk-aac 2.0.0. Instead, MPEG-style output
is always non-interleaved and WAV-style output is always interleaved.
Earlier libfdk-aac also defaults interleaving accordingly.

Since our reordering looks at the associated PCE indices instead of the
actual channel order, we're agnostic to the mapping.

For https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/825
2018-12-05 21:50:03 +00:00
Jan Alexander Steffens (heftig)
f4fdb9770c fdkaacenc: Remove MODE_2_1
This is not a standard mode and no longer supported by fdk-aac 2.0.0.

For https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/825
2018-12-05 21:50:03 +00:00
Nirbheek Chauhan
9504fc7174 meson: Add missing gio dep to webrtcbin plugin
It's usually pulled in implicitly through gstsdp_dep, but it's
actually a private dependency there. Fixes a build failure on Windows
with newer Meson.
2018-12-05 19:58:44 +05:30
Tim-Philipp Müller
4f935e1e7f cc708overlay: fix deadlock
We would forget to unlock when a caption data buffer is deemed
out of segment, which makes everything lock up next time buffers
are received.
2018-11-29 11:24:39 +00:00
Jordan Petridis
1f562870ee Run gst-indent through the files
This is required before we enabled an indent test in the CI.

https://gitlab.freedesktop.org/gstreamer/gstreamer-project/issues/33
2018-11-28 14:18:26 +00:00
Seungha Yang
2c81a50c2c hlssink2: Fix string leak
Need to free allocated string memory on _finalize()
2018-11-27 16:08:17 +09:00
Nicola Murino
24d5c9b200 opencv: define CASCADE_DO_CANNY_PRUNING for opencv < 4 2018-11-26 13:29:03 +00:00
Nicola Murino
b0773c6ea7 opencv: make compatible with opencv 4
Closed #826
2018-11-26 13:29:03 +00:00
Nicola Murino
890dbb560f opencv: fix indentation 2018-11-26 13:29:03 +00:00
Matthew Waters
57a006d8a5 tests/webrtc: use the existing functions in the plugin
Instead of redefining our own, use the function implementations in
webrtcsdp.c and utils.c
2018-11-26 17:13:08 +11:00
Matthew Waters
14ee6f9d35 webrtc: fix typo in RTCRemoteOutboundRTPStreamStats 2018-11-26 16:21:58 +11:00
Matthew Waters
a42fdbb012 webrtc: add a few comments on bundle and src pad exposure 2018-11-26 16:21:19 +11:00
Matthew Waters
6f91a191de webrtcbin: factor out dtls fingerprint setting 2018-11-26 16:20:02 +11:00
Matthew Waters
3a2566c61f webrtc: remove extra 'pad' from log line 2018-11-26 16:12:03 +11:00
Matthew Waters
5ecca0bb22 webrtc: move some functions to the appropriate files 2018-11-26 16:07:57 +11:00
Harshad Khedkar
9ad618e487 Webrtcbin : Need to use 'host' from gst_uri_get_host s libnice agent expects it
Currently master code of gst1-plugins-bad use plain-string host name while passing it to
libnice agent: nice_agent_set_relay_info() in gstwebrtcice.c while adding turn_server(_add_turn_server).

It is observered that if we don't convert the host parameter by using gst_uri_get_host, it fails in libnice agent(0.1.14-1).

Code does, actually, set the host correctly but while passing params to nice_agent_set_relay_info, it uses incorrect one.

https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/823
2018-11-22 18:47:13 +05:30
Rosen Penev
29d48ce8a1 dtls: Fix compilation without deprecated APIs on OpenSSL 1.1.x 2018-11-14 14:55:37 -08:00
Justin Kim
e76c61d74c cameracalibrate: Fix build error on Mac OSX
It fails to build only on Mac OSX with the following error.

In file included from ../subprojects/gst-plugins-bad/ext/opencv/gstopencv.cpp:45:
../subprojects/gst-plugins-bad/ext/opencv/gstcameracalibrate.h:96:38: error: a space is required between consecutive right angle brackets (use '> >')
  std::vector<std::vector<cv::Point2f>> imagePoints;
                                     ^~
                                     > >
1 error generated.

Fix: #817
2018-11-13 18:23:19 +09:00
Matthew Waters
c78f81f410 build: link against the gnustl dependency on android for c++ plugins 2018-11-12 21:37:07 +11:00
Olivier Crête
75d4ede815 srtpenc: Add support for adding a MKI
https://bugzilla.gnome.org/show_bug.cgi?id=797305
2018-11-09 15:08:05 -05:00
Olivier Crête
46b5756d30 srtpdec: Add support for MKI
Add support for MKIs which allow multiple keys to be used with a single SRTP stream.

https://bugzilla.gnome.org/show_bug.cgi?id=797305
2018-11-09 15:06:27 -05:00
Jan Alexander Steffens (heftig)
84d3f58c4a
dtls: Link against winsock2 on Windows
Should fix the Windows build after
b1509b1047.
2018-11-06 18:48:44 +01:00
Jan Alexander Steffens (heftig)
b1509b1047 dtlsconnection: Print out errno info for syscall errors
As suggested in [the SSL_get_error manpage][1]. Upgrade the message to a
warning if the errno isn't 0 (success). The latter apparently means the
transport encountered an EOF (shutdown) without the shut down handshake
on the (D)TLS level. This happens quite often for otherwise normal DTLS
connections.

[1]: https://www.openssl.org/docs/man1.1.1/man3/SSL_get_error.html
2018-11-06 16:23:50 +00:00
Andreas Frisch
51f0307900 dtls: Properly display all errors/warnings from ERR queue
Print out all errors from the OpenSSL error queue instead of just
looking at the topmost error. Using the callback interface also removes
the need for formatting using a buffer on the stack.
2018-11-06 16:23:50 +00:00
Jan Alexander Steffens (heftig)
7bb6ce352b dtlsconnection: Replace if-else chain with switch
A more idiomatic construct for testing a bunch of integers.
2018-11-06 16:23:50 +00:00
Jan Alexander Steffens (heftig)
49cc7b8091 dtlsconnection: Clear error queue before SSL_do_handshake
As documented on [the SSL_get_error manpage][1] we need to empty the
error queue before making any call that we check with SSL_get_error.

[1]: https://www.openssl.org/docs/man1.1.1/man3/SSL_get_error.html
2018-11-06 16:23:50 +00:00
Jan Alexander Steffens (heftig)
fa92909d0d dtlsconnection: Lower BIO error log level to DEBUG
Periodic SSL_ERROR_SYSCALL errors with errno == 0 seem to be normal
behavior for DTLS connections.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/677
2018-11-06 16:23:50 +00:00
Jan Alexander Steffens (heftig)
a9b9994738 dtlsconnection: Run gst-indent 2018-11-06 16:23:50 +00:00
Sebastian Dröge
eb92865ea1 cccombiner: Add new closed caption combiner element
This is the inverse of ccextractor: it takes a video and closed caption
stream and places the closed caption metas on the video output buffers.
2018-11-06 16:21:42 +00:00
Sebastian Dröge
7ba9493ff1 ccextractor: Handle multiple caption metas per buffer 2018-11-06 16:21:06 +00:00
Tim-Philipp Müller
247cd2113e webrtc: update default libnice options
Uses feature options now.
2018-11-02 20:16:56 +00:00
Sebastian Dröge
7cfe6b0bf3 ccextractor: Support changes of the caption type
https://bugzilla.gnome.org/show_bug.cgi?id=797370
2018-11-02 12:22:15 +02:00
Tim-Philipp Müller
a4cfb1fa14 meson: add 'curl-ssh2' option for curl libssh2 support
https://bugzilla.gnome.org/show_bug.cgi?id=797346
2018-10-28 11:53:42 +00:00
Xavier Claessens
8dfe0dd9ce meson: Use the 'curl' feature option
https://bugzilla.gnome.org/show_bug.cgi?id=797346
2018-10-28 11:51:34 +00:00
Luis de Bethencourt
16c1eee36f webrtcbin: options is a placeholder argument
Make it clear this unused argument is there for planned future use.
2018-10-26 15:15:57 +01:00
Luis de Bethencourt
83b29b813e webrtcbin: ws-semantic is not supported
Don't offer something that isn't supported.
2018-10-26 14:36:47 +01:00
Edward Hervey
4a24739a14 hls: Remove stray '\n' from debug statement 2018-10-22 09:59:24 +02:00
Olivier Crête
a10c46a93a Revert "srtpdec: also check for "roc" in caps"
This reverts commit 73ebdb888e.

This isn't needed and it breaks srtpenc ! srtpdec, specifying the
roll-over counter manually is an advanced feature.

Also revert "srtp: Add "roc" caps field to the gst-launch example"
This reverts commit 67ae35813b.

https://bugzilla.gnome.org/show_bug.cgi?id=765079
2018-10-17 18:34:31 -04:00
Matthew Waters
59f40eb1a0 sctp: link against ws2_32 on windows
ext/sctp/ext@sctp@@gstsctp@sha/sctpassociation.c.obj: In function `receive_cb':
/var/lib/jenkins/workspace/cerbero-cross-mingw32/workdir/sources/windows_x86/gst-plugins-bad-1.0-1.15.0.1/_builddir/../ext/sctp/sctpassociation.c:692: undefined reference to `_imp__ntohl@4'
2018-10-17 21:07:36 +11:00
Mathieu Duponchelle
9f684a2f81 webrtcbin: implement support for group: BUNDLE 2018-10-15 14:17:35 +02:00
Wonchul Lee
51d5db3f47 av1enc: Add to configure image formats
Expanded to support image format to YV12/I422/I444. It's related to the
color bit-depth and profile of the codec. It can make configuring
appropriate profile according to bit-depth and format.

https://bugzilla.gnome.org/show_bug.cgi?id=791674
2018-10-10 15:44:34 -04:00
Wonchul Lee
cc9d65a512 av1enc: fix compliation with removed defines
AOM_FRAME_IS_INVISIBLE is unused and remove in aom_encoder.h

https://aomedia-review.googlesource.com/c/aom/+/70421

https://bugzilla.gnome.org/show_bug.cgi?id=791674
2018-10-10 15:44:34 -04:00
Wonchul Lee
7d73307bc4 av1enc: Add configurations
Added rate control and profile related configuration. The profile
configuration has been copied from vpx.

https://bugzilla.gnome.org/show_bug.cgi?id=791674
2018-10-10 15:44:34 -04:00
Matthew Waters
21bf3a35ac webrtc/datachannel: fix support for prenegotiated channels
With prenegotiated channels, the data-channel protocol is not used and
instead the channel's negotiation is intended to be performed out of band in
some application-specific manner.

Comes with test!
2018-10-09 02:38:14 +11:00
Matthew Waters
7bf18ad258 webrtc: start in the closed state
This means that we will reject all operations before we've transitioned
into READY.

This also fixes the tests using the default GMainContext in the NULL
state instead of the webrtcbin internal GMainContext and thread.  Also
removes a potential ordering race where on the element transitioning to
READY, an operations could have been queued on two different threads and
removing a guarentee on operation ordering.
2018-10-08 21:56:31 +11:00
Aleix Conchillo Flaqué
c4fe52395b webrtcbin: start and stop thread when changing state
It might be possible that if we set webrtcbin to the NULL state some
tasks (idle sources) are still executed and they might even freeze. The freeze
is caused because the webrtcbin tasks don't hold a reference to webrtcbin and
if it's last unref inside the idle source itself this will not allow the main
loop to finish because the main loop is waiting on the idle source to finish.

We now start and stop webrtcbin thread when changing states. This will allow
the idle sources to finish properly.

https://bugzilla.gnome.org/show_bug.cgi?id=797251
2018-10-08 13:46:55 +11:00
Matthew Waters
d5da9e080a glvideomixer: fix the default blend modes for unpremultipled alpha
Alpha in GStreamer is unpremultiplied
2018-10-05 01:18:59 +10:00
Matthew Waters
ea355ca0a3 glmixerbin: add gloverlaycompositor to each input stream
Flattens the overlay compositions into the stream before the mixer will
mix them.

https://bugzilla.gnome.org/show_bug.cgi?id=759867
2018-10-04 14:32:14 +10:00
Sebastian Dröge
b5ae66ea1d glstereomix: Fix build after deprecating misnamed GST_TYPE_GL_STEREO_DOWNMIX_MODE_TYPE 2018-10-03 16:00:23 +03:00
Matthew Waters
8e8eb41ddf webrtcdatachannel: take ref of data so it doesn't disappear 2018-09-26 16:01:57 +10:00
Sebastian Dröge
47b69bca12 glmixerbin: "latency" property on aggregator is uint64, not int64
Also update the property description and range with aggregator's values.
2018-09-24 23:26:52 +03:00
Matthew Waters
ce9e2a7b78 glvideomixer: fix constant alpha enum value for constant alpha 2018-09-21 19:45:13 +10:00
Matthew Waters
07e9374eff webrtcbin: add support for data channels based on SCTP
Mostly follows the W3C specification
https://www.w3.org/TR/webrtc/#peer-to-peer-data-api

With contributions from:
Mathieu Duponchelle <mathieu@centricular.com>

https://bugzilla.gnome.org/show_bug.cgi?id=794351
2018-09-21 19:45:12 +10:00
Matthew Waters
cf46d49b1e webrtcbin: functionify dependent element checks 2018-09-21 19:36:52 +10:00
Matthew Waters
f0a4713932 webrtc/stats: rename debug category not to be ice related 2018-09-21 19:36:52 +10:00