Commit graph

37 commits

Author SHA1 Message Date
Seungha Yang
61d200a957 Port to gst_print* family
g_print* would print broken string on Windows
See also https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/258

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/20>
2020-07-27 16:28:33 +09:00
Matthew Waters
204945b902 webrtc: indent sources
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/16>
2020-06-25 18:36:22 +10:00
Matthew Waters
3a86a37c03 sendrecv: wait until the offer is set before creating answer
Pragmatically, an answer cannot be created until the offer is created as
the answer creation needs information from the offer.  Practically, due
to implementation details, the answer was always queued after the set of
the offer and so the call flow did not matter.

The current code also hid a bug in webrtcbin where ice candidates would be
generated before the answer had been created which is against the JSEP
specification.

Change to the correct call flow for exemplary effect.
2020-05-06 06:01:57 +00:00
Matthew Waters
c3f629340d check: first pass at a couple of validate tests 2020-05-06 06:01:57 +00:00
Matthew Waters
bc821a85d4 tests: first pass at some basic browser tests 2020-05-06 06:01:57 +00:00
Costa Shulyupin
133a1593ee android, sendrecv: add missing break in switch case statements 2020-04-16 17:34:11 +02:00
Costa Shulyupin
2557eab9d5 gst-indent 2020-04-14 14:40:37 +03:00
Jan Schmidt
5bf67feae8 sendrecv: Add a switch for remote-offerer
Add a switch to the command line utility that makes it request
the initial offer from the peer instead of generating it.

Modify the webrtc.js example to support a new REQUEST_OFFER
message, and generate the offer when receiving it.
2020-03-05 03:03:17 +11:00
Jan Schmidt
c8e79c9671 webrtc-sendrecv.py: Add a stun server
Fixes https://github.com/centricular/gstwebrtc-demos/issues/160
2020-02-21 14:01:58 +11:00
Seungha Yang
60dbf27896 Add meson build script
make build easy with meson
2019-07-02 14:40:36 +01:00
Bernhard Jung
21e5f4fbda unref sinkpad 2019-07-01 13:21:20 +03:00
Bernhard Jung
92050d6a59 do no use gst_element_link but gst_pad_link in pad-added callbacks to prevent situations where
on multiple incoming streams they might not get linked correctly and leave a stream unconnected
2019-07-01 13:21:20 +03:00
Jason Sun
92bce589d8 Improve building documentation
- Add apt-get install lines for Ubuntu 18.04
- add gstreamer-webrtc-1.0 and gstreamer-sdp-1.0 to CFLAGS
- make the CLAGS match LIBS in Makefile dependencies
2018-11-22 05:23:15 +00:00
Matthew Waters
a63902e621 webrtc: fix data channel usage after requiring a READY webrtcbin
c4fe52395b
7bf18ad258

Fixes https://github.com/centricular/gstwebrtc-demos/issues/55
2018-11-06 15:44:14 +11:00
Mathieu Duponchelle
4df6d21992 sendrecv: port all examples to use a max-bundle policy 2018-10-15 20:46:28 +02:00
Matthew Clark
738e969a06 Add check_plugins() to Python example, matching C and Rust versions 2018-09-24 03:33:11 +00:00
Jan Alexander Steffens (heftig)
fd1d53b04a on_server_message: Do not unref message GBytes
We don't own the reference. Since GLib 2.58, the g_bytes_unref that
follows the signal emission in libsoup loudly complains about the
attempt to underflow the refcount.
2018-09-21 13:12:43 +00:00
Mathieu Duponchelle
547f296293 sendrecv: try to add a data channel 2018-09-21 13:12:16 +00:00
Mathieu Duponchelle
1958814680 webrtc-sendrecv.py: required gstreamer 1.14.2
Addresses #25
2018-06-25 14:45:57 +02:00
maxmcd
b826f968cb Add --disable-ssl flag to webrtc-sendrecv.c 2018-06-18 09:02:05 +03:00
maxmcd
bb56d6eab7 Add Rust version of sendrecv example
This also comes with a docker image to collect all dependencies and
build everything.

