Commit graph

163 commits

Author SHA1 Message Date
François Laignel
875e01e90a Use gst_element_request_pad_simple...
Instead of the deprecated gst_element_get_request_pad.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/35>
2021-05-05 06:17:06 +00:00
Olivier Crête
c89dccbf4e validate README: Document paths for gst-examples
As the webrtc demos have now been merged, change the paths for
easier copy-pasting.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/38>
2021-04-30 17:20:18 -04:00
Nirbheek Chauhan
2c3d78c9a6 webrtc/signalling: Document cert exception needed for browsers
Fixes https://gitlab.freedesktop.org/gstreamer/gst-examples/-/issues/28

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/34>
2021-03-16 19:41:27 +05:30
Nirbheek Chauhan
f8cbae9d6e sendrecv: Implement remote-offerer option for JS example
Now you can check the "Remote offerer" checkbox in the JS example to
force the peer to send the SDP offer. This involved implementing
support for receiving the OFFER_REQUEST message in the C example.

As a side-effect of this, the C example will no longer send
OFFER_REQUEST automatically when the --our-id option is passed. It
will only do so when the --remote-offerer option is explicitly passed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/31>
2021-02-10 16:23:40 +05:30
Nirbheek Chauhan
28aa23dc20 sendrecv/gst: Some misc whitespace fixes
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/31>
2021-02-10 16:23:40 +05:30
Nirbheek Chauhan
2892a8b206 sendrecv/js: Implement state handling for Connect button
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/31>
2021-02-10 16:21:34 +05:30
Nirbheek Chauhan
eb89cd01ba webrtc: Document OFFER_REQUEST in the protocol doc
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/31>
2021-02-10 16:21:32 +05:30
Nirbheek Chauhan
ea3c0e8766 sendrecv/js: Handle OFFER_REQUEST as part of the switch
This is clearer, and also stricter w.r.t. what sort of messages we
accept.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/31>
2021-02-10 16:21:30 +05:30
Nirbheek Chauhan
a508bc243d sendrecv/gst: Don't need to allocate to send OFFER_REQUEST
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/31>
2021-02-10 16:21:24 +05:30
Seungha Yang
767f46b1a0 webrtc: sendonly: Add support for Windows
Add meson build script and use mfvideosrc element in case of Windows

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/29>
2020-12-10 20:18:30 +09:00
Seungha Yang
85aeda42fe sendrecv/js: Add an UI for connecting to specified peer id
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/28>
2020-12-07 20:40:50 +09:00
Seungha Yang
9e83c09be6 sendrecv/js: Convert taps to spaces
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/28>
2020-12-07 20:40:50 +09:00
Seungha Yang
753f14f5de sendrecv: Add an option for example to be able to accept connection request from peer
Add "our-id" option to specify id to be used for registering to
signalling server and wait connection request from peer

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/28>
2020-12-07 20:40:41 +09:00
Emmanuel Gil Peyrot
20bc59f1ff rust: Regenerate Cargo.lock
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/27>
2020-11-23 15:29:44 +01:00
Emmanuel Gil Peyrot
3710c81432 rust: Bump async-tungstenite
This removes the pin-project 0.4 dependency to use 1.0 instead like the
rest of the code.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/27>
2020-11-23 15:28:28 +01:00
Olivier Crête
4e141f1076 webrtc sendonly: Add priority to example
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/18>
2020-10-08 16:16:36 -04:00
Olivier Crête
992cb3c5f4 webrtc sendonly: Add videoscale to avoid webcam compat issues
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/18>
2020-10-08 16:16:19 -04:00
Olivier Crête
4d06428001 webrtc sendonly: Exit on bus errors
Catch bus errors and cleanly error out

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/18>
2020-10-08 16:16:16 -04:00
Matthew Waters
09195ebe86 webrtc/android: add decodebin/autoaudiosink to plugin list
Otherwise the app fails to run

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/25>
2020-08-19 20:42:16 +10:00
Matthew Waters
8b4d156712 webrtc/android: initialize the debug category
Fixes possible critical/crash on startup

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/25>
2020-08-19 20:42:16 +10:00
Matthew Waters
101d9965e5 webrtc/android: use a better name for the output apk
Instead of a generic app-debug.apk

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/25>
2020-08-19 20:01:56 +10:00
Matthew Waters
a7daeb14c3 webrtc/android: explicitly link to iconv
As is now required

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/25>
2020-08-19 20:01:56 +10:00
Matthew Waters
a7d0e6051c webrtc/android: use the openssl Gio module
That's what is shipped upstream now.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/25>
2020-08-19 20:01:56 +10:00
Matthew Waters
d1b81046a4 webrtc/android: add missing gradle-wrapper jar
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/25>
2020-08-19 20:01:56 +10:00
Carl Karsten
e1de93cf40 Update README.md
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/23>
2020-08-09 20:06:54 +00:00
Sebastian Dröge
bbed24d919 webrtc: Change H264 examples to use aggregate-mode=zero-latency for best compatibility
The default changed back to none because it broke existing code.

