Initial community commit
This commit is contained in:
139
Src/Plugins/Library/ml_transcode/LinkedQueue.cpp
Normal file
139
Src/Plugins/Library/ml_transcode/LinkedQueue.cpp
Normal file
@ -0,0 +1,139 @@
|
||||
#include "LinkedQueue.h"
|
||||
|
||||
LinkedQueue::LinkedQueue()
|
||||
{
|
||||
size=0;
|
||||
head=NULL;
|
||||
tail=NULL;
|
||||
bm=NULL;
|
||||
bmpos=0;
|
||||
InitializeCriticalSection(&cs);
|
||||
}
|
||||
|
||||
void LinkedQueue::lock()
|
||||
{
|
||||
EnterCriticalSection(&cs);
|
||||
//wchar_t buf[100]; wsprintf(buf,L"Lock taken by %x",GetCurrentThreadId()); OutputDebugString(buf);
|
||||
}
|
||||
void LinkedQueue::unlock()
|
||||
{
|
||||
LeaveCriticalSection(&cs);
|
||||
//wchar_t buf[100]; wsprintf(buf,L"Lock released by %x",GetCurrentThreadId()); OutputDebugString(buf);
|
||||
}
|
||||
|
||||
LinkedQueue::~LinkedQueue()
|
||||
{
|
||||
lock();
|
||||
QueueElement * q=head;
|
||||
while(q) { QueueElement *p=q; q=q->next; delete p; }
|
||||
unlock();
|
||||
DeleteCriticalSection(&cs);
|
||||
}
|
||||
|
||||
void LinkedQueue::Offer(void * e)
|
||||
{
|
||||
lock();
|
||||
if(size==0) { size++; head=tail=new QueueElement(e); unlock(); return; }
|
||||
tail->next=new QueueElement(e);
|
||||
tail->next->prev=tail;
|
||||
tail=tail->next;
|
||||
size++;
|
||||
bm=NULL;
|
||||
unlock();
|
||||
}
|
||||
|
||||
void * LinkedQueue::Poll()
|
||||
{
|
||||
lock();
|
||||
if(size == 0) { unlock(); return NULL; }
|
||||
size--;
|
||||
void * r = head->elem;
|
||||
QueueElement * q = head;
|
||||
head=head->next;
|
||||
if(head!=NULL) head->prev=NULL;
|
||||
else tail=NULL;
|
||||
delete q;
|
||||
bm=NULL;
|
||||
unlock();
|
||||
return r;
|
||||
}
|
||||
|
||||
void * LinkedQueue::Peek()
|
||||
{
|
||||
lock();
|
||||
void * ret=head?head->elem:NULL;
|
||||
unlock();
|
||||
return ret;
|
||||
}
|
||||
|
||||
QueueElement * LinkedQueue::Find(int x)
|
||||
{
|
||||
if(x>=size || x<0) return NULL;
|
||||
if(x == 0) return head;
|
||||
if(x == size-1) return tail;
|
||||
if(!bm) { bm=head; bmpos=0; }
|
||||
int diffh = x;
|
||||
int difft = (size-1) - x;
|
||||
int diffbm = x - bmpos;
|
||||
diffbm>0?diffbm:-diffbm;
|
||||
if(diffh < difft && diffh < diffbm) { bm=head; bmpos=0; }
|
||||
else if(diffh >= difft && diffbm >= difft) { bm=tail; bmpos=size-1; }
|
||||
while(bmpos > x && bm) { bm=bm->prev; bmpos--; }
|
||||
while(bmpos < x && bm) { bm=bm->next; bmpos++; }
|
||||
return bm;
|
||||
}
|
||||
|
||||
void * LinkedQueue::Get(int pos)
|
||||
{
|
||||
lock();
|
||||
QueueElement * e = Find(pos);
|
||||
unlock();
|
||||
return e?e->elem:NULL;
|
||||
}
|
||||
|
||||
void LinkedQueue::Set(int pos, void * val)
|
||||
{
|
||||
lock();
|
||||
QueueElement * e = Find(pos);
|
||||
if(e) e->elem=val;
|
||||
unlock();
|
||||
}
|
||||
|
||||
void* LinkedQueue::Del(int pos)
|
||||
{
|
||||
lock();
|
||||
QueueElement * e = Find(pos);
|
||||
if(!e) { unlock(); return NULL; }
|
||||
else if(size == 1) head=tail=NULL;
|
||||
else if(e==head)
|
||||
{
|
||||
head=head->next;
|
||||
head->prev=NULL;
|
||||
}
|
||||
else if(e==tail)
|
||||
{
|
||||
tail=tail->prev;
|
||||
tail->next=NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
e->prev->next = e->next;
|
||||
e->next->prev = e->prev;
|
||||
}
|
||||
size--;
|
||||
bm=NULL;
|
||||
unlock();
|
||||
void * ret = e->elem;
|
||||
delete e;
|
||||
return ret;
|
||||
}
|
||||
|
||||
int LinkedQueue::GetSize()
|
||||
{
|
||||
return size;
|
||||
/*
|
||||
lock();
|
||||
int s = size;
|
||||
unlock();
|
||||
return s;*/
|
||||
}
|
||||
41
Src/Plugins/Library/ml_transcode/LinkedQueue.h
Normal file
41
Src/Plugins/Library/ml_transcode/LinkedQueue.h
Normal file
@ -0,0 +1,41 @@
|
||||
#ifndef _LINKEDQUEUE_H_
|
||||
#define _LINKEDQUEUE_H_
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
class LinkedQueue;
|
||||
class QueueElement;
|
||||
|
||||
class QueueElement {
|
||||
public:
|
||||
QueueElement * next;
|
||||
QueueElement * prev;
|
||||
void * elem;
|
||||
QueueElement(void * e) { next=NULL; prev=NULL; elem=e; }
|
||||
};
|
||||
|
||||
|
||||
class LinkedQueue {
|
||||
protected:
|
||||
QueueElement * head;
|
||||
QueueElement * tail;
|
||||
QueueElement * bm;
|
||||
int bmpos;
|
||||
int size;
|
||||
QueueElement * Find(int pos);
|
||||
CRITICAL_SECTION cs;
|
||||
public:
|
||||
LinkedQueue();
|
||||
~LinkedQueue();
|
||||
int GetSize();
|
||||
void Offer(void * e);
|
||||
void *Poll();
|
||||
void *Peek();
|
||||
void *Get(int pos);
|
||||
void Set(int pos, void * val);
|
||||
void *Del(int pos);
|
||||
void lock();
|
||||
void unlock();
|
||||
};
|
||||
|
||||
#endif //_LINKEDQUEUE_H_
|
||||
26
Src/Plugins/Library/ml_transcode/api__ml_transcode.h
Normal file
26
Src/Plugins/Library/ml_transcode/api__ml_transcode.h
Normal file
@ -0,0 +1,26 @@
|
||||
#ifndef NULLSOFT_ML_TRANSCODE_API_H
|
||||
#define NULLSOFT_ML_TRANSCODE_API_H
|
||||
|
||||
#include <api/application/api_application.h>
|
||||
extern api_application *applicationApi;
|
||||
#define WASABI_API_APP applicationApi
|
||||
|
||||
#include "../Agave/Metadata/api_metadata.h"
|
||||
extern api_metadata *metadataApi;
|
||||
#define AGAVE_API_METADATA metadataApi
|
||||
|
||||
#include "../playlist/api_playlistmanager.h"
|
||||
extern api_playlistmanager *playlistManager;
|
||||
#define AGAVE_API_PLAYLISTMANAGER playlistManager
|
||||
|
||||
#include "../Agave/AlbumArt/api_albumart.h"
|
||||
extern api_albumart *albumArtApi;
|
||||
#define AGAVE_API_ALBUMART albumArtApi
|
||||
|
||||
#include "../Agave/Language/api_language.h"
|
||||
|
||||
#include "../Winamp/api_stats.h"
|
||||
extern api_stats *statsApi;
|
||||
#define AGAVE_API_STATS statsApi
|
||||
|
||||
#endif
|
||||
1100
Src/Plugins/Library/ml_transcode/main.cpp
Normal file
1100
Src/Plugins/Library/ml_transcode/main.cpp
Normal file
File diff suppressed because it is too large
Load Diff
162
Src/Plugins/Library/ml_transcode/ml_transcode.rc
Normal file
162
Src/Plugins/Library/ml_transcode/ml_transcode.rc
Normal file
@ -0,0 +1,162 @@
|
||||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "afxres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (U.S.) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""version.rc2""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_TRANSCODE DIALOGEX 0, 0, 186, 90
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | DS_CENTERMOUSE | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Converting..."
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
LTEXT "",IDC_CURRENTTRACK,7,7,172,8
|
||||
CONTROL "",IDC_TRACKPROGRESS,"msctls_progress32",WS_BORDER,7,18,172,14
|
||||
LTEXT "",IDC_TOTALCAPTION,7,38,172,8
|
||||
CONTROL "",IDC_TOTALPROGRESS,"msctls_progress32",WS_BORDER,7,49,172,14
|
||||
PUSHBUTTON "Abort",IDC_ABORT,67,70,50,13
|
||||
END
|
||||
|
||||
IDD_TRANSCODE_CONFIG DIALOGEX 0, 0, 271, 319
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Format Converter Configuration"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
GROUPBOX "Output File Naming Scheme",IDC_STATIC,7,4,256,80
|
||||
LTEXT "Specify the destination folder to store your converted music:",IDC_STATIC,13,15,231,8,0,WS_EX_TRANSPARENT
|
||||
EDITTEXT IDC_ROOTDIR,14,26,192,13,ES_AUTOHSCROLL
|
||||
PUSHBUTTON "Browse...",IDC_BROWSE,207,26,50,13
|
||||
LTEXT "Specify the naming scheme:",IDC_STATIC,13,42,198,8,0,WS_EX_TRANSPARENT
|
||||
EDITTEXT IDC_NAMING,14,52,192,13,ES_AUTOHSCROLL
|
||||
PUSHBUTTON "Format Help",IDC_FORMATHELP,207,52,50,13
|
||||
CONTROL "Use old file name and path (just change the extension)",IDC_USE_FILENAME,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,70,219,10
|
||||
GROUPBOX "Encoding Format",IDC_STATIC,7,87,256,40
|
||||
LTEXT "Select the format you wish to convert to:",IDC_STATIC,13,97,135,8
|
||||
COMBOBOX IDC_ENCFORMAT,14,108,243,116,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
|
||||
GROUPBOX "",IDC_ENC_CONFIG,7,129,256,169,NOT WS_VISIBLE
|
||||
CONTROL "Show this before each convert",IDC_SHOWEVERY,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,7,304,140,9
|
||||
DEFPUSHBUTTON "Ok",IDOK,159,302,50,13
|
||||
PUSHBUTTON "Cancel",IDCANCEL,213,302,50,13
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DESIGNINFO
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO
|
||||
BEGIN
|
||||
IDD_TRANSCODE, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 179
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 83
|
||||
END
|
||||
|
||||
IDD_TRANSCODE_CONFIG, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 263
|
||||
TOPMARGIN, 4
|
||||
BOTTOMMARGIN, 315
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// String Table
|
||||
//
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_NULLSOFT_FORMAT_CONVERTER "Nullsoft Format Converter v%s"
|
||||
65535 "{699B8BA5-B292-4aba-8047-D46B0DF4E1D6}"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_FORMAT_CONVERTER "Format Converter"
|
||||
IDS_DONE "Done"
|
||||
IDS_TRANSCODING_FAILED "Transcoding Failed"
|
||||
IDS_ABORT "Abort"
|
||||
IDS_TRACKS_DONE_REMAINING_FAILED
|
||||
"%d tracks done, %d tracks remaining, %d failed"
|
||||
IDS_FILENAME_FORMAT_HELP
|
||||
"You may enter a filename format string for your copied files.\nIt can contain \\ or / to delimit a path, and the following keywords:\n\n<Artist> - inserts the artist with the default capitalization\n<ARTIST> - inserts the artist in all uppercase\n<artist> - inserts the artist in all lowercase\n<Albumartist>/<ALBUMARTIST>/<albumartist> - inserts the album artist\n<Album>/<ALBUM>/<album> - inserts the album\n<year> - inserts the album year\n<Genre>/<GENRE>/<genre> - inserts the album genre\n<Title>/<TITLE>/<title> - inserts the track title\n#, ##, ### - inserts the track number, with leading 0s if ## or ###\n<filename> - uses the old filename of the file (not the full path)\n<disc> - inserts the disc number\n<discs> - inserts the total discs number (e.g. CD<disc> of <discs>)"
|
||||
IDS_FILENAME_FORMAT_HELP_TITLE "Filename format help"
|
||||
IDS_CHOOSE_FOLDER "Choose a folder or create a new one"
|
||||
IDS_SELECT_WHERE_TO_SAVE "Choose where to save converted files"
|
||||
IDS_DO_YOU_ALSO_WANT_TO_REMOVE_SETTINGS
|
||||
"Do you also want to remove the saved settings file for this plug-in?"
|
||||
IDS_TRANSCODING_ABORTED "Transcoding Aborted"
|
||||
IDS_REMOVE_PARTIAL_FILE "Do you want to remove the partially transcoded file\n '%s' or keep it?\n\n(Note: it is likely to be invalid and not play correctly)"
|
||||
END
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
#include "version.rc2"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
||||
30
Src/Plugins/Library/ml_transcode/ml_transcode.sln
Normal file
30
Src/Plugins/Library/ml_transcode/ml_transcode.sln
Normal file
@ -0,0 +1,30 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.29709.97
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ml_transcode", "ml_transcode.vcxproj", "{B9933E53-426C-4603-BE06-672059143A27}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{B9933E53-426C-4603-BE06-672059143A27}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{B9933E53-426C-4603-BE06-672059143A27}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{B9933E53-426C-4603-BE06-672059143A27}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{B9933E53-426C-4603-BE06-672059143A27}.Debug|x64.Build.0 = Debug|x64
|
||||
{B9933E53-426C-4603-BE06-672059143A27}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{B9933E53-426C-4603-BE06-672059143A27}.Release|Win32.Build.0 = Release|Win32
|
||||
{B9933E53-426C-4603-BE06-672059143A27}.Release|x64.ActiveCfg = Release|x64
|
||||
{B9933E53-426C-4603-BE06-672059143A27}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {B5FE8422-686F-47D5-A186-D3E42F8236F4}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
333
Src/Plugins/Library/ml_transcode/ml_transcode.vcxproj
Normal file
333
Src/Plugins/Library/ml_transcode/ml_transcode.vcxproj
Normal file
@ -0,0 +1,333 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{B9933E53-426C-4603-BE06-672059143A27}</ProjectGuid>
|
||||
<RootNamespace>ml_transcode</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(PlatformShortName)_$(Configuration)\</OutDir>
|
||||
<IntDir>$(PlatformShortName)_$(Configuration)\</IntDir>
|
||||
<IncludePath>$(IncludePath)</IncludePath>
|
||||
<LibraryPath>$(LibraryPath)</LibraryPath>
|
||||
<EmbedManifest>true</EmbedManifest>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(PlatformShortName)_$(Configuration)\</OutDir>
|
||||
<IntDir>$(PlatformShortName)_$(Configuration)\</IntDir>
|
||||
<EmbedManifest>true</EmbedManifest>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(PlatformShortName)_$(Configuration)\</OutDir>
|
||||
<IntDir>$(PlatformShortName)_$(Configuration)\</IntDir>
|
||||
<IncludePath>$(IncludePath)</IncludePath>
|
||||
<LibraryPath>$(LibraryPath)</LibraryPath>
|
||||
<EmbedManifest>true</EmbedManifest>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(PlatformShortName)_$(Configuration)\</OutDir>
|
||||
<IntDir>$(PlatformShortName)_$(Configuration)\</IntDir>
|
||||
<EmbedManifest>true</EmbedManifest>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Vcpkg">
|
||||
<VcpkgEnableManifest>false</VcpkgEnableManifest>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<VcpkgInstalledDir>
|
||||
</VcpkgInstalledDir>
|
||||
<VcpkgUseStatic>false</VcpkgUseStatic>
|
||||
<VcpkgConfiguration>Debug</VcpkgConfiguration>
|
||||
<VcpkgTriplet>x86-windows-static-md</VcpkgTriplet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<VcpkgInstalledDir>
|
||||
</VcpkgInstalledDir>
|
||||
<VcpkgUseStatic>false</VcpkgUseStatic>
|
||||
<VcpkgTriplet>x86-windows-static-md</VcpkgTriplet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<VcpkgInstalledDir>
|
||||
</VcpkgInstalledDir>
|
||||
<VcpkgUseStatic>false</VcpkgUseStatic>
|
||||
<VcpkgTriplet>x86-windows-static-md</VcpkgTriplet>
|
||||
<VcpkgConfiguration>Debug</VcpkgConfiguration>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<VcpkgInstalledDir>
|
||||
</VcpkgInstalledDir>
|
||||
<VcpkgUseStatic>false</VcpkgUseStatic>
|
||||
<VcpkgTriplet>x86-windows-static-md</VcpkgTriplet>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..\Wasabi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_WIN32_WINNT=0x0601;WINVER=0x0601;WIN32;_DEBUG;_WINDOWS;_USRDLL;ML_ex_EXPORTS;_UNICODE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4838;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_WIN32_WINNT=0x0601;WINVER=0x0601;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>comctl32.lib;odbc32.lib;odbccp32.lib;wsock32.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
|
||||
<GenerateMapFile>false</GenerateMapFile>
|
||||
<MapExports>false</MapExports>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<MapFileName>$(IntDir)$(TargetName).map</MapFileName>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\
|
||||
xcopy /Y /D $(IntDir)$(TargetName).pdb ..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\ </Command>
|
||||
<Message>Post build event: 'xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\'</Message>
|
||||
</PostBuildEvent>
|
||||
<Manifest>
|
||||
<OutputManifestFile>$(IntDir)$(TargetName)$(TargetExt).intermediate.manifest</OutputManifestFile>
|
||||
</Manifest>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..\Wasabi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_WIN32_WINNT=0x0601;WINVER=0x0601;WIN64;_DEBUG;_WINDOWS;_USRDLL;ML_ex_EXPORTS;_UNICODE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4244;4302;4311;4838;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_WIN32_WINNT=0x0601;WINVER=0x0601;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>comctl32.lib;odbc32.lib;odbccp32.lib;wsock32.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
|
||||
<GenerateMapFile>false</GenerateMapFile>
|
||||
<MapExports>false</MapExports>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
|
||||
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<MapFileName>$(IntDir)$(TargetName).map</MapFileName>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\
|
||||
xcopy /Y /D $(IntDir)$(TargetName).pdb ..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\ </Command>
|
||||
<Message>Post build event: 'xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\'</Message>
|
||||
</PostBuildEvent>
|
||||
<Manifest>
|
||||
<OutputManifestFile>$(IntDir)$(TargetName)$(TargetExt).intermediate.manifest</OutputManifestFile>
|
||||
</Manifest>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MinSpace</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
||||
<AdditionalIncludeDirectories>..\..\..\Wasabi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_WIN32_WINNT=0x0601;WINVER=0x0601;WIN32;NDEBUG;_WINDOWS;_USRDLL;ML_ex_EXPORTS;_UNICODE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>None</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4838;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_WIN32_WINNT=0x0601;WINVER=0x0601;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>comctl32.lib;odbc32.lib;odbccp32.lib;wsock32.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
|
||||
<MapFileName>$(IntDir)$(TargetName).map</MapFileName>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\ </Command>
|
||||
<Message>Post build event: 'xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\'</Message>
|
||||
</PostBuildEvent>
|
||||
<Manifest>
|
||||
<OutputManifestFile>$(IntDir)$(TargetName)$(TargetExt).intermediate.manifest</OutputManifestFile>
|
||||
</Manifest>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>MinSpace</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
||||
<AdditionalIncludeDirectories>..\..\..\Wasabi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_WIN32_WINNT=0x0601;WINVER=0x0601;WIN64;NDEBUG;_WINDOWS;_USRDLL;ML_ex_EXPORTS;_UNICODE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>None</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4244;4302;4311;4838;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_WIN32_WINNT=0x0601;WINVER=0x0601;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>comctl32.lib;odbc32.lib;odbccp32.lib;wsock32.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
|
||||
<MapFileName>$(IntDir)$(TargetName).map</MapFileName>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
|
||||
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<ModuleDefinitionFile>
|
||||
</ModuleDefinitionFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\ </Command>
|
||||
<Message>Post build event: 'xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\'</Message>
|
||||
</PostBuildEvent>
|
||||
<Manifest>
|
||||
<OutputManifestFile>$(IntDir)$(TargetName)$(TargetExt).intermediate.manifest</OutputManifestFile>
|
||||
</Manifest>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\General\gen_ml\itemlist.h" />
|
||||
<ClInclude Include="..\..\General\gen_ml\ml.h" />
|
||||
<ClInclude Include="..\..\..\nu\AutoChar.h" />
|
||||
<ClInclude Include="..\..\..\nu\AutoWide.h" />
|
||||
<ClInclude Include="..\..\..\Winamp\wa_ipc.h" />
|
||||
<ClInclude Include="api__ml_transcode.h" />
|
||||
<ClInclude Include="LinkedQueue.h" />
|
||||
<ClInclude Include="resource.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\General\gen_ml\itemlist.cpp" />
|
||||
<ClCompile Include="..\..\General\gen_ml\ml_lib.cpp" />
|
||||
<ClCompile Include="..\ml_local\guess.cpp" />
|
||||
<ClCompile Include="LinkedQueue.cpp" />
|
||||
<ClCompile Include="main.cpp" />
|
||||
<ClCompile Include="replaceVars.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="ml_transcode.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\Wasabi\Wasabi.vcxproj">
|
||||
<Project>{3e0bfa8a-b86a-42e9-a33f-ec294f823f7f}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@ -0,0 +1,65 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\ml_local\guess.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="LinkedQueue.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="main.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="replaceVars.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\General\gen_ml\itemlist.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\General\gen_ml\ml_lib.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="api__ml_transcode.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="LinkedQueue.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="resource.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\nu\AutoChar.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\nu\AutoWide.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\General\gen_ml\itemlist.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\General\gen_ml\ml.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\Winamp\wa_ipc.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{dad8753a-63ad-4940-b004-ee080d154ba8}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Ressource Files">
|
||||
<UniqueIdentifier>{9eded93f-4358-4590-b654-608fc1d13764}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{56b6e7a2-f5f3-4b8d-a042-b3bf2cd8b7dd}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="ml_transcode.rc">
|
||||
<Filter>Ressource Files</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
317
Src/Plugins/Library/ml_transcode/replaceVars.cpp
Normal file
317
Src/Plugins/Library/ml_transcode/replaceVars.cpp
Normal file
@ -0,0 +1,317 @@
|
||||
#include <windows.h>
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
#include "..\..\General\gen_ml/ml.h"
|
||||
|
||||
#include <shlwapi.h>
|
||||
#include <strsafe.h>
|
||||
|
||||
static void removebadchars(wchar_t *s, wchar_t *&end, size_t &str_size)
|
||||
{
|
||||
const wchar_t *start = s;
|
||||
while (s && *s)
|
||||
{
|
||||
if (*s == L'?' || *s == L'/' || *s == L'\\' || *s == L':' || *s == L'*' || *s == L'\"' || *s == L'<' || *s == L'>' || *s == L'|')
|
||||
*s = L'_';
|
||||
s = CharNextW(s);
|
||||
}
|
||||
|
||||
// cut off trailing periods
|
||||
if (s != start)
|
||||
{
|
||||
do
|
||||
{
|
||||
s--;
|
||||
if (*s == '.')
|
||||
{
|
||||
*s = '_';
|
||||
end--;
|
||||
str_size++;
|
||||
}
|
||||
else
|
||||
break;
|
||||
}
|
||||
while (s != start);
|
||||
}
|
||||
}
|
||||
|
||||
void RecursiveCreateDirectory(wchar_t *str)
|
||||
{
|
||||
wchar_t *p = str;
|
||||
if ((p[0] ==L'\\' || p[0] ==L'/') && (p[1] ==L'\\' || p[1] ==L'/'))
|
||||
{
|
||||
p += 2;
|
||||
while (p &&*p && *p !=L'\\' && *p !=L'/') p++;
|
||||
if (!p || !*p) return ;
|
||||
p++;
|
||||
while (p && *p && *p !=L'\\' && *p !=L'/') p++;
|
||||
}
|
||||
else
|
||||
{
|
||||
while (p && *p && *p !=L'\\' && *p !=L'/') p++;
|
||||
}
|
||||
|
||||
while (p && *p)
|
||||
{
|
||||
while (p && *p && *p !=L'\\' && *p !=L'/') p = CharNextW(p);
|
||||
if (p && *p)
|
||||
{
|
||||
wchar_t lp = *p;
|
||||
*p = 0;
|
||||
CreateDirectoryW(str, NULL);
|
||||
*p++ = lp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void FixFileLength(wchar_t *str)
|
||||
{
|
||||
size_t len = wcslen(str);
|
||||
if (len >= MAX_PATH) // no good
|
||||
{
|
||||
size_t extensionPosition=len;
|
||||
while (extensionPosition--)
|
||||
{
|
||||
if (str[extensionPosition]=='.' || str[extensionPosition] == '/' || str[extensionPosition] == '\\')
|
||||
break;
|
||||
}
|
||||
if (str[extensionPosition]=='.') // found an extension? good, let's relocate it
|
||||
{
|
||||
ptrdiff_t diff = len - extensionPosition;
|
||||
diff++;
|
||||
while (diff)
|
||||
{
|
||||
str[MAX_PATH-diff]=str[len-diff+1];
|
||||
diff--;
|
||||
}
|
||||
}
|
||||
str[MAX_PATH-1]=0;
|
||||
}
|
||||
}
|
||||
|
||||
static void ADD_STR(const wchar_t *x, wchar_t *&outp, size_t &str_size)
|
||||
{
|
||||
wchar_t *end = outp;
|
||||
StringCchCopyExW(outp, str_size, (x) ? (x) : L"", &end, &str_size, 0);
|
||||
removebadchars(outp, end, str_size);
|
||||
outp = end;
|
||||
}
|
||||
|
||||
static void ADD_STR_U(const wchar_t *x, wchar_t *&outp, size_t &str_size)
|
||||
{
|
||||
wchar_t *end = outp;
|
||||
StringCchCopyExW(outp, str_size, (x) ? (x) : L"", &end, &str_size, 0);
|
||||
removebadchars(outp, end, str_size);
|
||||
CharUpperW(outp);
|
||||
outp = end;
|
||||
}
|
||||
|
||||
static void ADD_STR_L(const wchar_t *x, wchar_t *&outp, size_t &str_size)
|
||||
{
|
||||
wchar_t *end = outp;
|
||||
StringCchCopyExW(outp, str_size, (x)?(x):L"", &end, &str_size,0);
|
||||
removebadchars(outp, end, str_size);
|
||||
CharLowerW(outp);
|
||||
outp=end;
|
||||
}
|
||||
|
||||
// FixReplacementVars: replaces <Artist>, <Title>, <Album>, and #, ##, ##, with appropriate data
|
||||
wchar_t *FixReplacementVars(wchar_t *str, size_t str_size, itemRecordW * song)
|
||||
{
|
||||
wchar_t tmpsrc[4096] = {0};
|
||||
lstrcpyn(tmpsrc,str,sizeof(tmpsrc)/sizeof(wchar_t)); //lstrcpyn is nice enough to make sure it's null terminated.
|
||||
|
||||
wchar_t *inp = tmpsrc;
|
||||
wchar_t *outp = str;
|
||||
|
||||
while (inp && *inp && str_size)
|
||||
{
|
||||
if (*inp == L'<')
|
||||
{
|
||||
if (!wcsncmp(inp,L"<TITLE>",7))
|
||||
{
|
||||
ADD_STR_U(song->title, outp, str_size);
|
||||
inp+=7;
|
||||
}
|
||||
else if (!wcsncmp(inp,L"<title>",7))
|
||||
{
|
||||
ADD_STR_L(song->title, outp, str_size);
|
||||
inp+=7;
|
||||
}
|
||||
else if (!_wcsnicmp(inp,L"<Title>",7))
|
||||
{
|
||||
ADD_STR(song->title, outp, str_size);
|
||||
inp+=7;
|
||||
}
|
||||
else if (!wcsncmp(inp,L"<ALBUM>",7))
|
||||
{
|
||||
ADD_STR_U(song->album, outp, str_size);
|
||||
inp+=7;
|
||||
}
|
||||
else if (!wcsncmp(inp,L"<album>",7))
|
||||
{
|
||||
ADD_STR_L(song->album, outp, str_size);
|
||||
inp+=7;
|
||||
}
|
||||
else if (!_wcsnicmp(inp,L"<Album>",7))
|
||||
{
|
||||
ADD_STR(song->album, outp, str_size);
|
||||
inp+=7;
|
||||
}
|
||||
else if (!wcsncmp(inp,L"<GENRE>",7))
|
||||
{
|
||||
ADD_STR_U(song->genre, outp, str_size);
|
||||
inp+=7;
|
||||
}
|
||||
else if (!wcsncmp(inp,L"<genre>",7))
|
||||
{
|
||||
ADD_STR_L(song->genre, outp, str_size);
|
||||
inp+=7;
|
||||
}
|
||||
else if (!_wcsnicmp(inp,L"<Genre>",7))
|
||||
{
|
||||
ADD_STR(song->genre, outp, str_size);
|
||||
inp+=7;
|
||||
}
|
||||
else if (!wcsncmp(inp,L"<ARTIST>",8))
|
||||
{
|
||||
ADD_STR_U(song->artist, outp, str_size);
|
||||
inp+=8;
|
||||
}
|
||||
else if (!wcsncmp(inp,L"<artist>",8))
|
||||
{
|
||||
ADD_STR_L(song->artist, outp, str_size);
|
||||
inp+=8;
|
||||
}
|
||||
else if (!_wcsnicmp(inp,L"<Artist>",8))
|
||||
{
|
||||
ADD_STR(song->artist, outp, str_size);
|
||||
inp+=8;
|
||||
}
|
||||
else if (!wcsncmp(inp,L"<ALBUMARTIST>",13))
|
||||
{
|
||||
if (song->albumartist && song->albumartist[0])
|
||||
ADD_STR_U(song->albumartist, outp, str_size);
|
||||
else
|
||||
ADD_STR_U(song->artist, outp, str_size);
|
||||
inp+=13;
|
||||
}
|
||||
else if (!wcsncmp(inp,L"<albumartist>",13))
|
||||
{
|
||||
if (song->albumartist && song->albumartist[0])
|
||||
ADD_STR_L(song->albumartist, outp, str_size);
|
||||
else
|
||||
ADD_STR_L(song->artist, outp, str_size);
|
||||
inp+=13;
|
||||
}
|
||||
else if (!_wcsnicmp(inp,L"<Albumartist>",13))
|
||||
{
|
||||
if (song->albumartist && song->albumartist[0])
|
||||
ADD_STR(song->albumartist, outp, str_size);
|
||||
else
|
||||
ADD_STR(song->artist, outp, str_size);
|
||||
inp+=13;
|
||||
}
|
||||
else if (!_wcsnicmp(inp,L"<year>",6))
|
||||
{
|
||||
wchar_t year[64] = {0};
|
||||
if(song->year==0) year[0]=0;
|
||||
else StringCchPrintf(year, 64, L"%d", song->year);
|
||||
ADD_STR(year, outp, str_size);
|
||||
inp+=6;
|
||||
}
|
||||
else if (!_wcsnicmp(inp,L"<disc>",6))
|
||||
{
|
||||
wchar_t disc[16] = {0};
|
||||
if(song->disc==0) disc[0]=0;
|
||||
else StringCchPrintf(disc, 16, L"%d", song->disc);
|
||||
ADD_STR(disc, outp, str_size);
|
||||
inp+=6;
|
||||
}
|
||||
else if (!_wcsnicmp(inp,L"<discs>",7))
|
||||
{
|
||||
wchar_t discs[32] = {0};
|
||||
if(song->disc==0) discs[0]=0;
|
||||
else StringCchPrintf(discs, 32, L"%d", song->discs);
|
||||
ADD_STR(discs, outp, str_size);
|
||||
inp+=7;
|
||||
}
|
||||
else if(!_wcsnicmp(inp,L"<filename>",10))
|
||||
{
|
||||
wchar_t *fn = _wcsdup(PathFindFileName(song->filename));
|
||||
const wchar_t *insert;
|
||||
|
||||
if (NULL != fn &&
|
||||
FALSE != PathIsFileSpec(fn))
|
||||
{
|
||||
PathRemoveExtension(fn);
|
||||
insert = fn;
|
||||
}
|
||||
else
|
||||
insert = NULL;
|
||||
|
||||
if (NULL == insert || L'\0' == *insert)
|
||||
insert = L"<filename>";
|
||||
|
||||
ADD_STR(insert, outp, str_size);
|
||||
|
||||
free(fn);
|
||||
inp+=10;
|
||||
}
|
||||
else *outp++=*inp++;
|
||||
}
|
||||
else if (*inp == '#')
|
||||
{
|
||||
int nd = 0;
|
||||
wchar_t tmp[64] = {0};
|
||||
while (inp && *inp =='#') nd++,inp++;
|
||||
|
||||
if (!song->track)
|
||||
{
|
||||
tmp[0] = 0;
|
||||
while (inp && *inp == ' ') inp++;
|
||||
if (inp && (*inp == '-' || *inp == '.' || *inp == '_')) // separator
|
||||
{
|
||||
inp++;
|
||||
while (inp && *inp == ' ') inp++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (nd > 1)
|
||||
{
|
||||
wchar_t tmp2[32] = {0};
|
||||
if (nd > 5) nd=5;
|
||||
StringCchPrintf(tmp2, 32, L"%%%02dd",nd);
|
||||
StringCchPrintf(tmp, 64, tmp2,song->track);
|
||||
}
|
||||
else StringCchPrintf(tmp, 64, L"%d", song->track);
|
||||
}
|
||||
ADD_STR(tmp, outp, str_size);
|
||||
}
|
||||
else *outp++ = *inp++;
|
||||
}
|
||||
if (outp) *outp = 0;
|
||||
|
||||
inp = str;
|
||||
outp = str;
|
||||
wchar_t lastc=0;
|
||||
while (inp && *inp)
|
||||
{
|
||||
wchar_t c=*inp++;
|
||||
if (c == '\t') c=' ';
|
||||
|
||||
if (c == ' ' && (lastc == ' ' || lastc == '\\' || lastc == '/')) continue; // ignore space after slash, or another space
|
||||
|
||||
if ((c == '\\' || c == '/') && lastc == ' ') outp--; // if we have a space then slash, back up to write the slash where the space was
|
||||
*outp++ = c;
|
||||
lastc = c;
|
||||
}
|
||||
if (outp) *outp=0;
|
||||
|
||||
#undef ADD_STR
|
||||
#undef ADD_STR_L
|
||||
#undef ADD_STR_U
|
||||
|
||||
return(str);
|
||||
}
|
||||
45
Src/Plugins/Library/ml_transcode/resource.h
Normal file
45
Src/Plugins/Library/ml_transcode/resource.h
Normal file
@ -0,0 +1,45 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by ml_transcode.rc
|
||||
//
|
||||
#define IDS_FORMAT_CONVERTER 0
|
||||
#define IDS_DONE 1
|
||||
#define IDS_TRANSCODING_FAILED 2
|
||||
#define IDS_ABORT 3
|
||||
#define IDCANCEL2 4
|
||||
#define IDS_TRACKS_DONE_REMAINING_FAILED 4
|
||||
#define IDS_FILENAME_FORMAT_HELP 5
|
||||
#define IDS_FILENAME_FORMAT_HELP_TITLE 6
|
||||
#define IDS_CHOOSE_FOLDER 7
|
||||
#define IDS_SELECT_WHERE_TO_SAVE 9
|
||||
#define IDS_DO_YOU_ALSO_WANT_TO_REMOVE_SETTINGS 10
|
||||
#define IDS_TRANSCODING_ABORTED 11
|
||||
#define IDS_STRING12 12
|
||||
#define IDS_REMOVE_PARTIAL_FILE 12
|
||||
#define IDD_TRANSCODE 101
|
||||
#define IDD_TRANSCODE_CONFIG 102
|
||||
#define IDC_TRACKPROGRESS 1001
|
||||
#define IDC_CURRENTTRACK 1002
|
||||
#define IDC_TOTALPROGRESS 1003
|
||||
#define IDC_TOTALCAPTION 1004
|
||||
#define IDC_ABORT 1005
|
||||
#define IDC_USE_FILENAME 1011
|
||||
#define IDC_ROOTDIR 1014
|
||||
#define IDC_BROWSE 1015
|
||||
#define IDC_NAMING 1016
|
||||
#define IDC_FORMATHELP 1017
|
||||
#define IDC_ENC_CONFIG 1018
|
||||
#define IDC_SHOWEVERY 1019
|
||||
#define IDC_ENCFORMAT 1020
|
||||
#define IDS_NULLSOFT_FORMAT_CONVERTER 65534
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 106
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1006
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
9
Src/Plugins/Library/ml_transcode/reversesync.h
Normal file
9
Src/Plugins/Library/ml_transcode/reversesync.h
Normal file
@ -0,0 +1,9 @@
|
||||
#ifndef _REVERSESYNC_H
|
||||
#define _REVERSESYNC_H
|
||||
|
||||
WIN32_FIND_DATA *File_Exists(char *buf);
|
||||
char *Skip_Root(char *path);
|
||||
BOOL RecursiveCreateDirectory(char* buf1);
|
||||
char *FixReplacementVars(char *str, int str_size, itemRecord * song);
|
||||
|
||||
#endif
|
||||
39
Src/Plugins/Library/ml_transcode/version.rc2
Normal file
39
Src/Plugins/Library/ml_transcode/version.rc2
Normal file
@ -0,0 +1,39 @@
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
#include "../../../Winamp/buildType.h"
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 2,79,0,0
|
||||
PRODUCTVERSION WINAMP_PRODUCTVER
|
||||
FILEFLAGSMASK 0x17L
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x4L
|
||||
FILETYPE 0x2L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Winamp SA"
|
||||
VALUE "FileDescription", "Winamp Media Library Plug-in"
|
||||
VALUE "FileVersion", "2,79,0,0"
|
||||
VALUE "InternalName", "Nullsoft Format Convertor"
|
||||
VALUE "LegalCopyright", "Copyright <20> 2006-2023 Winamp SA"
|
||||
VALUE "LegalTrademarks", "Nullsoft and Winamp are trademarks of Winamp SA"
|
||||
VALUE "OriginalFilename", "ml_transcode.dll"
|
||||
VALUE "ProductName", "Winamp"
|
||||
VALUE "ProductVersion", STR_WINAMP_PRODUCTVER
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1200
|
||||
END
|
||||
END
|
||||
Reference in New Issue
Block a user