Commit graph

4,441 commits

Author SHA1 Message Date
Goffi
e77bf03f99 frontends (tools/webrtc): Add recording to file descriptor:
A new `record_fd` argument can now be used to specify a file descriptor. If set, the
incoming stream will be written there.

For now `record_fd` must be specified on `WebRTC` creation. In the future, it should
be possible to add or remove it it during a call.
2025-11-17 12:54:13 +01:00
Goffi
ed1a652029 frontends (tools/webrtc): Handle SourcesStdin:
Update the pipeline workflow to handle `SourcesStdin`. A `decodebin` is used to autodetect
the stream type, then audio and/or video elements are created and plugged accordingly.
2025-11-08 22:21:46 +01:00
Goffi
59cf0b846d cli (call), frontends(tools/webrtc_models): Add source for stdin:
If data is piped in with `auto` source, a new `SourcesStdin` is used.
2025-11-08 22:21:23 +01:00
Goffi
91b9fc7cd3 cli (call): Add arguments to set custom pipelines in sources. 2025-11-08 22:18:20 +01:00
Goffi
e91ebd8cf2 frontends (tools/webrtc): Use actual video sizes for dimension checks and PIP positioning. 2025-11-08 16:06:06 +01:00
Goffi
ac56375b70 frontends(tools/webrtc): raise webrtcbin latency to default's 200 2025-11-08 16:06:06 +01:00
Goffi
ba7ea7664a frontends (tools/webrtc): Add a video recovery mecanism:
When packets are lost, artefacts appear and the remove stream video quickly becomes mush
(can be reproduced by blocking UDP for few seconds). To recover from this situation, the
video pad is monitored for GAP events, and when they occur, a new keyframe is requested 1s
after the last GAP.
2025-11-08 16:06:06 +01:00
Goffi
3ad1f14c25 frontends (tools/Webrtc): use specific configs for video sources:
- Each video source (webcam, desktop, muted) has now a specific config, to adapt
  framerate, bitrate and keyframe max distance.
- Improve logging.
- Tuned pipeline to make it error resilient and improve bitrate.
2025-11-08 16:05:54 +01:00
Goffi
450ea7b381 frontends (tools/webrtc): More tuning for remote video sink:
This tuning is done to avoid mush after a few minutes.
2025-11-06 22:25:26 +01:00
Goffi
482de127e8 cli (call_gui): Make FastTransformation explicit. 2025-11-06 22:24:38 +01:00
Goffi
bcfd8d3285 cli (call_gui): Fix Qt events processing:
`app.sendPostedEvents` was not handling all events (notably not the window system ones),
resulting in side effects such as the image freezing during A/V calls when the mouse was
not moving for a few seconds.

Instead, `app.processEvents` is now used, even though the documentation discourages its
use: in this context, it should be fine, and it's a simple solution.
2025-11-06 22:24:10 +01:00
Goffi
cebd60ae56 frontends (tools/webrtc): Fix audio muting. 2025-11-06 22:23:57 +01:00
Goffi
a5e1280af8 frontends (tools/webrtc): Fix pipeline for desktop sharing:
Fix desktop sharing, and improve error handling.
2025-11-06 22:23:51 +01:00
Goffi
9a2830c7e2 frontends (tools/webrtc): improve ICE candidate buffering:
Buffer and wait for remote description to be set before sending ICE candidate. This avoids
the sending of ICE candidates before the negotiation is done.
2025-11-06 22:18:58 +01:00
Goffi
40b1c93f4c frontends (tools/webrtc): Fix PIP merging. 2025-11-06 22:15:47 +01:00
Goffi
d55315e75f tools (webrtc): improved pipeline:
- Adjust parameters and elements to better handle the buffering and jitter.
- Add logging, better error handling.
2025-11-06 22:10:13 +01:00
Goffi
cd8516f0bb plugin XEP-0167: fix ICE credentials handling. 2025-10-29 13:20:56 +01:00
Goffi
2fce8ba7d6 frontends (tools/webrtc): Better error handling and logging 2025-10-29 13:20:45 +01:00
Goffi
47564ec828 plugin XEP-0176: Add non standard <tickle> element:
Add the non standard <trickle> element found with Jingle negociation with Conversations.
2025-10-29 12:12:51 +01:00
Goffi
9fd3e33425 core: fix wrong calls to addElement. 2025-10-29 12:12:25 +01:00
Goffi
06661e3bbc plugin XEP-0471: minor namespaces update. 2025-10-27 12:33:57 +01:00
Goffi
d2f4623b53 doc: Add How-To for Email Gateway:
This How-To complete installation instruction with an easy-to follow document to
completely install the Email <=> XMPP gateway.

