Update of /cvsroot/audacity/audacity-src/src/import
In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv11161/src/import

Modified Files:
        ImportFFmpeg.cpp 
Log Message:
New functions being imported from FFmpeg libraries (will be required for 
exporter and required for some improvements in importer).
Moved log callback to FFmpeg.cpp (used in both importer and exporter).
Changed import progress report - file size is used.

Index: ImportFFmpeg.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/import/ImportFFmpeg.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- ImportFFmpeg.cpp    6 Jun 2008 22:15:17 -0000       1.10
+++ ImportFFmpeg.cpp    12 Jun 2008 09:16:40 -0000      1.11
@@ -175,32 +175,6 @@
    int                  m_initialchannels;               // number of channels 
allocated when we begin the importing. Assumes that number of channels doesn't 
change on the fly.
 } streamContext;
 
-void av_log_wx_callback(void* ptr, int level, const char* fmt, va_list vl)
-{
-   int av_log_level = AV_LOG_WARNING;
-   AVClass* avc = ptr ? *(AVClass**)ptr : NULL;
-   if (level > av_log_level)
-      return;
-   wxString printstring(wxT(""));
-
-   if (avc) {
-      printstring.Append(wxString::Format(wxT("[%s @ %p] "), 
wxString::FromUTF8(avc->item_name(ptr)).c_str(), avc));
-   }
-
-   wxString frm(fmt,wxConvLibc);
-   printstring.Append(wxString::FormatV(frm,vl));
-
-   wxString cpt;
-   switch (level)
-   {
-      case 0: cpt = wxT("Error"); break;
-      case 1: cpt = wxT("Info"); break;
-      case 2: cpt = wxT("Debug"); break;
-      default: cpt = wxT("Log"); break;
-   }
-   wxLogMessage(wxT("%s: %s"),cpt.c_str(),printstring.c_str());
-}
-
 class FFmpegImportPlugin : public ImportPlugin
 {
 public:
@@ -701,10 +675,9 @@
    }
 
    free(tmp);
-
-   mSamplesDone += 1;
-
-   if (!mProgress->Update((wxLongLong)mSamplesDone, (wxLongLong)(mNumSamples > 
0 ? mNumSamples : 1))) {
+   
+   int tsize = FFmpegLibsInst->url_fsize(mFormatContext->pb);
+   if (!mProgress->Update((wxLongLong)this->mFormatContext->pb->pos, 
(wxLongLong)(tsize > 0 ? tsize : 1))) {
       mCancelled = true;
       return 1;
    }


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Audacity-cvs mailing list
Audacity-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/audacity-cvs

Reply via email to