|
简单的jpeg转成avi的类(6) ~AVI_list_odml () {} friend ostream& operator << (ostream& out, AVI_list_odml const& odml){ out << odml.list_hdr << odml.id[0] << odml.id[1] << odml.id[2] << odml.id[3]; out << odml.sz << odml.frames; return out; } }; struct AVI_list_strl { struct AVI_list_hdr list_hdr; /* chunk strh */ unsigned char strh_id[4]; DWORD strh_sz; struct AVI_strh strh; /* chunk strf */ unsigned char strf_id[4]; DWORD strf_sz; struct AVI_strf strf; /* list odml */ struct AVI_list_odml list_odml; }; struct AVI_list_hdrl { struct AVI_list_hdr list_hdr; /* chunk avih */ unsigned char avih_id[4]; DWORD avih_sz; struct AVI_avih avih; /* list strl */ struct AVI_list_hdr strl_hdr; /* chunk strh */ unsigned char strh_id[4]; DWORD strh_sz; struct AVI_strh strh; /* chunk strf */ unsigned char strf_id[4]; DWORD strf_sz; struct AVI_strf strf; /* list odml */ struct AVI_list_odml list_odml; AVI_list_hdrl (DWORD width = 0, DWORD height = 0, DWORD jpg_sz = 1, DWORD per_usec = 1, DWORD frames = 1) :list_hdr ("LIST", sizeof (struct AVI_list_hdrl) - 8, "hdrl") //* chunk avih */ ,avih_sz (sizeof (struct AVI_avih)) ,avih (per_usec, 1000000 * (jpg_sz/frames) / per_usec, (0) ,AVIF_HASINDEX, frames, 0, 1, 0, width, height) // list strl ,strl_hdr ("LIST", sizeof (struct AVI_list_strl) - 8, "strl") // chunk strh ,strh_sz (sizeof (struct AVI_strh)) ,strh ("vids", "MJPG", 0, 0, 0, per_usec, 1000000 , 0, frames, 0, 0, 0)
|