wrtc 0.0.0.dev8__tar.gz → 0.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- wrtc-0.0.1/.clang-format +23 -0
- wrtc-0.0.1/.clang-tidy +48 -0
- wrtc-0.0.1/.gitignore +31 -0
- wrtc-0.0.1/.mailmap +2 -0
- wrtc-0.0.1/.readthedocs.yaml +23 -0
- wrtc-0.0.1/CHANGES.md +151 -0
- wrtc-0.0.1/CMakeLists.txt +37 -0
- wrtc-0.0.1/CONTRIBUTING.md +46 -0
- {wrtc-0.0.0.dev8 → wrtc-0.0.1}/LICENSE.md +1 -3
- wrtc-0.0.1/Makefile +86 -0
- wrtc-0.0.1/PKG-INFO +203 -0
- wrtc-0.0.1/README.md +151 -0
- wrtc-0.0.1/SECURITY.md +9 -0
- wrtc-0.0.1/THIRD_PARTY_LICENSES.md +2929 -0
- wrtc-0.0.1/benchmarks/RESULTS.md +64 -0
- wrtc-0.0.1/benchmarks/__init__.py +8 -0
- wrtc-0.0.1/benchmarks/__main__.py +212 -0
- wrtc-0.0.1/benchmarks/measure.py +134 -0
- wrtc-0.0.1/benchmarks/media.py +436 -0
- wrtc-0.0.1/cmake/libcxx/README.md +21 -0
- wrtc-0.0.1/cmake/libcxx/config.sha256 +2 -0
- wrtc-0.0.1/cmake/libcxx/headers.sha256 +222 -0
- wrtc-0.0.1/cmake/libcxx/runtime.sha256 +275 -0
- wrtc-0.0.1/cmake/libcxx/update.py +271 -0
- wrtc-0.0.1/cmake/libwebrtc.cmake +349 -0
- wrtc-0.0.1/cmake/libwebrtc_linux_fixups.cpp +23 -0
- wrtc-0.0.1/cmake/openh264.cmake +81 -0
- wrtc-0.0.1/cmake/openh264.sha256 +4 -0
- wrtc-0.0.1/pyproject.toml +246 -0
- wrtc-0.0.1/python-webrtc/cpp/CMakeLists.txt +55 -0
- wrtc-0.0.1/python-webrtc/cpp/NATIVE.md +124 -0
- wrtc-0.0.1/python-webrtc/cpp/src/codecs/openh264.cpp +237 -0
- wrtc-0.0.1/python-webrtc/cpp/src/codecs/openh264.h +46 -0
- wrtc-0.0.1/python-webrtc/cpp/src/codecs/openh264_decoder.cpp +106 -0
- wrtc-0.0.1/python-webrtc/cpp/src/codecs/openh264_decoder.h +44 -0
- wrtc-0.0.1/python-webrtc/cpp/src/codecs/videotoolbox.h +42 -0
- wrtc-0.0.1/python-webrtc/cpp/src/codecs/videotoolbox.mm +483 -0
- wrtc-0.0.1/python-webrtc/cpp/src/enums/enums.cpp +22 -0
- wrtc-0.0.1/python-webrtc/cpp/src/enums/enums.h +359 -0
- wrtc-0.0.1/python-webrtc/cpp/src/exceptions.cpp +65 -0
- wrtc-0.0.1/python-webrtc/cpp/src/exceptions.h +89 -0
- wrtc-0.0.1/python-webrtc/cpp/src/functions/functions.cpp +20 -0
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/enums/webrtc/rtc_ice_role.h → wrtc-0.0.1/python-webrtc/cpp/src/functions/functions.h +6 -3
- wrtc-0.0.1/python-webrtc/cpp/src/functions/get_user_media.cpp +56 -0
- wrtc-0.0.1/python-webrtc/cpp/src/functions/get_user_media.h +23 -0
- wrtc-0.0.1/python-webrtc/cpp/src/interfaces/interfaces.cpp +71 -0
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/enums/webrtc/rtc_ice_transport_state.h → wrtc-0.0.1/python-webrtc/cpp/src/interfaces/interfaces.h +6 -3
- wrtc-0.0.1/python-webrtc/cpp/src/interfaces/media_stream.cpp +191 -0
- wrtc-0.0.1/python-webrtc/cpp/src/interfaces/media_stream.h +89 -0
- wrtc-0.0.1/python-webrtc/cpp/src/interfaces/media_stream_track.cpp +438 -0
- wrtc-0.0.1/python-webrtc/cpp/src/interfaces/media_stream_track.h +192 -0
- wrtc-0.0.1/python-webrtc/cpp/src/interfaces/peer_connection_factory.cpp +226 -0
- wrtc-0.0.1/python-webrtc/cpp/src/interfaces/peer_connection_factory.h +90 -0
- wrtc-0.0.1/python-webrtc/cpp/src/interfaces/rtc_audio_track_source.cpp +75 -0
- wrtc-0.0.1/python-webrtc/cpp/src/interfaces/rtc_audio_track_source.h +60 -0
- wrtc-0.0.1/python-webrtc/cpp/src/interfaces/rtc_data_channel.cpp +308 -0
- wrtc-0.0.1/python-webrtc/cpp/src/interfaces/rtc_data_channel.h +142 -0
- wrtc-0.0.1/python-webrtc/cpp/src/interfaces/rtc_dtls_transport.cpp +188 -0
- wrtc-0.0.1/python-webrtc/cpp/src/interfaces/rtc_dtls_transport.h +103 -0
- wrtc-0.0.1/python-webrtc/cpp/src/interfaces/rtc_dtmf_sender.cpp +139 -0
- wrtc-0.0.1/python-webrtc/cpp/src/interfaces/rtc_dtmf_sender.h +82 -0
- wrtc-0.0.1/python-webrtc/cpp/src/interfaces/rtc_ice_transport.cpp +594 -0
- wrtc-0.0.1/python-webrtc/cpp/src/interfaces/rtc_ice_transport.h +229 -0
- wrtc-0.0.1/python-webrtc/cpp/src/interfaces/rtc_peer_connection/create_session_description_observer.cpp +31 -0
- wrtc-0.0.1/python-webrtc/cpp/src/interfaces/rtc_peer_connection/create_session_description_observer.h +46 -0
- wrtc-0.0.1/python-webrtc/cpp/src/interfaces/rtc_peer_connection/descriptions.cpp +487 -0
- wrtc-0.0.1/python-webrtc/cpp/src/interfaces/rtc_peer_connection/ice.cpp +338 -0
- wrtc-0.0.1/python-webrtc/cpp/src/interfaces/rtc_peer_connection/rtc_peer_connection.cpp +922 -0
- wrtc-0.0.1/python-webrtc/cpp/src/interfaces/rtc_peer_connection/rtc_peer_connection.h +463 -0
- wrtc-0.0.1/python-webrtc/cpp/src/interfaces/rtc_peer_connection/rtp.cpp +182 -0
- wrtc-0.0.1/python-webrtc/cpp/src/interfaces/rtc_peer_connection/sdp.cpp +194 -0
- wrtc-0.0.1/python-webrtc/cpp/src/interfaces/rtc_peer_connection/sdp.h +55 -0
- wrtc-0.0.1/python-webrtc/cpp/src/interfaces/rtc_peer_connection/set_session_description_observer.h +45 -0
- wrtc-0.0.1/python-webrtc/cpp/src/interfaces/rtc_peer_connection/stats_collector_callback.h +56 -0
- wrtc-0.0.1/python-webrtc/cpp/src/interfaces/rtc_rtp_receiver.cpp +190 -0
- wrtc-0.0.1/python-webrtc/cpp/src/interfaces/rtc_rtp_receiver.h +109 -0
- wrtc-0.0.1/python-webrtc/cpp/src/interfaces/rtc_rtp_sender.cpp +296 -0
- wrtc-0.0.1/python-webrtc/cpp/src/interfaces/rtc_rtp_sender.h +119 -0
- wrtc-0.0.1/python-webrtc/cpp/src/interfaces/rtc_rtp_transceiver.cpp +135 -0
- wrtc-0.0.1/python-webrtc/cpp/src/interfaces/rtc_rtp_transceiver.h +92 -0
- wrtc-0.0.1/python-webrtc/cpp/src/interfaces/rtc_sctp_transport.cpp +116 -0
- wrtc-0.0.1/python-webrtc/cpp/src/interfaces/rtc_sctp_transport.h +87 -0
- wrtc-0.0.1/python-webrtc/cpp/src/interfaces/rtc_video_track_source.cpp +138 -0
- wrtc-0.0.1/python-webrtc/cpp/src/interfaces/rtc_video_track_source.h +103 -0
- wrtc-0.0.1/python-webrtc/cpp/src/media/audio_samples.cpp +186 -0
- wrtc-0.0.1/python-webrtc/cpp/src/media/audio_samples.h +31 -0
- wrtc-0.0.1/python-webrtc/cpp/src/media/boringssl.h +58 -0
- wrtc-0.0.1/python-webrtc/cpp/src/media/encoded_frame.cpp +145 -0
- wrtc-0.0.1/python-webrtc/cpp/src/media/encoded_frame.h +52 -0
- wrtc-0.0.1/python-webrtc/cpp/src/media/frame_transformer_bridge.cpp +161 -0
- wrtc-0.0.1/python-webrtc/cpp/src/media/frame_transformer_bridge.h +137 -0
- wrtc-0.0.1/python-webrtc/cpp/src/media/media.cpp +32 -0
- wrtc-0.0.1/python-webrtc/cpp/src/media/media.h +23 -0
- wrtc-0.0.1/python-webrtc/cpp/src/media/media_stream_track_processor.cpp +213 -0
- wrtc-0.0.1/python-webrtc/cpp/src/media/media_stream_track_processor.h +138 -0
- wrtc-0.0.1/python-webrtc/cpp/src/media/playout_audio_device.cpp +210 -0
- wrtc-0.0.1/python-webrtc/cpp/src/media/playout_audio_device.h +167 -0
- wrtc-0.0.1/python-webrtc/cpp/src/media/rtc_rtp_script_transform.cpp +203 -0
- wrtc-0.0.1/python-webrtc/cpp/src/media/rtc_rtp_script_transform.h +90 -0
- wrtc-0.0.1/python-webrtc/cpp/src/media/sframe.cpp +530 -0
- wrtc-0.0.1/python-webrtc/cpp/src/media/sframe.h +123 -0
- wrtc-0.0.1/python-webrtc/cpp/src/media/sframe_transform.cpp +156 -0
- wrtc-0.0.1/python-webrtc/cpp/src/media/sframe_transform.h +74 -0
- wrtc-0.0.1/python-webrtc/cpp/src/media/source_control.h +83 -0
- wrtc-0.0.1/python-webrtc/cpp/src/media/track_generator.cpp +156 -0
- wrtc-0.0.1/python-webrtc/cpp/src/media/track_generator.h +77 -0
- wrtc-0.0.1/python-webrtc/cpp/src/media/track_monitor.h +100 -0
- wrtc-0.0.1/python-webrtc/cpp/src/media/video_frame_buffer.cpp +496 -0
- wrtc-0.0.1/python-webrtc/cpp/src/media/video_frame_buffer.h +125 -0
- wrtc-0.0.1/python-webrtc/cpp/src/models/models.cpp +30 -0
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/enums/webrtc/cricket_ice_gathering_state.h → wrtc-0.0.1/python-webrtc/cpp/src/models/models.h +7 -3
- wrtc-0.0.1/python-webrtc/cpp/src/models/python_webrtc/rtc_certificate.cpp +52 -0
- wrtc-0.0.1/python-webrtc/cpp/src/models/python_webrtc/rtc_certificate.h +53 -0
- wrtc-0.0.1/python-webrtc/cpp/src/models/python_webrtc/rtc_configuration.cpp +68 -0
- wrtc-0.0.1/python-webrtc/cpp/src/models/python_webrtc/rtc_configuration.h +61 -0
- wrtc-0.0.1/python-webrtc/cpp/src/models/python_webrtc/rtc_ice_candidate.cpp +45 -0
- wrtc-0.0.1/python-webrtc/cpp/src/models/python_webrtc/rtc_ice_candidate.h +42 -0
- wrtc-0.0.1/python-webrtc/cpp/src/models/python_webrtc/rtc_session_description.cpp +35 -0
- wrtc-0.0.1/python-webrtc/cpp/src/models/python_webrtc/rtc_session_description.h +37 -0
- {wrtc-0.0.0.dev8 → wrtc-0.0.1}/python-webrtc/cpp/src/models/python_webrtc/rtc_session_description_init.cpp +6 -6
- wrtc-0.0.1/python-webrtc/cpp/src/models/python_webrtc/rtc_session_description_init.h +36 -0
- wrtc-0.0.1/python-webrtc/cpp/src/models/webrtc/rtp_parameters.cpp +106 -0
- wrtc-0.0.1/python-webrtc/cpp/src/models/webrtc/rtp_parameters.h +22 -0
- wrtc-0.0.1/python-webrtc/cpp/src/models/webrtc/rtp_transceiver_init.h +28 -0
- wrtc-0.0.1/python-webrtc/cpp/src/module.cpp +56 -0
- wrtc-0.0.1/python-webrtc/cpp/src/testing.cpp +259 -0
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/enums/python_webrtc/rtc_ice_component.h → wrtc-0.0.1/python-webrtc/cpp/src/testing.h +6 -5
- wrtc-0.0.1/python-webrtc/cpp/src/utils/absl_optional.h +28 -0
- wrtc-0.0.1/python-webrtc/cpp/src/utils/buffer.h +53 -0
- wrtc-0.0.1/python-webrtc/cpp/src/utils/dispatcher.cpp +258 -0
- wrtc-0.0.1/python-webrtc/cpp/src/utils/dispatcher.h +93 -0
- wrtc-0.0.1/python-webrtc/cpp/src/utils/field_trials.h +67 -0
- wrtc-0.0.1/python-webrtc/cpp/src/utils/gil.h +71 -0
- wrtc-0.0.1/python-webrtc/cpp/src/utils/held_events.h +63 -0
- wrtc-0.0.1/python-webrtc/cpp/src/utils/libwebrtc_thread.h +130 -0
- wrtc-0.0.1/python-webrtc/cpp/src/utils/locked_function.h +39 -0
- wrtc-0.0.1/python-webrtc/cpp/src/utils/mailbox.cpp +212 -0
- wrtc-0.0.1/python-webrtc/cpp/src/utils/mailbox.h +162 -0
- wrtc-0.0.1/python-webrtc/cpp/src/utils/native_object.h +132 -0
- wrtc-0.0.1/python-webrtc/cpp/src/utils/paced_thread.h +69 -0
- wrtc-0.0.1/python-webrtc/cpp/src/utils/parking.h +98 -0
- wrtc-0.0.1/python-webrtc/cpp/src/utils/registry.h +93 -0
- wrtc-0.0.1/python-webrtc/cpp/src/utils/surfaced.h +63 -0
- wrtc-0.0.1/python-webrtc/python/webrtc/__init__.py +547 -0
- wrtc-0.0.1/python-webrtc/python/webrtc/base.py +129 -0
- wrtc-0.0.1/python-webrtc/python/webrtc/enums.py +997 -0
- wrtc-0.0.1/python-webrtc/python/webrtc/exceptions.py +254 -0
- wrtc-0.0.1/python-webrtc/python/webrtc/interfaces/__init__.py +8 -0
- wrtc-0.0.1/python-webrtc/python/webrtc/interfaces/field_trials.py +137 -0
- wrtc-0.0.1/python-webrtc/python/webrtc/interfaces/media_devices.py +305 -0
- wrtc-0.0.1/python-webrtc/python/webrtc/interfaces/media_stream.py +198 -0
- wrtc-0.0.1/python-webrtc/python/webrtc/interfaces/media_stream_track.py +571 -0
- wrtc-0.0.1/python-webrtc/python/webrtc/interfaces/media_stream_track_processor.py +199 -0
- wrtc-0.0.1/python-webrtc/python/webrtc/interfaces/rtc_data_channel.py +423 -0
- wrtc-0.0.1/python-webrtc/python/webrtc/interfaces/rtc_dtls_transport.py +129 -0
- wrtc-0.0.1/python-webrtc/python/webrtc/interfaces/rtc_dtmf_sender.py +107 -0
- wrtc-0.0.1/python-webrtc/python/webrtc/interfaces/rtc_ice_transport.py +382 -0
- wrtc-0.0.1/python-webrtc/python/webrtc/interfaces/rtc_peer_connection.py +1091 -0
- wrtc-0.0.1/python-webrtc/python/webrtc/interfaces/rtc_rtp_receiver.py +183 -0
- wrtc-0.0.1/python-webrtc/python/webrtc/interfaces/rtc_rtp_script_transform.py +400 -0
- wrtc-0.0.1/python-webrtc/python/webrtc/interfaces/rtc_rtp_sender.py +363 -0
- wrtc-0.0.1/python-webrtc/python/webrtc/interfaces/rtc_rtp_transceiver.py +194 -0
- wrtc-0.0.1/python-webrtc/python/webrtc/interfaces/rtc_sctp_transport.py +90 -0
- wrtc-0.0.1/python-webrtc/python/webrtc/interfaces/sframe_transform.py +376 -0
- wrtc-0.0.1/python-webrtc/python/webrtc/interfaces/track_generator.py +189 -0
- wrtc-0.0.1/python-webrtc/python/webrtc/loopback.py +32 -0
- wrtc-0.0.1/python-webrtc/python/webrtc/models/__init__.py +8 -0
- wrtc-0.0.1/python-webrtc/python/webrtc/models/audio_data.py +423 -0
- wrtc-0.0.1/python-webrtc/python/webrtc/models/blob.py +242 -0
- wrtc-0.0.1/python-webrtc/python/webrtc/models/closable.py +33 -0
- wrtc-0.0.1/python-webrtc/python/webrtc/models/dictionary.py +97 -0
- wrtc-0.0.1/python-webrtc/python/webrtc/models/events.py +484 -0
- wrtc-0.0.1/python-webrtc/python/webrtc/models/media_track_constraints.py +505 -0
- wrtc-0.0.1/python-webrtc/python/webrtc/models/rtc_certificate.py +229 -0
- wrtc-0.0.1/python-webrtc/python/webrtc/models/rtc_configuration.py +278 -0
- wrtc-0.0.1/python-webrtc/python/webrtc/models/rtc_encoded_frame.py +348 -0
- wrtc-0.0.1/python-webrtc/python/webrtc/models/rtc_ice_candidate.py +464 -0
- wrtc-0.0.1/python-webrtc/python/webrtc/models/rtc_offer_answer_options.py +57 -0
- wrtc-0.0.1/python-webrtc/python/webrtc/models/rtc_rtp_transceiver_init.py +61 -0
- wrtc-0.0.1/python-webrtc/python/webrtc/models/rtc_session_description.py +95 -0
- wrtc-0.0.1/python-webrtc/python/webrtc/models/rtc_session_description_init.py +77 -0
- wrtc-0.0.1/python-webrtc/python/webrtc/models/rtc_stats.py +1325 -0
- wrtc-0.0.1/python-webrtc/python/webrtc/models/rtp_parameters.py +525 -0
- wrtc-0.0.1/python-webrtc/python/webrtc/models/rtp_source.py +70 -0
- wrtc-0.0.1/python-webrtc/python/webrtc/models/sframe_transform_options.py +63 -0
- wrtc-0.0.1/python-webrtc/python/webrtc/models/video_frame.py +1138 -0
- wrtc-0.0.1/python-webrtc/python/webrtc/openh264.py +219 -0
- wrtc-0.0.1/python-webrtc/python/webrtc/openh264_license.txt +59 -0
- wrtc-0.0.1/python-webrtc/python/webrtc/py.typed +0 -0
- wrtc-0.0.1/python-webrtc/python/webrtc/streams.py +1734 -0
- wrtc-0.0.1/python-webrtc/python/webrtc/utils/__init__.py +8 -0
- wrtc-0.0.1/python-webrtc/python/webrtc/utils/events.py +595 -0
- wrtc-0.0.1/python-webrtc/python/webrtc/utils/lifetime.py +84 -0
- wrtc-0.0.1/python-webrtc/python/webrtc/utils/loops.py +673 -0
- wrtc-0.0.1/python-webrtc/python/webrtc/utils/names.py +74 -0
- wrtc-0.0.1/python-webrtc/python/webrtc/utils/operations.py +129 -0
- wrtc-0.0.1/python-webrtc/python/webrtc/utils/strings.py +19 -0
- wrtc-0.0.1/python-webrtc/python/webrtc/utils/transfer.py +63 -0
- wrtc-0.0.1/scripts/__init__.py +8 -0
- wrtc-0.0.1/scripts/debug/README.md +95 -0
- wrtc-0.0.1/scripts/debug/__init__.py +8 -0
- wrtc-0.0.1/scripts/debug/cores.entitlements +8 -0
- wrtc-0.0.1/scripts/debug/cover.py +432 -0
- wrtc-0.0.1/scripts/debug/hunt.py +962 -0
- wrtc-0.0.1/scripts/debug/stacks.py +171 -0
- wrtc-0.0.1/scripts/debug/synthetic.py +67 -0
- wrtc-0.0.1/scripts/debug/triage.py +401 -0
- wrtc-0.0.1/stubs/wrtc/__init__.pyi +966 -0
- wrtc-0.0.1/stubs/wrtc/_testing.pyi +81 -0
- {wrtc-0.0.0.dev8/python-webrtc/python/webrtc/utils → wrtc-0.0.1/tests}/__init__.py +1 -1
- wrtc-0.0.1/tests/chaos.py +638 -0
- wrtc-0.0.1/tests/conftest.py +257 -0
- wrtc-0.0.1/tests/fuzz/README.md +26 -0
- {wrtc-0.0.0.dev8/python-webrtc/python/webrtc/models → wrtc-0.0.1/tests/fuzz}/__init__.py +1 -1
- wrtc-0.0.1/tests/fuzz/fuzz_audio_data.py +92 -0
- wrtc-0.0.1/tests/fuzz/fuzz_encoded_frame.py +393 -0
- wrtc-0.0.1/tests/fuzz/fuzz_generator.py +139 -0
- wrtc-0.0.1/tests/fuzz/fuzz_native_buffers.py +95 -0
- wrtc-0.0.1/tests/fuzz/fuzz_sframe.py +207 -0
- wrtc-0.0.1/tests/fuzz/fuzz_sframe_stream.py +320 -0
- wrtc-0.0.1/tests/fuzz/fuzz_video_frame.py +137 -0
- wrtc-0.0.1/tests/fuzz/inputs.py +108 -0
- wrtc-0.0.1/tests/h264.py +111 -0
- wrtc-0.0.1/tests/helpers.py +483 -0
- wrtc-0.0.1/tests/idl/LICENSE-W3C.md +44 -0
- wrtc-0.0.1/tests/idl/README.md +37 -0
- {wrtc-0.0.0.dev8/python-webrtc/python/webrtc/interfaces → wrtc-0.0.1/tests/idl}/__init__.py +1 -1
- wrtc-0.0.1/tests/idl/__main__.py +55 -0
- wrtc-0.0.1/tests/idl/child.py +39 -0
- wrtc-0.0.1/tests/idl/compare.py +443 -0
- wrtc-0.0.1/tests/idl/expectations.json +96 -0
- wrtc-0.0.1/tests/idl/expectations.py +34 -0
- wrtc-0.0.1/tests/idl/spec.py +324 -0
- wrtc-0.0.1/tests/idl/test_compare.py +254 -0
- wrtc-0.0.1/tests/idl/test_idl.py +38 -0
- wrtc-0.0.1/tests/idl/webrtc-extensions.idl +108 -0
- wrtc-0.0.1/tests/isolation.py +114 -0
- {wrtc-0.0.0.dev8/python-webrtc/python/webrtc/functions → wrtc-0.0.1/tests/rtc_peer_connection}/__init__.py +1 -1
- wrtc-0.0.1/tests/rtc_peer_connection/test_add_track.py +225 -0
- wrtc-0.0.1/tests/rtc_peer_connection/test_add_transceiver.py +198 -0
- wrtc-0.0.1/tests/rtc_rtp_transceiver/__init__.py +6 -0
- wrtc-0.0.1/tests/rtc_rtp_transceiver/test_direction.py +66 -0
- wrtc-0.0.1/tests/rtc_rtp_transceiver/test_stop.py +157 -0
- wrtc-0.0.1/tests/test_audio_data.py +253 -0
- wrtc-0.0.1/tests/test_blob.py +72 -0
- wrtc-0.0.1/tests/test_configuration.py +466 -0
- wrtc-0.0.1/tests/test_connection_states.py +198 -0
- wrtc-0.0.1/tests/test_data_channel.py +303 -0
- wrtc-0.0.1/tests/test_docstrings.py +75 -0
- wrtc-0.0.1/tests/test_e2e.py +82 -0
- wrtc-0.0.1/tests/test_encoded_transform.py +589 -0
- wrtc-0.0.1/tests/test_enums.py +85 -0
- wrtc-0.0.1/tests/test_events.py +506 -0
- wrtc-0.0.1/tests/test_field_trials.py +285 -0
- wrtc-0.0.1/tests/test_free_threading.py +145 -0
- wrtc-0.0.1/tests/test_helpers.py +86 -0
- wrtc-0.0.1/tests/test_ice_transport.py +142 -0
- wrtc-0.0.1/tests/test_isolation.py +98 -0
- wrtc-0.0.1/tests/test_lifetime.py +1172 -0
- wrtc-0.0.1/tests/test_lifetime_model.py +572 -0
- wrtc-0.0.1/tests/test_lifetime_transforms.py +629 -0
- wrtc-0.0.1/tests/test_loopback.py +57 -0
- wrtc-0.0.1/tests/test_loops.py +570 -0
- wrtc-0.0.1/tests/test_mailbox.py +342 -0
- wrtc-0.0.1/tests/test_media_devices.py +189 -0
- wrtc-0.0.1/tests/test_media_e2e.py +171 -0
- wrtc-0.0.1/tests/test_media_stream_track_processor.py +398 -0
- wrtc-0.0.1/tests/test_media_stress.py +229 -0
- wrtc-0.0.1/tests/test_native_calls.py +143 -0
- wrtc-0.0.1/tests/test_native_rules.py +95 -0
- wrtc-0.0.1/tests/test_openh264.py +236 -0
- wrtc-0.0.1/tests/test_openh264_encoder.py +184 -0
- wrtc-0.0.1/tests/test_openh264_interop.py +226 -0
- wrtc-0.0.1/tests/test_operations.py +215 -0
- wrtc-0.0.1/tests/test_package.py +45 -0
- wrtc-0.0.1/tests/test_robustness_chaos.py +94 -0
- wrtc-0.0.1/tests/test_robustness_exit.py +126 -0
- wrtc-0.0.1/tests/test_robustness_exit_handlers.py +96 -0
- wrtc-0.0.1/tests/test_robustness_media.py +153 -0
- wrtc-0.0.1/tests/test_robustness_threads.py +292 -0
- wrtc-0.0.1/tests/test_robustness_transforms.py +284 -0
- wrtc-0.0.1/tests/test_rtp_sender_receiver.py +382 -0
- wrtc-0.0.1/tests/test_sdp_munging.py +338 -0
- wrtc-0.0.1/tests/test_session_description.py +90 -0
- wrtc-0.0.1/tests/test_sframe.py +686 -0
- wrtc-0.0.1/tests/test_stats.py +347 -0
- wrtc-0.0.1/tests/test_streams.py +606 -0
- wrtc-0.0.1/tests/test_track_settings.py +298 -0
- wrtc-0.0.1/tests/test_tracks.py +242 -0
- wrtc-0.0.1/tests/test_video.py +116 -0
- wrtc-0.0.1/tests/test_video_frame.py +451 -0
- wrtc-0.0.1/tests/test_videotoolbox.py +239 -0
- wrtc-0.0.1/uv.lock +2832 -0
- wrtc-0.0.0.dev8/CMakeLists.txt +0 -266
- wrtc-0.0.0.dev8/MANIFEST.in +0 -14
- wrtc-0.0.0.dev8/PKG-INFO +0 -210
- wrtc-0.0.0.dev8/README.md +0 -167
- wrtc-0.0.0.dev8/THIRD_PARTY_LICENSES.md +0 -1313
- wrtc-0.0.0.dev8/python-webrtc/cpp/CMakeLists.txt +0 -183
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/config.h.in +0 -10
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/enums/enums.cpp +0 -47
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/enums/enums.h +0 -19
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/enums/python_webrtc/rtc_ice_component.cpp +0 -20
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/enums/webrtc/cricket_ice_gathering_state.cpp +0 -22
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/enums/webrtc/ice_connection_state.cpp +0 -27
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/enums/webrtc/ice_connection_state.h +0 -19
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/enums/webrtc/ice_gathering_state.cpp +0 -22
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/enums/webrtc/ice_gathering_state.h +0 -19
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/enums/webrtc/peer_connection_state.cpp +0 -27
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/enums/webrtc/peer_connection_state.h +0 -19
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/enums/webrtc/rtc_ice_role.cpp +0 -22
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/enums/webrtc/rtc_ice_transport_state.cpp +0 -26
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/enums/webrtc/rtp_transceiver_direction.cpp +0 -24
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/enums/webrtc/rtp_transceiver_direction.h +0 -19
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/enums/webrtc/sdp_type.cpp +0 -23
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/enums/webrtc/sdp_type.h +0 -19
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/enums/webrtc/source_state.cpp +0 -23
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/enums/webrtc/source_state.h +0 -19
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/enums/webrtc/track_state.cpp +0 -21
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/enums/webrtc/track_state.h +0 -19
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/exceptions.cpp +0 -53
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/exceptions.h +0 -60
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/functions/functions.cpp +0 -18
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/functions/functions.h +0 -19
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/functions/get_user_media.cpp +0 -39
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/interfaces/create_session_description_observer.cpp +0 -28
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/interfaces/create_session_description_observer.h +0 -33
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/interfaces/interfaces.cpp +0 -33
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/interfaces/interfaces.h +0 -19
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/interfaces/media_stream.cpp +0 -217
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/interfaces/media_stream.h +0 -109
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/interfaces/media_stream_track.cpp +0 -131
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/interfaces/media_stream_track.h +0 -74
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/interfaces/peer_connection_factory.cpp +0 -133
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/interfaces/peer_connection_factory.h +0 -71
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/interfaces/rtc_audio_source.cpp +0 -36
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/interfaces/rtc_audio_source.h +0 -33
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/interfaces/rtc_audio_track_source.cpp +0 -46
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/interfaces/rtc_audio_track_source.h +0 -41
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/interfaces/rtc_ice_transport.cpp +0 -128
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/interfaces/rtc_ice_transport.h +0 -65
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/interfaces/rtc_peer_connection.cpp +0 -315
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/interfaces/rtc_peer_connection.h +0 -101
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/interfaces/rtc_rtp_receiver.cpp +0 -44
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/interfaces/rtc_rtp_receiver.h +0 -36
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/interfaces/rtc_rtp_sender.cpp +0 -50
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/interfaces/rtc_rtp_sender.h +0 -44
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/interfaces/rtc_rtp_transceiver.cpp +0 -95
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/interfaces/rtc_rtp_transceiver.h +0 -61
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/interfaces/set_session_description_observer.cpp +0 -20
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/interfaces/set_session_description_observer.h +0 -32
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/models/models.cpp +0 -24
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/models/models.h +0 -19
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/models/python_webrtc/rtc_on_data_event.cpp +0 -28
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/models/python_webrtc/rtc_on_data_event.h +0 -29
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/models/python_webrtc/rtc_session_description.cpp +0 -49
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/models/python_webrtc/rtc_session_description.h +0 -36
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/models/python_webrtc/rtc_session_description_init.h +0 -33
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/module.cpp +0 -42
- wrtc-0.0.0.dev8/python-webrtc/cpp/src/utils/instance_holder.h +0 -55
- wrtc-0.0.0.dev8/python-webrtc/python/webrtc/__init__.py +0 -82
- wrtc-0.0.0.dev8/python-webrtc/python/webrtc/base.py +0 -43
- wrtc-0.0.0.dev8/python-webrtc/python/webrtc/functions/get_user_media.py +0 -30
- wrtc-0.0.0.dev8/python-webrtc/python/webrtc/interfaces/media_stream.py +0 -92
- wrtc-0.0.0.dev8/python-webrtc/python/webrtc/interfaces/media_stream_track.py +0 -66
- wrtc-0.0.0.dev8/python-webrtc/python/webrtc/interfaces/rtc_audio_source.py +0 -46
- wrtc-0.0.0.dev8/python-webrtc/python/webrtc/interfaces/rtc_ice_transport.py +0 -51
- wrtc-0.0.0.dev8/python-webrtc/python/webrtc/interfaces/rtc_peer_connection.py +0 -175
- wrtc-0.0.0.dev8/python-webrtc/python/webrtc/interfaces/rtc_rtp_receiver.py +0 -28
- wrtc-0.0.0.dev8/python-webrtc/python/webrtc/interfaces/rtc_rtp_sender.py +0 -32
- wrtc-0.0.0.dev8/python-webrtc/python/webrtc/interfaces/rtc_rtp_transceiver.py +0 -89
- wrtc-0.0.0.dev8/python-webrtc/python/webrtc/models/rtc_on_data_event.py +0 -81
- wrtc-0.0.0.dev8/python-webrtc/python/webrtc/models/rtc_session_description.py +0 -57
- wrtc-0.0.0.dev8/python-webrtc/python/webrtc/models/rtc_session_description_init.py +0 -42
- wrtc-0.0.0.dev8/python-webrtc/python/webrtc/utils/callbacks_to_async.py +0 -62
- wrtc-0.0.0.dev8/python-webrtc/python/webrtc/utils/convert_exceptions.py +0 -28
- wrtc-0.0.0.dev8/python-webrtc/python/wrtc.egg-info/PKG-INFO +0 -210
- wrtc-0.0.0.dev8/python-webrtc/python/wrtc.egg-info/SOURCES.txt +0 -147
- wrtc-0.0.0.dev8/python-webrtc/python/wrtc.egg-info/dependency_links.txt +0 -1
- wrtc-0.0.0.dev8/python-webrtc/python/wrtc.egg-info/not-zip-safe +0 -1
- wrtc-0.0.0.dev8/python-webrtc/python/wrtc.egg-info/top_level.txt +0 -2
- wrtc-0.0.0.dev8/scripts/build-webrtc.bat +0 -20
- wrtc-0.0.0.dev8/scripts/build-webrtc.sh +0 -21
- wrtc-0.0.0.dev8/scripts/configure-webrtc.bat +0 -28
- wrtc-0.0.0.dev8/scripts/configure-webrtc.sh +0 -25
- wrtc-0.0.0.dev8/scripts/download-webrtc.bat +0 -47
- wrtc-0.0.0.dev8/scripts/download-webrtc.sh +0 -17
- wrtc-0.0.0.dev8/setup.cfg +0 -4
- wrtc-0.0.0.dev8/setup.py +0 -193
- wrtc-0.0.0.dev8/third_party/pybind11/CMakeLists.txt +0 -297
- wrtc-0.0.0.dev8/third_party/pybind11/LICENSE +0 -29
- wrtc-0.0.0.dev8/third_party/pybind11/include/pybind11/attr.h +0 -605
- wrtc-0.0.0.dev8/third_party/pybind11/include/pybind11/buffer_info.h +0 -144
- wrtc-0.0.0.dev8/third_party/pybind11/include/pybind11/cast.h +0 -1432
- wrtc-0.0.0.dev8/third_party/pybind11/include/pybind11/chrono.h +0 -213
- wrtc-0.0.0.dev8/third_party/pybind11/include/pybind11/common.h +0 -2
- wrtc-0.0.0.dev8/third_party/pybind11/include/pybind11/complex.h +0 -65
- wrtc-0.0.0.dev8/third_party/pybind11/include/pybind11/detail/class.h +0 -709
- wrtc-0.0.0.dev8/third_party/pybind11/include/pybind11/detail/common.h +0 -1022
- wrtc-0.0.0.dev8/third_party/pybind11/include/pybind11/detail/descr.h +0 -104
- wrtc-0.0.0.dev8/third_party/pybind11/include/pybind11/detail/init.h +0 -346
- wrtc-0.0.0.dev8/third_party/pybind11/include/pybind11/detail/internals.h +0 -467
- wrtc-0.0.0.dev8/third_party/pybind11/include/pybind11/detail/type_caster_base.h +0 -985
- wrtc-0.0.0.dev8/third_party/pybind11/include/pybind11/detail/typeid.h +0 -55
- wrtc-0.0.0.dev8/third_party/pybind11/include/pybind11/eigen.h +0 -606
- wrtc-0.0.0.dev8/third_party/pybind11/include/pybind11/embed.h +0 -284
- wrtc-0.0.0.dev8/third_party/pybind11/include/pybind11/eval.h +0 -163
- wrtc-0.0.0.dev8/third_party/pybind11/include/pybind11/functional.h +0 -121
- wrtc-0.0.0.dev8/third_party/pybind11/include/pybind11/gil.h +0 -193
- wrtc-0.0.0.dev8/third_party/pybind11/include/pybind11/iostream.h +0 -275
- wrtc-0.0.0.dev8/third_party/pybind11/include/pybind11/numpy.h +0 -1741
- wrtc-0.0.0.dev8/third_party/pybind11/include/pybind11/operators.h +0 -163
- wrtc-0.0.0.dev8/third_party/pybind11/include/pybind11/options.h +0 -65
- wrtc-0.0.0.dev8/third_party/pybind11/include/pybind11/pybind11.h +0 -2522
- wrtc-0.0.0.dev8/third_party/pybind11/include/pybind11/pytypes.h +0 -1879
- wrtc-0.0.0.dev8/third_party/pybind11/include/pybind11/stl/filesystem.h +0 -103
- wrtc-0.0.0.dev8/third_party/pybind11/include/pybind11/stl.h +0 -375
- wrtc-0.0.0.dev8/third_party/pybind11/include/pybind11/stl_bind.h +0 -747
- wrtc-0.0.0.dev8/third_party/pybind11/tools/FindCatch.cmake +0 -70
- wrtc-0.0.0.dev8/third_party/pybind11/tools/FindEigen3.cmake +0 -86
- wrtc-0.0.0.dev8/third_party/pybind11/tools/FindPythonLibsNew.cmake +0 -257
- wrtc-0.0.0.dev8/third_party/pybind11/tools/check-style.sh +0 -44
- wrtc-0.0.0.dev8/third_party/pybind11/tools/cmake_uninstall.cmake.in +0 -23
- wrtc-0.0.0.dev8/third_party/pybind11/tools/libsize.py +0 -39
- wrtc-0.0.0.dev8/third_party/pybind11/tools/make_changelog.py +0 -64
- wrtc-0.0.0.dev8/third_party/pybind11/tools/pybind11Common.cmake +0 -403
- wrtc-0.0.0.dev8/third_party/pybind11/tools/pybind11Config.cmake.in +0 -233
- wrtc-0.0.0.dev8/third_party/pybind11/tools/pybind11NewTools.cmake +0 -278
- wrtc-0.0.0.dev8/third_party/pybind11/tools/pybind11Tools.cmake +0 -219
- wrtc-0.0.0.dev8/third_party/pybind11/tools/pyproject.toml +0 -3
- wrtc-0.0.0.dev8/third_party/pybind11/tools/setup_global.py.in +0 -65
- wrtc-0.0.0.dev8/third_party/pybind11/tools/setup_main.py.in +0 -41
wrtc-0.0.1/.clang-format
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
BasedOnStyle: LLVM
|
|
3
|
+
Standard: c++20
|
|
4
|
+
ColumnLimit: 120
|
|
5
|
+
IndentWidth: 2
|
|
6
|
+
ContinuationIndentWidth: 4
|
|
7
|
+
NamespaceIndentation: All
|
|
8
|
+
AccessModifierOffset: -2
|
|
9
|
+
PointerAlignment: Right
|
|
10
|
+
QualifierAlignment: Left
|
|
11
|
+
ReferenceAlignment: Right
|
|
12
|
+
AllowShortFunctionsOnASingleLine: Inline
|
|
13
|
+
AllowShortLambdasOnASingleLine: All
|
|
14
|
+
AllowShortIfStatementsOnASingleLine: Never
|
|
15
|
+
AllowShortLoopsOnASingleLine: false
|
|
16
|
+
AlwaysBreakTemplateDeclarations: Yes
|
|
17
|
+
BreakBeforeBraces: Attach
|
|
18
|
+
InsertBraces: true
|
|
19
|
+
IncludeBlocks: Preserve
|
|
20
|
+
SortIncludes: CaseSensitive
|
|
21
|
+
FixNamespaceComments: true
|
|
22
|
+
SpaceAfterTemplateKeyword: true
|
|
23
|
+
...
|
wrtc-0.0.1/.clang-tidy
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
# Every disabled check has a reason; everything else is fixed, or NOLINT(check) with a reason where it can't be.
|
|
3
|
+
Checks: >
|
|
4
|
+
-*,
|
|
5
|
+
bugprone-*,
|
|
6
|
+
cert-*,
|
|
7
|
+
clang-analyzer-*,
|
|
8
|
+
concurrency-*,
|
|
9
|
+
cppcoreguidelines-*,
|
|
10
|
+
misc-*,
|
|
11
|
+
modernize-*,
|
|
12
|
+
performance-*,
|
|
13
|
+
portability-*,
|
|
14
|
+
readability-*,
|
|
15
|
+
-modernize-use-trailing-return-type,
|
|
16
|
+
-misc-include-cleaner,
|
|
17
|
+
-misc-multiple-inheritance,
|
|
18
|
+
-cppcoreguidelines-owning-memory,
|
|
19
|
+
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
|
|
20
|
+
-cppcoreguidelines-pro-bounds-constant-array-index,
|
|
21
|
+
-cppcoreguidelines-pro-bounds-avoid-unchecked-container-access,
|
|
22
|
+
-cppcoreguidelines-pro-type-static-cast-downcast
|
|
23
|
+
|
|
24
|
+
# modernize-use-trailing-return-type: libwebrtc and pybind11 APIs, which we override and mirror, use leading returns
|
|
25
|
+
# misc-include-cleaner: pybind11 and libwebrtc are used through umbrella headers the check maps to internal ones
|
|
26
|
+
# misc-multiple-inheritance: libwebrtc observer interfaces (not pure virtual) are implemented next to our bases
|
|
27
|
+
# cppcoreguidelines-owning-memory: libwebrtc takes raw `new` into its refcounting, and there's no GSL owner<>
|
|
28
|
+
# cppcoreguidelines-pro-bounds-*: libwebrtc frames and audio are raw planes with strides, indexed per sample
|
|
29
|
+
# cppcoreguidelines-pro-type-static-cast-downcast: libwebrtc has no RTTI, tracks are downcast by kind() as it does
|
|
30
|
+
|
|
31
|
+
WarningsAsErrors: '*'
|
|
32
|
+
HeaderFilterRegex: '.*/python-webrtc/cpp/src/.*'
|
|
33
|
+
FormatStyle: file
|
|
34
|
+
|
|
35
|
+
CheckOptions:
|
|
36
|
+
# running out of memory terminates anyway, and so does calling an empty std::function, a bug
|
|
37
|
+
bugprone-exception-escape.IgnoredExceptions: 'bad_alloc,bad_array_new_length,length_error,bad_function_call'
|
|
38
|
+
# pybind11 dataclass-like models (def_readwrite) are plain structs
|
|
39
|
+
misc-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic: true
|
|
40
|
+
# `m` for the pybind11 module, `pc` for a peer connection, coordinates and iterators
|
|
41
|
+
readability-identifier-length.IgnoredVariableNames: '^(m|pc|id|it|x|y|u|v|uv|i|j)$'
|
|
42
|
+
readability-identifier-length.IgnoredParameterNames: '^(m|pc|id|it|x|y|u|v|uv|i|j)$'
|
|
43
|
+
readability-identifier-length.IgnoredLoopCounterNames: '^[ijkxy_]$'
|
|
44
|
+
# a width and a height, in the order everything takes them
|
|
45
|
+
bugprone-easily-swappable-parameters.IgnoredParameterNames: '"";iterator;Iterator;begin;Begin;end;End;first;First;last;Last;lhs;LHS;rhs;RHS;width;height'
|
|
46
|
+
cppcoreguidelines-special-member-functions.AllowSoleDefaultDtor: true
|
|
47
|
+
cppcoreguidelines-special-member-functions.AllowMissingMoveFunctionsWhenCopyIsDeleted: true
|
|
48
|
+
...
|
wrtc-0.0.1/.gitignore
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
.idea/
|
|
2
|
+
.vscode/
|
|
3
|
+
.DS_Store
|
|
4
|
+
|
|
5
|
+
# build artifacts
|
|
6
|
+
build/
|
|
7
|
+
dist/
|
|
8
|
+
wheelhouse/
|
|
9
|
+
cmake-build-*/
|
|
10
|
+
*.so
|
|
11
|
+
*.pyd
|
|
12
|
+
|
|
13
|
+
# python
|
|
14
|
+
.venv/
|
|
15
|
+
__pycache__/
|
|
16
|
+
*.egg-info/
|
|
17
|
+
.pytest_cache/
|
|
18
|
+
.ruff_cache/
|
|
19
|
+
.mypy_cache/
|
|
20
|
+
|
|
21
|
+
*.env
|
|
22
|
+
*.log
|
|
23
|
+
|
|
24
|
+
docs/build
|
|
25
|
+
|
|
26
|
+
# local reference checkouts and experiments
|
|
27
|
+
/wpt/
|
|
28
|
+
|
|
29
|
+
# fuzzing (tests/fuzz): crashes and the corpora libFuzzer grows
|
|
30
|
+
/tests/fuzz/crashes/
|
|
31
|
+
/tests/fuzz/corpus/
|
wrtc-0.0.1/.mailmap
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Read the Docs configuration file
|
|
2
|
+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
|
|
3
|
+
|
|
4
|
+
version: 2
|
|
5
|
+
|
|
6
|
+
build:
|
|
7
|
+
os: ubuntu-24.04
|
|
8
|
+
tools:
|
|
9
|
+
python: "3.13"
|
|
10
|
+
jobs:
|
|
11
|
+
pre_create_environment:
|
|
12
|
+
- asdf plugin add uv
|
|
13
|
+
- asdf install uv latest
|
|
14
|
+
- asdf global uv latest
|
|
15
|
+
create_environment:
|
|
16
|
+
- uv venv "${READTHEDOCS_VIRTUALENV_PATH}"
|
|
17
|
+
# the native module is mocked: the docs need no build of libwebrtc
|
|
18
|
+
install:
|
|
19
|
+
- UV_PROJECT_ENVIRONMENT="${READTHEDOCS_VIRTUALENV_PATH}" uv sync --frozen --only-group docs
|
|
20
|
+
|
|
21
|
+
sphinx:
|
|
22
|
+
configuration: docs/source/conf.py
|
|
23
|
+
builder: dirhtml
|
wrtc-0.0.1/CHANGES.md
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
# Change Log
|
|
2
|
+
|
|
3
|
+
## Version 0.0.1
|
|
4
|
+
|
|
5
|
+
**12.10.2026**
|
|
6
|
+
|
|
7
|
+
**🔌 The whole WebRTC API is bound. Every interface, every method, every dictionary: all 154 binding issues of the [tracker](https://github.com/users/MarshalX/projects/1/views/1) are done, and the API goes beyond them**
|
|
8
|
+
|
|
9
|
+
**🎞 Media processing that not every browser ships yet: `MediaStreamTrackProcessor`, `VideoTrackGenerator` and `MediaStreamTrackGenerator`, with the `VideoFrame` and `AudioData` of WebCodecs**
|
|
10
|
+
|
|
11
|
+
**🔐 WebRTC Encoded Transform: the encoded frames of senders and receivers in Python with `RTCRtpScriptTransform`, and end-to-end encryption with SFrame**
|
|
12
|
+
|
|
13
|
+
**🎥 H.264 without bundling it: VideoToolbox on macOS, offered by default, and Cisco's OpenH264 binary on request elsewhere**
|
|
14
|
+
|
|
15
|
+
**🚀 Field trials and WARP: DTLS 1.3, SNAP and SPED cut round trips off connection setup**
|
|
16
|
+
|
|
17
|
+
**⚡ libwebrtc M152, pre-built wheels for Linux (x86_64 and aarch64), macOS and Windows, CPython 3.9 – 3.15, free-threaded 3.14t and 3.15t too**
|
|
18
|
+
|
|
19
|
+
**🧪 The public API follows the WebIDL of the specifications and runs the original web-platform-tests**
|
|
20
|
+
|
|
21
|
+
**📚 Fully reworked [docs website](https://wrtc.marshal.dev): a new theme, guides, examples and the full API reference**
|
|
22
|
+
|
|
23
|
+
What is bound, by specification:
|
|
24
|
+
|
|
25
|
+
* [WebRTC](https://w3c.github.io/webrtc-pc/): `RTCPeerConnection`, `RTCDataChannel`, `RTCRtpTransceiver`, `RTCRtpSender`, `RTCRtpReceiver`, `RTCDtlsTransport`, `RTCIceTransport`, `RTCSctpTransport`, `RTCDTMFSender`, `RTCCertificate`, `RTCIceCandidate`, `RTCSessionDescription`, with every method, attribute, event and dictionary
|
|
26
|
+
* [WebRTC Extensions](https://w3c.github.io/webrtc-extensions/): standalone `RTCIceTransport`, RTP header encryption, and more
|
|
27
|
+
* [WebRTC Statistics](https://w3c.github.io/webrtc-stats/): 19 typed stats objects in `RTCStatsReport`
|
|
28
|
+
* [WebRTC Encoded Transform](https://w3c.github.io/webrtc-encoded-transform/): `RTCRtpScriptTransform`, `RTCEncodedVideoFrame`, `RTCEncodedAudioFrame`, and SFrame (RFC 9605)
|
|
29
|
+
* [Media Capture and Streams](https://w3c.github.io/mediacapture-main/): `MediaStream`, `MediaStreamTrack` with constraints, settings and capabilities, and `MediaDevices` with a synthetic camera and microphone
|
|
30
|
+
* [MediaStreamTrack Insertable Media Processing](https://w3c.github.io/mediacapture-transform/): `MediaStreamTrackProcessor`, `VideoTrackGenerator`, and `MediaStreamTrackGenerator`
|
|
31
|
+
* [WebCodecs](https://w3c.github.io/webcodecs/): `VideoFrame` and `AudioData`
|
|
32
|
+
* [Streams](https://streams.spec.whatwg.org/): `ReadableStream`, `WritableStream` and `TransformStream`, with piping and async iteration
|
|
33
|
+
|
|
34
|
+
In numbers: 229 public classes, 50 enums with the string values of the specifications, 18 exceptions named after their `DOMException`, and the camelCase names of the specifications next to the snake_case ones.
|
|
35
|
+
|
|
36
|
+
* Migrate to prebuilt libwebrtc M152, scikit-build-core and single cibuildwheel CI by [@MarshalX](https://github.com/MarshalX) in [#191](https://github.com/MarshalX/python-webrtc/pull/191)
|
|
37
|
+
* Split wheel builds per Python version and cache libwebrtc by [@MarshalX](https://github.com/MarshalX) in [#196](https://github.com/MarshalX/python-webrtc/pull/196)
|
|
38
|
+
* Add Linux aarch64 wheels by [@MarshalX](https://github.com/MarshalX) in [#207](https://github.com/MarshalX/python-webrtc/pull/207)
|
|
39
|
+
* Support free-threaded Python with `cp314t` and `cp315t` wheels, add CPython 3.15 by [@MarshalX](https://github.com/MarshalX) in [#232](https://github.com/MarshalX/python-webrtc/pull/232)
|
|
40
|
+
* Implement WebRTC spec APIs and event ordering for WPT by [@MarshalX](https://github.com/MarshalX) in [#195](https://github.com/MarshalX/python-webrtc/pull/195)
|
|
41
|
+
* Add MediaStreamTrackProcessor, track generators and WebCodecs frames by [@MarshalX](https://github.com/MarshalX) in [#197](https://github.com/MarshalX/python-webrtc/pull/197)
|
|
42
|
+
* Align WebIDL dictionaries with the spec as typed models by [@MarshalX](https://github.com/MarshalX) in [#212](https://github.com/MarshalX/python-webrtc/pull/212)
|
|
43
|
+
* Align the public API with the WPT WebIDL by [@MarshalX](https://github.com/MarshalX) in [#214](https://github.com/MarshalX/python-webrtc/pull/214)
|
|
44
|
+
* Type event handlers per event, add listener management methods by [@MarshalX](https://github.com/MarshalX) in [#215](https://github.com/MarshalX/python-webrtc/pull/215)
|
|
45
|
+
* Add H.264 through Cisco's OpenH264 binary, downloaded on request by [@MarshalX](https://github.com/MarshalX) in [#218](https://github.com/MarshalX/python-webrtc/pull/218)
|
|
46
|
+
* Add H.264 on macOS through VideoToolbox, offered by default by [@MarshalX](https://github.com/MarshalX) in [#219](https://github.com/MarshalX/python-webrtc/pull/219)
|
|
47
|
+
* Encode H.264 with our own VideoToolbox session: AutoLevel, no rate freeze, High for Chrome by [@MarshalX](https://github.com/MarshalX) in [#233](https://github.com/MarshalX/python-webrtc/pull/233)
|
|
48
|
+
* Match browsers on SDP munging, connection states, `setParameters` and close by [@MarshalX](https://github.com/MarshalX) in [#227](https://github.com/MarshalX/python-webrtc/pull/227)
|
|
49
|
+
* Replace `to_async` with `call_native`, drop its timeout by [@MarshalX](https://github.com/MarshalX) in [#206](https://github.com/MarshalX/python-webrtc/pull/206)
|
|
50
|
+
* Add the OpenAI GPT-Live voice chat example by [@MarshalX](https://github.com/MarshalX) in [#198](https://github.com/MarshalX/python-webrtc/pull/198)
|
|
51
|
+
* Add field trials, connect the GPT-Live example with WARP, skip loopback candidates by [@MarshalX](https://github.com/MarshalX) in [#225](https://github.com/MarshalX/python-webrtc/pull/225)
|
|
52
|
+
* Add the Janus streaming example by [@MarshalX](https://github.com/MarshalX) in [#205](https://github.com/MarshalX/python-webrtc/pull/205)
|
|
53
|
+
* Play Janus streams in stereo by munging the Opus answer by [@MarshalX](https://github.com/MarshalX) in [#234](https://github.com/MarshalX/python-webrtc/pull/234)
|
|
54
|
+
* Rework the docs website with guides, examples and the API reference by [@MarshalX](https://github.com/MarshalX) in [#217](https://github.com/MarshalX/python-webrtc/pull/217)
|
|
55
|
+
* Rewrite the API docs with MDN links by [@MarshalX](https://github.com/MarshalX) in [#221](https://github.com/MarshalX/python-webrtc/pull/221)
|
|
56
|
+
* Run original web-platform-tests through a PythonMonkey shim by [@MarshalX](https://github.com/MarshalX) in [#193](https://github.com/MarshalX/python-webrtc/pull/193)
|
|
57
|
+
* Sync tests with web-platform-tests by [@MarshalX](https://github.com/MarshalX) in [#192](https://github.com/MarshalX/python-webrtc/pull/192)
|
|
58
|
+
* Compare the public API with the WPT WebIDL by [@MarshalX](https://github.com/MarshalX) in [#211](https://github.com/MarshalX/python-webrtc/pull/211)
|
|
59
|
+
* Add Atheris fuzz targets, fix findings by [@MarshalX](https://github.com/MarshalX) in [#204](https://github.com/MarshalX/python-webrtc/pull/204)
|
|
60
|
+
* Add strict clang-format and clang-tidy, fix all findings by [@MarshalX](https://github.com/MarshalX) in [#203](https://github.com/MarshalX/python-webrtc/pull/203)
|
|
61
|
+
* Enable all ruff rules, fix findings by [@MarshalX](https://github.com/MarshalX) in [#210](https://github.com/MarshalX/python-webrtc/pull/210)
|
|
62
|
+
* Type check with Pyrefly at full strictness, fix findings by [@MarshalX](https://github.com/MarshalX) in [#213](https://github.com/MarshalX/python-webrtc/pull/213)
|
|
63
|
+
* Run tests on GitHub Actions by [@MarshalX](https://github.com/MarshalX) in [#187](https://github.com/MarshalX/python-webrtc/pull/187)
|
|
64
|
+
* Build on Ubuntu 22.04 in CI by [@MarshalX](https://github.com/MarshalX) in [#189](https://github.com/MarshalX/python-webrtc/pull/189)
|
|
65
|
+
* Make CI wheel builds and PyPI publish safe to retry by [@MarshalX](https://github.com/MarshalX) in [#226](https://github.com/MarshalX/python-webrtc/pull/226)
|
|
66
|
+
* Retry and cache CI downloads, build the sdist in each wheel job by [@MarshalX](https://github.com/MarshalX) in [#230](https://github.com/MarshalX/python-webrtc/pull/230)
|
|
67
|
+
* Run isolated tests as functions instead of code strings by [@MarshalX](https://github.com/MarshalX) in [#228](https://github.com/MarshalX/python-webrtc/pull/228)
|
|
68
|
+
* Add an unattended bug hunt with stacks, crash triage and C++/Python coverage by [@MarshalX](https://github.com/MarshalX) in [#231](https://github.com/MarshalX/python-webrtc/pull/231)
|
|
69
|
+
* Update the licence holder and headers, rebuild third-party licences for M152 by [@MarshalX](https://github.com/MarshalX) in [#220](https://github.com/MarshalX/python-webrtc/pull/220)
|
|
70
|
+
* Fix wrapper ownership: shared_ptr lifetimes, no factory leaks or dangling observers by [@MarshalX](https://github.com/MarshalX) in [#194](https://github.com/MarshalX/python-webrtc/pull/194)
|
|
71
|
+
* Fix the GC deadlock by releasing wrappers off libwebrtc threads by [@MarshalX](https://github.com/MarshalX) in [#199](https://github.com/MarshalX/python-webrtc/pull/199)
|
|
72
|
+
* Fix deadlocks, leaks and crashes found by sanitizers and chaos tests by [@MarshalX](https://github.com/MarshalX) in [#200](https://github.com/MarshalX/python-webrtc/pull/200)
|
|
73
|
+
* Fix `set_parameters` hanging when libwebrtc drops the callback by [@MarshalX](https://github.com/MarshalX) in [#208](https://github.com/MarshalX/python-webrtc/pull/208)
|
|
74
|
+
* Fix sender and receiver leaks by releasing handlers of ended tracks by [@MarshalX](https://github.com/MarshalX) in [#216](https://github.com/MarshalX/python-webrtc/pull/216)
|
|
75
|
+
* Fix spec bugs found by a stricter WPT by [@MarshalX](https://github.com/MarshalX) in [#222](https://github.com/MarshalX/python-webrtc/pull/222)
|
|
76
|
+
* Fix callback crashes, exit hangs and thread churn in the native layer by [@MarshalX](https://github.com/MarshalX) in [#223](https://github.com/MarshalX/python-webrtc/pull/223)
|
|
77
|
+
* Fix stream, track and event-loop bugs, and a wrapper deadlock by [@MarshalX](https://github.com/MarshalX) in [#224](https://github.com/MarshalX/python-webrtc/pull/224)
|
|
78
|
+
* Release tasks stranded by a closed test loop by [@MarshalX](https://github.com/MarshalX) in [#229](https://github.com/MarshalX/python-webrtc/pull/229)
|
|
79
|
+
* Rebuild object lifetime: unreferenced connections, channels and live tracks stay alive while they have handlers or pending work, native threads never run Python, wrappers take no attributes by [@MarshalX](https://github.com/MarshalX) in [#232](https://github.com/MarshalX/python-webrtc/pull/232)
|
|
80
|
+
* Fire `ended` on remote tracks when a connection closes, keep a failed `RTCIceTransport` for an ICE restart by [@MarshalX](https://github.com/MarshalX) in [#232](https://github.com/MarshalX/python-webrtc/pull/232)
|
|
81
|
+
* Fix a cancelled operation of a connection breaking the operations queued before and after it by [@MarshalX](https://github.com/MarshalX) in [#217](https://github.com/MarshalX/python-webrtc/pull/217)
|
|
82
|
+
* Fix the docs build with the current `sphinx-favicon` by [@MarshalX](https://github.com/MarshalX) in [#217](https://github.com/MarshalX/python-webrtc/pull/217), closes [#186](https://github.com/MarshalX/python-webrtc/issues/186)
|
|
83
|
+
|
|
84
|
+
## Version 0.0.0.dev9
|
|
85
|
+
|
|
86
|
+
**03.03.2022**
|
|
87
|
+
|
|
88
|
+
* Add `RTCDtlsTransport` and `RTCPeerConnection.add_transceiver`, with `RtpEncodingParameters`, `RtpTransceiverInit` and `MediaType`
|
|
89
|
+
* `transport` of `RTCRtpSender` and `RTCRtpReceiver`
|
|
90
|
+
* `MediaStreamTrack.kind` is a `MediaType`
|
|
91
|
+
|
|
92
|
+
## Version 0.0.0.dev8
|
|
93
|
+
|
|
94
|
+
**02.03.2022**
|
|
95
|
+
|
|
96
|
+
* Add `RTCRtpTransceiver`, `RTCRtpReceiver` and `RTCIceTransport`
|
|
97
|
+
* `get_transceivers`, `get_senders` and `get_receivers` of `RTCPeerConnection`
|
|
98
|
+
* Unified Plan is the default SDP semantics
|
|
99
|
+
|
|
100
|
+
## Version 0.0.0.dev7
|
|
101
|
+
|
|
102
|
+
**26.02.2022**
|
|
103
|
+
|
|
104
|
+
* Fix a segfault of the `MediaStream` from `get_user_media`
|
|
105
|
+
* Compare Python wrappers by their native objects
|
|
106
|
+
* Add the test suite with pytest
|
|
107
|
+
|
|
108
|
+
## Version 0.0.0.dev6
|
|
109
|
+
|
|
110
|
+
**10.02.2022**
|
|
111
|
+
|
|
112
|
+
* Bind `RTCError`, `SdpParseError` and the common exceptions; failed async calls raise them
|
|
113
|
+
* Fix a segfault in `RTCPeerConnection.close`
|
|
114
|
+
* Add the security policy
|
|
115
|
+
|
|
116
|
+
## Version 0.0.0.dev5
|
|
117
|
+
|
|
118
|
+
**09.02.2022**
|
|
119
|
+
|
|
120
|
+
* Fix a segfault of `RTCSessionDescription` (double destruction)
|
|
121
|
+
* Publish the sdist, include third-party licences in the package
|
|
122
|
+
|
|
123
|
+
## Version 0.0.0.dev4
|
|
124
|
+
|
|
125
|
+
**06.02.2022**
|
|
126
|
+
|
|
127
|
+
* Keep one Python wrapper per native object, which fixes many segfaults and bus errors
|
|
128
|
+
* Fix `MediaStream` pointers and the creation of `RTCRtpSender`
|
|
129
|
+
* Docs: favicons, OpenGraph, keyboard navigation and mobile layout
|
|
130
|
+
|
|
131
|
+
## Version 0.0.0.dev3
|
|
132
|
+
|
|
133
|
+
**03.02.2022**
|
|
134
|
+
|
|
135
|
+
* Docs on Read the Docs, a README with the logo
|
|
136
|
+
|
|
137
|
+
## Version 0.0.0.dev2
|
|
138
|
+
|
|
139
|
+
**03.02.2022**
|
|
140
|
+
|
|
141
|
+
* `RTCPeerConnection` with `create_offer`, `create_answer`, `set_local_description`, `set_remote_description`, `add_track` and `close`
|
|
142
|
+
* `MediaStream`, `MediaStreamTrack` and `get_user_media`
|
|
143
|
+
* `RTCRtpSender`, and `RTCAudioSource` to send PCM from Python
|
|
144
|
+
* The pure Python `webrtc` module over the native `wrtc`, with docs
|
|
145
|
+
* Wheels for Linux, macOS (Intel and Apple Silicon) and Windows
|
|
146
|
+
|
|
147
|
+
## Version 0.0.0.dev1
|
|
148
|
+
|
|
149
|
+
**03.01.2022**
|
|
150
|
+
|
|
151
|
+
* The first upload: the package skeleton
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
cmake_minimum_required(VERSION 3.26)
|
|
2
|
+
|
|
3
|
+
if(NOT DEFINED SKBUILD_PROJECT_VERSION)
|
|
4
|
+
set(SKBUILD_PROJECT_VERSION 0.0.0)
|
|
5
|
+
set(SKBUILD_PROJECT_VERSION_FULL 0.0.0.dev0)
|
|
6
|
+
endif()
|
|
7
|
+
|
|
8
|
+
project(python_webrtc
|
|
9
|
+
LANGUAGES C CXX
|
|
10
|
+
DESCRIPTION "a Python extension that provides bindings to WebRTC"
|
|
11
|
+
HOMEPAGE_URL "https://github.com/MarshalX/python-webrtc"
|
|
12
|
+
VERSION ${SKBUILD_PROJECT_VERSION}
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
set(CMAKE_CXX_STANDARD 20)
|
|
16
|
+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
17
|
+
set(CMAKE_CXX_EXTENSIONS OFF)
|
|
18
|
+
if(APPLE)
|
|
19
|
+
# glue to libwebrtc's ObjC VideoToolbox codecs
|
|
20
|
+
enable_language(OBJCXX)
|
|
21
|
+
set(CMAKE_OBJCXX_STANDARD 20)
|
|
22
|
+
endif()
|
|
23
|
+
# for clang-tidy (make tidy) and editors
|
|
24
|
+
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
|
25
|
+
if(MSVC)
|
|
26
|
+
# libwebrtc is linked against the static release CRT
|
|
27
|
+
set(CMAKE_MSVC_RUNTIME_LIBRARY MultiThreaded)
|
|
28
|
+
endif()
|
|
29
|
+
|
|
30
|
+
include(cmake/libwebrtc.cmake)
|
|
31
|
+
|
|
32
|
+
find_package(Python 3.9 REQUIRED COMPONENTS Interpreter Development.Module)
|
|
33
|
+
find_package(pybind11 CONFIG REQUIRED)
|
|
34
|
+
|
|
35
|
+
include(cmake/openh264.cmake)
|
|
36
|
+
|
|
37
|
+
add_subdirectory(python-webrtc/cpp)
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Contributions of any size are welcome. For bugs and features, [open an issue](https://github.com/MarshalX/python-webrtc/issues/new);
|
|
4
|
+
for questions, [start a discussion](https://github.com/MarshalX/python-webrtc/discussions/new).
|
|
5
|
+
|
|
6
|
+
## Development
|
|
7
|
+
|
|
8
|
+
Requires [uv](https://docs.astral.sh/uv/).
|
|
9
|
+
|
|
10
|
+
``` bash
|
|
11
|
+
make dev # editable install into .venv, C++ is rebuilt on import when changed
|
|
12
|
+
make test # run the test suite
|
|
13
|
+
make lint # ruff
|
|
14
|
+
make stub # regenerate type stubs of the native module
|
|
15
|
+
make wheels # build wheels for the current platform the same way CI does
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Building from sources (sdist)
|
|
19
|
+
|
|
20
|
+
- CMake 3.26 or higher
|
|
21
|
+
- A C++20 compiler: Clang on Linux (libwebrtc there is built against Chromium's libc++), Apple Clang on macOS, MSVC on Windows
|
|
22
|
+
- ~150 MB of free disk space
|
|
23
|
+
|
|
24
|
+
Nothing else has to be installed or configured manually: a prebuilt static libwebrtc for the target platform
|
|
25
|
+
(from [libwebrtc-bin](https://github.com/crow-misia/libwebrtc-bin)) is downloaded once, verified and unpacked
|
|
26
|
+
into a shared cache (`~/.cache/python-webrtc`, `%LOCALAPPDATA%\python-webrtc` on Windows or `$WRTC_CACHE_DIR`).
|
|
27
|
+
Only the headers in use are extracted and debug info is stripped, so it takes ~60 MB per platform.
|
|
28
|
+
Pass `-Ccmake.define.LIBWEBRTC_ROOT=/path/to/libwebrtc` to use your own libwebrtc build instead.
|
|
29
|
+
|
|
30
|
+
## Releasing
|
|
31
|
+
|
|
32
|
+
1. Bump `version` in `pyproject.toml` and run `uv lock`.
|
|
33
|
+
2. Push a `v<version>` tag. CI builds the sdist and wheels for every platform and publishes them to PyPI.
|
|
34
|
+
|
|
35
|
+
Publishing uses [trusted publishing](https://docs.pypi.org/trusted-publishers/): the PyPI project needs a
|
|
36
|
+
trusted publisher for this repository's `ci.yml` workflow, and the repository a `pypi` environment. No tokens needed.
|
|
37
|
+
|
|
38
|
+
## Updating WebRTC
|
|
39
|
+
|
|
40
|
+
The libwebrtc version and archive hashes are pinned in `cmake/libwebrtc.cmake`:
|
|
41
|
+
|
|
42
|
+
1. Set `LIBWEBRTC_VERSION` to a [libwebrtc-bin release](https://github.com/crow-misia/libwebrtc-bin/releases)
|
|
43
|
+
and update the `LIBWEBRTC_SHA256_*` values (the release page lists a SHA256 digest per asset).
|
|
44
|
+
2. Refresh the Linux libc++ pins as described in [`cmake/libcxx/README.md`](cmake/libcxx/README.md).
|
|
45
|
+
3. Build and run the tests. On Linux, check whether `cmake/libwebrtc_linux_fixups.cpp` is still needed:
|
|
46
|
+
remove it and see whether the module imports (it is linked with `-z now`, so missing symbols fail on import).
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
## BSD 3-Clause License
|
|
2
2
|
|
|
3
|
-
This project is inspired by [node-webrtc](https://github.com/node-webrtc/node-webrtc). License: [LICENSE](https://github.com/node-webrtc/node-webrtc/blob/develop/LICENSE.md).
|
|
4
|
-
|
|
5
3
|
The following license applies to all parts of this software except as documented
|
|
6
4
|
below.
|
|
7
5
|
|
|
8
6
|
```
|
|
9
|
-
Copyright (c) 2022
|
|
7
|
+
Copyright (c) 2022-2026 Ilya Siamionau. All rights reserved.
|
|
10
8
|
|
|
11
9
|
Redistribution and use in source and binary forms, with or without
|
|
12
10
|
modification, are permitted provided that the following conditions are met:
|
wrtc-0.0.1/Makefile
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
.PHONY: dev test asan tsan ft fuzz hunt hunt-report coverage coverage-report stacks lint typecheck format format-check tidy stub wheels doc clean
|
|
2
|
+
|
|
3
|
+
# pinned to the clang-tidy of .github/scripts/tidy.sh
|
|
4
|
+
CLANG_FORMAT := uvx clang-format==22.1.8
|
|
5
|
+
CPP_SRC = $(shell find python-webrtc/cpp/src -name '*.cpp' -o -name '*.h' -o -name '*.mm')
|
|
6
|
+
|
|
7
|
+
# editable install; the extension is rebuilt automatically on import after C++ changes
|
|
8
|
+
dev:
|
|
9
|
+
uv sync --group dev --no-install-project
|
|
10
|
+
uv pip install --no-build-isolation -e . \
|
|
11
|
+
-Ceditable.rebuild=true -Cbuild-dir=build/editable
|
|
12
|
+
|
|
13
|
+
test:
|
|
14
|
+
uv run --no-sync pytest tests $(O)
|
|
15
|
+
|
|
16
|
+
# the tests against an ASan+UBSan build, natively on macOS (on Linux: .github/scripts/sanitizers.sh)
|
|
17
|
+
asan:
|
|
18
|
+
.github/scripts/sanitizers-macos.sh $(O)
|
|
19
|
+
|
|
20
|
+
tsan:
|
|
21
|
+
SANITIZE=thread .github/scripts/sanitizers-macos.sh $(O)
|
|
22
|
+
|
|
23
|
+
# the tests against a plain build with another interpreter, kept in build/ft: make ft [PY=3.15t] [B=build/ft] [O=...]
|
|
24
|
+
ft:
|
|
25
|
+
SANITIZE=none PYTHON="$$(uv python find $(or $(PY),3.15t))" WRTC_SANITIZERS_BUILD_DIR="$(or $(B),build/ft)" \
|
|
26
|
+
.github/scripts/sanitizers-macos.sh $(O)
|
|
27
|
+
|
|
28
|
+
# a target of tests/fuzz with Atheris in the Linux image, the build kept in build/fuzz: make fuzz T=video_frame O=-max_total_time=600
|
|
29
|
+
fuzz:
|
|
30
|
+
docker run --rm -it --platform linux/amd64 -v "$(CURDIR):/src" -v "$(CURDIR)/build/fuzz:/tmp/wrtc-fuzz" \
|
|
31
|
+
-e WRTC_CACHE_DIR=/tmp/wrtc-fuzz/cache -w /src \
|
|
32
|
+
quay.io/pypa/manylinux_2_28_x86_64 .github/scripts/fuzz.sh $(T) $(O)
|
|
33
|
+
|
|
34
|
+
# the unattended bug hunt of scripts/debug/hunt.py, results in build/hunt/REPORT.md: make hunt H=8 [O='--until 07:30']
|
|
35
|
+
hunt:
|
|
36
|
+
CMAKE_BUILD_PARALLEL_LEVEL=4 uv run --no-sync python -m scripts.debug.hunt --hours $(or $(H),8) $(O)
|
|
37
|
+
|
|
38
|
+
hunt-report:
|
|
39
|
+
@cat build/hunt/REPORT.md
|
|
40
|
+
|
|
41
|
+
# make coverage [O='-k stats'], results in build/coverage
|
|
42
|
+
coverage:
|
|
43
|
+
CMAKE_BUILD_PARALLEL_LEVEL=4 uv run --no-sync python -m scripts.debug.cover run $(O)
|
|
44
|
+
|
|
45
|
+
coverage-report:
|
|
46
|
+
uv run --no-sync python -m scripts.debug.cover report
|
|
47
|
+
|
|
48
|
+
# native stacks of a process and its children: make stacks PID=1234 [O=--signal]
|
|
49
|
+
stacks:
|
|
50
|
+
uv run --no-sync python -m scripts.debug.stacks $(PID) $(O)
|
|
51
|
+
|
|
52
|
+
lint: format-check
|
|
53
|
+
uvx ruff check
|
|
54
|
+
uvx ruff format --check
|
|
55
|
+
|
|
56
|
+
typecheck:
|
|
57
|
+
uvx pyrefly check
|
|
58
|
+
|
|
59
|
+
format:
|
|
60
|
+
uvx ruff check --fix
|
|
61
|
+
uvx ruff format
|
|
62
|
+
$(CLANG_FORMAT) -i $(CPP_SRC)
|
|
63
|
+
|
|
64
|
+
format-check:
|
|
65
|
+
@$(CLANG_FORMAT) --dry-run --Werror $(CPP_SRC)
|
|
66
|
+
|
|
67
|
+
# clang-tidy over the extension, see .clang-tidy
|
|
68
|
+
tidy:
|
|
69
|
+
.github/scripts/tidy.sh $(O)
|
|
70
|
+
|
|
71
|
+
stub:
|
|
72
|
+
uv run --no-sync pybind11-stubgen wrtc -o build/stubs
|
|
73
|
+
cp build/stubs/wrtc.pyi stubs/wrtc/__init__.pyi
|
|
74
|
+
# collections.abc.Buffer is 3.12+
|
|
75
|
+
perl -pi -e 's/collections\.abc\.Buffer/typing_extensions.Buffer/g; s/^import typing$$/import typing\nimport typing_extensions/' stubs/wrtc/__init__.pyi
|
|
76
|
+
|
|
77
|
+
# wheels for the current platform, exactly as CI builds them
|
|
78
|
+
wheels:
|
|
79
|
+
uvx cibuildwheel==4.2.1 --output-dir wheelhouse
|
|
80
|
+
|
|
81
|
+
doc:
|
|
82
|
+
UV_PROJECT_ENVIRONMENT=build/docs-venv uv sync --frozen --only-group docs --python 3.13
|
|
83
|
+
cd docs && make gen && make html SPHINXBUILD=../build/docs-venv/bin/sphinx-build
|
|
84
|
+
|
|
85
|
+
clean:
|
|
86
|
+
rm -rf build dist wheelhouse
|