Skip to content

Commit

Permalink
Merge branch 'develop' into 106-create-new-rtsp-server
Browse files Browse the repository at this point in the history
  • Loading branch information
rzeldent committed Feb 15, 2024
2 parents 03582b8 + a760fda commit 4fb0f61
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Simple [RTSP](https://en.wikipedia.org/wiki/Real_Time_Streaming_Protocol), [HTTP JPEG Streamer](https://en.wikipedia.org/wiki/Motion_JPEG) and image server with configuration through the web interface.

> [!IMPORTANT]
> New branch available! Here [branch: feature/seeed_xiao_esp32s3](https://github.com/rzeldent/esp32cam-rtsp/tree/feature/seeed_xiao_esp32s3)
> New branch available! Here [branch: develop](https://github.com/rzeldent/esp32cam-rtsp/tree/develop)
> This branch supports all the current devices and the Seeed Studio Xiao esp32s3!
> Please use this and let me know if this works for you!
Expand Down
18 changes: 13 additions & 5 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -390,11 +390,19 @@ void setup()
#endif
iotWebConf.init();

camera_init_result = initialize_camera();
if (camera_init_result == ESP_OK)
update_camera_settings();
else
log_e("Failed to initialize camera: 0x%0x. Frame size: %s, frame rate: %d ms, jpeg quality: %d", camera_init_result, param_frame_size.value(), param_frame_duration.value(), param_jpg_quality.value());
// Try to initialize 3 times
for (auto i = 0; i < 3; i++)
{
camera_init_result = initialize_camera();
if (camera_init_result == ESP_OK)
{
update_camera_settings();
break;
}

log_e("Failed to initialize camera. Error: 0x%0x. Frame size: %s, frame rate: %d ms, jpeg quality: %d", camera_init_result, param_frame_size.value(), param_frame_duration.value(), param_jpg_quality.value());
delay(500);
}

// Set up required URL handlers on the web server
web_server.on("/", HTTP_GET, handle_root);
Expand Down

0 comments on commit 4fb0f61

Please sign in to comment.