mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-02 07:03:50 +01: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:
@@ -791,6 +791,12 @@ bool FFmpegLibs::InitLibs(wxString libpath_format, bool WXUNUSED(showerr))
|
|||||||
codec = avformat;
|
codec = avformat;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!avcodec_filename.FileExists()) {
|
||||||
|
avcodec_filename = GetLibAVCodecName();
|
||||||
|
}
|
||||||
|
if (!avutil_filename.FileExists()) {
|
||||||
|
avutil_filename = GetLibAVUtilName();
|
||||||
|
}
|
||||||
|
|
||||||
if (util == NULL || codec == NULL) {
|
if (util == NULL || codec == NULL) {
|
||||||
wxLogMessage(wxT("avformat not monolithic"));
|
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"));
|
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__)
|
#elif defined(__WXMAC__)
|
||||||
/* Library names and file filters for Mac OS only */
|
/* Library names and file filters for Mac OS only */
|
||||||
wxString GetLibraryTypeString()
|
wxString GetLibraryTypeString()
|
||||||
@@ -308,6 +318,16 @@ public:
|
|||||||
{
|
{
|
||||||
return (wxT("libavformat.") wxT(AV_STRINGIFY(LIBAVFORMAT_VERSION_MAJOR)) wxT(".dylib"));
|
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
|
#else
|
||||||
/* Library names and file filters for other platforms, basically Linux and
|
/* Library names and file filters for other platforms, basically Linux and
|
||||||
* other *nix platforms */
|
* other *nix platforms */
|
||||||
@@ -325,6 +345,16 @@ public:
|
|||||||
{
|
{
|
||||||
return (wxT("libavformat.so.") wxT(AV_STRINGIFY(LIBAVFORMAT_VERSION_MAJOR)));
|
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__)
|
#endif // (__WXMAC__) || (__WXMSW__)
|
||||||
|
|
||||||
/// Ugly reference counting. I thought of using wxStuff for that,
|
/// Ugly reference counting. I thought of using wxStuff for that,
|
||||||
|
|||||||
Reference in New Issue
Block a user