Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Vouk committed Sep 10, 2020
1 parent ca3ba94 commit 34f6b35
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 35 deletions.
66 changes: 33 additions & 33 deletions Core/EncoderUtils.cpp
Expand Up @@ -113,35 +113,35 @@ bool EncoderUtils::IsEncoderAvailable(const wxString name)
{
bool ret = false;

// Hack for FFmpeg 4.3: NVENC
if (name.Lower().EndsWith("_nvenc"))
{
HINSTANCE lib = LoadLibraryA("nvcuda.dll");
if (lib == NULL)
return false;
else
FreeLibrary(lib);
}

// Hack for FFmpeg 4.3: AMD AMF
if (name.Lower().EndsWith("_amf"))
{
HINSTANCE lib = LoadLibraryA("amfrt64.dll");
if (lib == NULL)
return false;
else
FreeLibrary(lib);
}

// Hack for FFmpeg 4.3: FDK AAC
if (name.Lower() == "libfdk_aac")
{
HINSTANCE lib = LoadLibraryA("libfdk-aac-2.dll");
if (lib == NULL)
return false;
else
FreeLibrary(lib);
}
//// Hack for FFmpeg 4.3: NVENC
//if (name.Lower().EndsWith("_nvenc"))
//{
// HINSTANCE lib = LoadLibraryA("nvcuda.dll");
// if (lib == NULL)
// return false;
// else
// FreeLibrary(lib);
//}

//// Hack for FFmpeg 4.3: AMD AMF
//if (name.Lower().EndsWith("_amf"))
//{
// HINSTANCE lib = LoadLibraryA("amfrt64.dll");
// if (lib == NULL)
// return false;
// else
// FreeLibrary(lib);
//}

//// Hack for FFmpeg 4.3: FDK AAC
//if (name.Lower() == "libfdk_aac")
//{
// HINSTANCE lib = LoadLibraryA("libfdk-aac-2.dll");
// if (lib == NULL)
// return false;
// else
// FreeLibrary(lib);
//}

AVCodec* codec = avcodec_find_encoder_by_name(name);
if (codec != NULL)
Expand Down Expand Up @@ -170,7 +170,7 @@ bool EncoderUtils::IsEncoderAvailable(const wxString name)
}
else
{
//vkLogInfoVA(" This media type is not supported: %d", codec->type);
vkLogInfoVA("- This media type is not supported: %d", codec->type);
return false;
}

Expand All @@ -182,12 +182,12 @@ bool EncoderUtils::IsEncoderAvailable(const wxString name)
// Only 0 is successful
ret = res == 0;

//if (!ret)
// vkLogInfoVA(" Encoder initialization failed (Code: %d)", res);
if (!ret)
vkLogInfoVA("- Encoder initialization failed (Code: %d)", res);
}
catch (...)
{
//vkLogInfo(" Exception cought!");
vkLogInfo("- Exception cought!");
return false;
}

Expand Down
4 changes: 2 additions & 2 deletions Core/Voukoder.cpp
Expand Up @@ -108,8 +108,8 @@ BOOL Voukoder::Config::EnumNamesFunc(HMODULE hModule, LPCTSTR lpType, LPTSTR lpN
audioEncoderInfos.push_back(encoderInfo);
}
}
//else
// vkLogInfoVA("Unloading: encoders/%s.json", id);
else
vkLogInfoVA("Unloading: encoders/%s.json", id);
}
else if (lpType == MAKEINTRESOURCE(ID_MUXER))
{
Expand Down

0 comments on commit 34f6b35

Please sign in to comment.