oint back at the new mp4 file for write chunk
m_pFile = pWriteFile;
m_mode = 'w';
m_pTracks[nextTrackIndex]->
RewriteChunk(chunkIds[nextTrackIndex], pChunk, chunkSize);
MP4Free(pChunk);
chunkIds[nextTrackIndex]++;
nextChunkTimes[nextTrackIndex] = MP4_INVALID_TIMESTAMP;
}
delete [] chunkIds;
delete [] maxChunkIds;
delete [] nextChunkTimes;
}
void MP4File::Open(const char* fmode)
{
ASSERT(m_pFile == NULL);
#ifdef O_LARGEFILE
// UGH! fopen doesn't open a file in 64-bit mode, period.
// So we need to use open() and then fdopen()
int fd;
int flags = O_LARGEFILE;
if (strchr(fmode, '+')) {
flags |= O_CREAT | O_RDWR;
if (fmode[0] == 'w') {
flags |= O_TRUNC;
}
} else {
if (fmode[0] == 'w') {
flags |= O_CREAT | O_TRUNC | O_WRONLY;
} else {
flags |= O_RDONLY;
}
}
fd = open(m_fileName, flags, 0666);
if (fd >= 0) {
m_pFile = fdopen(fd, fmode);
}
#else
m_pFile = fopen(m_fileName, fmode)
上一篇:
mp4extract.cpp
下一篇:
淮河中下游水环境中PAHs的分布及其降解菌的筛选