fix 466
2025-10-10 17:44:04 +02:00
Goffi
c1cb70ac1a doc (installation): Update instructions:
- Instructions have been checked and updated. OS packages dependencies have been added for
  Arch Linux.
- Added missing package.
- Reordered/refreshed instructions.
- Old/not relevant content has been removed.
- Tested on latest docker images of Debian/Arch/Unbutu.

rel 466
2025-10-10 17:44:04 +02:00
Goffi
8c35f015f1 tools (common/uri): fix missing f for f-string. 2025-10-10 17:44:04 +02:00
Goffi
fcb76a7dde cli (uri/build): fix call to uri.build_xmpp_uri. 2025-10-10 17:44:04 +02:00
Goffi
1b3593d95b plugin XEP-0050: Some more refactoring:
- Arguments are now grouped in a new `PageData` NamedTuple, making it simpler to use, and
  easier to extend.
- Page index is automatically calculated, and can be checked in callback to know which
  page to show.
- Form send by calling entity is automatically parsed, using original form to instantiate
  the right field types.
- A new `DataForm.get_field` method use Generic type as second argument to retrieve the
  right field when getting a `submit` form.
- Updated all classes registering Ad-Hoc commands to use the new system and simplify the
  code.
2025-10-10 17:44:04 +02:00
Goffi
e4e879d871 core (memory/sqla): Improve file_update by using raw value:
ORM was used, resulting in deserialisation/reserialisation of value checked for race
condition during update. In addition to the overhead, this could lead to modification even
if the value didn't change (e.g., because of JSON key order changed).

The raw value is not used to check if the row has not change between `select` and
`update`, making the method more robust.
2025-10-10 17:44:04 +02:00
Goffi
eaf6f1f00b plugin XEP-0050: Improve page data handling:
- Ad-Hoc callbacks now receive only a `client` and a `page_data`.
- `page_data` keep all important data useful to process current page in a namedtuple.
- Submitted form is automatically parsed, so callback just has to check the data from there.
- Page index is automatically handled, so the handling by callback is no longed needed.
- Session data is now splitted in 2 dict: private for `AdHocCommandHandler`, and public
  for the callback.
2025-10-10 17:44:04 +02:00
Goffi
697c7dbdbe component Emai Gateway: Add Ad-Hoc Commands:
- add Ad-Hoc commands to
    * delete an email
    * move an email to another mailbox
    * change flags on an email

- The email Message-ID is used to identify to email to manipulate, it is used as <message>
  ID on XMPP side.
- Add a `vebose` attribute on IMAPClient to see data exchanged with server.
- Refactor IDLE workflow, to fix synchronisation issues when command were emitted quickly.
- When in IDLE mode, and a command is emitted, there is now a 5s delay to restart IDLE
  mode, allowing for a series of command to be run without going to IDLE mode between each
  command.
- Fix pubsub nodes which were returned on each disco#items query.

fix 465
2025-10-10 17:44:00 +02:00
Goffi
19f4ce55de add type hints + minor reformatting. 2025-10-01 17:57:48 +02:00
Goffi
b07179a871 plugin XEP-0050: refactor to use Pydantic models:
Pydantic models are now used for Ad-Hoc commands callback data. The `AdHocCommand` model
can (de)serialise the callback by using its import string.
This change has several benefits:
- better data validation.
- the serialisation mechanism will make communication with frontends easier.
- open the door for automatic documentation.

