Skip to content

Conversation

@Slaymish
Copy link

@Slaymish Slaymish commented Jun 1, 2025

This change introduces WebRTC streaming functionality to the record3d application, allowing for an alternative to USB-based streaming.

Key changes include:

  • Integrated libdatachannel as the WebRTC C++ library.
  • Implemented a WebRTCSignaling class to manage WebRTC connection establishment (SDP, ICE) and data channel communication.
  • Extended the Record3DStream class:
    • Added ConnectToDeviceViaWebRTC to initiate WebRTC connections.
    • Implemented frame data processing for frames received over WebRTC, reusing existing decompression and decoding logic.
    • Exposed WebRTC signaling mechanisms (callbacks for local SDP/ICE, methods to submit remote SDP/ICE) to allow for flexible signaling implementations.
  • Updated Python bindings:
    • Exposed ConnectToDeviceViaWebRTC.
    • Exposed WebRTC signaling callbacks and methods to Python.
  • Created webrtc-demo.py:
    • A Python script demonstrating how to use the new WebRTC functionality.
    • Includes example WebSocket-based signaling logic and OpenCV for frame display.
  • Added C++ unit tests:
    • Cover WebRTC connection initiation.
    • Test SDP/ICE exchange pathways.
    • Verify frame data processing for data received over WebRTC.

The system now supports connecting to and streaming from devices using WebRTC, with Python scripts able to manage the signaling process.

This change introduces WebRTC streaming functionality to the record3d
application, allowing for an alternative to USB-based streaming.

Key changes include:

- Integrated `libdatachannel` as the WebRTC C++ library.
- Implemented a `WebRTCSignaling` class to manage WebRTC connection
  establishment (SDP, ICE) and data channel communication.
- Extended the `Record3DStream` class:
    - Added `ConnectToDeviceViaWebRTC` to initiate WebRTC connections.
    - Implemented frame data processing for frames received over WebRTC,
      reusing existing decompression and decoding logic.
    - Exposed WebRTC signaling mechanisms (callbacks for local SDP/ICE,
      methods to submit remote SDP/ICE) to allow for flexible signaling
      implementations.
- Updated Python bindings:
    - Exposed `ConnectToDeviceViaWebRTC`.
    - Exposed WebRTC signaling callbacks and methods to Python.
- Created `webrtc-demo.py`:
    - A Python script demonstrating how to use the new WebRTC functionality.
    - Includes example WebSocket-based signaling logic and OpenCV for
      frame display.
- Added C++ unit tests:
    - Cover WebRTC connection initiation.
    - Test SDP/ICE exchange pathways.
    - Verify frame data processing for data received over WebRTC.

The system now supports connecting to and streaming from devices using
WebRTC, with Python scripts able to manage the signaling process.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant