Mercurial > libervia-backend
comparison libervia/frontends/tools/webrtc_models.py @ 4233:d01b8d002619
cli (call, file), frontends: implement webRTC data channel transfer:
- file send/receive commands now supports webRTC transfer. In `send` command, the
`--webrtc` flags is currenty used to activate it.
- WebRTC related code have been factorized and moved to `libervia.frontends.tools.webrtc*`
modules.
rel 442
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 06 Apr 2024 13:43:09 +0200 |
parents | |
children | 79c8a70e1813 |
comparison
equal
deleted
inserted
replaced
4232:0fbe5c605eb6 | 4233:d01b8d002619 |
---|---|
1 #!/usr/bin/env python3 | |
2 | |
3 # Libervia WebRTC implementation | |
4 # Copyright (C) 2009-2023 Jérôme Poisson (goffi@goffi.org) | |
5 | |
6 # This program is free software: you can redistribute it and/or modify | |
7 # it under the terms of the GNU Affero General Public License as published by | |
8 # the Free Software Foundation, either version 3 of the License, or | |
9 # (at your option) any later version. | |
10 | |
11 # This program is distributed in the hope that it will be useful, | |
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 # GNU Affero General Public License for more details. | |
15 | |
16 # You should have received a copy of the GNU Affero General Public License | |
17 # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
18 | |
19 from dataclasses import dataclass, field | |
20 from typing import Any, Callable | |
21 | |
22 from libervia.frontends.tools import jid | |
23 | |
24 | |
25 @dataclass | |
26 class CallData: | |
27 callee: jid.JID | |
28 sid: str | None = None | |
29 action_id: str | None = None | |
30 kwargs: dict[str, Any] = field(default_factory=dict) | |
31 | |
32 | |
33 @dataclass | |
34 class AppSinkData: | |
35 local_video_cb: Callable | |
36 remote_video_cb: Callable|None |