Commit graph

93 commits

Author SHA1 Message Date
Stéphane Cerveau
a5cd1adc97 gst-examples: continue if webrtc deps are not satisfied
The WebRTC examples are disabled if one dependency is
not satisfied, especially libsoup.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2261>
2022-05-14 09:49:33 +00:00
Stéphane Cerveau
5c46099b8d gst-examples: change include for gtk in gtk-play
The gdk.h is not necessary but the gtk.h yes for
the GTK_CHECK_VERSION macro.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2261>
2022-05-14 09:49:33 +00:00
Thibault Saunier
f90916f4bb docs:examples: Fix building iOS examples
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2264>
2022-04-21 09:18:56 -04:00
Stéphane Cerveau
5020a6e83a gst-examples: add -xobjective-c for darwin
To avoid error when including #include <AppKit/AppKit.h>
the  build should include the c args xobjective-c

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2095>
2022-04-04 16:27:45 +00:00
Zhao Zhili
dd27850a9a examples: fix build on macOS with gtk+-quartz-3.0
gdk_quartz_window_get_nsview is not declared in the header file now:
error: implicit declaration of function 'gdk_quartz_window_get_nsview'
is invalid in C99 [-Werror,-Wimplicit-function-declaration]

fixes #979

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2095>
2022-04-04 16:27:45 +00:00
Xavier Claessens
b004464ac6 Remove glib and gobject dependencies everywhere
They are part of gst_dep already and we have to make sure to always have
gst_dep. The order in dependencies matters, because it is also the order
in which Meson will set -I args. We want gstreamer's config.h to take
precedence over glib's private config.h when it's a subproject.

While at it, remove useless fallback args for gmodule/gio dependencies,
only gstreamer core needs it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2031>
2022-04-01 16:32:17 +00:00
Matthew Waters
4a2e0c1f4c examples/player/android: add missing dummy.cpp
allows libc++_shared.so to be placed in the application

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2043>
2022-03-28 14:38:24 +11:00
Matthew Waters
5d2d03892d examples/player/android: update for android changes
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2041>
2022-03-28 02:32:41 +00:00
Sebastian Dröge
d2ecce5862 webrtc: Update dependencies of the Rust examples
And also clean up code a bit while updating to new APIs.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2016>
2022-03-24 12:05:29 +02:00
Nirbheek Chauhan
4ae903d383 webrtc_sendrecv.py: Link pads instead of elements
This was not a problem here because even if we end up accidentally
linking to the wrong pad, things will work out eventually as long as
one pad-added is emitted for each pad that is added.

But it will be a huge problem if someone copies this code and changes
something that requires different handling for different sorts of
pads. The resultant code will be racy. Let's not do this, it's a bad
example.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2008>
2022-03-23 21:04:39 +00:00
Nirbheek Chauhan
0007fa38e0 webrtc-sendrecv: Fix create-answer caps negotiation
We need to parse the payload type map provided by the offer SDP and
set those values on the payloader, otherwise webrtcbin will create
a recvonly answer SDP and we won't send anything to the browser.

Fixed it for both C and Python sendrecv examples.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1864>
2022-03-18 08:16:46 +00:00
Nirbheek Chauhan
3c0d582b7c webrtc_sendrecv.py: Add picture-id-mode to rtpvp8pay
This doesn't just make TWCC stats perform better, it also fixes
stuttery video playback in Chrome.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1864>
2022-03-18 08:16:46 +00:00
Nirbheek Chauhan
e0378f9913 webrtc_sendrecv.py: Print an error on unknown JSON message
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1864>
2022-03-18 08:16:46 +00:00
Nirbheek Chauhan
90da0e1d1e webrtc_sendrecv.py: Add missing copyright headers
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1864>
2022-03-18 08:16:46 +00:00
Nirbheek Chauhan
583408c312 webrtc_sendrecv.py: Implement all negotiation modes
Earlier, the example only supported one negotiation mode:
* Browser client is running, gstreamer starts a call and sends offer

Now these three modes are also supported:
* Browser client is running, gstreamer starts a call and sends an
  offer request
* gstreamer connects and waits for browser client to start a call and
  send an offer
* gstreamer connects and waits for browser client to start a call and
  send an offer request

