Matthew Waters
e15a8fcbdd
webrtc/datachannel: clear the error after use
...
Fixes a memory leak
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1535 >
2020-08-24 17:02:35 +10:00
Matthew Waters
7489addc0a
webrtc/datachannel: free previous protocol/label fields
...
Fixes a memory leak
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1535 >
2020-08-24 17:02:35 +10:00
Sebastian Dröge
b25d153c34
webrtc: Add GstWebRTCDataChannel to the library API
...
This makes it more discoverable for bindings and allows bindings to
generate static API for the signals and functions.
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1168
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1313 >
2020-06-02 21:04:37 +00:00
Matthew Waters
02c8e66ff1
webrtc: fix an off-by-one calculating low-threshold
...
We were not signalling low-threshold when the previous amount was at
exactly the low-threshold mark.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1247 >
2020-05-06 15:49:58 +10:00
Matthew Waters
50644f5718
webrtc: always reply to a promise
...
Otherwise, we defeat the purpose of a promise.
We were not replying when the state was closed.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1240 >
2020-05-06 02:53:27 +00:00
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
Edward Hervey
706ec236ac
webrtcdatachannels: Don't leak strings
...
They would leak in error cases
CID: 1455480
2019-11-21 16:38:53 +01: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
Mathieu Duponchelle
42adb02a10
docstrings: port ulinks to markdown links
2019-08-23 20:14:12 +02: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
Philippe Normand
36de11520e
webrtc: Fix data-channel send-string doc
2019-06-23 17:03:32 +01:00
Matthew Waters
be011d2086
webrtc/dc: move some code from webrtcbin into the datachannel
2019-05-30 21:33:09 +10: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
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
8e8eb41ddf
webrtcdatachannel: take ref of data so it doesn't disappear
2018-09-26 16:01:57 +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