summaryrefslogtreecommitdiff
path: root/ext/webrtc/gstwebrtcice.c
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.com>2020-07-08 17:24:36 -0400
committerOlivier CrĂȘte <olivier.crete@collabora.com>2020-10-30 16:24:40 -0400
commit80a56c25a627b4cd4620aa17a597f8a5c3b949eb (patch)
tree58f3cbcced66f18776acd5c7e50e93b77ddee4f6 /ext/webrtc/gstwebrtcice.c
parentcca313ecd846273f928e9bf7fa5b68afe1a2e0f4 (diff)
downloadgstreamer-plugins-bad-80a56c25a627b4cd4620aa17a597f8a5c3b949eb.tar.gz
webrtc: Set the DSCP markings based on the priority
This matches how the WebRTC javascript API works and the Chrome implementation. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1707>
Diffstat (limited to 'ext/webrtc/gstwebrtcice.c')
-rw-r--r--ext/webrtc/gstwebrtcice.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/ext/webrtc/gstwebrtcice.c b/ext/webrtc/gstwebrtcice.c
index e917d501a..4a2ae33c5 100644
--- a/ext/webrtc/gstwebrtcice.c
+++ b/ext/webrtc/gstwebrtcice.c
@@ -867,6 +867,18 @@ gst_webrtc_ice_set_on_ice_candidate (GstWebRTCICE * ice,
ice->priv->on_candidate_notify = notify;
}
+void
+gst_webrtc_ice_set_tos (GstWebRTCICE * ice, GstWebRTCICEStream * stream,
+ guint tos)
+{
+ struct NiceStreamItem *item;
+
+ item = _find_item (ice, -1, -1, stream);
+ g_return_if_fail (item != NULL);
+
+ nice_agent_set_stream_tos (ice->priv->nice_agent, item->nice_stream_id, tos);
+}
+
static void
_clear_ice_stream (struct NiceStreamItem *item)
{