The following features are still missing:
* Data channel support
* TWCC support + stats logging

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1864>
2022-03-18 08:16:46 +00:00
Nirbheek Chauhan
0b1438cc97 webrtc_sendrecv.py: Make it executable
Why wasn't it already. Tired of typing 'python webrtc_sendrecv.py'.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1864>
2022-03-18 08:16:45 +00:00
Nirbheek Chauhan
2294356d9b webrtc_sendrecv.py: Fix event loop usage for messages
Instead of creating a new loop, we should just be fetching the running
loop, then doing a blocking network call inside the callback, schedule
it on the event loop. This is what the C example does too.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1864>
2022-03-18 08:16:45 +00:00
Nirbheek Chauhan
ee4ca699a0 webrtc_sendrecv.py: Use default arg for server URL
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1864>
2022-03-18 08:16:45 +00:00
Nirbheek Chauhan
4de365b31c webrtc_sendrecv.py: Sync element props with C version
Also add indentation to make it easier to read

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1821>
2022-03-01 16:33:28 +00:00
Nirbheek Chauhan
5ca5a83e75 webrtc_sendrecv.py: Ensure that gst-python overrides are installed
Otherwise fetching of the offer will fail with a cryptic error:

```
Traceback (most recent call last):
  File "/../gstreamer/subprojects/gst-examples/webrtc/sendrecv/gst/webrtc_sendrecv.py", line 56, in on_offer_created
    offer = reply['offer']
TypeError: 'Structure' object is not subscriptable
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1821>
2022-03-01 16:33:28 +00:00
Nirbheek Chauhan
e9a02a7380 webrtc_sendrecv.py: Don't try to set state on a None pipe
```
ERROR peer '5762' not found
Traceback (most recent call last):
  File "/../gstreamer/subprojects/gst-examples/webrtc/sendrecv/gst/webrtc_sendrecv.py", line 190, in <module>
    res = loop.run_until_complete(c.loop())
  File "/usr/lib64/python3.10/asyncio/base_events.py", line 641, in run_until_complete
    return future.result()
  File "/../gstreamer/subprojects/gst-examples/webrtc/sendrecv/gst/webrtc_sendrecv.py", line 155, in loop
    self.close_pipeline()
  File "/../gstreamer/subprojects/gst-examples/webrtc/sendrecv/gst/webrtc_sendrecv.py", line 142, in close_pipeline
    self.pipe.set_state(Gst.State.NULL)
AttributeError: 'NoneType' object has no attribute 'set_state'
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1821>
2022-03-01 16:33:28 +00:00
Nirbheek Chauhan
78f8505b9a webrtc_sendrecv.py: Fix SSLError when connecting to websocket server
```
  File "/../gstreamer/subprojects/gst-examples/webrtc/sendrecv/gst/webrtc_sendrecv.py", line 189, in <module>
    loop.run_until_complete(c.connect())
  File "/usr/lib64/python3.10/asyncio/base_events.py", line 641, in run_until_complete
    return future.result()
  File "/../gstreamer/subprojects/gst-examples/webrtc/sendrecv/gst/webrtc_sendrecv.py", line 40, in connect
    self.conn = await websockets.connect(self.server, ssl=sslctx)
  File "/home/nirbheek/.local/lib/python3.10/site-packages/websockets/legacy/client.py", line 650, in __await_impl_timeout__
    return await asyncio.wait_for(self.__await_impl__(), self.open_timeout)
  File "/usr/lib64/python3.10/asyncio/tasks.py", line 445, in wait_for
    return fut.result()
  File "/home/nirbheek/.local/lib/python3.10/site-packages/websockets/legacy/client.py", line 654, in __await_impl__
    transport, protocol = await self._create_connection()
  File "/usr/lib64/python3.10/asyncio/base_events.py", line 1080, in create_connection
    transport, protocol = await self._create_connection_transport(
  File "/usr/lib64/python3.10/asyncio/base_events.py", line 1110, in _create_connection_transport
    await waiter
  File "/usr/lib64/python3.10/asyncio/sslproto.py", line 631, in _on_handshake_complete
    raise handshake_exc
  File "/usr/lib64/python3.10/asyncio/sslproto.py", line 676, in _process_write_backlog
    ssldata = self._sslpipe.do_handshake(
  File "/usr/lib64/python3.10/asyncio/sslproto.py", line 116, in do_handshake
    self._sslobj = self._context.wrap_bio(
  File "/usr/lib64/python3.10/ssl.py", line 526, in wrap_bio
    return self.sslobject_class._create(
  File "/usr/lib64/python3.10/ssl.py", line 865, in _create
    sslobj = context._wrap_bio(
ssl.SSLError: Cannot create a client socket with a PROTOCOL_TLS_SERVER context (_ssl.c:801)
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1821>
2022-03-01 16:33:28 +00:00
Nirbheek Chauhan
e453e43e5a webrtc_sendrecv.py: Fix deprecation warning with Python 3.10
asyncio.get_event_loop() will not implicitly create a new event loop
in a future version of Python, so we need to do that explicitly.

```
webrtc_sendrecv.py:188: DeprecationWarning: There is no current event loop
  loop = asyncio.get_event_loop()
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1821>
2022-03-01 16:33:28 +00:00
Nirbheek Chauhan
4c2fd7f104 webrtc_sendrecv.py: Fix styling errors
These are now enforced by the pre-commit python style hook.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1821>
2022-03-01 16:33:28 +00:00
Nirbheek Chauhan
d6799b069a webrtc: Update Makefile for building webrtc-sendrecv
This now needs the RTP library.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1821>
2022-03-01 16:33:28 +00:00
Xavier Claessens
3d8372cc50 devenv: Add some missing GStreamer specific env variables
This should make "meson devenv" closer to what "gst-env.py" sets.

