Commit Graph

11 Commits

Author SHA1 Message Date
Kacper Rączy 74361d61a3 webrtcd: ability to have multiple streams publishing same message (#31700)
Use single PubMaster with dynamic services
old-commit-hash: 032c0878b8
2024-03-05 12:14:50 -08:00
Kacper Rączy b89fae4aa9 webrtcd: allow empty bridge_services_out (#31694)
* Test case

* Add messaging only if services non empty

* Fix webrtcd

* Use parametrized_class

* Bump to master teleoprtc
old-commit-hash: 09e73f8fb6
2024-03-04 15:04:28 -08:00
Cameron Clough a09300385b mypy: use implicit-optional (#31590)
* mypy: set implicit-optional = true

* find and replace '| None = None' -> '= None' in function args
old-commit-hash: 80da3aee14
2024-02-25 13:29:18 -08:00
Cameron Clough 9bd90112d0 use pyupgrade to update to new typing syntax (#31580)
* add pyupgrade hook

* run pyupgrade (pre-commit run -a)

* ruff --fix

* Revert "add pyupgrade hook"

This reverts commit 56ec18bb6b.

* revert changes to third_party/

* manual type fixes

* explicit Optional wrapping capnp objects
old-commit-hash: 995250ae49
2024-02-24 16:41:23 -08:00
Adeeb Shihadeh adcac1f207 SubMaster: improve service aliveness checks (#31391)
* bump cereal

* fix

* fixes

* single poll

* bump

* bump

---------

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 279d2c3b23
2024-02-12 10:11:37 -08:00
Kacper Rączy be6fdf72ee webrtcd: lazy import of aiortc (#31304)
* Lazy imports in webrtcd

* Lazy imports in web.py

* Type hints

* Remove FrameReaderVideoStreamTrack

* leave the aiohttp.web import

* Leave the client session

* main leftover
old-commit-hash: 35d848ad52
2024-02-05 19:04:59 -08:00
Kacper Rączy d331250b7e webrtcd: endpoint for message schema retrieval vol. 2 (#30607)
* webrtcd: endpoint for message schema retrieval (#30578)

* Capnp json schema conversion

* Schema get endpoint

* Type annotation for generate_field

* Filter empty services

* Add schema.py to release
old-commit-hash: f46f00b373
2023-12-04 23:51:52 -08:00
Shane Smiskol 13fe4389f8 Revert "webrtcd: endpoint for message schema retrieval" (#30606)
Revert "webrtcd: endpoint for message schema retrieval (#30578)"

This reverts commit d8c45e7bb8e1c79a243bde3c448df51c07de0694.
old-commit-hash: 2ae7d99143
2023-12-04 22:59:35 -08:00
Kacper Rączy a14ca845d6 webrtcd: endpoint for message schema retrieval (#30578)
* Capnp json schema conversion

* Schema get endpoint

* Type annotation for generate_field

* Filter empty services
old-commit-hash: 10eb70daf7
2023-12-04 20:43:19 -08:00
Kacper Rączy 65c1f4fd17 webrtcd: stop cereal proxy runner when data channel is closed (#30601)
Stop the proxy when channel reaches invalid state
old-commit-hash: 6a354ddab7
2023-12-04 19:14:11 -08:00
Kacper Rączy d062a97a26 webrtcd: webrtc streaming server (audio/video/cereal) (#30186)
* WebRTCClient and WebRTCServer abstractions

* webrtc client implementation

* Interactive test scripts

* Send localDescriptions as offer/asnwer, as they are different

* Tracks need to be added after setting remote description for multi-cam streaming to work

* Remove WebRTCStreamingMetadata

* Wait for tracks

* Move stuff to separate files, rename some things

* Refactor everything, create WebRTCStreamBuilder for both offer and answers

* ta flight done time to grind

* wait for incoming tracks and channels

* Dummy track and frame reader track. Fix timing.

* dt based on camera type

* first trial of the new api

* Fix audio track

* methods for checking for incoming tracks

* Web migration part 2

* Fixes for stream api

* use rtc description for web.py

* experimental cereal proxy

* remove old code from bodyav

* fix is_started

* serialize session description

* fix audio

* messaging channel wrapper

* fix audiotrack

* h264 codec preference

* Add codec preference to tracks

* override sdp codecs

* add logging

* Move cli stuff to separate file

* slight cleanup

* Fix audio track

* create codec_mime inside force_codec function

* fix incoming media estimation

* move builders to __init__

* stream updates following builders

* Update example script

* web.py support for new builder

* web speaker fixes

* StreamingMediaInfo API

* Move things around

* should_add_data_channel rename

* is_connected_and_ready

* fix linter errors

* make cli executable

* remove dumb comments

* logging support

* fix parse_info_from_offer

* improve type annotations

* satisfy linters

* Support for waiting for disconnection

* Split device tracks into video/audio files. Move audio speaker to audio.py

* default dt for dummy video track

* Fix cli

* new speaker fixes

* Remove almost all functionality from web.py

* webrtcd

* continue refactoring web.py

* after handling joystick reset in controlsd with #30409, controls are not necessary anymore

* ping endpoint

* Update js files to at least support what worked previously

* Fixes after some tests on the body

* Streaming fixes

* Remove the use of WebRTCStreamBuilder. Subclass use is now required

* Add todo

* delete all streams on shutdown

* Replace lastPing with lastChannelMessageTime

* Update ping text only if rtc is still on

* That should affect the chart too

* Fix paths in web

* use protocol in SSLContext

* remove warnings since aiortc is not used directly anymore

* check if task is done in stop

* remove channel handler wrapper, since theres only one channel

* Move things around

* Moved webrtc abstractions to separate repository

* Moved webrtcd to tools/webrtc

* Update imports

* Add bodyrtc as dependency

* Add webrtcd to process_config

* Remove usage of DummyVideoStreamTrack

* Add main to webrtcd

* Move webrtcd to system

* Fix imports

* Move cereal proxy logic outside of runner

* Incoming proxy abstractions

* Add some tests

* Make it executable

* Fix process config

* Fix imports

* Additional tests. Add tests to pyproject.toml

* Update poetry lock

* New line

* Bump aiortc to 1.6.0

* Added teleoprtc_repo as submodule, and linked its source dir

* Add init file to webrtc module

* Handle aiortc warnings

* Ignore deprecation warnings

* Ignore resource warning too

* Ignore the warnings

* find free port for test_webrtcd

* Start process inside the test case

* random sleep test

* test 2

* Test endpoint function instead

* Update comment

* Add system/webrtc to release

* default arguments for body fields

* Add teleoprtc to release

* Bump teleoprtc

* Exclude teleoprtc from static analysis

* Use separate event loop for stream session tests
old-commit-hash: f058b5d64e
2023-12-01 21:13:37 -08:00