ESP-IDF 5.5 + LVGL 9 firmware that plays random public cameras from insecam.org on the T-Embed's 320x170 screen, live MJPEG where available, a new camera every 20 seconds. Knob steps through cameras, LED ring shows the countdown. Auto-detects the original vs CC1101 board, reuses Wi-Fi credentials from NVS and falls back to a captive-portal setup hotspot.
11 lines
430 B
C
11 lines
430 B
C
#pragma once
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
#include "esp_err.h"
|
|
|
|
esp_err_t jpegdec_init(void);
|
|
// Header-only parse. Fails on progressive JPEGs (not decodable here).
|
|
esp_err_t jpegdec_dims(const uint8_t *jpeg, size_t len, int *w, int *h);
|
|
// Decodes and resamples to a full-bleed ("cover") 320x170 RGB565 frame in dst.
|
|
esp_err_t jpegdec_to_screen(const uint8_t *jpeg, size_t len, uint16_t *dst, int *src_w, int *src_h);
|