- GST_VALIDATE_SCENARIOS_PATH
- GST_VALIDATE_APPS_DIR
- GST_OMX_CONFIG_DIR
- GST_ENCODING_TARGET_PATH
- GST_PRESET_PATH
- GST_PLUGIN_SCANNER
- GST_PTP_HELPER
- _GI_OVERRIDES_PATH

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1768>
2022-02-25 20:35:26 +00:00
Matthew Waters
2f9ad38118 examples/docs: update android applications to the latest relevant sdk's and build tools
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1622>
2022-02-07 06:51:58 +00:00
Tim-Philipp Müller
701ed92d27 Back to development
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1635>
2022-02-04 22:59:41 +00:00
Tim-Philipp Müller
f0b045a69b Release 1.20.0 2022-02-03 20:03:15 +00:00
Tim-Philipp Müller
31b5243e1d Release 1.19.90 2022-01-28 14:28:42 +00:00
Nirbheek Chauhan
1be6d6ccf5 meson: Add explicit check: kwarg to all run_command() calls
This is required since Meson 0.61.0, and causes a warning to be
emitted otherwise:

2c079d855e
https://github.com/mesonbuild/meson/issues/9300

This exposed a bunch of places where we had broken run_command()
calls, unnecessary run_command() calls, and places where check: true
should be used.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1507>
2022-01-09 18:12:47 +05:30
Olivier Crête
27808444ea webrtc janus rust: Update extra dependencies
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1332>
2021-11-10 16:13:38 +00:00
Olivier Crête
5ab09323cd webrtc multiparty rust: Upgrade all other deps
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1332>
2021-11-10 16:13:38 +00:00
Olivier Crête
c592f75cdd webrtc sendrecv rust: Upgrade all other deps
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1332>
2021-11-10 16:13:38 +00:00
Olivier Crête
26e8624c9b webrtc multiparty rust: Port to bindings 0.17 version
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1332>
2021-11-10 16:13:38 +00:00
Olivier Crête
93032b2ecc webrtc sendrecv rust: Port to bindings 0.17 version
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1332>
2021-11-10 16:13:38 +00:00
Tim-Philipp Müller
a7b376011b Back to development 2021-11-03 19:31:23 +00:00
Tim-Philipp Müller
f513c289b0 Release 1.19.3 2021-11-03 15:43:43 +00:00
Tim-Philipp Müller
8dfab0b08c meson: update for meson.build_root() and .build_source() deprecation
-> use meson.project_build_root() or .global_build_root() instead.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1183>
2021-10-20 11:20:44 +00:00
Tim-Philipp Müller
c95a7ab1ca docs: remove mention of mms from docs and mmssrc from tutorials
Prerequisite for our removing it from the cerbero build, see
https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/760

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1199>
2021-10-20 00:40:22 +00:00
Tim-Philipp Müller
f1a169f39d Back to development
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/925>
2021-09-26 01:07:02 +01:00
Thibault Saunier
c6b9c81fdd ci: Remove now useless .gitlab-ci.yml files
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/891>
2021-09-24 16:21:18 -03:00
Thibault Saunier
41ed155bdf Move files from gst-examples into the "subprojects/gst-examples/" subdir 2021-09-24 16:15:58 -03:00