rel 465
2025-10-01 17:57:47 +02:00
Goffi
286e931a7f tools (utils): Add maybe_async function:
`maybe_async` can be used to call a function which may be or not `async`. It doesn't use
`defer.ensureDeferred` contrary to `ad_defered`, so the call stack is not lost, and it's
easier to debug when an Exception is raised.
2025-10-01 17:57:47 +02:00
Goffi
bf93abb343 core (memory): Use better types for Sessions:
- `SessionData` is not a dedicated type instead of a simple `dict`.
- `SessionInfo` is now handled by a named tuple.
- Add type hints.

rel 465
2025-10-01 17:57:47 +02:00
Goffi
b882fb53ea plugin XEP-0004: New data form implementation using Pydantic:
This new model is easier to manipulate and serialize, and use the benefits from Pydantic's
data validation mechanisms. It has method to easily convert to/from Wokkel data form or
to/from a domish.Element.

rel 465
2025-10-01 17:57:47 +02:00
Goffi
a32b8bf9e8 plugin XEP-0050: use Enums and add type hints:
- Replaces namedtuple with enums which are more appropriate here.
- Add docstrings and type hints to `AdHocCommand`

rel 465
2025-10-01 17:57:47 +02:00
Goffi
a37101adc7 install [pyproject.toml]: update treq version. 2025-10-01 16:07:51 +02:00
Goffi
acd46d1bf8 install [pyproject.toml]: restrict Twisted maximum version. 2025-10-01 15:50:00 +02:00
Goffi
c4d00d63da cli: Fix exit traceback on Twisted based loop (e.g.; pb bridge). 2025-10-01 14:55:32 +02:00
Goffi
d9a5257438 bridge (pb): Fix broken call to init_bridge. 2025-10-01 14:55:27 +02:00
Goffi
96bf3af324 Global reformatting with black. 2025-09-13 10:46:10 +02:00
Goffi
5ec4fdd787 doc (components): Add message cleaning section to email gateway doc:
fix 464
2025-09-11 21:17:51 +02:00
Goffi
2b9b14ba1b tests (unit/components): Add tests for email gateway's cleaning module:
rel 464
2025-09-11 21:17:51 +02:00
Goffi
63edb309f8 component email message: Mailing list messages cleaning:
For mailing-list messages:
    - convert all text-only messages to XHTML for consistency.
    - detect and flag "noisy" content, i.e. content which are not useful and annoying in
      forum-like view (full-lenght quoted previous messages, mailing-list signature)

rel 464
2025-09-11 21:17:47 +02:00
Goffi
412db6a216 component email (imap): fetch all recent emails instead of only the last one. 2025-09-11 21:10:35 +02:00
Goffi
81f63ef93e plugin XEP-0277: add mentions to extra data:
rel 463
2025-09-06 16:31:24 +02:00
Goffi
5c9c57588c plugin XEP-0376: Fix type hint for node which is optional in subscriptions. 2025-09-05 19:32:47 +02:00
Goffi
0a42dd3da3 core (main): renamed hasFeature to has_feature to fix inconsistency. 2025-09-05 19:31:50 +02:00
Goffi
b816dc5e54 cli (pubsub): List support first draft + doc:
Basic support for listing hierarchy of nodes with pubsub extended discovery. Nodes are
displayed as a tree, depth can be specified.

rel 463
2025-08-31 12:34:37 +02:00
Goffi
57e71c326d component email gateway: implement pubsub relationships and pubsub extended discovery:
- Pubsub relationships are used to set node hierarchy (comments nodes are set as children of
corresponding pubsub nodes).
- XEP-0499 Extended Pubsub Discovery is used to return hierarchy of pubsub nodes and
  items.

rel 463
2025-08-31 12:34:37 +02:00
Goffi
70e76dd190 plugin XEP-0499 Pubsub Extended Discovery implementation:
- Implement Pubsub Extended Discovery, and Pydantic models to handle the data easily.
- `client.discoHandler` initialisation has been moved in `core.xmpp` at an earlier stage
  of the workflow as it has to be initialised so XEP-0499 could remove the default disco
  handler to handle disco itself.
- Removed `Disco handled` trigger point as it was not used.

rel 463
2025-08-31 12:34:30 +02:00