aboutsummaryrefslogtreecommitdiff
path: root/Src/theora
diff options
context:
space:
mode:
Diffstat (limited to 'Src/theora')
-rw-r--r--Src/theora/api.h5
-rw-r--r--Src/theora/main.cpp79
-rw-r--r--Src/theora/mkv_theora_decoder.cpp159
-rw-r--r--Src/theora/mkv_theora_decoder.h48
-rw-r--r--Src/theora/ogg_theora_decoder.cpp29
-rw-r--r--Src/theora/ogg_theora_decoder.h26
-rw-r--r--Src/theora/resource.h14
-rw-r--r--Src/theora/theora.rc76
-rw-r--r--Src/theora/theora.sln44
-rw-r--r--Src/theora/theora.vcxproj269
-rw-r--r--Src/theora/theora.vcxproj.filters44
-rw-r--r--Src/theora/version.rc239
12 files changed, 832 insertions, 0 deletions
diff --git a/Src/theora/api.h b/Src/theora/api.h
new file mode 100644
index 00000000..6555c035
--- /dev/null
+++ b/Src/theora/api.h
@@ -0,0 +1,5 @@
+#pragma once
+
+#include <api/service/api_service.h>
+extern api_service *serviceManager;
+#define WASABI_API_SVC serviceManager
diff --git a/Src/theora/main.cpp b/Src/theora/main.cpp
new file mode 100644
index 00000000..9fb00b65
--- /dev/null
+++ b/Src/theora/main.cpp
@@ -0,0 +1,79 @@
+#define WIN32_LEAN_AND_MEAN
+#include "api.h"
+#include <bfc/platform/export.h>
+#include "../Agave/Component/ifc_wa5component.h"
+#include "../nu/Singleton.h"
+//#include "ogg_theora_decoder.h"
+#include "mkv_theora_decoder.h"
+
+api_service *WASABI_API_SVC=0;
+class TheoraComponent : public ifc_wa5component
+{
+public:
+ void RegisterServices(api_service *service);
+ int RegisterServicesSafeModeOk();
+ void DeregisterServices(api_service *service);
+protected:
+ RECVS_DISPATCH;
+};
+
+template <class api_T>
+void ServiceBuild(api_T *&api_t, GUID factoryGUID_t)
+{
+ if (WASABI_API_SVC)
+ {
+ waServiceFactory *factory = WASABI_API_SVC->service_getServiceByGuid(factoryGUID_t);
+ if (factory)
+ api_t = reinterpret_cast<api_T *>( factory->getInterface() );
+ }
+}
+
+template <class api_T>
+void ServiceRelease(api_T *api_t, GUID factoryGUID_t)
+{
+ if (WASABI_API_SVC && api_t)
+ {
+ waServiceFactory *factory = WASABI_API_SVC->service_getServiceByGuid(factoryGUID_t);
+ if (factory)
+ factory->releaseInterface(api_t);
+ }
+ api_t = NULL;
+}
+
+//OggDecoderFactory ogg_decoder;
+//static SingletonServiceFactory<svc_oggdecoder, OggDecoderFactory> ogg_factory;
+
+MKVDecoder mkv_decoder;
+static SingletonServiceFactory<svc_mkvdecoder, MKVDecoder> mkv_factory;
+
+void TheoraComponent::RegisterServices(api_service *service)
+{
+ WASABI_API_SVC = service;
+ //ogg_factory.Register(WASABI_API_SVC, &ogg_decoder);
+ mkv_factory.Register(WASABI_API_SVC, &mkv_decoder);
+}
+
+int TheoraComponent::RegisterServicesSafeModeOk()
+{
+ return 1;
+}
+
+void TheoraComponent::DeregisterServices(api_service *service)
+{
+ //ogg_factory.Deregister(WASABI_API_SVC);
+ mkv_factory.Deregister(WASABI_API_SVC);
+}
+
+static TheoraComponent component;
+extern "C" DLLEXPORT ifc_wa5component *GetWinamp5SystemComponent()
+{
+ return &component;
+}
+
+#define CBCLASS TheoraComponent
+START_DISPATCH;
+VCB(API_WA5COMPONENT_REGISTERSERVICES, RegisterServices)
+CB(15, RegisterServicesSafeModeOk)
+VCB(API_WA5COMPONENT_DEREEGISTERSERVICES, DeregisterServices)
+END_DISPATCH;
+#undef CBCLASS
diff --git a/Src/theora/mkv_theora_decoder.cpp b/Src/theora/mkv_theora_decoder.cpp
new file mode 100644
index 00000000..b64aa1fc
--- /dev/null
+++ b/Src/theora/mkv_theora_decoder.cpp
@@ -0,0 +1,159 @@
+#include "mkv_theora_decoder.h"
+#include "../nsmkv/Lacing.h"
+#include "../nsmkv/Cluster.h"
+#include <mmsystem.h>
+
+int MKVDecoder::CreateVideoDecoder(const char *codec_id, const nsmkv::TrackEntryData *track_entry_data, const nsmkv::VideoData *video_data, ifc_mkvvideodecoder **decoder)
+{
+ if (!strcmp(codec_id, "V_THEORA"))
+ {
+ MKVTheora *theora = new MKVTheora(video_data);
+ nsmkv::LacingState lacing_state;
+ if (nsmkv::Lacing::GetState(nsmkv::BlockBinary::XIPH_LACING, (const uint8_t *)track_entry_data->codec_private, track_entry_data->codec_private_len, &lacing_state))
+ {
+ const uint8_t *frame;
+ size_t frame_len;
+ uint16_t frame_number=0;
+ while (nsmkv::Lacing::GetFrame(frame_number, (const uint8_t *)track_entry_data->codec_private, track_entry_data->codec_private_len, &frame, &frame_len, &lacing_state))
+ {
+ ogg_packet packet = {const_cast<uint8_t *>(frame), (long)frame_len, (frame_number==0), 0, 0 /*-1?*/, theora->packet_number++};
+ int ret = th_decode_headerin(&theora->info, &theora->comment, &theora->setup, &packet);
+ if (ret < 0)
+ goto bail;
+ frame_number++;
+ }
+ theora->decoder = th_decode_alloc(&theora->info, theora->setup);
+ if (!theora->decoder)
+ goto bail;
+
+ *decoder = theora;
+ return CREATEDECODER_SUCCESS;
+ }
+
+bail:
+ delete theora;
+return CREATEDECODER_FAILURE;
+
+ }
+ else
+ {
+ return CREATEDECODER_NOT_MINE;
+ }
+}
+
+
+#define CBCLASS MKVDecoder
+START_DISPATCH;
+CB(CREATE_VIDEO_DECODER, CreateVideoDecoder)
+END_DISPATCH;
+#undef CBCLASS
+
+MKVTheora::MKVTheora(const nsmkv::VideoData *video_data) : video_data(video_data)
+{
+ th_info_init(&info);
+ memset(&comment, 0, sizeof(comment));
+ setup=0;
+ packet_number=0;
+ frame_ready=false;
+ flushing=false;
+}
+
+int MKVTheora::GetOutputProperties(int *x, int *y, int *color_format, double *aspect_ratio)
+{
+ if (decoder)
+ {
+ th_ycbcr_buffer buffer;
+ if (th_decode_ycbcr_out(decoder, buffer) == 0)
+ {
+ *x = buffer[0].width;
+ *y = buffer[0].height;
+ *aspect_ratio=1.0;
+ *color_format = mmioFOURCC('Y','V','1','2');
+ return MKV_SUCCESS;
+ }
+ }
+ return MKV_FAILURE;
+}
+
+int MKVTheora::DecodeBlock(const void *inputBuffer, size_t inputBufferBytes, uint64_t timestamp)
+{
+ if (decoder)
+ {
+ ogg_packet packet = {(uint8_t *)inputBuffer, (long)inputBufferBytes, 0, 0, 0 -1, packet_number++};
+ if (flushing)
+ {
+ if (th_packet_iskeyframe(&packet))
+ {
+ flushing=false;
+ }
+ else
+ return MKV_FAILURE;
+ }
+
+ if (th_decode_packetin(decoder, &packet, 0) == 0)
+ frame_ready=true;
+ last_timestamp=timestamp;
+ return MKV_SUCCESS;
+ }
+
+ return MKV_FAILURE;
+}
+
+void MKVTheora::Flush()
+{
+ packet_number = 0;
+ flushing=true;
+}
+
+int MKVTheora::GetPicture(void **data, void **decoder_data, uint64_t *timestamp)
+{
+ if (decoder && frame_ready)
+ {
+ th_ycbcr_buffer buffer;
+ if (th_decode_ycbcr_out(decoder, buffer) == 0)
+ {
+ planes.y.baseAddr = buffer[0].data;
+ planes.y.rowBytes = buffer[0].stride;
+ planes.u.baseAddr = buffer[1].data;
+ planes.u.rowBytes = buffer[1].stride;
+ planes.v.baseAddr = buffer[2].data;
+ planes.v.rowBytes = buffer[2].stride;
+ *data = &planes;
+ *decoder_data = 0;
+ *timestamp = last_timestamp;
+ frame_ready = false;
+ return MKV_SUCCESS;
+ }
+ }
+
+ return MKV_FAILURE;
+}
+
+void MKVTheora::FreePicture(void *data, void *decoder_data)
+{
+}
+
+void MKVTheora::HurryUp(int state)
+{
+
+}
+
+void MKVTheora::Close()
+{
+ if (decoder)
+ th_decode_free(decoder);
+ delete this;
+}
+
+#define CBCLASS MKVTheora
+START_DISPATCH;
+CB(GET_OUTPUT_PROPERTIES, GetOutputProperties)
+CB(DECODE_BLOCK, DecodeBlock)
+VCB(FLUSH, Flush)
+CB(GET_PICTURE, GetPicture)
+VCB(FREE_PICTURE, FreePicture)
+VCB(HURRY_UP, HurryUp)
+VCB(CLOSE, Close)
+END_DISPATCH;
+#undef CBCLASS
+
diff --git a/Src/theora/mkv_theora_decoder.h b/Src/theora/mkv_theora_decoder.h
new file mode 100644
index 00000000..db38c630
--- /dev/null
+++ b/Src/theora/mkv_theora_decoder.h
@@ -0,0 +1,48 @@
+#pragma once
+#include "../Plugins/Input/in_mkv/ifc_mkvvideodecoder.h"
+#include "../Plugins/Input/in_mkv/svc_mkvdecoder.h"
+#include <theora/theoradec.h>
+#include "../Winamp/wa_ipc.h" // for YV12_PLANES
+
+// {96E5EC72-FE8A-4e9f-B964-D16DA34D2FC9}
+static const GUID mkv_theora_guid =
+{ 0x96e5ec72, 0xfe8a, 0x4e9f, { 0xb9, 0x64, 0xd1, 0x6d, 0xa3, 0x4d, 0x2f, 0xc9 } };
+
+class MKVDecoder : public svc_mkvdecoder
+{
+public:
+ static const char *getServiceName() { return "Theora MKV Decoder"; }
+ static GUID getServiceGuid() { return mkv_theora_guid; }
+ int CreateVideoDecoder(const char *codec_id, const nsmkv::TrackEntryData *track_entry_data, const nsmkv::VideoData *video_data, ifc_mkvvideodecoder **decoder);
+protected:
+ RECVS_DISPATCH;
+};
+
+
+class MKVTheora : public ifc_mkvvideodecoder
+{
+public:
+ friend class MKVDecoder;
+ MKVTheora(const nsmkv::VideoData *video_data);
+
+ int GetOutputProperties(int *x, int *y, int *color_format, double *aspect_ratio);
+ int DecodeBlock(const void *inputBuffer, size_t inputBufferBytes, uint64_t timestamp);
+ void Flush();
+ int GetPicture(void **data, void **decoder_data, uint64_t *timestamp);
+ void FreePicture(void *data, void *decoder_data);
+ void HurryUp(int state);
+ void Close();
+private:
+ th_info info;
+ th_comment comment;
+ th_setup_info *setup;
+ th_dec_ctx *decoder;
+ ogg_int64_t packet_number;
+ const nsmkv::VideoData *video_data;
+ bool frame_ready;
+ uint64_t last_timestamp;
+ YV12_PLANES planes;
+ bool flushing;
+protected:
+ RECVS_DISPATCH;
+}; \ No newline at end of file
diff --git a/Src/theora/ogg_theora_decoder.cpp b/Src/theora/ogg_theora_decoder.cpp
new file mode 100644
index 00000000..38726bce
--- /dev/null
+++ b/Src/theora/ogg_theora_decoder.cpp
@@ -0,0 +1,29 @@
+#include "ogg_theora_decoder.h"
+#include <string.h>
+
+ifc_oggdecoder *OggDecoderFactory::CreateDecoder(const ogg_packet *packet)
+{
+ if (packet && packet->packet && packet->bytes >= 42)
+ {
+ if (!memcmp(packet->packet + 1, "theora", 6))
+ return new OggTheoraDecoder(packet);
+ }
+ return 0;
+}
+
+#define CBCLASS OggDecoderFactory
+START_DISPATCH;
+CB(DISP_CREATEDECODER, CreateDecoder)
+END_DISPATCH;
+#undef CBCLASS
+
+
+
+OggTheoraDecoder::OggTheoraDecoder(const ogg_packet *packet)
+{
+}
+
+#define CBCLASS OggTheoraDecoder
+START_DISPATCH;
+END_DISPATCH;
+#undef CBCLASS
diff --git a/Src/theora/ogg_theora_decoder.h b/Src/theora/ogg_theora_decoder.h
new file mode 100644
index 00000000..28a5d8af
--- /dev/null
+++ b/Src/theora/ogg_theora_decoder.h
@@ -0,0 +1,26 @@
+#pragma once
+#include "../in_ogg/svc_oggdecoder.h"
+
+// {6018D413-172D-417a-929A-72ADC2B6E387}
+static const GUID ogg_theora_guid =
+{ 0x6018d413, 0x172d, 0x417a, { 0x92, 0x9a, 0x72, 0xad, 0xc2, 0xb6, 0xe3, 0x87 } };
+
+
+class OggDecoderFactory : public svc_oggdecoder
+{
+public:
+ static const char *getServiceName() { return "Ogg Theora Decoder"; }
+ static GUID getServiceGuid() { return ogg_theora_guid; }
+
+ ifc_oggdecoder *CreateDecoder(const ogg_packet *packet);
+protected:
+ RECVS_DISPATCH;
+};
+
+class OggTheoraDecoder : public ifc_oggdecoder
+{
+public:
+ OggTheoraDecoder(const ogg_packet *packet);
+protected:
+ RECVS_DISPATCH;
+}; \ No newline at end of file
diff --git a/Src/theora/resource.h b/Src/theora/resource.h
new file mode 100644
index 00000000..c1110184
--- /dev/null
+++ b/Src/theora/resource.h
@@ -0,0 +1,14 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by theora.rc
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 101
+#define _APS_NEXT_COMMAND_VALUE 40001
+#define _APS_NEXT_CONTROL_VALUE 1001
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
diff --git a/Src/theora/theora.rc b/Src/theora/theora.rc
new file mode 100644
index 00000000..fcff7711
--- /dev/null
+++ b/Src/theora/theora.rc
@@ -0,0 +1,76 @@
+// 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
+
+#endif // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.K.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK
+#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
+
+#endif // English (U.K.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+#include "version.rc2"
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/Src/theora/theora.sln b/Src/theora/theora.sln
new file mode 100644
index 00000000..c9ac18da
--- /dev/null
+++ b/Src/theora/theora.sln
@@ -0,0 +1,44 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.29613.14
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "theora", "theora.vcxproj", "{FB5920DE-501F-4014-8FDC-22637A45A105}"
+ ProjectSection(ProjectDependencies) = postProject
+ {653F3841-3F26-49B9-AFCF-091DB4B67031} = {653F3841-3F26-49B9-AFCF-091DB4B67031}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libtheora_static", "..\libtheora\libtheora_static.vcxproj", "{653F3841-3F26-49B9-AFCF-091DB4B67031}"
+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
+ {FB5920DE-501F-4014-8FDC-22637A45A105}.Debug|Win32.ActiveCfg = Debug|Win32
+ {FB5920DE-501F-4014-8FDC-22637A45A105}.Debug|Win32.Build.0 = Debug|Win32
+ {FB5920DE-501F-4014-8FDC-22637A45A105}.Debug|x64.ActiveCfg = Debug|x64
+ {FB5920DE-501F-4014-8FDC-22637A45A105}.Debug|x64.Build.0 = Debug|x64
+ {FB5920DE-501F-4014-8FDC-22637A45A105}.Release|Win32.ActiveCfg = Release|Win32
+ {FB5920DE-501F-4014-8FDC-22637A45A105}.Release|Win32.Build.0 = Release|Win32
+ {FB5920DE-501F-4014-8FDC-22637A45A105}.Release|x64.ActiveCfg = Release|x64
+ {FB5920DE-501F-4014-8FDC-22637A45A105}.Release|x64.Build.0 = Release|x64
+ {653F3841-3F26-49B9-AFCF-091DB4B67031}.Debug|Win32.ActiveCfg = Debug|Win32
+ {653F3841-3F26-49B9-AFCF-091DB4B67031}.Debug|Win32.Build.0 = Debug|Win32
+ {653F3841-3F26-49B9-AFCF-091DB4B67031}.Debug|x64.ActiveCfg = Debug|x64
+ {653F3841-3F26-49B9-AFCF-091DB4B67031}.Debug|x64.Build.0 = Debug|x64
+ {653F3841-3F26-49B9-AFCF-091DB4B67031}.Release|Win32.ActiveCfg = Release|Win32
+ {653F3841-3F26-49B9-AFCF-091DB4B67031}.Release|Win32.Build.0 = Release|Win32
+ {653F3841-3F26-49B9-AFCF-091DB4B67031}.Release|x64.ActiveCfg = Release|x64
+ {653F3841-3F26-49B9-AFCF-091DB4B67031}.Release|x64.Build.0 = Release|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {532460CE-E2D3-4851-B63B-B1F0A3EE13D3}
+ EndGlobalSection
+EndGlobal
diff --git a/Src/theora/theora.vcxproj b/Src/theora/theora.vcxproj
new file mode 100644
index 00000000..c61c51fd
--- /dev/null
+++ b/Src/theora/theora.vcxproj
@@ -0,0 +1,269 @@
+<?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>{FB5920DE-501F-4014-8FDC-22637A45A105}</ProjectGuid>
+ <RootNamespace>theora</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>
+ <TargetExt>.w5s</TargetExt>
+ <IncludePath>$(IncludePath)</IncludePath>
+ <LibraryPath>$(LibraryPath)</LibraryPath>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <LinkIncremental>false</LinkIncremental>
+ <OutDir>$(PlatformShortName)_$(Configuration)\</OutDir>
+ <IntDir>$(PlatformShortName)_$(Configuration)\</IntDir>
+ <TargetExt>.w5s</TargetExt>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <LinkIncremental>false</LinkIncremental>
+ <OutDir>$(PlatformShortName)_$(Configuration)\</OutDir>
+ <IntDir>$(PlatformShortName)_$(Configuration)\</IntDir>
+ <TargetExt>.w5s</TargetExt>
+ <IncludePath>$(IncludePath)</IncludePath>
+ <LibraryPath>$(LibraryPath)</LibraryPath>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <LinkIncremental>false</LinkIncremental>
+ <OutDir>$(PlatformShortName)_$(Configuration)\</OutDir>
+ <IntDir>$(PlatformShortName)_$(Configuration)\</IntDir>
+ <TargetExt>.w5s</TargetExt>
+ </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;_DEBUG;_WINDOWS;_USRDLL;THEORA_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>false</MinimalRebuild>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Windows</SubSystem>
+ <ImportLibrary>$(ProjectDir)x86_Debug\$(ProjectName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ </Link>
+ <PostBuildEvent>
+ <Command>xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\System\
+xcopy /Y /D $(IntDir)$(TargetName).pdb ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\System\ </Command>
+ <Message>Post build event: 'xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\System\'</Message>
+ </PostBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../Wasabi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN64;_DEBUG;_WINDOWS;_USRDLL;THEORA_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>false</MinimalRebuild>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Windows</SubSystem>
+ <ImportLibrary>$(ProjectDir)x64_Debug\$(ProjectName).lib</ImportLibrary>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ </Link>
+ <PostBuildEvent>
+ <Command>xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\System\
+xcopy /Y /D $(IntDir)$(TargetName).pdb ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\System\ </Command>
+ <Message>Post build event: 'xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\System\'</Message>
+ </PostBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MinSpace</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
+ <AdditionalIncludeDirectories>../Wasabi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;THEORA_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>true</BufferSecurityCheck>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>None</DebugInformationFormat>
+ <DisableSpecificWarnings>4244;4701;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <ImportLibrary>$(ProjectDir)x86_Release\$(ProjectName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ </Link>
+ <PostBuildEvent>
+ <Command>xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\System\ </Command>
+ <Message>Post build event: 'xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\System\'</Message>
+ </PostBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <Optimization>MinSpace</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
+ <AdditionalIncludeDirectories>../Wasabi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN64;NDEBUG;_WINDOWS;_USRDLL;THEORA_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>true</BufferSecurityCheck>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>None</DebugInformationFormat>
+ <DisableSpecificWarnings>4244;4701;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <ImportLibrary>$(ProjectDir)x64_Release\$(ProjectName).lib</ImportLibrary>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ </Link>
+ <PostBuildEvent>
+ <Command>xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\System\ </Command>
+ <Message>Post build event: 'xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\System\'</Message>
+ </PostBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\external_dependencies\openmpt-trunk\build\vs2019win10\ext\openmpt-ogg.vcxproj">
+ <Project>{d8d5e11c-f959-49ef-b741-b3f6de52ded8}</Project>
+ </ProjectReference>
+ <ProjectReference Include="..\Wasabi\Wasabi.vcxproj">
+ <Project>{3e0bfa8a-b86a-42e9-a33f-ec294f823f7f}</Project>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\nsmkv\Lacing.cpp" />
+ <ClCompile Include="..\nsmkv\vint.cpp" />
+ <ClCompile Include="main.cpp" />
+ <ClCompile Include="mkv_theora_decoder.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="api.h" />
+ <ClInclude Include="mkv_theora_decoder.h" />
+ <ClInclude Include="resource.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="theora.rc" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/Src/theora/theora.vcxproj.filters b/Src/theora/theora.vcxproj.filters
new file mode 100644
index 00000000..8c7ddf56
--- /dev/null
+++ b/Src/theora/theora.vcxproj.filters
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <ClCompile Include="..\nsmkv\Lacing.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="main.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="mkv_theora_decoder.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\nsmkv\vint.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="api.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="mkv_theora_decoder.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="resource.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{2b9d0fcd-e6c6-4408-8874-36f34b9416ad}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{f124a1f4-94a0-48bd-b649-10a2c5a75189}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Ressource Files">
+ <UniqueIdentifier>{fd10c24a-e334-4522-af81-0f7efb5f1481}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="theora.rc">
+ <Filter>Ressource Files</Filter>
+ </ResourceCompile>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/Src/theora/version.rc2 b/Src/theora/version.rc2
new file mode 100644
index 00000000..747498e4
--- /dev/null
+++ b/Src/theora/version.rc2
@@ -0,0 +1,39 @@
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+#include "../Winamp/buildType.h"
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION WINAMP_PRODUCTVER
+ 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 5.x System Component"
+ VALUE "FileVersion", STR_WINAMP_PRODUCTVER
+ VALUE "InternalName", "theora.w5s"
+ VALUE "LegalCopyright", "Copyright © 2005-2023 Winamp SA"
+ VALUE "LegalTrademarks", "Nullsoft and Winamp are trademarks of Winamp SA"
+ VALUE "OriginalFilename", "theora.w5s"
+ VALUE "ProductName", "Winamp Theora Decoder Service"
+ VALUE "ProductVersion", STR_WINAMP_PRODUCTVER
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1200
+ END
+END