added code for mp3 and jpeg parsing

added interface for data sources
This commit is contained in:
2021-02-28 20:46:38 +01:00
parent 422610c21c
commit 331f9f3e6c
11 changed files with 5912 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
#include "JPEGDEC.h"
#include <iostream>
#include "testimage.h"
// gcc -D__LINUX__ jpeg.c JPEGDEC.cpp test.cpp
int drawJPEG(JPEGDRAW* pDraw) {
return 1;
}
int main(void) {
JPEGDEC jpeg;
int res = jpeg.openRAM(aaa_jpg, aaa_jpg_len, drawJPEG);
std::cout << res << std::endl;
if (res) {
jpeg.setPixelType(RGB565_BIG_ENDIAN);
jpeg.decode(0, 0, 0);//40, 100, JPEG_SCALE_QUARTER | JPEG_EXIF_THUMBNAIL);
jpeg.close();
}
}