mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-10 12:42:13 +00:00
5f9ba620ce
Requires: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2186 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/39>
23 lines
1.1 KiB
Text
23 lines
1.1 KiB
Text
description, summary="Open a data channel"
|
|
include,location=negotiation_initiator.scenario
|
|
include,location=bundle_policy.scenario
|
|
|
|
set-webrtc-options, local-bundle-policy="$(local_bundle_policy)", remote-bundle-policy="$(remote_bundle_policy)"
|
|
|
|
# add the channel on the initiator so that datachannel is added to the sdp
|
|
add-data-channel, which="$(negotiation_initiator)", id="gstreamer";
|
|
|
|
# negotiate
|
|
create-offer, which="$(negotiation_initiator)";
|
|
wait-for-negotiation-state, which="$(negotiation_responder)", state="offer-set"
|
|
create-answer, which="$(negotiation_responder)";
|
|
wait-for-negotiation-state, which="$(negotiation_initiator)", state="answer-set"
|
|
|
|
# ensure data channel is created
|
|
wait-for-data-channel, which="$(negotiation_responder)", id="gstreamer";
|
|
wait-for-data-channel, which="$(negotiation_initiator)", id="gstreamer";
|
|
wait-for-data-channel-state, which="$(negotiation_initiator)", id="gstreamer", state="open";
|
|
|
|
# close the data channel
|
|
close-data-channel, which="$(negotiation_initiator)", id="gstreamer"
|
|
wait-for-data-channel-state, which="$(negotiation_responder)", id="gstreamer", state="closed";
|