mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-14 05:12:09 +00:00
sendrecv: Add a Google STUN server to the configuration
Without this, the example will only work on link-local and localhost networks.
This commit is contained in:
parent
e4e83a648b
commit
97cf763420
1 changed files with 2 additions and 1 deletions
|
@ -250,6 +250,7 @@ on_negotiation_needed (GstElement * element, gpointer user_data)
|
||||||
g_signal_emit_by_name (webrtc1, "create-offer", NULL, promise);
|
g_signal_emit_by_name (webrtc1, "create-offer", NULL, promise);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define STUN_SERVER " stun-server=stun://stun.l.google.com:19302 "
|
||||||
#define RTP_CAPS_OPUS "application/x-rtp,media=audio,encoding-name=OPUS,payload="
|
#define RTP_CAPS_OPUS "application/x-rtp,media=audio,encoding-name=OPUS,payload="
|
||||||
#define RTP_CAPS_VP8 "application/x-rtp,media=video,encoding-name=VP8,payload="
|
#define RTP_CAPS_VP8 "application/x-rtp,media=video,encoding-name=VP8,payload="
|
||||||
|
|
||||||
|
@ -260,7 +261,7 @@ start_pipeline (void)
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
|
|
||||||
pipe1 =
|
pipe1 =
|
||||||
gst_parse_launch ("webrtcbin name=sendrecv "
|
gst_parse_launch ("webrtcbin name=sendrecv " STUN_SERVER
|
||||||
"videotestsrc pattern=ball ! queue ! vp8enc deadline=1 ! rtpvp8pay ! "
|
"videotestsrc pattern=ball ! queue ! vp8enc deadline=1 ! rtpvp8pay ! "
|
||||||
"queue ! " RTP_CAPS_VP8 "96 ! sendrecv. "
|
"queue ! " RTP_CAPS_VP8 "96 ! sendrecv. "
|
||||||
"audiotestsrc wave=red-noise ! queue ! opusenc ! rtpopuspay ! "
|
"audiotestsrc wave=red-noise ! queue ! opusenc ! rtpopuspay ! "
|
||||||
|
|
Loading…
Reference in a new issue