#include #include #include #include #include #include #include #include typedef unsigned int uint; typedef ushort ushort; class QT_ATOM { FILE *fp; long start_offset; const char* type; public: QT_ATOM(FILE* fp,const char* type) :fp(fp),type(type) { start_offset=ftell(fp); uint dummy; fwrite(&dummy,4,1,fp); fputs(type,fp); std::cout< samplesizes; std::vector offsets; uint bytes_read=8; // Write the samples (i.e. the mdat part in the quicktime) {long mdat_begin=ftell(fp); QT_ATOM mdat(fp,"mdat"); struct jpeg_compress_struct cinfo; struct jpeg_error_mgr jerr; for(int i=0;i