Audacity  3.0.3
FFmpegFunctions.cpp
Go to the documentation of this file.
1 /**********************************************************************
2 
3  Audacity: A Digital Audio Editor
4 
5  FFmpegFunctions.cpp
6 
7  Dmitry Vedenko
8 
9 **********************************************************************/
10 
11 #include "FFmpegFunctions.h"
12 
13 #include <wx/string.h>
14 #include <wx/dynlib.h>
15 #include <wx/log.h>
16 
17 #if defined(__WXMSW__)
18 # include <wx/buffer.h>
19 # include <wx/msw/registry.h>
20 
21 # define WIN32_LEAN_AND_MEAN
22 # include <windows.h>
23 # include <psapi.h>
24 #else
25 # include <dlfcn.h>
26 #endif
27 
28 #include "Prefs.h"
29 #include "FileNames.h"
30 
34 
35 #include "impl/FFmpegAPIResolver.h"
36 #include "impl/FFmpegLog.h"
37 
38 void* GetSymbolFromProcess(const char* name)
39 {
40 #if defined(__WXMSW__)
41  std::vector<HMODULE> handles(256);
42 
43  DWORD neededMemory;
44 
45  if (!EnumProcessModules(
46  GetCurrentProcess(), handles.data(), sizeof(HMODULE) * handles.size(),
47  &neededMemory))
48  {
49  return nullptr;
50  }
51 
52  const int modulesCount = neededMemory / sizeof(HMODULE);
53 
54  if (modulesCount > handles.size())
55  {
56  handles.resize(modulesCount);
57 
58  if (!EnumProcessModules(
59  GetCurrentProcess(), handles.data(),
60  sizeof(HMODULE) * handles.size(), &neededMemory))
61  {
62  return nullptr;
63  }
64  }
65 
66  for (HMODULE handle : handles)
67  {
68  void* addr = GetProcAddress(handle, name);
69 
70  if (addr != nullptr)
71  return addr;
72  }
73 
74  return nullptr;
75 #else
76  return dlsym(RTLD_DEFAULT, name);
77 #endif
78 }
79 
80 struct EnvSetter final
81 {
82  static const wxString VariableName;
83  static const wxString Separator;
84 
86  {
87  ValueExisted = wxGetEnv(VariableName, &OldValue);
88 
89  wxString value;
90 
91  for (const wxString& path : FFmpegFunctions::GetSearchPaths())
92  {
93  if (!value.empty())
94  value += Separator;
95 
96  value += path;
97  }
98 
99  wxSetEnv(VariableName, value);
100  };
101 
103  {
104  if (ValueExisted)
105  wxSetEnv(VariableName, OldValue);
106  else
107  wxUnsetEnv(VariableName);
108  }
109 
110  wxString OldValue;
112 };
113 
114 #if defined(__WXMSW__)
115 const wxString EnvSetter::VariableName("PATH");
116 const wxString EnvSetter::Separator(";");
117 #elif defined(__WXMAC__)
118 const wxString EnvSetter::VariableName("DYLD_LIBRARY_PATH");
119 const wxString EnvSetter::Separator(":");
120 #else
121 const wxString EnvSetter::VariableName("LD_LIBRARY_PATH");
122 const wxString EnvSetter::Separator(":");
123 #endif
124 
125 std::vector<wxString> BuildAVFormatPaths(int version)
126 {
127  return {
128 #if defined(__WXMSW__)
129  wxString::Format("avformat-%d.dll", version),
130 #elif defined(__WXMAC__)
131  wxString::Format("ffmpeg.%d.64bit.dylib", version),
132  wxString::Format("libavformat.%d.dylib", version),
133 #else
134  wxString::Format("libavformat.so.%d", version)
135 #endif
136 };
137 }
138 
140 {
141  std::shared_ptr<wxDynamicLibrary> AVFormatLibrary;
142  std::shared_ptr<wxDynamicLibrary> AVCodecLibrary;
143  std::shared_ptr<wxDynamicLibrary> AVUtilLibrary;
144 
145  std::unique_ptr<FFmpegLog> FFmpegLogCallbackSetter;
146 
150 
151  std::shared_ptr<wxDynamicLibrary> LibraryWithSymbol(const char* symbol) const
152  {
153  if (AVFormatLibrary->HasSymbol(symbol))
154  return AVFormatLibrary;
155 
156  void* addr = GetSymbolFromProcess(symbol);
157 
158  if (addr == nullptr)
159  return nullptr;
160 
161  const wxString path = FileNames::PathFromAddr(addr);
162 
163  if (path.empty())
164  return nullptr;
165 
166  return LoadLibrary(wxFileNameFromPath(path));
167  }
168 
169  bool Load(FFmpegFunctions& functions, const wxString& path)
170  {
171  // We start by loading AVFormat
173 
174  if (AVFormatLibrary == nullptr)
175  return false;
176 
177  if ((AVCodecLibrary = LibraryWithSymbol("avcodec_version")) == nullptr)
178  return false;
179 
180  if ((AVUtilLibrary = LibraryWithSymbol("avutil_version")) == nullptr)
181  return false;
182 
183  if (
184  !LoadAVFormatFunctions(*AVFormatLibrary, functions) ||
185  !LoadAVCodecFunctions(*AVCodecLibrary, functions) ||
186  !LoadAVUtilFunctions(*AVUtilLibrary, functions))
187  return false;
188 
189  if (!FFmpegAPIResolver::Get().GetAVFormatFactories(
191  return false;
192 
193  if (!FFmpegAPIResolver::Get().GetAVCodecFactories(
194  functions.AVCodecVersion.Major, CodecFactories))
195  return false;
196 
197  AVCodecIDResolver codecResolvers;
198 
199  if (!FFmpegAPIResolver::Get().GetAVCodecIDResolver(
200  functions.AVCodecVersion.Major, codecResolvers))
201  return false;
202 
203  functions.GetAVCodecID = codecResolvers.GetAVCodecID;
204  functions.GetAudacityCodecID = codecResolvers.GetAudacityCodecID;
205 
206  if (!FFmpegAPIResolver::Get().GetAVUtilFactories(
207  functions.AVUtilVersion.Major, UtilFactories))
208  return false;
209 
210  functions.avcodec_register_all();
211 
212  if (functions.av_register_all)
213  functions.av_register_all();
214 
217 
218  return true;
219  }
220 
221  std::shared_ptr<wxDynamicLibrary> LoadLibrary(const wxString& libraryName) const
222  {
223 #if defined(__WXMAC__)
224  // On macOS dyld reads environment only when application starts.
225  // Let's emulate the process manually
226  for(const wxString& path : FFmpegFunctions::GetSearchPaths())
227  {
228  const wxString fullName = wxFileName(path, libraryName).GetFullPath();
229 
230  auto library = std::make_shared<wxDynamicLibrary>(fullName);
231 
232  if (library->IsLoaded())
233  return library;
234  }
235 #endif
236  auto library = std::make_shared<wxDynamicLibrary> (libraryName);
237 
238  if (library->IsLoaded())
239  return library;
240 
241  // Loading has failed.
242  // wxLogSysError doesn't report errors correctly on *NIX
243 #if defined(_WIN32)
244  wxLogSysError("Failed to load %s", libraryName.c_str());
245 #else
246  const char* errorString = dlerror();
247  wxLogError("Failed to load %s (%s)", libraryName.c_str(), errorString);
248 #endif
249  return {};
250  }
251 };
252 
254  : mPrivate(std::make_unique<Private>())
255 {
256 }
257 
259 {
260 }
261 
262 std::shared_ptr<FFmpegFunctions> FFmpegFunctions::Load()
263 {
264  static std::weak_ptr<FFmpegFunctions> weakFunctions;
265 
266  auto functions = weakFunctions.lock();
267 
268  if (functions)
269  return functions;
270 
271  std::shared_ptr<FFmpegFunctions> ffmpeg =
272  std::make_shared<FFmpegFunctions>();
273 
274  const auto supportedVersions =
276 
277 #if !defined(__WXMAC__)
278  EnvSetter envSetter;
279 #endif
280 
281  for (int version : supportedVersions)
282  {
283  for (const wxString& path : BuildAVFormatPaths(version))
284  {
285  if (ffmpeg->mPrivate->Load(*ffmpeg, path))
286  {
287  weakFunctions = ffmpeg;
288  return ffmpeg;
289  }
290  }
291  }
292 
293  return {};
294 }
295 
296 StringSetting AVFormatPath { L"/FFmpeg/FFmpegLibPath", L"" };
297 
298 std::vector<wxString> FFmpegFunctions::GetSearchPaths()
299 {
300  std::vector<wxString> paths;
301 
302  const wxString userAVFormatFullPath = AVFormatPath.Read();
303 
304  if (!userAVFormatFullPath.empty())
305  paths.emplace_back(wxPathOnly(userAVFormatFullPath));
306 
307 #if defined(__WXMSW__)
308  wxRegKey reg(wxT("HKEY_LOCAL_MACHINE\\Software\\FFmpeg for Audacity"));
309  wxString path;
310 
311  if (reg.Exists())
312  reg.QueryValue(wxT("InstallPath"), path);
313 
314  if (!path.empty())
315  paths.emplace_back(path);
316 
317 #elif defined(__WXMAC__)
318  paths.emplace_back(wxT("/Library/Application Support/audacity/libs"));
319  paths.emplace_back(wxT("/usr/local/lib/audacity"));
320 #endif
321 
322  return paths;
323 }
324 
325 std::unique_ptr<AVIOContextWrapper> FFmpegFunctions::CreateAVIOContext() const
326 {
327  return mPrivate->FormatFactories.CreateAVIOContextWrapper(*this);
328 }
329 
330 std::unique_ptr<AVFormatContextWrapper>
332 {
333  return mPrivate->FormatFactories.CreateAVFormatContextWrapper(*this);
334 }
335 
336 std::unique_ptr<AVStreamWrapper>
338 {
339  return mPrivate->FormatFactories.CreateAVStreamWrapper(*this, stream);
340 }
341 
342 std::unique_ptr<AVPacketWrapper> FFmpegFunctions::CreateAVPacketWrapper() const
343 {
344  return mPrivate->CodecFactories.CreateAVPacketWrapper(*this);
345 }
346 
347 std::unique_ptr<AVFrameWrapper> FFmpegFunctions::CreateAVFrameWrapper() const
348 {
349  return mPrivate->UtilFactories.CreateAVFrameWrapper(*this);
350 }
351 
352 std::unique_ptr<AVInputFormatWrapper>
354  AVInputFormat* inputFormat) const
355 {
356  return mPrivate->FormatFactories.CreateAVInputFormatWrapper(inputFormat);
357 }
358 
359 std::unique_ptr<AVOutputFormatWrapper> FFmpegFunctions::GuessOutputFormat(
360  const char* short_name, const char* filename, const char* mime_type)
361 {
362  AVOutputFormat* outputFormat =
363  av_guess_format(short_name, filename, mime_type);
364 
365  return mPrivate->FormatFactories.CreateAVOutputFormatWrapper(outputFormat);
366 }
367 
368 std::unique_ptr<AVOutputFormatWrapper>
370  AVOutputFormat* outputFormat) const
371 {
372  return mPrivate->FormatFactories.CreateAVOutputFormatWrapper(outputFormat);
373 }
374 
375 std::unique_ptr<AVCodecWrapper>
377 {
378  AVCodec* codec = avcodec_find_decoder(codecID);
379 
380  if (codec == nullptr)
381  return {};
382 
383  return mPrivate->CodecFactories.CreateAVCodecWrapper(codec);
384 }
385 
386 std::unique_ptr<AVCodecWrapper>
388 {
389  AVCodec* codec = avcodec_find_encoder(codecID);
390 
391  if (codec == nullptr)
392  return {};
393 
394  return mPrivate->CodecFactories.CreateAVCodecWrapper(codec);
395 }
396 
397 std::unique_ptr<AVCodecWrapper>
399 {
401 
402  if (codec == nullptr)
403  return {};
404 
405  return mPrivate->CodecFactories.CreateAVCodecWrapper(codec);
406 }
407 
408 std::unique_ptr<AVCodecContextWrapper>
410 {
411  return mPrivate->CodecFactories.CreateAVCodecContextWrapper(
412  *this, context);
413 }
414 
415 std::unique_ptr<AVCodecContextWrapper>
417  std::unique_ptr<AVCodecWrapper> codec) const
418 {
419  if (codec == nullptr)
420  return {};
421 
422  return mPrivate->CodecFactories.CreateAVCodecContextWrapperFromCodec(
423  *this, std::move(codec));
424 }
425 
426 std::unique_ptr<AVOutputFormatWrapper>
428 {
429  AVOutputFormat* outputFormat =
430  av_oformat_next(fmt != nullptr ? fmt->GetWrappedValue() : nullptr);
431 
432  if (outputFormat == nullptr)
433  return {};
434 
435  return mPrivate->FormatFactories.CreateAVOutputFormatWrapper(outputFormat);
436 }
437 
438 std::unique_ptr<AVCodecWrapper>
440 {
441  AVCodec* nextCodec =
442  av_codec_next(codec != nullptr ? codec->GetWrappedValue() : nullptr);
443 
444  if (nextCodec == nullptr)
445  return {};
446 
447  return mPrivate->CodecFactories.CreateAVCodecWrapper(nextCodec);
448 }
449 
450 std::unique_ptr<AVFifoBufferWrapper>
452 {
453  return std::make_unique<AVFifoBufferWrapper>(*this, size);
454 }
size
size_t size
Definition: ffmpeg-2.3.6-single-header.h:412
FFmpegFunctions::Private::AVFormatLibrary
std::shared_ptr< wxDynamicLibrary > AVFormatLibrary
Definition: FFmpegFunctions.cpp:141
AVInputFormat
Definition: ffmpeg-2.3.6-single-header.h:4283
AVFormatFunctionsLoader.h
FFmpegFunctions::GetAudacityCodecID
AudacityAVCodecID(* GetAudacityCodecID)(AVCodecIDFwd)
Definition: FFmpegFunctions.h:92
AVCodecContext
Definition: ffmpeg-2.3.6-single-header.h:2847
FFmpegFunctions::Private::FFmpegLogCallbackSetter
std::unique_ptr< FFmpegLog > FFmpegLogCallbackSetter
Definition: FFmpegFunctions.cpp:145
AVCodecFunctionsLoader.h
AVOutputFormatWrapper
Definition: AVOutputFormatWrapper.h:19
FFmpegFunctions::Private
Definition: FFmpegFunctions.cpp:140
FFmpegAPIResolver::Get
static FFmpegAPIResolver & Get()
Definition: FFmpegAPIResolver.cpp:13
FFmpegFunctions::CreateAVCodecContextWrapper
std::unique_ptr< AVCodecContextWrapper > CreateAVCodecContextWrapper(AVCodecContext *context) const
Definition: FFmpegFunctions.cpp:409
AVCodecWrapper
Definition: AVCodecWrapper.h:21
AVOutputFormatWrapper::GetWrappedValue
AVOutputFormat * GetWrappedValue() noexcept
Definition: AVOutputFormatWrapper.cpp:20
AVCodecFunctions::av_codec_next
AVCodec *(* av_codec_next)(const AVCodec *c)
Definition: AVCodecFunctions.h:35
AVCodecFunctions::avcodec_find_encoder
AVCodec *(* avcodec_find_encoder)(AVCodecIDFwd id)
Definition: AVCodecFunctions.h:24
LoadAVFormatFunctions
bool LoadAVFormatFunctions(const wxDynamicLibrary &lib, AVFormatFunctions &functions)
Definition: AVFormatFunctionsLoader.cpp:19
AVCodecWrapper::GetWrappedValue
AVCodec * GetWrappedValue() noexcept
Definition: AVCodecWrapper.cpp:20
AVCodecFactories
Definition: FFmpegAPIResolver.h:33
FFmpegFunctions::GetAVCodecID
AVCodecIDFwd(* GetAVCodecID)(AudacityAVCodecID)
Definition: FFmpegFunctions.h:91
FFmpegLog.h
EnvSetter::ValueExisted
bool ValueExisted
Definition: FFmpegFunctions.cpp:111
FFmpegFunctions::Private::AVCodecLibrary
std::shared_ptr< wxDynamicLibrary > AVCodecLibrary
Definition: FFmpegFunctions.cpp:142
FFmpegFunctions::Private::LoadLibrary
std::shared_ptr< wxDynamicLibrary > LoadLibrary(const wxString &libraryName) const
Definition: FFmpegFunctions.cpp:221
FFmpegFunctions::CreateFifoBuffer
std::unique_ptr< AVFifoBufferWrapper > CreateFifoBuffer(int size) const
Definition: FFmpegFunctions.cpp:451
FFmpegFunctions::GetNextCodec
std::unique_ptr< AVCodecWrapper > GetNextCodec(const AVCodecWrapper *codec) const
Definition: FFmpegFunctions.cpp:439
AVUtilFactories
Definition: FFmpegAPIResolver.h:60
FFmpegFunctions::CreateAVPacketWrapper
std::unique_ptr< AVPacketWrapper > CreateAVPacketWrapper() const
Definition: FFmpegFunctions.cpp:342
FFmpegFunctions::CreateAVCodecContextWrapperFromCodec
std::unique_ptr< AVCodecContextWrapper > CreateAVCodecContextWrapperFromCodec(std::unique_ptr< AVCodecWrapper > codec) const
Definition: FFmpegFunctions.cpp:416
AVCodecIDFwd
int AVCodecIDFwd
Definition: AVCodecID.h:407
FFmpegFunctions::CreateAVStreamWrapper
std::unique_ptr< AVStreamWrapper > CreateAVStreamWrapper(AVStream *stream) const
Definition: FFmpegFunctions.cpp:337
FFmpegFunctions::Private::AVUtilLibrary
std::shared_ptr< wxDynamicLibrary > AVUtilLibrary
Definition: FFmpegFunctions.cpp:143
Setting::Read
bool Read(T *pVar) const
overload of Read returning a boolean that is true if the value was previously defined *‍/
Definition: Prefs.h:128
StringSetting
Specialization of Setting for strings.
Definition: Prefs.h:228
AVCodecFunctions::avcodec_register_all
void(* avcodec_register_all)(void)
Definition: AVCodecFunctions.h:34
EnvSetter::OldValue
wxString OldValue
Definition: FFmpegFunctions.cpp:110
FFmpegAPIResolver::GetSuportedAVFormatVersions
std::vector< int > GetSuportedAVFormatVersions() const
Definition: FFmpegAPIResolver.cpp:87
FFmpegFunctions::CreateAVFrameWrapper
std::unique_ptr< AVFrameWrapper > CreateAVFrameWrapper() const
Definition: FFmpegFunctions.cpp:347
FileNames::PathFromAddr
FILES_API FilePath PathFromAddr(void *addr)
FFmpegFunctions::Private::UtilFactories
AVUtilFactories UtilFactories
Definition: FFmpegFunctions.cpp:149
AVCodecFunctions::AVCodecVersion
FFMPegVersion AVCodecVersion
Definition: AVCodecFunctions.h:19
AVFormatFactories
Definition: FFmpegAPIResolver.h:49
FFmpegFunctions::~FFmpegFunctions
~FFmpegFunctions()
Definition: FFmpegFunctions.cpp:258
FFmpegFunctions::Private::CodecFactories
AVCodecFactories CodecFactories
Definition: FFmpegFunctions.cpp:148
FFmpegFunctions::CreateAVInputFormatWrapper
std::unique_ptr< AVInputFormatWrapper > CreateAVInputFormatWrapper(AVInputFormat *inputFormat) const
Definition: FFmpegFunctions.cpp:353
FFmpegFunctions::CreateAVIOContext
std::unique_ptr< AVIOContextWrapper > CreateAVIOContext() const
Definition: FFmpegFunctions.cpp:325
EnvSetter::~EnvSetter
~EnvSetter()
Definition: FFmpegFunctions.cpp:102
AVCodecIDResolver
Definition: FFmpegAPIResolver.h:27
FFmpegFunctions::GuessOutputFormat
std::unique_ptr< AVOutputFormatWrapper > GuessOutputFormat(const char *short_name, const char *filename, const char *mime_type)
Definition: FFmpegFunctions.cpp:359
FFmpegFunctions
Definition: FFmpegFunctions.h:85
name
const TranslatableString name
Definition: Distortion.cpp:98
AVCodecFunctions::avcodec_find_decoder
AVCodec *(* avcodec_find_decoder)(AVCodecIDFwd id)
Definition: AVCodecFunctions.h:26
LoadAVCodecFunctions
bool LoadAVCodecFunctions(const wxDynamicLibrary &lib, AVCodecFunctions &functions)
Definition: AVCodecFunctionsLoader.cpp:19
AVCodecIDResolver::GetAudacityCodecID
AudacityAVCodecID(* GetAudacityCodecID)(AVCodecIDFwd)
Definition: FFmpegAPIResolver.h:29
FFmpegFunctions::CreateAVOutputFormatWrapper
std::unique_ptr< AVOutputFormatWrapper > CreateAVOutputFormatWrapper(AVOutputFormat *outputFormat) const
Definition: FFmpegFunctions.cpp:369
AVFormatFunctions::av_oformat_next
AVOutputFormat *(* av_oformat_next)(const AVOutputFormat *f)
Definition: AVFormatFunctions.h:27
FFmpegFunctions::FFmpegFunctions
FFmpegFunctions()
Definition: FFmpegFunctions.cpp:253
FFmpegFunctions::mPrivate
std::unique_ptr< Private > mPrivate
Definition: FFmpegFunctions.h:131
FFmpegFunctions::CreateEncoder
std::unique_ptr< AVCodecWrapper > CreateEncoder(AVCodecIDFwd codecID) const
Definition: FFmpegFunctions.cpp:387
AVFormatFunctions::AVFormatVersion
FFMPegVersion AVFormatVersion
Definition: AVFormatFunctions.h:19
FFmpegFunctions::GetNextOutputFormat
std::unique_ptr< AVOutputFormatWrapper > GetNextOutputFormat(const AVOutputFormatWrapper *fmt) const
Definition: FFmpegFunctions.cpp:427
AVUtilFactories::CreateLogCallbackSetter
std::unique_ptr< FFmpegLog >(* CreateLogCallbackSetter)(const FFmpegFunctions &)
Definition: FFmpegAPIResolver.h:63
AVFormatFunctions::av_register_all
void(* av_register_all)(void)
Definition: AVFormatFunctions.h:39
AVFormatPath
StringSetting AVFormatPath
Definition: FFmpegFunctions.cpp:296
AVFormatFunctions::av_guess_format
AVOutputFormat *(* av_guess_format)(const char *short_name, const char *filename, const char *mime_type)
Definition: AVFormatFunctions.h:35
EnvSetter
Definition: FFmpegFunctions.cpp:81
FFmpegFunctions::Load
static std::shared_ptr< FFmpegFunctions > Load()
Definition: FFmpegFunctions.cpp:262
FileNames.h
FFmpegFunctions::Private::Load
bool Load(FFmpegFunctions &functions, const wxString &path)
Definition: FFmpegFunctions.cpp:169
FFMPegVersion::Major
unsigned Major
Definition: FFmpegTypes.h:164
FFmpegFunctions::GetSearchPaths
static std::vector< wxString > GetSearchPaths()
Definition: FFmpegFunctions.cpp:298
AVCodecIDResolver::GetAVCodecID
AVCodecIDFwd(* GetAVCodecID)(AudacityAVCodecID)
Definition: FFmpegAPIResolver.h:28
Prefs.h
EnvSetter::VariableName
static const wxString VariableName
Definition: FFmpegFunctions.cpp:82
FFmpegFunctions.h
AVStream
Definition: ffmpeg-2.3.6-single-header.h:4372
AVCodec
Definition: ffmpeg-2.3.6-single-header.h:3466
EnvSetter::Separator
static const wxString Separator
Definition: FFmpegFunctions.cpp:83
LoadAVUtilFunctions
bool LoadAVUtilFunctions(const wxDynamicLibrary &lib, AVUtilFunctions &functions)
Definition: AVUtilFunctionsLoader.cpp:19
FFmpegFunctions::CreateAVFormatContext
std::unique_ptr< AVFormatContextWrapper > CreateAVFormatContext() const
Definition: FFmpegFunctions.cpp:331
FFmpegFunctions::Private::LibraryWithSymbol
std::shared_ptr< wxDynamicLibrary > LibraryWithSymbol(const char *symbol) const
Definition: FFmpegFunctions.cpp:151
FFmpegFunctions::Private::FormatFactories
AVFormatFactories FormatFactories
Definition: FFmpegFunctions.cpp:147
GetSymbolFromProcess
void * GetSymbolFromProcess(const char *name)
Definition: FFmpegFunctions.cpp:38
anonymous_namespace{CompareAudioCommand.cpp}::reg
BuiltinCommandsModule::Registration< CompareAudioCommand > reg
Definition: CompareAudioCommand.cpp:41
AVUtilFunctionsLoader.h
EnvSetter::EnvSetter
EnvSetter()
Definition: FFmpegFunctions.cpp:85
FFmpegAPIResolver.h
AVCodecFunctions::avcodec_find_encoder_by_name
AVCodec *(* avcodec_find_encoder_by_name)(const char *name)
Definition: AVCodecFunctions.h:25
AVUtilFunctions::AVUtilVersion
FFMPegVersion AVUtilVersion
Definition: AVUtilFunctions.h:20
AVOutputFormat
Definition: ffmpeg-2.3.6-single-header.h:4236
FFmpegFunctions::CreateDecoder
std::unique_ptr< AVCodecWrapper > CreateDecoder(AVCodecIDFwd codecID) const
Definition: FFmpegFunctions.cpp:376
BuildAVFormatPaths
std::vector< wxString > BuildAVFormatPaths(int version)
Definition: FFmpegFunctions.cpp:125