|
简单的jpeg转成avi的类(2) for (int i = 0; i < 4; ++i) reserved[i] = 0; } AVI_avih (AVI_avih const& avih) { usec_per_frame = avih.usec_per_frame; max_bytes_per_sec = avih.max_bytes_per_sec; padding = avih.padding; flags = avih.flags; tot_frames = avih.tot_frames; init_frames = avih.init_frames; streams = avih.streams; buff_sz = avih.buff_sz; width = avih.width; height = avih.height; for (int i; i < 4; ++i) reserved[i] = avih.reserved[i]; } ~AVI_avih (){} friend ostream& operator << (ostream& out, AVI_avih const& avih) { out << avih.usec_per_frame << avih.max_bytes_per_sec << avih.padding << avih.flags << avih.tot_frames << avih.init_frames; out << avih.streams << avih.buff_sz << avih.width << avih.height; out << avih.reserved[0] << avih.reserved[1] << avih.reserved[2] << avih.reserved[3]; return out; } }; struct AVI_strh { unsigned char type[4]; ///* stream type */ unsigned char handler[4]; DWORD flags; DWORD priority; DWORD init_frames; ///* initial frames (???) */ DWORD scale; DWORD rate; DWORD start; DWORD length; DWORD buff_sz; ///* suggested buffer size */ DWORD quality; DWORD sample_sz; AVI_strh () {} AVI_strh (char const* t, char const* h, DWORD f, DWORD p, DWORD in, DWORD sc, DWORD r, DWORD st, DWORD l, DWORD bs, DWORD q, DWORD ss)
|