mirror of
https://github.com/rzeldent/esp32cam-rtsp.git
synced 2025-11-16 13:08:01 +00:00
Work in progress
This commit is contained in:
@@ -1,35 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
class micro_rtsp_jpeg
|
||||
{
|
||||
public:
|
||||
bool decode_jpeg(const uint8_t *jpg, size_t size);
|
||||
|
||||
class __attribute__ ((packed)) jpg_section
|
||||
{
|
||||
public:
|
||||
uint8_t flag() const { return section_flag; }
|
||||
const char *flag_name() const;
|
||||
uint16_t section_length() const { return section_flag == 0xd8 || section_flag == 0xd9 ? 0 : (section_length_msb << 8) + section_length_lsb; }
|
||||
const uint8_t *data() const { return reinterpret_cast<const uint8_t *>(§ion_data[1]); }
|
||||
uint16_t data_length() const { return section_length() - 3; }
|
||||
|
||||
private:
|
||||
const uint8_t section_flag;
|
||||
const uint8_t section_length_msb;
|
||||
const uint8_t section_length_lsb;
|
||||
const uint8_t section_data[];
|
||||
};
|
||||
|
||||
const jpg_section *quantization_table_0_;
|
||||
const jpg_section *quantization_table_1_;
|
||||
|
||||
const uint8_t *jpeg_data_start;
|
||||
const uint8_t *jpeg_data_end;
|
||||
|
||||
private:
|
||||
static const jpg_section *find_jpeg_section(const uint8_t **ptr, const uint8_t *end, uint8_t flag);
|
||||
};
|
||||
15
lib/micro-rtsp-server/include/micro_rtsp_streamer.h
Normal file
15
lib/micro-rtsp-server/include/micro_rtsp_streamer.h
Normal file
@@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
#include <jpg.h>
|
||||
|
||||
|
||||
class micro_rtsp_streamer
|
||||
{
|
||||
public:
|
||||
micro_rtsp_streamer();
|
||||
void create_jpg_packet(const jpg jpg, uint32_t timestamp);
|
||||
private :
|
||||
|
||||
uint32_t ssrc_;
|
||||
uint16_t sequenceNumber_;
|
||||
};
|
||||
@@ -1,6 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
class micro_rtsp_streamer
|
||||
{
|
||||
public:
|
||||
};
|
||||
Reference in New Issue
Block a user