/** Called during Audacity start-up to try and load the ffmpeg libraries */ void FFmpegStartup() { bool enabled = false; gPrefs->Read(wxT("/FFmpeg/Enabled"),&enabled); // 'false' means that no errors should be shown whatsoever if (enabled && !LoadFFmpeg(false)) { wxMessageBox(_("FFmpeg was configured in Preferences and successfully loaded before, \ \nbut this time Audacity failed to load it at startup. \ \n\nYou may want to go back to Preferences > Libraries and re-configure it."), _("FFmpeg startup failed")); }
bool ExportFFmpeg::CheckFileName(wxFileName & WXUNUSED(filename), int WXUNUSED(format)) { bool result = true; // Show "Locate FFmpeg" dialog if (!CheckFFmpegPresence(true)) { FFmpegLibsInst->FindLibs(NULL); FFmpegLibsInst->FreeLibs(); return LoadFFmpeg(true); } return result; }
void LibraryPrefs::OnFFmpegFindButton(wxCommandEvent & WXUNUSED(event)) { #ifdef USE_FFMPEG FFmpegLibs* FFmpegLibsInst = PickFFmpegLibs(); bool showerrs = #if defined(__WXDEBUG__) true; #else false; #endif FFmpegLibsInst->FreeLibs(); // Load the libs ('true' means that all errors will be shown) bool locate = !LoadFFmpeg(showerrs); // Libs are fine, don't show "locate" dialog unless user really wants it if (!locate) { int response = wxMessageBox(_("Audacity has automatically detected valid FFmpeg libraries.\nDo you still want to locate them manually?"), wxT("Success"), wxCENTRE | wxYES_NO | wxNO_DEFAULT |wxICON_QUESTION); if (response == wxYES) { locate = true; } } if (locate) { // Show "Locate FFmpeg" dialog FFmpegLibsInst->FindLibs(this); FFmpegLibsInst->FreeLibs(); LoadFFmpeg(showerrs); } SetFFmpegVersionText(); DropFFmpegLibs(); #endif }