Added support for embedding cover artwork to FLAC encoder.

This commit is contained in:
LoRd_MuldeR 2011-03-25 16:17:19 +01:00
parent 36de8e5d95
commit dba6d2fb3e
5 changed files with 20 additions and 12 deletions

View File

@ -25,7 +25,7 @@
#define VER_LAMEXP_MAJOR 4 #define VER_LAMEXP_MAJOR 4
#define VER_LAMEXP_MINOR_HI 0 #define VER_LAMEXP_MINOR_HI 0
#define VER_LAMEXP_MINOR_LO 1 #define VER_LAMEXP_MINOR_LO 1
#define VER_LAMEXP_BUILD 405 #define VER_LAMEXP_BUILD 406
#define VER_LAMEXP_SUFFIX Beta-14 #define VER_LAMEXP_SUFFIX Beta-14
/* /*

View File

@ -58,6 +58,7 @@ bool FLACEncoder::encode(const QString &sourceFile, const AudioFileModel &metaIn
if(!metaInfo.fileComment().isEmpty()) args << "-T" << QString("comment=%1").arg(metaInfo.fileComment()); if(!metaInfo.fileComment().isEmpty()) args << "-T" << QString("comment=%1").arg(metaInfo.fileComment());
if(metaInfo.fileYear()) args << "-T" << QString("date=%1").arg(QString::number(metaInfo.fileYear())); if(metaInfo.fileYear()) args << "-T" << QString("date=%1").arg(QString::number(metaInfo.fileYear()));
if(metaInfo.filePosition()) args << "-T" << QString("track=%1").arg(QString::number(metaInfo.filePosition())); if(metaInfo.filePosition()) args << "-T" << QString("track=%1").arg(QString::number(metaInfo.filePosition()));
if(!metaInfo.fileCover().isEmpty()) args << QString("--picture=%1").arg(metaInfo.fileCover());
//args << "--tv" << QString().sprintf("Encoder=LameXP v%d.%02d.%04d [%s]", lamexp_version_major(), lamexp_version_minor(), lamexp_version_build(), lamexp_version_release()); //args << "--tv" << QString().sprintf("Encoder=LameXP v%d.%02d.%04d [%s]", lamexp_version_major(), lamexp_version_minor(), lamexp_version_build(), lamexp_version_release());

View File

@ -367,6 +367,8 @@ void lamexp_init_console(int argc, char* argv[])
{ {
bool enableConsole = lamexp_version_demo(); bool enableConsole = lamexp_version_demo();
if(!LAMEXP_DEBUG)
{
for(int i = 0; i < argc; i++) for(int i = 0; i < argc; i++)
{ {
if(!_stricmp(argv[i], "--console")) if(!_stricmp(argv[i], "--console"))
@ -378,6 +380,7 @@ void lamexp_init_console(int argc, char* argv[])
enableConsole = false; enableConsole = false;
} }
} }
}
if(enableConsole) if(enableConsole)
{ {

View File

@ -124,6 +124,9 @@ SIZE_T lamexp_dbg_private_bytes(void);
#define WCHAR2QSTR(STR) QString::fromUtf16(reinterpret_cast<const unsigned short*>(STR)) #define WCHAR2QSTR(STR) QString::fromUtf16(reinterpret_cast<const unsigned short*>(STR))
#define LAMEXP_DYNCAST(OUT,CLASS,SRC) try { OUT = dynamic_cast<CLASS>(SRC); } catch(std::bad_cast) { OUT = NULL; } #define LAMEXP_DYNCAST(OUT,CLASS,SRC) try { OUT = dynamic_cast<CLASS>(SRC); } catch(std::bad_cast) { OUT = NULL; }
#define LAMEXP_BOOL(X) (X ? "1" : "0") #define LAMEXP_BOOL(X) (X ? "1" : "0")
#define LAMEXP_MAKE_STRING_EX(X) #X
#define LAMEXP_MAKE_STRING(X) LAMEXP_MAKE_STRING_EX(X)
#define LAMEXP_COMPILER_WARNING(TXT) __pragma(message(__FILE__ "(" LAMEXP_MAKE_STRING(__LINE__) ") : warning: " TXT))
//Output Qt debug message (Unicode-safe versions) //Output Qt debug message (Unicode-safe versions)
#define qDebug64(FORMAT, ...) qDebug("@BASE64@%s", QString(FORMAT).arg(__VA_ARGS__).toUtf8().toBase64().constData()); #define qDebug64(FORMAT, ...) qDebug("@BASE64@%s", QString(FORMAT).arg(__VA_ARGS__).toUtf8().toBase64().constData());
@ -132,13 +135,13 @@ SIZE_T lamexp_dbg_private_bytes(void);
//Check for debug build //Check for debug build
#if defined(_DEBUG) || defined(QT_DEBUG) || !defined(NDEBUG) || !defined(QT_NO_DEBUG) #if defined(_DEBUG) || defined(QT_DEBUG) || !defined(NDEBUG) || !defined(QT_NO_DEBUG)
#define LAMEXP_DEBUG 1 #define LAMEXP_DEBUG (1)
#define LAMEXP_CHECK_DEBUG_BUILD \ #define LAMEXP_CHECK_DEBUG_BUILD \
qWarning("---------------------------------------------------------"); \ qWarning("---------------------------------------------------------"); \
qWarning("DEBUG BUILD: DO NOT RELEASE THIS BINARY TO THE PUBLIC !!!"); \ qWarning("DEBUG BUILD: DO NOT RELEASE THIS BINARY TO THE PUBLIC !!!"); \
qWarning("---------------------------------------------------------\n"); qWarning("---------------------------------------------------------\n");
#else #else
#define LAMEXP_DEBUG 0 #define LAMEXP_DEBUG (0)
#define LAMEXP_CHECK_DEBUG_BUILD #define LAMEXP_CHECK_DEBUG_BUILD
#endif #endif

View File

@ -21,6 +21,7 @@
#pragma once #pragma once
#include "Global.h"
#include <ShObjIdl.h> #include <ShObjIdl.h>
class QWidget; class QWidget;
@ -56,7 +57,7 @@ private:
#else //__ITaskbarList3_INTERFACE_DEFINED__ #else //__ITaskbarList3_INTERFACE_DEFINED__
#pragma message("WARNING: ITaskbarList3 not defined. Compiling *without* support for Win7 taskbar!") LAMEXP_COMPILER_WARNING("ITaskbarList3 not defined. Compiling *without* support for Win7 taskbar!")
class WinSevenTaskbar class WinSevenTaskbar
{ {