Update of /cvsroot/audacity/audacity-src/src/import In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv8159/src/import
Modified Files: ImportFFmpeg.cpp Log Message: WAV and AMR are marked as not metadata-able. Saved format and codec are selected again when Custom export dialog is reopened. Changed some wxT() to _() For formats not listed in compatibility list all codecs are considered compatible (example - crc format) Save codec ID in preferences instead of codec name Sample rate = 0 now means "don't change sample rate", as it was intended. FFmpeg importer now handles start_time. Correctly? I do not know... Index: ImportFFmpeg.cpp =================================================================== RCS file: /cvsroot/audacity/audacity-src/src/import/ImportFFmpeg.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- ImportFFmpeg.cpp 2 Aug 2008 11:35:52 -0000 1.16 +++ ImportFFmpeg.cpp 3 Aug 2008 20:36:20 -0000 1.17 @@ -310,13 +310,6 @@ return false; } - if (mFormatContext->start_time != AV_NOPTS_VALUE) - { - //TODO: handle this situation (generate <start_time> ms of slience?) - wxLogMessage(wxT("start_time = %d, that would be %d milliseconds."),mFormatContext->start_time,(mFormatContext->start_time/AV_TIME_BASE*1000)); - wxLogMessage(wxT("start_time support is not implemented in FFmpeg import plugin. Patches are welcome.")); - } - InitCodecs(); return true; } @@ -444,6 +437,34 @@ } } + int64_t delay = 0; + if (mFormatContext->start_time != AV_NOPTS_VALUE) + { + delay = mFormatContext->start_time; + wxLogMessage(wxT("Container start_time = %d, that would be %d milliseconds."),mFormatContext->start_time,double(mFormatContext->start_time)/AV_TIME_BASE*1000); + //wxLogMessage(wxT("start_time support is not implemented in FFmpeg import plugin. Patches are welcome.")); + } + + for (int s = 0; s < mNumStreams; s++) + { + int64_t stream_delay = 0; + if (mScs[s]->m_stream->start_time != AV_NOPTS_VALUE) + { + stream_delay = mScs[s]->m_stream->start_time; + wxLogMessage(wxT("Stream %d start_time = %d, that would be %f milliseconds."), s, mScs[s]->m_stream->start_time, double(mScs[s]->m_stream->start_time)/AV_TIME_BASE*1000); + } + if (delay != 0 || stream_delay != 0) + { + for (int c = 0; c < mScs[s]->m_stream->codec->channels; c++) + { + WaveTrack *t = mChannels[s][c]; + double len = double(delay+stream_delay)/AV_TIME_BASE; + t->InsertSilence(0,double(delay+stream_delay)/AV_TIME_BASE); + } + } + } + + streamContext *sc = NULL; int res = 0; while ((sc = ReadNextFrame()) != NULL && (res == 0)) ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Audacity-cvs mailing list Audacity-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/audacity-cvs