amazon-kinesis-video-streams-webrtc-sdk-c
amazon-kinesis-video-streams-webrtc-sdk-c copied to clipboard
Support for Espressif chipsets via ESP-IDF
*** This is a placeholder PR: Not to be merged ****
This PR is meant to showcase the work which will bring the support for ESP-IDF build support and hence the Espressif chipsets.
Structure:
- Changes specific to ESP-IDF are put under
esp_portdirectory. - Go to the example webrtc_classic and build it as ESP-IDF example.
Setup ESP-IDF
Setup ESP_IDF with release/v5.4 branch: https://docs.espressif.com/projects/esp-idf/en/stable/esp32/get-started/linux-macos-setup.html
BUILD
cd esp_port/examples/webrtc_classic
idf.py set-target esp32s3 # Or esp32p4 etc
idf.py build
Flash the code on chip and run monitor
idf.py flash
idf.py monitor
The work is under progress, will keep rebasing as and when common functionality code keeps getting into main repository.
@sirknightj @unicornss
We have two options:
- Upstream and merge all the changes to this repo: Not as-is of course and will have reviews from structure and code point of view
- The
esp_portmaintained by Espressif with some suitable name under espressif/ organisation. It will useamazon-kinesis-video-sdk-cas a submodule or need developer to set path of cloned repo.
We can keep this PR for discussion ground continue discussion on other aspects of how best we can go about this. I prefer the option 1, simply because it remains maintained under single roof without needing to constant rebasing.
@sirknightj @unicornss do you have comments on this?
If you look at my solution, I have added a esp_port directory containing extra needed components and examples specific to ESP-IDF build system. (There are a few, very few, changes in the common source files specific to ESP-IDF under macro checks)
I would like to know if you want to suggest adding a generic port layer which can be leveraged by other platforms to build solutions based on this SDK? For example, this might have port directory and different platform ports can stay in the directory etc.
I would like to speed up the porting process as per your comments, so that the repo can then be used in-time for ESP-IDF based open-source solutions, viz., esp-rainmaker and esp-matter etc.
You may want to review the reference integration for the Realtek Ameba Pro2 Mini board at: https://github.com/awslabs/freertos-webrtc-reference-on-amebapro-for-amazon-kinesis-video-streams.
This reference integration utilizes our OS-agnostic libraries. You can adopt a similar approach to develop an integration for the ESP platform.
You may want to review the reference integration for the Realtek Ameba Pro2 Mini board at: https://github.com/awslabs/freertos-webrtc-reference-on-amebapro-for-amazon-kinesis-video-streams.
This reference integration utilizes our OS-agnostic libraries. You can adopt a similar approach to develop an integration for the ESP platform.
@aggarg
This solution in my particular PR is the working one. Only requiring the discussion on the final structure of the code to make it acceptable.
The approach you have shared is completely different take from what I've achieved. The particular ameba implementation does not use this repo, and hence I cannot go yet another implementation approach using multiple components. My goal is to get this repo adopted on ESP platforms and make the existing sources/APIs generic enough as is to be able to be used for ESP chipsets.