mirror of
https://github.com/rzeldent/esp32cam-rtsp.git
synced 2025-11-15 12:38:01 +00:00
WIP
This commit is contained in:
@@ -10,16 +10,15 @@ public:
|
||||
|
||||
esp_err_t initialize(camera_config_t *camera_config);
|
||||
esp_err_t deinitialize();
|
||||
// sensor_t* esp_camera_sensor_get();
|
||||
|
||||
void update_frame();
|
||||
|
||||
uint8_t *data() const { return fb->buf; }
|
||||
size_t width() const { return fb->width; }
|
||||
size_t height() const { return fb->height; }
|
||||
size_t size() const { return fb->len; }
|
||||
uint8_t *data() const { return fb_->buf; }
|
||||
size_t width() const { return fb_->width; }
|
||||
size_t height() const { return fb_->height; }
|
||||
size_t size() const { return fb_->len; }
|
||||
|
||||
private:
|
||||
esp_err_t init_result;
|
||||
camera_fb_t *fb;
|
||||
esp_err_t init_result_;
|
||||
camera_fb_t *fb_;
|
||||
};
|
||||
@@ -18,7 +18,7 @@ private:
|
||||
rtsp_command_teardown // TEARDOWN
|
||||
};
|
||||
|
||||
const std::string available_stream_name_ = "mjpeg/1";
|
||||
const char* available_stream_name_ = "mjpeg/1";
|
||||
|
||||
rtsp_command parse_command(const std::string &request);
|
||||
bool parse_client_port(const std::string &request);
|
||||
|
||||
@@ -8,19 +8,19 @@ constexpr uint8_t RTP_PAYLOAD_JPG = 26;
|
||||
constexpr size_t jpeg_luminance_table_length = 64;
|
||||
constexpr size_t jpeg_chrominance_table_length = 64;
|
||||
|
||||
// https://www.ietf.org/rfc/rfc2326#section-10.12
|
||||
typedef struct __attribute__((packed))
|
||||
{
|
||||
char magic; // Magic encapsulation ASCII dollar sign (24 hexadecimal)
|
||||
uint8_t channel; // Channel identifier
|
||||
uint16_t length; // Network order
|
||||
} rtp_over_tcp_hdr_t;
|
||||
|
||||
class micro_rtsp_streamer
|
||||
{
|
||||
public:
|
||||
// https://www.ietf.org/rfc/rfc2326#section-10.12
|
||||
typedef struct __attribute__((packed))
|
||||
{
|
||||
char magic; // Magic encapsulation ASCII dollar sign (24 hexadecimal)
|
||||
uint8_t channel; // Channel identifier
|
||||
uint16_t length; // Network order
|
||||
} rtp_over_tcp_hdr_t;
|
||||
|
||||
micro_rtsp_streamer(const uint16_t width, const uint16_t height);
|
||||
rtp_over_tcp_hdr_t *create_jpg_packet(const uint8_t *jpg_scan, const uint8_t *jpg_scan_end, uint8_t **jpg_offset, const uint32_t timestamp, const uint8_t* quantization_table_luminance, const uint8_t* quantization_table_chrominance);
|
||||
rtp_over_tcp_hdr_t *create_jpg_packet(const uint8_t *jpg_scan, const uint8_t *jpg_scan_end, uint8_t **jpg_offset, const uint32_t timestamp, const uint8_t *quantization_table_luminance, const uint8_t *quantization_table_chrominance);
|
||||
|
||||
private:
|
||||
uint16_t width_, height_;
|
||||
|
||||
Reference in New Issue
Block a user