mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-15 15:49:36 +02:00
FFmpeg: Fall back to guessing avutil and avcodec filenames
When the avutil_version and avcodec_version symbols are not found, fall back to guess the filenames of avutil and avcodec (as done in r13195 and previously).
This commit is contained in:
parent
9851b53a8f
commit
b8a464709d
@ -791,6 +791,12 @@ bool FFmpegLibs::InitLibs(wxString libpath_format, bool WXUNUSED(showerr))
|
||||
codec = avformat;
|
||||
}
|
||||
}
|
||||
if (!avcodec_filename.FileExists()) {
|
||||
avcodec_filename = GetLibAVCodecName();
|
||||
}
|
||||
if (!avutil_filename.FileExists()) {
|
||||
avutil_filename = GetLibAVUtilName();
|
||||
}
|
||||
|
||||
if (util == NULL || codec == NULL) {
|
||||
wxLogMessage(wxT("avformat not monolithic"));
|
||||
|
30
src/FFmpeg.h
30
src/FFmpeg.h
@ -292,6 +292,16 @@ public:
|
||||
{
|
||||
return (wxT("avformat-") wxT(AV_STRINGIFY(LIBAVFORMAT_VERSION_MAJOR)) wxT(".dll"));
|
||||
}
|
||||
|
||||
wxString GetLibAVCodecName()
|
||||
{
|
||||
return (wxT("avcodec-") wxT(AV_STRINGIFY(LIBAVCODEC_VERSION_MAJOR)) wxT(".dll"));
|
||||
}
|
||||
|
||||
wxString GetLibAVUtilName()
|
||||
{
|
||||
return (wxT("avutil-") wxT(AV_STRINGIFY(LIBAVUTIL_VERSION_MAJOR)) wxT(".dll"));
|
||||
}
|
||||
#elif defined(__WXMAC__)
|
||||
/* Library names and file filters for Mac OS only */
|
||||
wxString GetLibraryTypeString()
|
||||
@ -308,6 +318,16 @@ public:
|
||||
{
|
||||
return (wxT("libavformat.") wxT(AV_STRINGIFY(LIBAVFORMAT_VERSION_MAJOR)) wxT(".dylib"));
|
||||
}
|
||||
|
||||
wxString GetLibAVCodecName()
|
||||
{
|
||||
return (wxT("libavcodec.") wxT(AV_STRINGIFY(LIBAVCODEC_VERSION_MAJOR)) wxT(".dylib"));
|
||||
}
|
||||
|
||||
wxString GetLibAVUtilName()
|
||||
{
|
||||
return (wxT("libavutil.") wxT(AV_STRINGIFY(LIBAVUTIL_VERSION_MAJOR)) wxT(".dylib"));
|
||||
}
|
||||
#else
|
||||
/* Library names and file filters for other platforms, basically Linux and
|
||||
* other *nix platforms */
|
||||
@ -325,6 +345,16 @@ public:
|
||||
{
|
||||
return (wxT("libavformat.so.") wxT(AV_STRINGIFY(LIBAVFORMAT_VERSION_MAJOR)));
|
||||
}
|
||||
|
||||
wxString GetLibAVCodecName()
|
||||
{
|
||||
return (wxT("libavcodec.so.") wxT(AV_STRINGIFY(LIBAVCODEC_VERSION_MAJOR)));
|
||||
}
|
||||
|
||||
wxString GetLibAVUtilName()
|
||||
{
|
||||
return (wxT("libavutil.so.") wxT(AV_STRINGIFY(LIBAVUTIL_VERSION_MAJOR)));
|
||||
}
|
||||
#endif // (__WXMAC__) || (__WXMSW__)
|
||||
|
||||
/// Ugly reference counting. I thought of using wxStuff for that,
|
||||
|
Loading…
x
Reference in New Issue
Block a user