
Public Member Functions | |
| ChunkDescriptor (int64_t offsetInFile, unsigned size, unsigned frameSize, unsigned frameDuration, struct timeval presentationTime) | |
| virtual | ~ChunkDescriptor () |
| ChunkDescriptor * | extendChunk (int64_t newOffsetInFile, unsigned newSize, unsigned newFrameSize, unsigned newFrameDuration, struct timeval newPresentationTime) |
Data Fields | |
| ChunkDescriptor * | fNextChunk |
| int64_t | fOffsetInFile |
| unsigned | fNumFrames |
| unsigned | fFrameSize |
| unsigned | fFrameDuration |
| timeval | fPresentationTime |
Definition at line 40 of file QuickTimeFileSink.cpp.
| ChunkDescriptor::ChunkDescriptor | ( | int64_t | offsetInFile, | |
| unsigned | size, | |||
| unsigned | frameSize, | |||
| unsigned | frameDuration, | |||
| struct timeval | presentationTime | |||
| ) |
Definition at line 1141 of file QuickTimeFileSink.cpp.
Referenced by extendChunk().
01144 : fNextChunk(NULL), fOffsetInFile(offsetInFile), 01145 fNumFrames(size/frameSize), 01146 fFrameSize(frameSize), fFrameDuration(frameDuration), 01147 fPresentationTime(presentationTime) { 01148 }
| ChunkDescriptor::~ChunkDescriptor | ( | ) | [virtual] |
Definition at line 1150 of file QuickTimeFileSink.cpp.
References fNextChunk.
01150 { 01151 delete fNextChunk; 01152 }
| ChunkDescriptor * ChunkDescriptor::extendChunk | ( | int64_t | newOffsetInFile, | |
| unsigned | newSize, | |||
| unsigned | newFrameSize, | |||
| unsigned | newFrameDuration, | |||
| struct timeval | newPresentationTime | |||
| ) |
Definition at line 1155 of file QuickTimeFileSink.cpp.
References ChunkDescriptor(), fFrameDuration, fFrameSize, fNextChunk, fNumFrames, and fOffsetInFile.
Referenced by SubsessionIOState::useFrame1().
01157 { 01158 // First, check whether the new space is just at the end of this 01159 // existing chunk: 01160 if (newOffsetInFile == fOffsetInFile + fNumFrames*fFrameSize) { 01161 // We can extend this existing chunk, provided that the frame size 01162 // and frame duration have not changed: 01163 if (newFrameSize == fFrameSize && newFrameDuration == fFrameDuration) { 01164 fNumFrames += newSize/fFrameSize; 01165 return this; 01166 } 01167 } 01168 01169 // We'll allocate a new ChunkDescriptor, and link it to the end of us: 01170 ChunkDescriptor* newDescriptor 01171 = new ChunkDescriptor(newOffsetInFile, newSize, 01172 newFrameSize, newFrameDuration, 01173 newPresentationTime); 01174 01175 fNextChunk = newDescriptor; 01176 01177 return newDescriptor; 01178 }
Definition at line 53 of file QuickTimeFileSink.cpp.
Referenced by QuickTimeFileSink::addAtom_hdlr2(), extendChunk(), SubsessionIOState::setFinalQTstate(), while(), and ~ChunkDescriptor().
| int64_t ChunkDescriptor::fOffsetInFile |
Definition at line 54 of file QuickTimeFileSink.cpp.
Referenced by QuickTimeFileSink::addAtom_hdlr2(), and extendChunk().
| unsigned ChunkDescriptor::fNumFrames |
Definition at line 55 of file QuickTimeFileSink.cpp.
Referenced by QuickTimeFileSink::addAtom_hdlr2(), extendChunk(), SubsessionIOState::setFinalQTstate(), and while().
| unsigned ChunkDescriptor::fFrameSize |
Definition at line 56 of file QuickTimeFileSink.cpp.
Referenced by QuickTimeFileSink::addAtom_hdlr2(), and extendChunk().
| unsigned ChunkDescriptor::fFrameDuration |
Definition at line 57 of file QuickTimeFileSink.cpp.
Referenced by QuickTimeFileSink::addAtom_hdlr2(), extendChunk(), SubsessionIOState::setFinalQTstate(), and while().
struct timeval ChunkDescriptor::fPresentationTime [read] |
Definition at line 58 of file QuickTimeFileSink.cpp.
Referenced by QuickTimeFileSink::completeOutputFile(), and while().
1.5.2