MCPcopy Create free account
hub / github.com/audacity/audacity / OnFFmpegFindButton

Function OnFFmpegFindButton

modules/import-export/mod-ffmpeg/FFmpegPrefs.cpp:90–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88}
89
90void OnFFmpegFindButton(State &state)
91{
92 bool showerrs =
93#if defined(_DEBUG)
94 true;
95#else
96 false;
97#endif
98 // Load the libs ('true' means that all errors will be shown)
99 bool locate = !LoadFFmpeg(showerrs);
100
101 // Libs are fine, don't show "locate" dialog unless user really wants it
102 if (!locate) {
103 int response = AudacityMessageBox(
104 XO(
105"Audacity has automatically detected valid FFmpeg libraries.\nDo you still want to locate them manually?"),
106 XO("Success"),
107 wxCENTRE | wxYES_NO | wxNO_DEFAULT |wxICON_QUESTION);
108 if (response == wxYES) {
109 locate = true;
110 }
111 }
112
113 if (locate) {
114 // Show "Locate FFmpeg" dialog
115 FindFFmpegLibs(state.parent);
116 LoadFFmpeg(showerrs);
117 }
118 SetFFmpegVersionText(state);
119}
120
121LibraryPrefs::RegisteredControls reg{ wxT("FFmpeg"), AddControls };
122

Callers 1

FFmpegPrefs.cppFile · 0.85

Calls 4

LoadFFmpegFunction · 0.85
AudacityMessageBoxFunction · 0.85
FindFFmpegLibsFunction · 0.85
SetFFmpegVersionTextFunction · 0.85

Tested by

no test coverage detected