vttdemux: created win32 project

Change-Id: I2a1ce12bc374f7493c50021cbe4fc4a4716a6829
This commit is contained in:
Matthew Heaney 2014-02-28 12:33:58 -08:00
parent 7952ce8f78
commit 17cf7cc519
4 changed files with 136 additions and 2 deletions

View File

@ -7,6 +7,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libwebm", "libwebm_2010.vcx
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sample_muxer", "sample_muxer_2010.vcxproj", "{B407561F-1F5E-4798-B9C2-81AB09CFBC16}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vttdemux", "vttdemux_2010.vcxproj", "{42D98020-CC3D-468E-B0A2-9E0B565FD758}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug DLL|Win32 = Debug DLL|Win32
@ -39,6 +41,14 @@ Global
{B407561F-1F5E-4798-B9C2-81AB09CFBC16}.Release DLL|Win32.Build.0 = Release DLL|Win32
{B407561F-1F5E-4798-B9C2-81AB09CFBC16}.Release|Win32.ActiveCfg = Release|Win32
{B407561F-1F5E-4798-B9C2-81AB09CFBC16}.Release|Win32.Build.0 = Release|Win32
{42D98020-CC3D-468E-B0A2-9E0B565FD758}.Debug DLL|Win32.ActiveCfg = Debug|Win32
{42D98020-CC3D-468E-B0A2-9E0B565FD758}.Debug DLL|Win32.Build.0 = Debug|Win32
{42D98020-CC3D-468E-B0A2-9E0B565FD758}.Debug|Win32.ActiveCfg = Debug|Win32
{42D98020-CC3D-468E-B0A2-9E0B565FD758}.Debug|Win32.Build.0 = Debug|Win32
{42D98020-CC3D-468E-B0A2-9E0B565FD758}.Release DLL|Win32.ActiveCfg = Release|Win32
{42D98020-CC3D-468E-B0A2-9E0B565FD758}.Release DLL|Win32.Build.0 = Release|Win32
{42D98020-CC3D-468E-B0A2-9E0B565FD758}.Release|Win32.ActiveCfg = Release|Win32
{42D98020-CC3D-468E-B0A2-9E0B565FD758}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -551,7 +551,11 @@ bool vttdemux::OpenFiles(metadata_map_t* metadata_map, const char* filename) {
if (exists[type] > 1) {
enum { kLen = 33 };
char str[kLen]; // max 126 tracks, so only 4 chars really needed
#ifndef _MSC_VER
snprintf(str, kLen, "%ld", v.first); // track number
#else
_snprintf_s(str, sizeof(str), kLen, "%ld", v.first); // track number
#endif
name += str;
}
@ -562,9 +566,15 @@ bool vttdemux::OpenFiles(metadata_map_t* metadata_map, const char* filename) {
// We have synthesized the full output filename, so attempt to
// open the WebVTT output file.
#ifndef _MSC_VER
info.file = fopen(name.c_str(), "wb");
const bool success = (info.file != NULL);
#else
const errno_t e = fopen_s(&info.file, name.c_str(), "wb");
const bool success = (e == 0);
#endif
if (info.file == NULL) {
if (!success) {
printf("unable to open output file %s\n", name.c_str());
return false;
}
@ -851,7 +861,7 @@ bool vttdemux::ProcessBlockEntry(
const long long tn = block->GetTrackNumber(); // NOLINT
typedef metadata_map_t::const_iterator iter_t;
const iter_t i = m.find(tn);
const iter_t i = m.find(static_cast<metadata_map_t::key_type>(tn));
if (i == m.end()) // not a metadata track
return true; // nothing else to do

100
vttdemux_2010.vcxproj Normal file
View File

@ -0,0 +1,100 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.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="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{42D98020-CC3D-468E-B0A2-9E0B565FD758}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>vttdemux</RootNamespace>
<ProjectName>vttdemux</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<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>true</LinkIncremental>
<OutDir>$(SolutionDir)..\exe\libwebm_2010\$(ProjectName)\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)..\obj\libwebm_2010\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
<GenerateManifest>false</GenerateManifest>
<TargetName>$(RootNamespace)</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)..\exe\libwebm_2010\$(ProjectName)\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)..\obj\libwebm_2010\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
<TargetName>$(RootNamespace)</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
<MinimalRebuild>false</MinimalRebuild>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="mkvparser.cpp" />
<ClCompile Include="mkvreader.cpp" />
<ClCompile Include="vttdemux.cc" />
<ClCompile Include="webvttparser.cc" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="mkvparser.hpp" />
<ClInclude Include="mkvreader.hpp" />
<ClInclude Include="webvttparser.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClCompile Include="vttdemux.cc" />
<ClCompile Include="mkvparser.cpp" />
<ClCompile Include="webvttparser.cc" />
<ClCompile Include="mkvreader.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="mkvparser.hpp" />
<ClInclude Include="webvttparser.h" />
<ClInclude Include="mkvreader.hpp" />
</ItemGroup>
</Project>