Fixes https://github.com/centricular/gstwebrtc-demos/pull/20
2018-06-18 09:02:05 +03:00
Mathieu Duponchelle
3603899291 webrtc-sendrecv.py: improve debug and documentation 2018-06-11 20:26:07 +02:00
Mathieu Duponchelle
56c17d6487 sendrecv: python version 2018-06-11 18:49:53 +02:00
Nirbheek Chauhan
47bfa3cc27 sendrecv/gst: Add no-op audio/video converters
This reduces the chance that someone will try to change the
audio/video source elements and get an error because they don't know
about the conversion elements. They will be no-ops in the usual case.

Closes https://github.com/centricular/gstwebrtc-demos/issues/8
2018-04-01 01:15:16 +05:30
Nirbheek Chauhan
563826deaf sendrecv: Don't set pipeline state if it's NULL
Avoids ugly CRITICAL warnings when erroring out.
2018-03-31 10:28:51 +05:30
Nirbheek Chauhan
82314cabbb Don't use strict ssl certificate checking for localhost
When using localhost signalling servers, we don't want to use
strict ssl because it's probably using a self-signed certificate
and there's no need to do certificate checking over localhost anyway.
2018-03-31 10:27:05 +05:30
Nirbheek Chauhan
0e1be2a63f Add Makefiles for all C demos 2018-03-23 19:00:37 +05:30
Nirbheek Chauhan
2d2bc0fe0e Fix compiler warnings in all C demos 2018-03-23 19:00:37 +05:30
Nirbheek Chauhan
20cf2503ee sendrecv: Fix SDP message format
The format is {'sdp': {'sdp': <sdp>, 'type': <sdptype>}}

The multiparty-sendrecv demo already uses this format.
2018-03-23 19:00:37 +05:30
Sebastian Kilb
2b82525bb0 Fix audio/video linking error on windows
Closes https://github.com/centricular/gstwebrtc-demos/issues/5
2018-03-21 06:26:49 +05:30
Nirbheek Chauhan
55e86469d9 Check for all necessary plugins at startup
People seem to be having problems ensuring that they have all the
right plugins built, so make it a bit easier for them.
2018-03-10 01:54:48 +05:30
Nirbheek Chauhan
fa2adc717b Fix crash on Windows by delimiting option entries with NULL
Also use more verbose forms of g_assert which print values on failure
2018-03-08 20:10:55 +05:30
Tim-Philipp Müller
72c10e8243 webrtc-sendrecv: define GST_USE_UNSTABLE_API to avoid compiler warnings 2018-02-02 08:39:04 +00:00
Nirbheek Chauhan
97cf763420 sendrecv: Add a Google STUN server to the configuration
Without this, the example will only work on link-local and localhost
networks.
2017-12-12 21:40:48 +05:30
Mathieu Duponchelle
e5c5767298 Update to new promise API 2017-11-22 22:28:55 +10:00
Nirbheek Chauhan
569aff43f9 sendrecv: Rename function for greater clarity 2017-10-30 09:14:29 +05:30
Nirbheek Chauhan
e9b0656bad Add sendrecv implementation in js and gst webrtc
JS code runs on the browser and uses the browser's webrtc
implementation.

C code uses gstreamer's webrtc implementation, for which you need the
following repositories:

https://github.com/ystreet/gstreamer/tree/promise
https://github.com/ystreet/gst-plugins-bad/tree/webrtc

You can build these with either Autotools gst-uninstalled:

https://arunraghavan.net/2014/07/quick-start-guide-to-gst-uninstalled-1-x/

Or with Meson gst-build:

https://cgit.freedesktop.org/gstreamer/gst-build/
2017-10-21 20:02:19 +05:30