See https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/749

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/22>
2020-08-05 10:47:55 +03:00
Sebastian Dröge
6378337a0e sendrecv/Rust: Only set pipeline to Playing after connecting to the signals
Might miss some signal emissions otherwise, especially the
on-negotiation-needed signal.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/21>
2020-07-31 12:03:46 +03:00
Sebastian Dröge
3492c81fcf Update Rust examples to latest bindings versions
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/21>
2020-07-31 11:59:58 +03:00
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
Philippe Normand
234dff8dbb webrtc: Add Janus video-room example
This Rust crate provides a program able to connect to a Janus instance using
WebSockets and send a live video stream to the videoroom plugin.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/15>
2020-06-29 14:08:51 +01:00
Matthew Waters
f5d9471639 webrtc/test: check if selenium is available before attempting to add tests
Fixes the following error

File "/builds/vivia/gst-plugins-bad/gst-build/build/../subprojects/gst-examples/webrtc/check/basic.py", line 5, in <module>
     from selenium import webdriver

ModuleNotFoundError: No module named 'selenium'
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/17>
2020-06-25 22:11:33 +10: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
e1c3dad258 webrtc: update for move to gst-examples
- Integrate with the build system.
- Some README updates.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/16>
2020-06-25 18:36:22 +10:00
Nirbheek Chauhan
d44b2316fa sendonly: Don't assume we're building on UNIX
Fixes https://github.com/centricular/gstwebrtc-demos/issues/203
2020-06-25 18:36:18 +10:00
Nirbheek Chauhan
751d06af6f signalling: Fix simple-server script name in Dockerfile
Fixes https://github.com/centricular/gstwebrtc-demos/issues/202
2020-06-18 23:34:48 +10:00
Corey Cole
17f84bfd81 fix: python webrtc_sendrecv.py typo 2020-06-18 23:34:48 +10:00
Nirbheek Chauhan
0776def18c simple_server: asyncio TimeoutError has moved
We didn't notice this because the logging was broken.
2020-06-18 23:34:48 +10:00
Nirbheek Chauhan
77ae10ab66 simple_server: Restart when the certificate changes
Reload the SSL context and restart the server if the certificate
changes. Without this, new connections will continue to use the old
expired certificate.
2020-06-18 23:34:48 +10:00
Nirbheek Chauhan
4761396d87 simple_server: Abstract out ssl context generation 2020-06-18 23:34:48 +10:00
Nirbheek Chauhan
7b96b06752 simple_server: Make the server class loop-aware
First step in making the class able to manage its own state.
2020-06-18 23:34:48 +10:00
Nirbheek Chauhan
b8c1bd1fa3 simple_server: Fix init of websockets log handler
This has changed since the original code was written:
https://websockets.readthedocs.io/en/stable/cheatsheet.html#debugging
2020-06-18 23:34:48 +10:00
Nirbheek Chauhan
78df1ca74c simple_server: Correctly pass health option
It was completely ignored. Also don't de-serialize options. Just parse
them directly in `__init__`. Less error-prone.
2020-06-18 23:34:48 +10:00
Sebastian Dröge
180e1ce24c Update dependencies of Rust demos 2020-06-18 23:34:48 +10:00
Philippe Normand
c0f303eacf janus: Remove unused parameters and refactor 2020-05-14 11:04:37 +01:00
Jan Schmidt
255fef3896 webrtc-recvonly-h264: Add a recvonly standalone example.
This example sets up a recvonly H.264 transceiver and receives
H.264 from a peer, while sending bi-directional Opus audio.
2020-05-09 19:13:52 +10:00
Jan Schmidt
8da8375986 sendonly: Fix transceivers leak.
Make sure to unref the transceivers array after use.
2020-05-09 19:13:52 +10:00
Matthew Waters
7445fc4928 signalling/server: python 3.8 asyncio has it's own TimeoutError 2020-05-06 06:01:57 +00: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
615813ef93 check/validate: a few more tests and improvements
Tests a matrix of options:
- local/remote negotiation initiator
- 'most' bundle-policy combinations (some combinations will never work)
- firefox or chrome browser

Across 4 test scenarios:
- simple negotiation with default browser streams (or none if gstreamer
  initiates)
- sending a vp8 stream
- opening a data channel
- sending a message over the data channel

for a total of 112 tests!
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