While at it, add MP4. Gif fixed tommorow

This commit is contained in:
ArsenArsen 2017-06-13 01:18:18 +02:00
parent c6caa2c422
commit a53af2eeb2
2 changed files with 8 additions and 1 deletions

View File

@ -43,6 +43,9 @@ QString formats::recordingFormatName(formats::Recording format) {
case Recording::WebM:
return "WEBM";
break;
case Recording::MP4:
return "MP4";
break;
default:
return QString();
break;
@ -52,6 +55,7 @@ QString formats::recordingFormatName(formats::Recording format) {
formats::Recording formats::recordingFormatFromName(QString format) {
if (format.toLower() == "gif") return Recording::GIF;
if (format.toLower() == "webm") return Recording::WebM;
if (format.toLower() == "mp4") return Recording::MP4;
return Recording::None;
}
@ -63,6 +67,9 @@ QString formats::recordingFormatMIME(formats::Recording format) {
case Recording::WebM:
return "video/webm";
break;
case Recording::MP4:
return "video/mp4";
break;
default:
return QString();
break;

View File

@ -9,7 +9,7 @@ QString normalFormatName(Normal format);
Normal normalFormatFromName(QString format);
QString normalFormatMIME(Normal format);
enum class Recording { GIF, WebM, None };
enum class Recording { GIF, WebM, MP4, None };
QString recordingFormatName(Recording format);
Recording recordingFormatFromName(QString format);
QString recordingFormatMIME(Recording format);