Conversation
|
✅Static analysis result - no issues found! ✅ |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the RTSP component to support Python bindings by transitioning internal JPEG APIs from std::string_view to std::span<const uint8_t>, implements a new span caster for pybind11, and adds comprehensive Python examples for both RTSP client and server functionality.
- Migrated JPEG-related APIs from
std::string_viewtostd::span<const uint8_t>for better type safety - Added Python bindings for RTSP classes with span converter support
- Updated existing Python examples to use simplified Task constructor patterns
Reviewed Changes
Copilot reviewed 25 out of 26 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
lib/python_bindings/span_caster.h |
Implements pybind11 type converters for std::span to/from Python types |
lib/python_bindings/pybind_espp.cpp |
Adds Python bindings for RTSP classes and updates constructor patterns |
python/rtsp_server.py |
New RTSP server example with display/webcam capture and mDNS advertising |
python/rtsp_client.py |
New RTSP client example with mDNS discovery and OpenCV display |
components/task/include/task.hpp |
Adds convenience constructors for Task class |
components/socket/ |
Adds std::span overloads for TCP/UDP socket transmit methods |
components/rtsp/ |
Refactors JPEG APIs to use std::span instead of std::string_view |
Comments suppressed due to low confidence (1)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
rtspcomponent so that it can be bound withpybind11and used from python - this required changing some of the internal JPEG APIs to use std::span instead of std::string_viewespp::Taskto make it easier to use / wrap from withinpython- since python cannot use thestd::mutex / std::condition_variablecallback signaturespythonexamples forespp::RtspClientandespp::RtspServerMotivation and Context
How has this been tested?
camera-streamerexamplecamera-displayexamplelib/Screenshots (if appropriate, e.g. schematic, board, console logs, lab pictures):
RTSP Client (
espp/camera-displayupdated with this code):rtsp-display-screen.mp4
RTSP Client (Python):
RTSP Server (Python):
Timer and Task (Python):
Types of changes
Checklist:
Software
.github/workflows/build.ymlfile to add my new test to the automated cloud build github action.