ffmpeg/tools: Remove a few warnings and translate more errors
This commit is contained in:
+41
-1
@@ -20,9 +20,12 @@
|
|||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
#pragma warning(push)
|
||||||
|
#pragma warning(disable : 4244)
|
||||||
#include <libavcodec/avcodec.h>
|
#include <libavcodec/avcodec.h>
|
||||||
#include <libavutil/error.h>
|
#include <libavutil/error.h>
|
||||||
#include <libavutil/pixdesc.h>
|
#include <libavutil/pixdesc.h>
|
||||||
|
#pragma warning(pop)
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string ffmpeg::tools::translate_encoder_capabilities(int capabilities)
|
std::string ffmpeg::tools::translate_encoder_capabilities(int capabilities)
|
||||||
@@ -116,10 +119,47 @@ const char* ffmpeg::tools::get_error_description(int error)
|
|||||||
switch (error) {
|
switch (error) {
|
||||||
case AVERROR(EPERM):
|
case AVERROR(EPERM):
|
||||||
return "Permission Denied";
|
return "Permission Denied";
|
||||||
|
// case AVERROR(ENOENT):
|
||||||
|
// case AVERROR(ESRCH):
|
||||||
|
// case AVERROR(EINTR):
|
||||||
|
// case AVERROR(EIO):
|
||||||
|
// case AVERROR(ENXIO):
|
||||||
|
// case AVERROR(E2BIG):
|
||||||
|
// case AVERROR(ENOEXEC):
|
||||||
|
// case AVERROR(EBADF):
|
||||||
|
// case AVERROR(ECHILD):
|
||||||
|
// case AVERROR(EAGAIN):
|
||||||
case AVERROR(ENOMEM):
|
case AVERROR(ENOMEM):
|
||||||
return "Out Of Memory";
|
return "Out Of Memory";
|
||||||
|
// case AVERROR(EACCES):
|
||||||
|
// case AVERROR(EFAULT):
|
||||||
|
// case AVERROR(EBUSY):
|
||||||
|
// case AVERROR(EEXIST):
|
||||||
|
// case AVERROR(EXDEV):
|
||||||
|
// case AVERROR(ENODEV):
|
||||||
|
// case AVERROR(ENOTDIR):
|
||||||
|
// case AVERROR(EISDIR):
|
||||||
|
// case AVERROR(ENFILE):
|
||||||
|
// case AVERROR(EMFILE):
|
||||||
|
// case AVERROR(ENOTTY):
|
||||||
|
// case AVERROR(EFBIG):
|
||||||
|
// case AVERROR(ENOSPC):
|
||||||
|
// case AVERROR(ESPIPE):
|
||||||
|
// case AVERROR(EROFS):
|
||||||
|
// case AVERROR(EMLINK):
|
||||||
|
// case AVERROR(EPIPE):
|
||||||
|
// case AVERROR(EDOM):
|
||||||
|
// case AVERROR(EDEADLK):
|
||||||
|
// case AVERROR(ENAMETOOLONG):
|
||||||
|
// case AVERROR(ENOLCK):
|
||||||
|
// case AVERROR(ENOSYS):
|
||||||
|
// case AVERROR(ENOTEMPTY):
|
||||||
case AVERROR(EINVAL):
|
case AVERROR(EINVAL):
|
||||||
return "Invalid Value for Parameter";
|
return "Invalid Value(s)";
|
||||||
|
case AVERROR(ERANGE):
|
||||||
|
return "Out of Range";
|
||||||
|
// case AVERROR(EILSEQ):
|
||||||
|
// case AVERROR(STRUNCATE):
|
||||||
}
|
}
|
||||||
return "Not Translated Yet";
|
return "Not Translated Yet";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user